/* Stack & Stone — shared stylesheet
   Tokens, chrome and components for index.html and support.html.
   Set in Instrument Serif & Geist. */

/* ---------------- Reset & Tokens ---------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --graphite: #2E343C;
  --graphite-soft: #3A4049;
  --bone: #F4EFE6;
  --bone-deep: #ECE5D7;
  --slate: #6E747C;
  --slate-light: #9A9D9F;
  --oxide: #B85C38;
  --bone-veil: rgba(244, 239, 230, 0.78);
  --hairline: rgba(46, 52, 60, 0.14);
  --hairline-strong: rgba(46, 52, 60, 0.28);

  color-scheme: light dark;

  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;

  --max: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bone);
  color: var(--graphite);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* ---------------- Paper-grain overlay ---------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.85;
  mix-blend-mode: multiply;
  background-image: url("grain.png");
  background-size: 1024px 1024px;
  background-repeat: repeat;
}

::selection { background: var(--graphite); color: var(--bone); }

/* ---------------- Type ---------------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--slate);
  font-weight: 500;
}
.serif { font-family: var(--serif); font-weight: 400; }
em, .italic { font-family: var(--serif); font-style: italic; }

a { color: inherit; text-decoration: none; }
a.link {
  border-bottom: 1px solid var(--hairline-strong);
  padding-bottom: 1px;
  transition: border-color 200ms ease, color 200ms ease;
}
a.link:hover { border-color: var(--oxide); color: var(--oxide); }

/* ---------------- Layout ---------------- */
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------------- Top bar ---------------- */
nav.top {
  position: sticky; top: 0; z-index: 100;
  background: var(--bone-veil);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
nav.top .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 18px; padding-bottom: 18px;
}
.mark { display: flex; align-items: center; gap: 12px; }
.mark img { width: 28px; height: 28px; display: block; }
.mark .name {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.005em;
  color: var(--graphite);
}
nav.top ul { list-style: none; display: flex; gap: clamp(18px, 3vw, 36px); }
nav.top a {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--slate); transition: color 180ms ease;
}
nav.top a:hover { color: var(--graphite); }

/* ---------------- Hero ---------------- */
header.hero { padding-top: clamp(60px, 12vh, 140px); padding-bottom: clamp(80px, 14vh, 180px); position: relative; }

.hero-eyebrow {
  display: inline-block;
  margin-bottom: clamp(28px, 4vw, 44px);
  opacity: 0; animation: rise 900ms ease-out 280ms forwards;
}

.hero-headline-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(28px, 4vw, 48px);
  margin-bottom: clamp(28px, 4vw, 44px);
}
@media (min-width: 720px) {
  .hero-headline-row { flex-direction: row; align-items: stretch; }
}

.hero-logo {
  flex-shrink: 0;
  opacity: 0; transform: translateY(12px);
  animation: rise 1100ms cubic-bezier(0.2, 0.7, 0.2, 1) 100ms forwards;
}
.hero-logo img {
  height: clamp(96px, 20vw, 200px);
  width: auto;
  display: block;
}
@media (min-width: 720px) {
  .hero-logo { align-self: stretch; display: flex; }
  .hero-logo img { height: 100%; width: auto; }
}

h1.headline {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(52px, 10vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--graphite);
  flex: 1;
  opacity: 0; animation: rise 1100ms cubic-bezier(0.2, 0.7, 0.2, 1) 360ms forwards;
}
h1.headline em { font-style: italic; color: var(--graphite-soft); }

p.lead {
  max-width: 32ch;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.45;
  color: var(--graphite-soft);
  opacity: 0; animation: rise 1000ms ease-out 540ms forwards;
}

/* Hero meta line */
.hero-meta {
  margin-top: clamp(60px, 9vh, 110px);
  display: flex; justify-content: space-between; align-items: end;
  gap: 24px; flex-wrap: wrap;
  border-top: 1px solid var(--hairline);
  padding-top: 22px;
  opacity: 0; animation: rise 900ms ease-out 720ms forwards;
}
.hero-meta > div { display: flex; flex-direction: column; gap: 6px; }
.hero-meta .val { font-family: var(--serif); font-size: 20px; }

/* ---------------- Section scaffolding ---------------- */
section { padding-top: clamp(80px, 12vh, 160px); padding-bottom: clamp(80px, 12vh, 160px); }
section.tight { padding-top: clamp(60px, 8vh, 100px); padding-bottom: clamp(60px, 8vh, 100px); }
.divider {
  height: 1px; background: var(--hairline);
  margin: 0; border: none;
}
.divider-stipple {
  height: 28px; position: relative; overflow: hidden;
  background-image: url("grain.png");
  background-size: 1024px 1024px;
  opacity: 0.5;
}

.section-head {
  display: grid; grid-template-columns: 1fr; gap: 16px;
  margin-bottom: clamp(40px, 6vw, 80px);
}
@media (min-width: 760px) {
  .section-head { grid-template-columns: 1fr 2fr; gap: clamp(40px, 6vw, 100px); }
}
.section-head h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(36px, 5.5vw, 72px);
  line-height: 0.98; letter-spacing: -0.015em;
  color: var(--graphite);
}
.section-head h2 em { color: var(--graphite-soft); }

/* ---------------- Studio (about) ---------------- */
.studio-body {
  display: grid; grid-template-columns: 1fr; gap: clamp(28px, 4vw, 56px);
  max-width: 100%;
}
@media (min-width: 880px) {
  .studio-body { grid-template-columns: 1fr 2fr; }
}
.studio-body .col-left { color: var(--slate); font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.studio-body p {
  font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.5;
  color: var(--graphite);
  margin-bottom: 1em;
  max-width: 60ch;
}
.studio-body p:last-child { margin-bottom: 0; }
.pull {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.15;
  color: var(--graphite-soft);
  margin: clamp(32px, 5vw, 60px) 0;
  padding-left: clamp(20px, 3vw, 40px);
  border-left: 1px solid var(--hairline-strong);
  max-width: 26ch;
}

/* ---------------- Work ---------------- */
.work-item {
  display: grid; grid-template-columns: 1fr; gap: clamp(28px, 4vw, 64px);
  padding: clamp(40px, 6vw, 72px) 0;
  border-top: 1px solid var(--hairline);
}
.work-item:last-child { border-bottom: 1px solid var(--hairline); }
@media (min-width: 880px) {
  .work-item { grid-template-columns: 1fr 2.4fr; align-items: start; }
}
.work-num {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--slate);
  display: flex; justify-content: space-between; align-items: baseline;
}
.work-num .status { color: var(--oxide); }
.work-body h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 5.5vw, 68px); line-height: 1;
  letter-spacing: -0.015em; margin-bottom: 18px;
}
.work-body .descriptor {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--slate); margin-bottom: 28px;
}
.work-body p {
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.6; max-width: 56ch;
  color: var(--graphite-soft);
  margin-bottom: 1em;
}
.work-body p:last-of-type { margin-bottom: 28px; }
.work-meta {
  display: flex; gap: clamp(24px, 4vw, 48px); flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
}
.work-meta dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--slate); margin-bottom: 4px; }
.work-meta dd { font-family: var(--serif); font-size: 18px; color: var(--graphite); }

/* Future work placeholder */
.work-future {
  display: grid; grid-template-columns: 1fr 2.4fr; gap: clamp(28px, 4vw, 64px);
  padding: clamp(40px, 6vw, 72px) 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  color: var(--slate-light);
}
@media (max-width: 879px) { .work-future { grid-template-columns: 1fr; } }
.work-future h3 {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(32px, 4vw, 48px); line-height: 1;
  color: var(--slate-light);
}
.work-future p { font-size: 16px; line-height: 1.55; color: var(--slate); max-width: 50ch; margin-top: 14px; }


/* ---------------- Principles ---------------- */
section.principles { background: var(--bone-deep); position: relative; }
.principles-grid {
  display: grid; grid-template-columns: 1fr; gap: clamp(20px, 2.5vw, 36px);
}
@media (min-width: 720px) { .principles-grid { grid-template-columns: 1fr 1fr 1fr; } }
.principle {
  padding: clamp(28px, 4vw, 48px);
  background: var(--bone);
  border: 1px solid var(--hairline);
  display: flex; flex-direction: column;
  min-height: 280px;
  position: relative;
}
.principle .num {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.2em; color: var(--slate);
  margin-bottom: 28px;
}
.principle h4 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(32px, 3.5vw, 44px); line-height: 1;
  letter-spacing: -0.01em; margin-bottom: 18px;
}
.principle h4 em { color: var(--graphite-soft); }
.principle p {
  font-size: 16px; line-height: 1.6; color: var(--graphite-soft);
  margin-top: auto; max-width: 38ch;
}

/* ---------------- Contact ---------------- */
section.contact { padding-top: clamp(100px, 14vh, 180px); padding-bottom: clamp(100px, 14vh, 180px); }
.contact-grid {
  display: grid; grid-template-columns: 1fr; gap: clamp(28px, 4vw, 56px);
}
@media (min-width: 760px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 100px); } }
.contact-grid h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 6vw, 84px); line-height: 0.98;
  letter-spacing: -0.015em;
}
.contact-grid h2 em { color: var(--graphite-soft); }
.contact-grid p { font-size: clamp(17px, 1.4vw, 19px); line-height: 1.6; color: var(--graphite-soft); max-width: 42ch; margin-bottom: 24px; }
.contact-email {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--serif); font-size: clamp(24px, 3vw, 36px);
  color: var(--graphite); border-bottom: 1px solid var(--hairline-strong);
  padding-bottom: 6px; transition: color 200ms ease, border-color 200ms ease;
}
.contact-email:hover { color: var(--oxide); border-color: var(--oxide); }
.contact-email .arrow { font-family: var(--sans); font-size: 0.7em; }

/* A support address is a longer word than a greeting; give it its own measure
   so it never runs past the gutter on a narrow phone. */
.contact-email.long {
  font-size: clamp(16px, 2.3vw, 30px);
  letter-spacing: -0.012em;
  max-width: 100%;
}
@media (max-width: 400px) { .contact-email.long { font-size: 15px; gap: 10px; } }

/* ---------------- BloomBook card (scoped: .bb-card) ----------------
   Same shape as the studio's other product card; BloomBook's palette. */
.bb-card {
  --bb-paper:#FAF3DD; --bb-ink:#3A2E25; --bb-soft:#6A574A;
  --bb-muted:#9A8779; --bb-line:rgba(58,46,37,.14); --bb-rose:#B8616E;
  display:block; max-width:460px; text-decoration:none; color:var(--bb-ink);
  background:var(--bb-paper);
  border:1px solid var(--bb-line); border-radius:20px;
  padding:26px 26px 22px;
  font-family:var(--sans);
  transition:transform .2s cubic-bezier(.22,.61,.36,1), box-shadow .2s ease, border-color .2s ease;
}
.bb-card:hover, .bb-card:focus-visible {
  transform:translateY(-2px);
  border-color:rgba(184,97,110,.34);
  box-shadow:0 18px 40px rgba(71,41,30,.10);
}
.bb-card:focus-visible { outline:2.5px solid var(--bb-rose); outline-offset:3px; }
.bb-card * { box-sizing:border-box; }

.bb-top { display:flex; align-items:center; gap:13px; }
.bb-mark { width:42px; height:42px; flex:0 0 auto; display:block; }
.bb-name {
  font-family:var(--serif);
  font-size:1.42rem; line-height:1; letter-spacing:-.015em;
}
.bb-name b { font-style:normal; }
.bb-name i { font-style:italic; }
.bb-kicker {
  display:block; margin-top:6px;
  font-family:var(--mono); font-size:.63rem; letter-spacing:.17em;
  text-transform:uppercase; color:var(--bb-muted); font-weight:500;
}
.bb-lede {
  font-family:var(--serif); font-style:italic;
  font-size:1.12rem; line-height:1.4; color:var(--bb-ink);
  margin:19px 0 0;
}
.bb-body { font-size:.9rem; line-height:1.55; color:var(--bb-soft); margin:10px 0 0; }
.bb-meta {
  display:flex; flex-wrap:wrap; gap:7px;
  margin:17px 0 0; padding:16px 0 0; border-top:1px solid var(--bb-line);
}
.bb-chip {
  font-size:.7rem; letter-spacing:.03em; color:var(--bb-soft);
  border:1px solid var(--bb-line); border-radius:999px; padding:4px 10px;
  white-space:nowrap;
}
.bb-go {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin-top:15px; font-size:.86rem; font-weight:600; color:var(--bb-rose);
}
.bb-go svg { width:15px; height:15px; transition:transform .2s ease; }
.bb-card:hover .bb-go svg { transform:translateX(3px); }

@media (prefers-color-scheme: dark) {
  .bb-card {
    --bb-paper:#241D19; --bb-ink:#F2E5D8; --bb-soft:#B8A695;
    --bb-muted:#8A7A6B; --bb-line:rgba(242,229,216,.14); --bb-rose:#D9A6B3;
  }
  .bb-card:hover, .bb-card:focus-visible { box-shadow:0 18px 40px rgba(0,0,0,.34); }
}
@media (prefers-reduced-motion: reduce) {
  .bb-card, .bb-go svg { transition:none; }
  .bb-card:hover { transform:none; }
}

/* ---------------- Zero Float card (scoped: .zf-card) ----------------
   Same shape as the studio's other product card; Zero Float's palette. */
.zf-card {
  --zf-sheet:#FFFEFA; --zf-ink:#17223B; --zf-soft:#4A5568;
  --zf-muted:#8A93A3; --zf-line:rgba(23,34,59,.14); --zf-red:#D8443A;
  display:block; max-width:460px; text-decoration:none; color:var(--zf-ink);
  background:var(--zf-sheet);
  border:1px solid var(--zf-line); border-radius:20px;
  padding:26px 26px 22px;
  font-family:var(--sans);
  transition:transform .2s cubic-bezier(.22,.61,.36,1), box-shadow .2s ease, border-color .2s ease;
}
.zf-card:hover, .zf-card:focus-visible {
  transform:translateY(-2px);
  border-color:rgba(216,68,58,.34);
  box-shadow:0 18px 40px rgba(23,34,59,.10);
}
.zf-card:focus-visible { outline:2.5px solid var(--zf-red); outline-offset:3px; }
.zf-card * { box-sizing:border-box; }

.zf-top { display:flex; align-items:center; gap:13px; }
.zf-mark { width:42px; height:42px; flex:0 0 auto; display:block; border-radius:9px; }
.zf-name {
  font-family:var(--sans); font-weight:600;
  font-size:1.34rem; line-height:1; letter-spacing:-.012em;
}
.zf-kicker {
  display:block; margin-top:6px;
  font-family:var(--mono); font-size:.63rem; letter-spacing:.17em;
  text-transform:uppercase; color:var(--zf-muted); font-weight:500;
}
.zf-lede {
  font-family:var(--serif); font-style:italic;
  font-size:1.12rem; line-height:1.4; color:var(--zf-ink);
  margin:19px 0 0;
}
.zf-body { font-size:.9rem; line-height:1.55; color:var(--zf-soft); margin:10px 0 0; }
.zf-meta {
  display:flex; flex-wrap:wrap; gap:7px;
  margin:17px 0 0; padding:16px 0 0; border-top:1px solid var(--zf-line);
}
.zf-chip {
  font-size:.7rem; letter-spacing:.03em; color:var(--zf-soft);
  border:1px solid var(--zf-line); border-radius:999px; padding:4px 10px;
  white-space:nowrap;
}
.zf-go {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin-top:15px; font-size:.86rem; font-weight:600; color:var(--zf-red);
}
.zf-go svg { width:15px; height:15px; transition:transform .2s ease; }
.zf-card:hover .zf-go svg { transform:translateX(3px); }

@media (prefers-color-scheme: dark) {
  .zf-card {
    --zf-sheet:#1B2130; --zf-ink:#E9E7E0; --zf-soft:#AEB6C4;
    --zf-muted:#737C8E; --zf-line:rgba(233,231,224,.14); --zf-red:#F07C6E;
  }
  .zf-card:hover, .zf-card:focus-visible { box-shadow:0 18px 40px rgba(0,0,0,.34); }
}
@media (prefers-reduced-motion: reduce) {
  .zf-card, .zf-go svg { transition:none; }
  .zf-card:hover { transform:none; }
}

/* ---------------- Store link ----------------
   The product cards are each a single <a>, so the store link cannot nest
   inside one. It sits beneath the card as a second, parallel route. */
.store-link {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 20px;
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--graphite);
  border-bottom: 1px solid var(--hairline-strong);
  padding-bottom: 6px;
  transition: color 200ms ease, border-color 200ms ease;
}
.store-link:hover, .store-link:focus-visible { color: var(--oxide); border-color: var(--oxide); }
.store-link .arrow { font-family: var(--sans); font-size: 0.95em; }
@media (max-width: 440px) { .store-link { font-size: 11px; letter-spacing: 0.10em; } }

/* ---------------- Support ---------------- */
section.support { padding-top: clamp(72px, 11vh, 132px); padding-bottom: clamp(48px, 7vh, 84px); }
.support-notes { padding-bottom: clamp(80px, 12vh, 150px); }
.support-notes .principle { min-height: 0; }
.support-notes .principle p { margin-top: 18px; }

/* ---------------- Footer ---------------- */
footer {
  border-top: 1px solid var(--hairline);
  padding: 36px 0 60px;
}
footer .wrap {
  display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap;
}
footer .col { display: flex; flex-direction: column; gap: 4px; }
footer .label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--slate-light); }
footer .val { font-family: var(--serif); font-size: 17px; color: var(--graphite); }
footer .colophon { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--slate-light); max-width: 30ch; line-height: 1.6; }

/* ---------------- Animations ---------------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal { opacity: 1; }

/* ---------------- Dark mode ---------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --graphite: #E8E4DC;
    --graphite-soft: #C9C4BA;
    --bone: #171B20;
    --bone-deep: #101317;
    --slate: #98A0A9;
    --slate-light: #6E767F;
    --oxide: #D97F55;
    --bone-veil: rgba(23, 27, 32, 0.78);
    --hairline: rgba(232, 228, 220, 0.14);
    --hairline-strong: rgba(232, 228, 220, 0.30);
  }

  /* Multiply darkens a dark ground into mud. Invert the texture and
     screen it, so the grain reads as light speckle instead. */
  body::before {
    mix-blend-mode: screen;
    filter: invert(1);
    opacity: 0.30;
  }
  .divider-stipple { filter: invert(1); opacity: 0.22; }

  /* The mark's graphite faces go flat against the dark ground. */
  /* The mark is 61% mid-graphite face, which sits at 2.1:1 on this ground and
     reads hollow. Inverting restores it as a solid form in bone, and lands the
     face tone in the same family as the dark-mode type. */
  .mark img, .hero-logo img { filter: invert(1); }
}

/* ---------------- Responsive niceties ---------------- */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero-meta { gap: 18px; }
  .hero-meta .val { font-size: 17px; }
  nav.top ul { gap: 16px; }
  nav.top a { font-size: 11px; letter-spacing: 0.10em; }
  .mark .name { font-size: 17px; }
  .pull { font-size: 24px; padding-left: 16px; }
}

/* Four nav items and the wordmark will not both fit a narrow phone.
   The mark carries the identity on its own down here. */
@media (max-width: 440px) {
  .mark .name { display: none; }
  nav.top ul { gap: 14px; }
}
