/* ================================================================
   EQ MARKETING — Homepage sections (Desert Light)
   Loads after css/interior.css (the design system).
   ================================================================ */

/* ----------------------------------------------------------------
   HERO — split editorial: type on plaster, arched photograph beside it
   ---------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--paper);
  padding: 10.5rem 0 6rem;
}
/* Low desert sun, sitting behind the arch */
.hero__sun {
  position: absolute; top: -18vh; right: -6vw;
  width: 62vw; height: 62vw; max-width: 900px; max-height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
    rgba(217, 196, 169, 0.55) 0%,
    rgba(217, 196, 169, 0.22) 42%,
    rgba(217, 196, 169, 0) 68%);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid; grid-template-columns: 1.02fr 0.98fr;
  gap: 5rem; align-items: center;
}
.hero__kicker {
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--clay-deep); margin-bottom: 1.5rem;
}
.hero h1 {
  font-family: var(--f-display);
  font-size: clamp(2.9rem, 5.6vw, 5rem);
  font-weight: 500; line-height: 1.02;
  letter-spacing: -0.022em; color: var(--ink);
  margin-bottom: 1.6rem;
  font-variation-settings: 'SOFT' 28, 'WONK' 1, 'opsz' 144;
}
.hero h1 em { font-style: italic; color: var(--clay-deep); }
/* Masked line reveal */
.hero .lr { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero .lr__in { display: block; }
.hero__sub {
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.78; color: var(--gray);
  max-width: 44ch; margin-bottom: 2.4rem;
}
.hero__actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* Arched photograph with an offset outline behind it */
.hero__media { position: relative; }
.hero__frame {
  position: absolute; inset: -1.6rem -1.6rem 1.6rem 1.6rem;
  border: 1px solid var(--sand);
  border-radius: var(--arch);
  pointer-events: none;
}
.hero__photo {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--arch);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }

@media (prefers-reduced-motion: no-preference) {
  .hero .lr__in {
    transform: translateY(112%);
    animation: heroLine 1s var(--ease-expo) forwards;
  }
  .hero .lr:nth-child(2) .lr__in { animation-delay: 0.09s; }
  .hero__kicker, .hero__sub, .hero__actions {
    opacity: 0; transform: translateY(24px);
    animation: heroRise 0.9s var(--ease-expo) forwards;
  }
  .hero__sub     { animation-delay: 0.26s; }
  .hero__actions { animation-delay: 0.36s; }
  .hero__media {
    opacity: 0; transform: translateY(30px);
    animation: heroRise 1.1s var(--ease-expo) 0.16s forwards;
  }
  @keyframes heroLine { to { transform: none; } }
  @keyframes heroRise { to { opacity: 1; transform: none; } }
}

/* ----------------------------------------------------------------
   LINE WALL — five logo tiles on sand
   ---------------------------------------------------------------- */
.linewall {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 3.5rem 0;
}
.linewall__note {
  text-align: center; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 2.2rem;
}
.linewall__grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 0.9rem;
}
.linewall__grid .plate { height: 104px; padding: 1.2rem 1.1rem; }
.linewall__grid a.plate:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: var(--sand);
}

/* ----------------------------------------------------------------
   STATS BAND — oversized serif numerals
   ---------------------------------------------------------------- */
.stats { padding: 6.5rem 0; background: var(--paper); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats__item { padding: 0.4rem 2.4rem; }
.stats__item + .stats__item { border-left: 1px solid var(--line); }
.stats__item:first-child { padding-left: 0; }
.stats__num {
  font-family: var(--f-display);
  font-size: clamp(3.2rem, 5.4vw, 5rem);
  font-weight: 400; letter-spacing: -0.03em;
  line-height: 1; color: var(--clay);
  font-variation-settings: 'SOFT' 40, 'WONK' 1, 'opsz' 144;
  font-variant-numeric: lining-nums;
}
.stats__label {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint); margin-top: 0.9rem;
}

/* ----------------------------------------------------------------
   LINES GALLERY — 1 featured + 4 arched cards
   ---------------------------------------------------------------- */
.lines { background: var(--paper); padding: 2rem 0 6.5rem; }
.lines__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap; margin-bottom: 3rem;
}
.lines__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 3rem 1.5rem;
}
.line-card { display: block; grid-column: span 1; }
.line-card--featured { grid-column: 1 / -1; }
.line-card__media {
  position: relative; overflow: hidden;
  border-radius: var(--arch);
  aspect-ratio: 3 / 4; background: var(--paper-2);
  box-shadow: var(--shadow-sm);
}
.line-card--featured .line-card__media {
  aspect-ratio: 21 / 9;
  border-radius: var(--arch-soft);
}
.line-card__media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-expo);
}
.line-card:hover .line-card__media img { transform: scale(1.045); }
.line-card__meta {
  display: flex; flex-direction: column-reverse; gap: 0.3rem;
  margin-top: 1.3rem;
  padding-bottom: 0.7rem; border-bottom: 1px solid var(--line);
}
/* The narrow cards stack (column-reverse puts the tier above the name, since
   the name comes first in the DOM). The featured card is wide enough to keep
   them on one line — plain `row` so the name stays left and the tier right. */
.line-card--featured .line-card__meta {
  flex-direction: row; align-items: baseline;
  justify-content: space-between; gap: 1rem;
}
.line-card__name {
  font-family: var(--f-display);
  font-size: 1.28rem; font-weight: 500; letter-spacing: -0.012em;
  color: var(--ink); transition: color 0.2s;
  font-variation-settings: 'SOFT' 28, 'WONK' 1;
}
.line-card__name::after {
  content: '→'; display: inline-block; margin-left: 0.5rem;
  color: var(--clay);
  opacity: 0; transform: translateX(-8px);
  transition: opacity 0.25s, transform 0.3s var(--ease-expo);
}
.line-card:hover .line-card__name { color: var(--clay-deep); }
.line-card:hover .line-card__name::after { opacity: 1; transform: none; }
.line-card--featured .line-card__name { font-size: 1.9rem; }
.line-card__tier {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--faint); white-space: nowrap;
}
.line-card__desc {
  font-size: 0.93rem; line-height: 1.7; color: var(--gray);
  margin-top: 0.9rem; max-width: 56ch;
}

/* ----------------------------------------------------------------
   HOW WE WORK — pinned horizontal walk of chapter cards
   (GSAP scrub on desktop, vertical stack on mobile / reduced motion)
   ---------------------------------------------------------------- */
.how-pan {
  position: relative; overflow: hidden;
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.how-pan__track { display: flex; height: 100dvh; align-items: center; }
.how-panel { flex: none; position: relative; }
.how-panel--intro {
  width: 40vw;
  padding: 0 4vw 0 calc(max((100vw - 1240px) / 2, 4vw));
}
.how-panel--intro .sec-headline { margin-bottom: 1.4rem; }
.how-panel--step { width: 30vw; padding: 0 1.1rem; }
.how-panel__img {
  border-radius: var(--arch); overflow: hidden;
  aspect-ratio: 4 / 5; box-shadow: var(--shadow-sm);
}
.how-panel__img img { width: 100%; height: 100%; object-fit: cover; }
.how-panel__body { padding-top: 1.6rem; }
.how-panel__step-no {
  font-family: var(--f-display);
  font-size: 1.9rem; font-weight: 400; font-style: italic;
  color: var(--clay); line-height: 1; margin-bottom: 0.6rem;
}
.how-panel__body h3 {
  font-family: var(--f-display);
  font-size: clamp(1.3rem, 1.9vw, 1.7rem);
  font-weight: 500; letter-spacing: -0.012em;
  color: var(--ink); margin-bottom: 0.6rem;
  font-variation-settings: 'SOFT' 28, 'WONK' 1;
}
.how-panel__body p {
  font-size: 0.93rem; line-height: 1.72; color: var(--gray);
  max-width: 40ch;
}

@media (max-width: 899px), (prefers-reduced-motion: reduce) {
  .how-pan__track { flex-direction: column; height: auto; align-items: stretch; }
  .how-panel--intro { width: 100%; padding: 4.5rem 6vw 2rem; }
  .how-panel--step { width: 100%; padding: 2rem 6vw; }
  .how-panel--step:last-child { padding-bottom: 4.5rem; }
  .how-panel__img { aspect-ratio: 16 / 11; }
}

/* ----------------------------------------------------------------
   TERRITORY — map plate on plaster
   ---------------------------------------------------------------- */
.territory { background: var(--paper); padding: 6.5rem 0; }
.territory__grid {
  display: grid; grid-template-columns: 1.12fr 1fr;
  gap: 5rem; align-items: center;
}
.territory__map {
  border-radius: var(--r);
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.territory__map img { width: 100%; height: auto; }
.territory__states {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.6rem;
  margin-top: 1.9rem;
}
.territory__state {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-2);
  border: 1px solid var(--line-2); border-radius: 999px;
  padding: 0.4rem 0.95rem;
}
.territory__cta { margin-top: 2.25rem; }

/* ----------------------------------------------------------------
   SERVICES — list rows with arched thumbnails
   ---------------------------------------------------------------- */
.services { background: var(--paper-2); padding: 6.5rem 0; border-top: 1px solid var(--line); }
.services__head { max-width: 640px; margin-bottom: 2.5rem; }
.svc-row {
  display: grid; grid-template-columns: 1fr 300px;
  gap: 3rem; align-items: center;
  padding: 2.4rem 0;
  border-top: 1px solid var(--line);
}
.svc-row:last-of-type { border-bottom: 1px solid var(--line); }
.svc-row h3 {
  font-family: var(--f-display);
  font-size: clamp(1.4rem, 2.2vw, 1.85rem); font-weight: 500;
  letter-spacing: -0.014em; color: var(--ink);
  margin-bottom: 0.6rem;
  font-variation-settings: 'SOFT' 28, 'WONK' 1;
}
.svc-row p { font-size: 0.96rem; line-height: 1.75; color: var(--gray); max-width: 54ch; }
.svc-row__img {
  overflow: hidden; border-radius: var(--arch-soft);
  aspect-ratio: 16 / 11;
}
.svc-row__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease-expo);
}
.svc-row:hover .svc-row__img img { transform: scale(1.04); }
.services__more { margin-top: 2.25rem; }

/* ----------------------------------------------------------------
   FINAL CTA — photograph under a warm mesquite wash
   ---------------------------------------------------------------- */
.final-cta {
  position: relative; overflow: hidden;
  padding: 10rem 0;
}
.final-cta__bg {
  position: absolute; inset: -12% 0;
  background-size: cover; background-position: center;
}
.final-cta__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(96deg, rgba(43,33,27,0.95) 18%, rgba(43,33,27,0.62) 58%, rgba(43,33,27,0.30) 100%),
    radial-gradient(90% 120% at 8% 50%, rgba(150,67,31,0.42), transparent 60%);
}
.final-cta__content { position: relative; z-index: 1; max-width: 620px; }
.final-cta__headline {
  font-family: var(--f-display);
  font-size: clamp(2.4rem, 4.6vw, 4rem);
  font-weight: 500; line-height: 1.06;
  letter-spacing: -0.022em; color: var(--night-ink);
  margin-bottom: 1.3rem;
  font-variation-settings: 'SOFT' 28, 'WONK' 1, 'opsz' 144;
}
.final-cta__headline em { font-style: italic; color: var(--sand); }
.final-cta__sub {
  font-size: 1.02rem; line-height: 1.78;
  color: rgba(246,239,229,0.82);
  max-width: 46ch; margin-bottom: 2.25rem;
}

/* ----------------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero { padding: 8.5rem 0 4rem; }
  .hero__grid { grid-template-columns: 1fr; gap: 3.5rem; }
  .hero__media { max-width: 460px; }
  .hero__sub { max-width: 52ch; }
  .linewall__grid { grid-template-columns: repeat(3, 1fr); }
  .linewall__grid .plate { height: 92px; }
  .stats__grid { grid-template-columns: 1fr 1fr; gap: 2.5rem 0; }
  .stats__item:nth-child(3) { border-left: none; padding-left: 0; }
  .lines__grid { grid-template-columns: repeat(2, 1fr); }
  .territory__grid { grid-template-columns: 1fr; gap: 3rem; }
}
@media (max-width: 760px) {
  .linewall__grid { grid-template-columns: repeat(2, 1fr); }
  /* At two columns a tile is ~172px wide, and Covered Bridge's 5:1 wordmark
     would be width-clamped to ~26px while the others sat at 38px. Trimming the
     padding and the target height lands all five within ~1px of each other. */
  .linewall__grid .plate { height: 84px; padding: 1rem 0.75rem; }
  .linewall__grid .plate img { height: 30px; }
}
@media (max-width: 640px) {
  .stats__item { padding: 0.4rem 1.2rem; }
  .lines__grid { grid-template-columns: 1fr; }
  .line-card--featured .line-card__meta { flex-direction: column-reverse; align-items: flex-start; gap: 0.3rem; }
  .svc-row { grid-template-columns: 1fr; gap: 1.5rem; }
  .svc-row__img { order: -1; }
  .final-cta { padding: 6rem 0; }
  .hero__frame { inset: -1rem -1rem 1rem 1rem; }
}
