/* ==========================================================================
   Components: reusable UI pieces
   ========================================================================== */

/* --- Wordmark logo ------------------------------------------------------ */

.kaizen-logo {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-logo);
  font-size: 28px;
  font-weight: 700;
  color: currentColor;
  line-height: 1;
  user-select: none;
  white-space: nowrap;
  /* Lowercase letters sit low in the line box; lift so the x-height is optically centred */
  transform: translateY(-0.09em);
}

.kaizen-logo > span {
  display: inline-block;
  position: relative;
}

/* Crossbar under the "k" */
.kaizen-logo .kz-k::after {
  content: "";
  position: absolute;
  left: 0.068em;
  width: 0.505em;
  bottom: -0.081em;
  height: 0.088em;
  background-color: currentColor;
}

/* Hand-tuned letter spacing for the wordmark */
.kaizen-logo .kz-a   { margin-left: -0.050em; }
.kaizen-logo .kz-i   { margin-left: -0.059em; }
.kaizen-logo .kz-z   { margin-left: -0.018em; }
.kaizen-logo .kz-e   { margin-left: -0.032em; }
.kaizen-logo .kz-n   { margin-left: -0.049em; }
.kaizen-logo .kz-dot { margin-left: -0.105em; }

/* --- Rotating brand tag ------------------------------------------------- */

.brand-rotator {
  margin-left: 1.25rem;
  padding-left: 1.25rem;
  border-left: 1px solid var(--border);
  display: none;
  /* Must start at the top: centring the tall track would push the first item out of view */
  align-items: flex-start;
  height: 20px;
  overflow: hidden;
  /* Same size and spacing as the menu links, in the dimmer tag colour */
  font-size: var(--nav-font-size);
  letter-spacing: var(--nav-letter-spacing);
  text-transform: uppercase;
  color: var(--text-dim);
}

@media (min-width: 768px) {
  .brand-rotator {
    display: flex;
  }
}

.brand-rotator__track {
  position: relative;
  display: flex;
  flex-direction: column;
  animation: rotate-text 7.5s var(--ease-in-out-quart) infinite;
}

.brand-rotator__item {
  height: 20px;
  line-height: 20px;
  white-space: nowrap;
}

/*
 * The track holds the three tags plus a clone of the first. The last step
 * slides to that clone, then the loop restarts at the real first item, which
 * looks identical, so the cycle never visibly rewinds.
 *
 * This animates `top` rather than `transform` on purpose: a transform
 * animation moves the text onto its own compositor layer, which switches it
 * to softer grayscale antialiasing and makes it look blurry mid-animation.
 * The track is tiny, so the layout cost is negligible.
 */
@keyframes rotate-text {
  0%, 25%  { top: 0; }
  33%, 58% { top: -20px; }
  66%, 91% { top: -40px; }
  100%     { top: -60px; }
}

/* --- Buttons ------------------------------------------------------------ */

.btn-tender {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.65rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: all 0.2s;
}

.btn-tender:hover {
  background-color: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1rem 2rem;
  background-color: var(--text);
  color: var(--bg);
  border-radius: 2px;
  transition: background-color 0.2s, color 0.2s;
}

.btn-cta:hover {
  background-color: rgba(255, 255, 255, 0.85);
}

/* The button version (contact reveal) matches the link version */
button.btn-cta {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.btn-cta__arrow {
  transition: transform 0.25s var(--ease-out-expo);
}

.btn-cta[aria-expanded="true"] .btn-cta__arrow {
  transform: rotate(90deg);
}

/* --- Contact reveal (phone / email shown on click) ----------------------- */

/* Small button; the options sit beside it on wide screens (no extra page height)
   and stack underneath on narrow ones */
.contact-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.contact-cta .btn-cta {
  gap: 0.5rem;
  padding: 0 1rem;
  font-size: 0.68rem;
}

/* Button and options share one height, so opening the options on wide screens
   doesn't make the footer any taller */
.contact-cta .btn-cta,
.contact-option {
  min-height: 2.5rem;
}

.contact-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(100%, 22rem);
}

@media (min-width: 700px) {
  .contact-options {
    flex-direction: row;
    flex-wrap: wrap;
    width: auto;
    gap: 0.5rem;
  }

  /* Beside the button there isn't room for the labels, and "0439 201 701" and an
     email address explain themselves (the links keep an aria-label) */
  .contact-option__label {
    display: none;
  }

  /* The options open to the right, so the arrow keeps pointing right */
  .contact-cta .btn-cta[aria-expanded="true"] .btn-cta__arrow {
    transform: none;
  }
}

.contact-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  padding: 0 0.9rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 0.78rem;
  color: var(--text);
  transition: background-color 0.2s, border-color 0.2s;
}

.contact-option:hover {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.35);
}

.contact-option__label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* --- Section tag (small numbered label) --------------------------------- */

.section-tag {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 3rem;
}

.section-tag--tight {
  margin-bottom: 0.5rem;
}

.section-tag--dark {
  color: var(--text-dim);
  margin-bottom: 1rem;
}
