/* ============================================================
   STELLAN — "Coastal Editorial" (white)
   Layers a reference-informed treatment over option-a's base.
   Inspiration: jkate-designs.com (white ground, cool slate type,
   letterspaced serif heads bracketed by hairline rules, solid caps
   buttons) and foundry-house.com (serif caps mixed with italic
   accent words, letterspaced small-caps support lines).
   Brand stays Mrs Eaves + the X; only the styling evolves.
   Loads AFTER option-a/css/styles.css.
   ============================================================ */

:root {
  /* Cool slate ink on a true-white ground — the opposite of tan. */
  --ink:        #25292b;
  --ink-soft:   #4d5356;
  --ink-faint:  #8b9094;
  --paper:      #ffffff;
  --paper-warm: #f1f3f3;   /* section bands read as cool stone */
  --line:       #e2e4e4;   /* hairlines, JKate-thin */
}

/* Whisper of grain only; the page should read clean white. */
body {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.018'/%3E%3C/svg%3E");
}

/* ---- Nav: letterspaced caps, JKate-clean ---- */
.brand { letter-spacing: 0.46em; padding-left: 0.46em; }
.nav-links a { font-size: 0.72rem; letter-spacing: 0.22em; color: var(--ink-soft); }
.nav.is-stuck { background: rgba(255,255,255,0.9); box-shadow: 0 1px 0 var(--line); }

/* ---- Signature: hairline-bracketed letterspaced caps + the X ----
   This is the JKate "rule through the headline" move, made STELLAN's
   by seating the X in the center of the rule. Use above section heads. */
.rule-head {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0 auto clamp(1.6rem, 3vw, 2.4rem);
  max-width: 60rem;
}
.rule-head::before,
.rule-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.rule-head .label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}
.rule-head .x-mark { width: 20px; height: 20px; color: var(--ink-faint); flex: 0 0 auto; }
.rule-head .x-mark + .label { margin-left: -0.6rem; }

/* Centered editorial heading cluster (hero + section openers). */
.center-head { text-align: center; max-width: 54rem; margin-inline: auto; }
.center-head h2 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
.center-head .sub {
  margin: 1.2rem auto 0;
  max-width: 46ch;
  color: var(--ink-soft);
}

/* Letterspaced small-caps support line (Foundry "DEEPLY COMMITTED..."). */
.caps-support {
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  line-height: 2.1;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---- Solid caps button (JKate "ABOUT JEN", Foundry "OUR STORY") ---- */
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  padding: 1.05rem 2.5rem;
  border: 1px solid var(--ink);
  transition: background 0.45s ease, color 0.45s ease;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn--light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--light:hover { background: transparent; color: var(--paper); }

/* Hero: a touch more editorial. Italic accents already in markup;
   give the meta row the Foundry caps-support voice. */
.hero-meta { letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.7rem; color: var(--ink-faint); }
.hero-cta-row { margin-top: 2.6rem; }

/* Cool the photography slightly (less warm contrast). */
.hero-figure img,
.category-media img,
.product-media img { filter: grayscale(0.22) contrast(1.0); }

/* Design teaser: keep the solid-button language on the dark plate. */
.design-teaser .btn { margin-top: 1.8rem; }

/* ---- Footer: cool near-black ---- */
.footer { background: #15181a; }
.footer .brand-block p,
.footer .hours-line { color: rgba(255,255,255,0.55); }
.footer address,
.footer address a,
.footer-social a { color: rgba(255,255,255,0.82); }
.footer address a:hover,
.footer-social a:hover,
.footer .brand-block .brand { color: #ffffff; }
.footer h4 { color: rgba(255,255,255,0.5); }
.footer .big-x { color: rgba(255,255,255,0.4); }
.footer-bottom { border-top-color: rgba(255,255,255,0.14); color: rgba(255,255,255,0.45); }

/* Rule-head responsive: let the rules shrink, keep label centered. */
@media (max-width: 540px) {
  .rule-head { gap: 1rem; }
  .rule-head .label { letter-spacing: 0.24em; font-size: 0.68rem; }
}

/* ============================================================
   Interactive: "The Materials" — swatch explorer + magnifier loupe
   Lets visitors swap materials and move across the cloth to see the
   weave/grain up close. Vanilla JS (see inline module). Loupe is
   mouse-only; swatches are keyboard-operable buttons.
   ============================================================ */
.materials-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.mat-stage {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-warm);
  cursor: crosshair;
}
.mat-stage img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.12) contrast(1.0);
  transition: opacity 0.5s ease;
}
.mat-hint {
  position: absolute; left: 1rem; bottom: 1rem; z-index: 3;
  font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: #fff; background: rgba(20,22,24,0.42);
  padding: 0.45rem 0.8rem; backdrop-filter: blur(4px);
  pointer-events: none; transition: opacity 0.4s ease;
}
.mat-stage.is-zooming .mat-hint { opacity: 0; }
.mat-loupe {
  position: absolute; width: 176px; height: 176px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow: 0 14px 36px -8px rgba(0,0,0,0.45), inset 0 0 0 7px rgba(255,255,255,0.12);
  background-repeat: no-repeat; pointer-events: none;
  opacity: 0; transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.22s ease, transform 0.22s ease; z-index: 4;
}
.mat-loupe.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.mat-swatches { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1.9rem; }
.mat-swatch {
  width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid var(--line); padding: 0; cursor: pointer;
  overflow: hidden; background: var(--paper-warm); position: relative;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.mat-swatch img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mat-swatch[aria-pressed="true"] {
  transform: scale(1.09);
  box-shadow: 0 0 0 1px var(--ink), 0 10px 20px -12px rgba(0,0,0,0.55);
}
.mat-swatch:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ink); }

.mat-detail .mat-name { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0; }
.mat-detail .mat-meta { font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); margin: 0.5rem 0 0.9rem; }
.mat-detail .mat-note { color: var(--ink-soft); max-width: 36ch; min-height: 4.2em; }
.mat-counter { margin-top: 1.6rem; font-size: 0.68rem; letter-spacing: 0.24em; color: var(--ink-faint); }

@media (max-width: 820px) {
  .materials-grid { grid-template-columns: 1fr; gap: 2rem; }
  .mat-stage { cursor: default; }
  .mat-loupe { display: none; }       /* no hover loupe on touch */
  .mat-detail .mat-note { min-height: 0; }
}

/* ============================================================
   Interactive: cursor-spotlight reveal — a soft circle that
   follows the cursor and reveals a texture macro through the
   styled image. CSS radial-gradient mask (no canvas), eased in JS.
   Mouse follows the cursor; touch auto-drifts; reduced-motion
   parks a single soft reveal. STELLAN-light, not the dark example.
   ============================================================ */
.reveal-section .reveal-stage {
  position: relative;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--paper-warm);
  cursor: crosshair;
}
.reveal-base, .reveal-top { position: absolute; inset: 0; width: 100%; height: 100%; }
.reveal-base { object-fit: cover; filter: grayscale(0.14) contrast(1.0); }
.reveal-top {
  background-size: cover;
  background-position: center;
  -webkit-mask-image: radial-gradient(circle var(--r, 210px) at var(--mx, -999px) var(--my, -999px),
                       #000 34%, rgba(0,0,0,0.5) 66%, transparent 100%);
          mask-image: radial-gradient(circle var(--r, 210px) at var(--mx, -999px) var(--my, -999px),
                       #000 34%, rgba(0,0,0,0.5) 66%, transparent 100%);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.reveal-hint {
  position: absolute; left: 1rem; bottom: 1rem; z-index: 4;
  font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: #fff;
  background: rgba(20,22,24,0.42); padding: 0.45rem 0.8rem; backdrop-filter: blur(4px);
  pointer-events: none; transition: opacity 0.4s ease;
}
.reveal-stage.on .reveal-hint { opacity: 0; }
.reveal-tag {
  position: absolute; right: 1rem; top: 1rem; z-index: 4;
  font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-soft); background: rgba(255,255,255,0.78);
  padding: 0.4rem 0.7rem; backdrop-filter: blur(4px); pointer-events: none;
}
@media (max-width: 700px) {
  .reveal-section .reveal-stage { aspect-ratio: 4 / 5; cursor: default; }
  .reveal-hint { content: ""; }
}

/* ============================================================
   Interior pages (Design Services, Locations, About, etc.)
   Reuses the homepage system; adds a few page-level patterns.
   ============================================================ */
.page-hero { padding: clamp(7rem, 12vw, 10rem) var(--edge) clamp(3rem, 6vw, 5rem); }
.page-hero .center-head { max-width: 56rem; }
.page-hero h1 {
  font-family: var(--font-display); font-weight: 400; line-height: 1.04;
  font-size: clamp(2.6rem, 6vw, 5rem); letter-spacing: -0.01em; margin: 0;
}
.page-hero h1 em { font-style: italic; }
.page-hero .lede { margin: 1.6rem auto 0; max-width: 44ch; color: var(--ink-soft); font-size: 1.12rem; }
.page-hero .cta-row { margin-top: 2.4rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.breadcrumb { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 1.4rem; }
.breadcrumb a { color: var(--ink-faint); }
.breadcrumb a:hover { color: var(--ink); }

/* Full-bleed band image under the page hero. */
.band-figure { aspect-ratio: 21 / 9; overflow: hidden; background: var(--paper-warm); }
.band-figure img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.18) contrast(1.0); }

/* Two-column prose block. */
.prose-split { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.prose-split h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.1; }
.prose-split p { color: var(--ink-soft); }
.prose-split p + p { margin-top: 1.1rem; }

/* Process steps. */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3rem); margin-top: clamp(2.5rem, 5vw, 4rem); }
.step { border-top: 1px solid var(--line); padding-top: 1.4rem; }
.step .n { font-family: var(--font-display); font-style: italic; font-size: 1.4rem; color: var(--ink-faint); }
.step h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; margin: 0.5rem 0 0.7rem; }
.step p { color: var(--ink-soft); font-size: 0.98rem; }

/* Services list. */
.svc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: clamp(2rem, 4vw, 3rem); }
.svc { border-top: 1px solid var(--line); padding: 1.5rem 0; display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: baseline; }
.svc .x-mark { width: 16px; height: 16px; color: var(--ink-faint); }
.svc h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; margin: 0 0 0.3rem; }
.svc p { color: var(--ink-soft); font-size: 0.96rem; max-width: 40ch; }

/* Portfolio / gallery grid. */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(0.8rem, 2vw, 1.4rem); }
.work-grid figure { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-warm); }
.work-grid img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.14); transition: transform 1.1s cubic-bezier(0.2,0.7,0.2,1); }
.work-grid figure:hover img { transform: scale(1.05); }

/* FAQ accordion. */
.faq { max-width: 50rem; margin-inline: auto; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.4rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-family: var(--font-display); font-size: clamp(1.15rem, 2vw, 1.4rem);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { position: relative; width: 16px; height: 16px; flex: 0 0 auto; }
.faq summary .plus::before, .faq summary .plus::after { content: ""; position: absolute; background: var(--ink); transition: transform 0.35s ease; }
.faq summary .plus::before { left: 0; right: 0; top: 7.5px; height: 1px; }
.faq summary .plus::after { top: 0; bottom: 0; left: 7.5px; width: 1px; }
.faq details[open] summary .plus::after { transform: scaleY(0); }
.faq details p { color: var(--ink-soft); padding: 0 0 1.5rem; max-width: 60ch; }

/* Dark CTA band. */
.cta-band { background: var(--ink); color: var(--paper); text-align: center; padding: clamp(4rem, 9vw, 7rem) var(--edge); }
.cta-band h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 4.5vw, 3.4rem); }
.cta-band p { color: rgba(255,255,255,0.7); max-width: 44ch; margin: 1.1rem auto 0; }
.cta-band .cta-row { margin-top: 2.2rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.cta-band .rule-head .label { color: rgba(255,255,255,0.6); }
.cta-band .rule-head::before, .cta-band .rule-head::after { background: rgba(255,255,255,0.2); }
.cta-band .rule-head .x-mark { color: rgba(255,255,255,0.5); }

@media (max-width: 820px) {
  .prose-split { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .svc-list { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr 1fr; }
}
