/* =============================================================================
   Elevate Cabinets — shared components
   -----------------------------------------------------------------------------
   Buttons, cards (incl. navy overlay panels), checkmark lists, numbered gold
   step markers, form fields, header, mobile menu, footer.
   Depends on tokens.css + base.css. Load order:
     tokens.css -> base.css -> components.css -> (per-page / section CSS)

   NOTE FOR PAGE AGENTS: if a component variant you need is missing, add a
   scoped class in your own section CSS file instead of editing this sheet,
   unless the variant is genuinely shared across pages.
   ============================================================================= */

/* --- Buttons ----------------------------------------------------------------- */
/* Export pattern: navy solid ("GET A QUOTE") + navy outlined ("VIEW OUR PROJECT").
   Uppercase, letter-spaced labels; both have a light variant for use on navy. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.875rem 1.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: var(--text-small);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast),
    border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
}

.btn--solid {
  background-color: var(--color-navy);
  color: var(--color-text-on-navy);
}

.btn--solid:hover,
.btn--solid:focus-visible {
  background-color: var(--color-navy-hover);
  color: var(--color-text-on-navy);
}

.btn--outline {
  background-color: transparent;
  border-color: var(--color-navy);
  color: var(--color-navy);
}

.btn--outline:hover,
.btn--outline:focus-visible {
  background-color: rgba(36, 65, 133, 0.06);
  color: var(--color-navy-hover);
  border-color: var(--color-navy-hover);
}

/* Variants for use on navy backgrounds (header CTA, navy sections) */
.btn--light-solid {
  background-color: var(--color-white);
  color: var(--color-navy);
}

.btn--light-solid:hover,
.btn--light-solid:focus-visible {
  background-color: var(--color-cream);
  color: var(--color-navy-hover);
}

.btn--light-outline {
  background-color: transparent;
  border-color: var(--color-white);
  color: var(--color-white);
}

.btn--light-outline:hover,
.btn--light-outline:focus-visible {
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--color-white);
  border-color: var(--color-white);
}

/* --- Eyebrow label ------------------------------------------------------------ */
/* Gold label with a short leading rule, e.g. "— Who We Are".
   The exports render these in title case; the pattern spec calls for small
   caps, which is implemented here. Page agents can override letter-spacing
   per section if Figma differs. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
  font-family: var(--font-heading);
  font-size: var(--text-eyebrow);
  font-weight: var(--fw-medium);
  color: var(--color-gold);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
}

.eyebrow::before {
  content: "";
  width: 2.25rem;
  height: 1px;
  background-color: var(--color-gold);
  flex: none;
}

/* Eyebrow on navy backgrounds */
.on-dark .eyebrow,
.eyebrow--on-dark {
  color: var(--color-gold-pale);
}

/* --- Checkmark lists ------------------------------------------------------------ */
/* Gold circled-check items (Services page residential/commercial lists). */
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.check-list li {
  position: relative;
  padding-left: 2rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1.125rem;
  height: 1.125rem;
  background-color: var(--color-gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8 12.5 2.5 2.5L16 9.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8 12.5 2.5 2.5L16 9.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Two-column variant seen in the Services export */
.check-list--cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 40em) {
  .check-list--cols {
    grid-template-columns: 1fr;
  }
}

/* --- Numbered step markers -------------------------------------------------------- */
/* Large pale-gold numerals (01-05 on About, 01-04 on Financing, 01-06 on Home
   "Why Elevate" grid). Sampled: #DDCDAE at large sizes; the compact Home/Financing
   variant uses the stronger gold #BC9C5F. */
.step {
  position: relative;
}

.step__number {
  font-family: var(--font-heading);
  font-size: var(--text-step-number);
  font-weight: var(--fw-semibold);
  line-height: 1;
  color: var(--color-gold-pale);
  margin: 0 0 var(--space-2);
}

.step__title {
  margin-bottom: var(--space-2);
}

.step__body {
  color: var(--color-ink-muted);
  margin-bottom: 0;
}

/* Compact variant (Home "Why Elevate" 01-06 grid, Financing 01-04 path) */
.step--compact .step__number {
  font-size: 1.5rem;
  color: var(--color-gold);
  font-variant-numeric: tabular-nums;
}

.step--compact .step__title {
  font-size: var(--text-h3);
}

/* About page pattern: numeral sits behind/beside an alternating image+copy row */
.step-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(var(--space-5), 4vw, var(--space-7));
  align-items: center;
  padding-block: var(--space-6);
}

.step-row:nth-child(even) .step-row__media {
  order: -1;
}

.step-row__number {
  position: absolute;
  top: -0.15em;
  left: -0.35em;
  z-index: 1;
  font-family: var(--font-heading);
  font-size: var(--text-step-number);
  font-weight: var(--fw-semibold);
  line-height: 1;
  color: var(--color-gold-pale);
  pointer-events: none;
}

@media (max-width: 56.25em) {
  .step-row {
    grid-template-columns: 1fr;
  }

  .step-row:nth-child(even) .step-row__media {
    order: 0;
  }

  .step-row__number {
    position: static;
    margin-bottom: var(--space-2);
  }
}

/* --- Cards ------------------------------------------------------------------------- */
/* 1) .card — plain card on white/cream (Services "Custom Manufacturing" cream cards) */
.card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-5), 3vw, var(--space-6));
  box-shadow: var(--shadow-card);
}

.card--cream {
  background-color: var(--color-cream);
  box-shadow: none;
}

/* 2) .tile-card — image on top, navy panel with title + copy below
      (Home "What We Create" grid: Kitchen Cabinets, Bathroom Vanities, ...). */
.tile-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--color-navy);
}

.tile-card__media {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.tile-card__panel {
  flex: 1;
  padding: var(--space-4) var(--space-5) var(--space-5);
  background-color: var(--color-navy);
  color: var(--color-text-on-navy);
}

.tile-card__panel h3 {
  color: var(--color-text-on-navy);
  font-size: 1.0625rem;
  margin-bottom: var(--space-2);
}

.tile-card__panel p {
  color: var(--color-text-on-navy-muted);
  font-size: var(--text-small);
  margin-bottom: 0;
}

/* 3) .media-card — image with a navy overlay panel pinned to the bottom of the
      image (Home "Where We Work": Residential / Commercial Cabinetry cards). */
.media-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.media-card__media {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 100%;
}

.media-card__panel {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(to top, rgba(27, 51, 105, 0.92), rgba(27, 51, 105, 0.55) 70%, transparent);
  color: var(--color-text-on-navy);
}

.media-card__panel h3 {
  color: var(--color-text-on-navy);
  font-size: 1.0625rem;
  margin-bottom: var(--space-1);
}

.media-card__panel p {
  color: var(--color-text-on-navy-muted);
  font-size: var(--text-small);
  margin-bottom: var(--space-2);
}

.media-card__link {
  color: var(--color-gold-pale);
  font-size: var(--text-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.media-card__link:hover {
  color: var(--color-white);
}

/* --- Forms --------------------------------------------------------------------------- */
/* Export pattern: white fields with gold hairline borders on cream sections.
   Labels sit above the field; required fields are marked with an asterisk. */
.form {
  display: grid;
  gap: var(--space-4);
}

.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

@media (max-width: 40em) {
  .form__row {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field__label {
  font-size: var(--text-small);
  font-weight: var(--fw-medium);
  color: var(--color-navy);
}

.field__required {
  color: var(--color-gold-dark);
}

.field__input,
.field__textarea,
.field__select {
  width: 100%;
  padding: 0.75rem 0.875rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-navy);
  background-color: var(--color-white);
  border: 1px solid var(--color-gold);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.field__textarea {
  min-height: 9rem;
  resize: vertical;
}

.field__input:focus,
.field__textarea:focus,
.field__select:focus {
  outline: none;
  border-color: var(--color-gold-dark);
  box-shadow: var(--focus-ring);
}

.field__input::placeholder,
.field__textarea::placeholder {
  color: var(--color-ink-muted);
}

/* Validation state hooks (Forms agent wires server/client validation) */
.field--error .field__input,
.field--error .field__textarea,
.field--error .field__select {
  border-color: #B3423A;
}

.field__error {
  font-size: var(--text-small);
  color: #B3423A;
}

/* --- Header --------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-navy);
  color: var(--color-text-on-navy);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: var(--header-height);
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  flex: none;
}

/* Logo sized from "Elevate 1.png" (user request 2026-10-13): the export renders
   the brand 83px tall inside a 115px header. Our nav bar keeps its 92px height
   (--header-height; scroll offsets depend on it) — 83px + centering leaves ~4px
   breathing room, so the logo grows to its design size with no bar change. */
.site-header__brand img {
  height: 83px;
  width: auto;
}

@media (max-width: 62em) {
  /* Same-size logo would crowd the hamburger row on phones. */
  .site-header__brand img {
    height: 56px;
  }
}

/* Text fallback for the brand logo (kept as a safety net; the real asset is
   /images/logo-light.png, produced by the asset agent from Logo 1.png) */
.site-header__brand-fallback {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold-pale);
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: clamp(var(--space-4), 2.5vw, var(--space-6));
}

.site-header__link {
  font-family: var(--font-heading);
  font-size: var(--text-small);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-on-navy);
}

.site-header__link:hover {
  color: var(--color-gold-pale);
  text-decoration: none;
}

.site-header__link[aria-current="page"] {
  color: var(--color-gold-pale);
}

.site-header__cta {
  margin-left: var(--space-4);
}

/* --- Mobile menu ------------------------------------------------------------------------ */
/* Accessible slide-down panel. Contract (see wwwroot/js/menu.js):
     [data-menu]            root element; JS toggles data-menu-open="true|false"
     [data-menu-toggle]     hamburger button; JS keeps aria-expanded in sync
     [data-menu-panel]      slide-down panel; hidden until data-menu-open="true"
     Escape closes and returns focus to the toggle; links inside close the menu. */
.site-header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.site-header__toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--color-text-on-navy);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

[data-menu-open="true"] .site-header__toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

[data-menu-open="true"] .site-header__toggle span:nth-child(2) {
  opacity: 0;
}

[data-menu-open="true"] .site-header__toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.site-menu {
  display: none;
  background-color: var(--color-navy);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

[data-menu-open="true"] .site-menu {
  display: block;
}

.site-menu__list {
  list-style: none;
  margin: 0;
  padding: var(--space-4) var(--container-pad) var(--space-6);
}

.site-menu__link {
  display: block;
  padding: var(--space-3) 0;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-on-navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-menu__link[aria-current="page"] {
  color: var(--color-gold-pale);
}

.site-menu__cta {
  margin-top: var(--space-5);
}

@media (max-width: 62em) {
  .site-header__nav {
    display: none;
  }

  .site-header__toggle {
    display: flex;
  }
}

/* --- Footer ------------------------------------------------------------------------------ */
/* Navy footer: brand column + Explore / Services / Visit & Contact, then a
   bottom bar with copyright and social links. */
.site-footer {
  background-color: var(--color-navy);
  color: var(--color-text-on-navy-muted);
  padding-block: var(--space-8) var(--space-5);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1.6fr;
  gap: clamp(var(--space-5), 3vw, var(--space-7));
}

@media (max-width: 62em) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 40em) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

.site-footer__brand img {
  height: 88px;
  width: auto;
  margin-bottom: var(--space-3);
}

.site-footer__heading {
  color: var(--color-text-on-navy);
  font-size: 1.0625rem;
  margin-bottom: var(--space-4);
}

.site-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.site-footer__link {
  color: var(--color-text-on-navy-muted);
  font-size: var(--text-small);
}

.site-footer__link:hover {
  color: var(--color-text-on-navy);
}

.site-footer__contact li {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: var(--text-small);
}

.site-footer__contact a {
  color: var(--color-text-on-navy);
}

.site-footer__contact a:hover {
  color: var(--color-gold-pale);
}

.site-footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-7);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: var(--text-small);
}

.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__social a {
  color: var(--color-text-on-navy-muted);
  font-size: var(--text-small);
}

.site-footer__social a:hover {
  color: var(--color-text-on-navy);
}
