/* Below-fold styles. Critical CSS (variables, reset, nav, hero) is inlined in <style> in index.html for render performance. */

/* ---------------- 02 / Services ---------------- */
.services {
  min-height: 100svh;
  padding: clamp(6rem, 14vh, 10rem) var(--pad-x);
  background: var(--ivory);
}

.service-rows {
  border-bottom: 1px solid var(--line);
}

.service-row {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 3rem);
  align-items: start;
  padding: clamp(1.75rem, 4vh, 2.75rem) 0;
  border-top: 1px solid var(--line);
}

.service-idx {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--sage);
  padding-top: 0.5em;
}

.service-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(1.6rem, 3.5vw, 3rem);
  line-height: 1.1;
  color: var(--charcoal);
}

.service-title-text {
  position: relative;
  display: inline-block;
}

/* Sage underline wipe on hover */
.service-title-text::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.07em;
  height: 0.06em;
  background: var(--rose);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s var(--ease-snap);
}

.service-row:hover .service-title-text::after,
.service-row:focus-within .service-title-text::after {
  transform: scaleX(1);
}

.service-meta {
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--charcoal-55);
}

.service-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--charcoal-75);
  max-width: 46ch;
  padding-top: 0.45em;
}

/* ---------------- 03 / Studio ---------------- */
.studio {
  background: var(--ivory-deep);
}

.studio-media {
  position: relative;
  height: 62svh;
  overflow: hidden;
  will-change: clip-path;
}

.studio-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(0.98);
}

.studio-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(249, 245, 238, 0.45) 0%, rgba(249, 245, 238, 0.05) 30%, rgba(249, 245, 238, 0.65) 100%),
    linear-gradient(90deg, rgba(122, 158, 126, 0.06), transparent 55%);
}

.studio-overlay {
  position: relative;
  padding: 2.75rem var(--pad-x) 4.5rem;
}

.studio-label {
  display: block;
  margin-bottom: 2rem;
}

.ws-note {
  max-width: 26rem;
  margin-bottom: 1.4rem;
  padding: 1.1rem 1.3rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--charcoal-75);
  background: rgba(249, 245, 238, 0.85);
  border-left: 2px solid var(--sage);
}

.ws-note-key {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.28em;
  color: var(--sage-mid);
  margin-bottom: 0.55rem;
}

.studio-title {
  margin-top: 2.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(2.8rem, 8.5vw, 7.5rem);
  line-height: 1.02;
  color: var(--charcoal);
}

@media (min-width: 768px) {
  .studio {
    min-height: 100svh;
  }

  .studio-media {
    position: absolute;
    inset: 0;
    height: 100%;
  }

  .studio-overlay {
    position: absolute;
    inset: 0;
    padding: 0;
  }

  .studio-label {
    position: absolute;
    top: 7%;
    left: var(--pad-x);
    margin: 0;
  }

  .ws-note {
    position: absolute;
    margin: 0;
  }

  .ws-note-1 {
    top: 17%;
    left: var(--pad-x);
  }

  .ws-note-2 {
    top: 36%;
    right: var(--pad-x);
  }

  .ws-note-3 {
    bottom: 11%;
    left: var(--pad-x);
  }

  .studio-title {
    position: absolute;
    right: var(--pad-x);
    bottom: 8%;
    margin: 0;
    text-align: right;
  }
}

/* ---------------- 04 / Philosophy ---------------- */
.philosophy {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(6rem, 14vh, 10rem) var(--pad-x);
  background: var(--ivory);
}

.manifesto-text {
  margin-top: 2.5rem;
  max-width: 1150px;
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(2rem, 5.4vw, 4.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--charcoal);
}

.manifesto-sub {
  margin-top: clamp(2.5rem, 6vh, 4rem);
  margin-left: clamp(0rem, 30vw, 24rem);
  max-width: 46ch;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--charcoal-75);
}

/* ---------------- 05 / Numbers ---------------- */
.numbers {
  min-height: 60svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(6rem, 14vh, 10rem) var(--pad-x);
  background: var(--ivory-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 3vw, 2.5rem);
}

.stat {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

.stat-num-row {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  font-family: var(--font-mono);
}

.stat-num {
  font-size: clamp(2.4rem, 5.5vw, 4.6rem);
  font-weight: 500;
  line-height: 1;
  color: var(--charcoal);
  font-variant-numeric: tabular-nums;
}

.stat-suffix {
  font-size: clamp(1.2rem, 2.5vw, 2.2rem);
  font-weight: 500;
  color: var(--sage);
}

.stat-label {
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--charcoal-55);
}

/* ---------------- 06 / Words (Reviews) ---------------- */
.reviews {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(6rem, 14vh, 10rem) var(--pad-x);
  background: var(--ivory);
}

.reviews > .sec-label {
  margin-bottom: clamp(3rem, 8vh, 5rem);
}

.reviews-inner {
  position: relative;
  max-width: 62rem;
}

.quote + .quote {
  margin-top: 3.5rem;
}

/* Stacked for pinned crossfade — applied by JS on desktop */
.reviews.reviews-pinned .reviews-inner {
  display: grid;
}

.reviews.reviews-pinned .quote {
  grid-area: 1 / 1;
  margin-top: 0;
}

.review-stars {
  color: #7a9e7e;
  font-size: 1rem;
  letter-spacing: 0.1em;
}

.quote-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.35rem, 3vw, 2.4rem);
  font-weight: 400;
  line-height: 1.42;
  color: var(--charcoal);
}

.quote-mark {
  font-family: var(--font-display);
  color: var(--rose);
  margin-right: 0.25rem;
}

.quote-cite {
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  color: var(--charcoal-55);
}

.quote-cite cite {
  font-style: normal;
  color: var(--charcoal);
}

/* ---------------- 07 / Areas ---------------- */
.areas {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(6rem, 14vh, 10rem) var(--pad-x);
  background: var(--ivory-deep);
}

.areas-intro {
  margin-top: 1.25rem;
  max-width: 40ch;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  color: var(--charcoal-75);
  line-height: 1.65;
}

.area-rows {
  border-bottom: 1px solid var(--line);
}

.area-row {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1rem, 2.6vh, 1.9rem) 0;
  border-top: 1px solid var(--line);
}

/* Sage marker bar slides in on hover */
.area-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2rem;
  height: 3px;
  margin-top: -1.5px;
  background: var(--sage);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s var(--ease-snap);
}

.area-row:hover::before {
  transform: scaleX(1);
}

.area-name {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(2rem, 7.5vw, 6.75rem);
  line-height: 1.05;
  color: var(--mid);
  transition: transform 0.5s var(--ease-snap), color 0.4s var(--ease-snap);
}

.area-row:hover .area-name {
  transform: translateX(2.9rem);
  color: var(--charcoal);
}

.area-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  color: var(--charcoal-55);
  white-space: nowrap;
  transition: color 0.4s var(--ease-snap);
}

.area-row:hover .area-meta {
  color: var(--sage-mid);
}

/* ---------------- 08 / Order + footer ---------------- */
.book {
  padding: clamp(7rem, 15vh, 11rem) var(--pad-x) 2.5rem;
  background: var(--charcoal);
  overflow: hidden;
}

/* Botanical bloom bar across the top */
.bloom-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sage) 0%, var(--rose) 50%, var(--sage) 100%);
}

.book-head {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(2.6rem, 8.8vw, 8rem);
  line-height: 1.02;
  color: var(--ivory);
}

.book-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.045em;
}

.book-line-inner {
  display: inline-block;
  will-change: transform;
}

.book-accent {
  color: var(--rose);
}

.book-phone {
  position: relative;
  display: inline-block;
  margin-top: clamp(2rem, 5vh, 3.25rem);
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(1.8rem, 4.5vw, 3.6rem);
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--ivory);
  padding-bottom: 0.18em;
  transition: color 0.35s var(--ease-snap);
}

.book-phone::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--sage);
}

.book-phone:hover,
.book-phone:focus-visible {
  color: var(--sage);
}

.book-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.5rem 2rem;
  margin-top: clamp(5rem, 12vh, 8rem);
  padding-top: 3rem;
  border-top: 1px solid rgba(249, 245, 238, 0.12);
}

.book-col-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--sage);
  margin-bottom: 1rem;
}

.book-col p {
  font-size: 0.94rem;
  line-height: 1.75;
  color: rgba(249, 245, 238, 0.7);
}

.book-col a {
  border-bottom: 1px solid transparent;
  color: rgba(249, 245, 238, 0.7);
  transition: color 0.3s var(--ease-snap), border-color 0.3s var(--ease-snap);
}

.book-col a:hover,
.book-col a:focus-visible {
  color: var(--ivory);
  border-color: var(--rose);
}

.book-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-top: clamp(4rem, 9vh, 6rem);
  padding-top: 1.75rem;
  border-top: 1px solid rgba(249, 245, 238, 0.1);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: rgba(249, 245, 238, 0.3);
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1024px) {
  .book-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 899px) {
  .service-row {
    grid-template-columns: 2.75rem minmax(0, 1fr);
  }

  .service-desc {
    grid-column: 2;
    padding-top: 0;
  }

  .manifesto-sub {
    margin-left: 0;
  }
}

@media (max-width: 767px) {
  .nav-links {
    display: none;
  }

  .hero-idx {
    top: 5.25rem;
  }

  .area-row:hover .area-name {
    transform: translateX(1.6rem);
  }

  .area-row::before {
    width: 1.1rem;
  }
}

@media (max-width: 560px) {
  .stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .book-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .book-foot {
    flex-direction: column;
  }

  .nav-cta {
    font-size: 0.74rem;
    padding: 0.5em 0.85em;
  }

  .nav-brand {
    font-size: 1.05rem;
  }
}

/* ---------------- Reduced motion ---------------- */
/* body.no-motion is added by JS under prefers-reduced-motion */
.no-motion .cue-line {
  display: none;
}

.no-motion .reviews.reviews-pinned .reviews-inner {
  display: block;
}

.no-motion .reviews.reviews-pinned .quote + .quote {
  margin-top: 3.5rem;
}

.no-motion .hero-bg {
  clip-path: circle(75% at 50% 50%) !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .petal-drift {
    animation: none !important;
    opacity: 0;
  }
}
