/* ============================================================
   STUDIO SYNTAXE — Shared Stylesheet
   Consumed by all sub-pages; index.html carries inline CSS
   independently for zero-dependency hero animations.
   ============================================================ */

/* SELF-HOSTED FONTS */
@font-face { font-family: "Vollkorn";      font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/vollkorn-v30-latin-600.woff2") format("woff2"); }
@font-face { font-family: "Outfit";        font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/outfit-v15-latin-800.woff2") format("woff2"); }
@font-face { font-family: "Roboto Slab";   font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/roboto-slab-v36-latin-regular.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono";font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/jetbrains-mono-v24-latin-regular.woff2") format("woff2"); }
@font-face { font-family: "Fraunces";      font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/fraunces-v38-latin-regular.woff2") format("woff2"); }
@font-face { font-family: "Fraunces";      font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/fraunces-v38-latin-italic.woff2") format("woff2"); }

/* DESIGN TOKENS */
:root {
  --bg:        #F5F2ED;
  --ink:       #0F172A;
  --accent:    #8B6A3E;
  --accent-light: #C8A878;
  --accent-on-dark: #AC8B5C;
  --slate:     #64748B;
  --hair:      rgba(139, 106, 62, 0.30);
  --hair-thin: rgba(139, 106, 62, 0.30);
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
  --tex-mult:  1;
  --tex-desat: saturate(0.86) contrast(0.92);
  --wm-gap-nav: 2px;
  --wm-gap-doc: 6px;
  --scrim-color: var(--bg);
  --scrim-opacity: 0.85;
}

/* TEXTURE SYSTEM */
.tex {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--mat);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.tex.light {
  mix-blend-mode: multiply;
  filter: var(--tex-desat);
  opacity: calc(var(--tex-base, 0.18) * var(--tex-mult));
}
main { position: relative; overflow: hidden; }

/* ANCHOR SCROLL OFFSET */
#methodology, #application { scroll-margin-top: 0; }

/* RESET & BASE */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Roboto Slab", Georgia, serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* TYPOGRAPHY */
.display {
  font-family: "Fraunces", "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 72;
  color: var(--ink);
  letter-spacing: 0;
  line-height: 1.15;
  margin: 0;
}
.body {
  font-family: "Roboto Slab", Georgia, serif;
  font-weight: 400;
  color: rgba(15, 23, 42, 0.65);
  line-height: 1.95;
  margin: 0;
}
.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* WORDMARK */
.wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}
.wm-mark {
  font-family: "Vollkorn", Georgia, serif;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
.wm-pedestal {
  font-family: "Outfit", "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.wordmark.nav { align-items: center; }
.wordmark.nav .wm-mark     { font-size: 16.5px; letter-spacing: 0.20em; line-height: 1; }
.wordmark.nav .wm-pedestal { font-size: 8.75px; letter-spacing: 0.30em; margin-top: var(--wm-gap-nav); line-height: 1; }
.wordmark.doc              { font-size: 28px; }
.wordmark.doc .wm-mark     { font-size: 1em; letter-spacing: 0.20em; }
.wordmark.doc .wm-pedestal { font-size: 0.4643em; letter-spacing: 0.52em; margin-top: var(--wm-gap-doc); padding-right: 0.52em; }

/* NAV — desktop */
.stx-nav {
  --nav-inset: 28px;
  position: fixed;
  top: var(--nav-inset); left: 32px; right: 32px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  mix-blend-mode: multiply;
}
.stx-nav-items {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.65);
  line-height: 16px;
  height: 16px;
}
.stx-nav-items a { color: inherit; text-decoration: none; transition: color 400ms var(--ease); }
.stx-nav-items .sep { color: rgba(139, 106, 62, 0.55); user-select: none; }

@media (hover: hover) and (pointer: fine) {
  .stx-nav-items a:hover { color: var(--accent); }
}

/* NAV — mobile hamburger + drawer */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 60;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--ink);
  opacity: 0.65;
  transition: opacity 400ms var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .nav-hamburger:hover span { opacity: 1; }
}

.nav-drawer {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--bg);
  padding: 72px 24px 40px;
  z-index: 55;
  display: flex;
  flex-direction: column;
  gap: 28px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 400ms var(--ease), visibility 0s linear 400ms;
}
.nav-drawer.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 400ms var(--ease), visibility 0s linear 0s; }
.nav-drawer-close {
  position: absolute;
  top: 24px; right: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: rgba(15, 23, 42, 0.40);
  transition: color 400ms var(--ease);
  padding: 8px;
  line-height: 1;
}

@media (hover: hover) and (pointer: fine) {
  .nav-drawer-close:hover { color: var(--ink); }
}
.nav-drawer a {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.65);
  text-decoration: none;
  transition: color 400ms var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .nav-drawer a:hover { color: var(--accent); }
}

/* NAV SCRIM */
.nav-scrim {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  z-index: 49;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(to bottom, var(--scrim-color) 0%, var(--scrim-color) 20%, transparent 100%);
  transition: opacity 1100ms var(--ease);
}

@media (max-width: 768px) {
  .nav-scrim { height: 55px; }
}

/* HAIRLINE RULE */
.rule {
  display: block;
  height: 1px;
  background: var(--accent);
  opacity: 0.30;
  margin: 0;
  flex-shrink: 0;
}

/* GHOST BUTTON */
.ghost-btn {
  display: inline-block;
  padding: 12px 36px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 500ms var(--ease), color 500ms var(--ease);
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .ghost-btn:hover { border-color: var(--bg); }
}

/* SCROLL REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1700ms var(--ease), transform 1700ms var(--ease);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* PAGE & CASE LAYOUT */
.page-wrap,
.case-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 140px 32px 160px;
}
.case-wrap { max-width: 680px; }

@media (max-width: 768px) {
  .page-wrap,
  .case-wrap { padding: 96px 24px 64px; }
}

/* FOOTER */
.stx-footer {
  background: var(--ink);
  border-top: 0.5px solid rgba(139, 106, 62, 0.20);
  padding: 36px 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.stx-footer .row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  line-height: 1.5;
  gap: 0;
}
.stx-footer .row.nav { color: var(--accent-on-dark); }
.stx-footer .row.nav a { color: inherit; text-decoration: none; transition: color 400ms var(--ease); }
.stx-footer .row.nav .sep { margin: 0 14px; color: rgba(245, 242, 237, 0.30); }

@media (hover: hover) and (pointer: fine) {
  .stx-footer .row.nav a:hover { color: var(--accent-light); }
  .stx-footer .row.mark a:hover { color: var(--accent-light); }
}
.stx-footer .row.mark { color: rgba(245, 242, 237, 0.40); }
.stx-footer .row.mark .sep { margin: 0 12px; color: rgba(245, 242, 237, 0.25); }

/* COOKIE CONSENT */
.gdpr-strip {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 24px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 10px 24px;
  background: var(--bg);
  border: 1px solid rgba(139, 106, 62, 0.50);
  pointer-events: auto;
  white-space: nowrap;
}
.gdpr-strip .gdpr-text {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.65);
}
.gdpr-strip .gdpr-actions { display: flex; align-items: center; gap: 14px; }
.gdpr-link {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  transition: color 400ms var(--ease);
}
.gdpr-link.mute { color: rgba(15, 23, 42, 0.45); }

@media (hover: hover) and (pointer: fine) {
  .gdpr-link:hover      { color: var(--accent); }
  .gdpr-link.mute:hover { color: var(--ink); }
}
.gdpr-strip.is-dismissed { display: none; }

/* MOBILE — 768px */
@media (max-width: 768px) {
  .stx-nav-items { display: none; }
  .nav-hamburger { display: flex; }
  .stx-nav { --nav-inset: 20px; top: var(--nav-inset); left: 20px; right: 20px; }
  .wordmark.nav .wm-mark     { font-size: 11px; }
  .wordmark.nav .wm-pedestal { font-size: 6px; }
  .wordmark.doc { font-size: 19px; }
  .ghost-btn {
    width: auto;
    text-align: center;
    padding: 14px 24px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
  }
  .stx-footer           { padding: 48px 24px; }
  .stx-footer .row      { font-size: 7px; }
  .stx-footer .row.nav .sep  { margin: 0 8px; }
  .stx-footer .row.mark .sep { margin: 0 8px; }
  .gdpr-strip {
    white-space: normal;
    width: calc(100% - 32px);
    flex-direction: column;
    gap: 10px;
    text-align: center;
    bottom: 16px;
    padding: 12px 16px;
  }
}
@media (max-width: 390px) {
  .wordmark.nav .wm-mark     { font-size: 10px; }
  .wordmark.nav .wm-pedestal { font-size: 5.5px; }
  .wordmark.doc { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; animation: none; transition: none; }
}
