/* ============================================================
   Avari — shared stylesheet
   Used by product.html, studio.html, about.html.

   index.html keeps its own inline CSS (per CLAUDE.md's single-file
   rule) and is deliberately untouched. Duplicating ~600 lines of it
   across three more pages would have been worse than one shared file,
   and a plain <link> adds no build step — the "no bundler" constraint
   still holds.
   ============================================================ */

:root {
  --ink: #0D0D14;
  --navy: #1A2F6E;
  --navy-lt: #E8EDF8;
  --gold: #C9A84C;
  --gold-lt: #FDF6E3;
  --gold-dk: #8B6914;
  --cream: #FDFAF4;
  --paper: #F7F5EE;
  --green: #1D6A47;
  --red: #C0392B;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  /* The off-canvas nav panel otherwise inflates the document's scrollable
     width (body overflow-x alone doesn't clip it — the sticky nav is in-flow).
     clip preferred: it never creates a scroll container, so sticky is safe. */
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button, a, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* Anchored targets land clear of the sticky nav */
[id] { scroll-margin-top: 84px; }

h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }

.label {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Scroll progress (element injected by avari.js) ---------- */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), #E9D6A3);
  background: linear-gradient(90deg, var(--gold), color-mix(in srgb, var(--gold) 55%, white));
  z-index: 1001;
  transition: width 0.1s linear;
}
/* Hide the bar while the mobile menu is open — it would paint over the panel */
body.nav-open #progress-bar { display: none; }

/* ---------- Cursor glow, desktop only (element injected by avari.js) ---------- */
#cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.10) 0%, rgba(201,168,76,0) 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  left: -9999px;
  top: -9999px;
}
@media (max-width: 900px) { #cursor-glow { display: none; } }

/* ---------- Skip link (a11y) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: 12px 20px;
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Nav ---------- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  /* No backdrop-filter here: filter on nav would change the containing
     block of the fixed .nav-links panel (fragile across Safari/Chromium),
     and at 0.94 alpha the blur is invisible anyway. */
  background: rgba(13,13,20,0.94);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid rgba(201,168,76,0.16);
}
nav .logo { display: block; }
nav .logo img { height: 48px; width: auto; display: block; }
@media (max-width: 680px) { nav .logo img { height: 38px; } }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  color: rgba(253,250,244,0.78);
  font-size: 15px;
  transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--gold); }
.nav-links .cta-btn {
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
}
.nav-links .cta-btn:hover { background: #D9BA63; background: color-mix(in srgb, var(--gold) 88%, white); color: var(--ink); }

#nav-toggle {
  display: none;
  background: none;
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  position: relative;
  z-index: 1002; /* must sit above the open .nav-links panel or it becomes unclickable */
}
#nav-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
#nav-toggle span {
  width: 22px; height: 2px;
  background: var(--cream);
  display: block;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
#nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#nav-toggle.open span:nth-child(2) { opacity: 0; }
#nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Page head ---------- */
.page-head {
  background: var(--ink);
  color: var(--cream);
  padding: 110px 32px 88px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-head::before {
  content: '';
  position: absolute;
  top: -30%; left: 50%;
  transform: translateX(-50%);
  width: 1000px; height: 800px;
  background: radial-gradient(ellipse at center, rgba(201,168,76,0.18) 0%, rgba(13,13,20,0) 70%);
  pointer-events: none;
}
.page-head > * { position: relative; z-index: 2; }
.page-head .label { color: var(--gold); margin-bottom: 20px; }
.page-head h1 {
  font-size: clamp(36px, 5.4vw, 64px);
  line-height: 1.08;
  margin-bottom: 22px;
  max-width: 16ch;
  margin-left: auto;
  margin-right: auto;
}
.page-head h1 em { font-style: italic; color: var(--gold); }
.page-head p {
  font-size: clamp(16px, 1.8vw, 19px);
  color: rgba(253,250,244,0.72);
  max-width: 56ch;
  margin: 0 auto;
}

/* ---------- Sections (padding rhythm matches index.html) ---------- */
section { padding: 110px 0; }
.section-head { text-align: center; margin-bottom: 54px; }
.section-head .label { color: var(--gold-dk); margin-bottom: 14px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; }
.section-head p { margin-top: 16px; color: rgba(13,13,20,0.7); max-width: 56ch; margin-inline: auto; }

.alt { background: var(--paper); }
.dark { background: var(--ink); color: var(--cream); }
.dark .section-head h2 { color: var(--cream); }
.dark .section-head .label { color: var(--gold); }
.dark .section-head p { color: rgba(253,250,244,0.7); }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
  padding: 17px 34px;
  border-radius: var(--radius-sm);
  transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  background: #D9BA63;
  background: color-mix(in srgb, var(--gold) 88%, white);
  box-shadow: 0 12px 32px rgba(201,168,76,0.4);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(13,13,20,0.22);
  color: var(--ink);
  font-size: 16px;
  padding: 17px 26px;
  border-radius: var(--radius-sm);
  transition: border-color 0.22s ease, color 0.22s ease;
}
.btn-ghost:hover { border-color: var(--gold-dk); color: var(--gold-dk); }
.dark .btn-ghost { border-color: rgba(253,250,244,0.24); color: var(--cream); }
.dark .btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Cards ---------- */
.card {
  background: var(--cream);
  border: 1px solid rgba(13,13,20,0.07);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
}
.alt .card { background: var(--cream); }
.dark .card {
  background: rgba(253,250,244,0.04);
  border-color: rgba(201,168,76,0.18);
}

/* ---------- Reveal (timing matches index.html) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
.reveal.revealed { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Final CTA ---------- */
.final-cta { background: var(--ink); color: var(--cream); text-align: center; }
.final-cta h2 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.14; max-width: 20ch; margin: 0 auto 32px; }
.final-cta .fineprint {
  margin-top: 22px;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(253,250,244,0.62);
}

/* ---------- Sticky mobile buy bar ---------- */
.buy-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  background: rgba(13,13,20,0.96);
  border-top: 1px solid rgba(201,168,76,0.3);
  transform: translateY(100%);
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), visibility 0s linear 0.35s;
}
.buy-bar[hidden] { display: none; }
.buy-bar.show { transform: translateY(0); visibility: visible; transition-delay: 0s, 0s; }
body.nav-open .buy-bar { transform: translateY(100%); visibility: hidden; }
.buy-bar__price {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 14px;
  color: rgba(253,250,244,0.6);
  white-space: nowrap;
}
.buy-bar__price s { opacity: 0.7; }
.buy-bar__price strong { color: var(--gold); font-size: 19px; font-weight: 500; margin-left: 6px; }
.buy-bar__cta {
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  flex: none;
}
@media (max-width: 680px) {
  .buy-bar:not([hidden]) { display: flex; }
  footer { padding-bottom: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  .buy-bar { transition: none; }
}

/* ---------- Footer ---------- */
footer {
  background: var(--ink);
  color: rgba(253,250,244,0.5);
  border-top: 1px solid rgba(201,168,76,0.16);
}
.footer-cols {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 44px;
  padding: 64px 32px 48px;
}
.footer-brand .flogo { display: inline-block; margin-bottom: 14px; }
.footer-brand .flogo img { height: 40px; width: auto; display: block; }
.footer-tag {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 17px;
  color: rgba(253,250,244,0.7);
}
.footer-col h3 {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.footer-col ul { display: grid; gap: 11px; }
.footer-col a {
  font-size: 14px;
  color: rgba(253,250,244,0.62);
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--cream); }
.footer-col .footnote {
  font-size: 13px;
  color: rgba(253,250,244,0.42);
  margin-top: 14px;
  max-width: 26ch;
}
.footer-bottom {
  text-align: center;
  padding: 26px 32px;
  border-top: 1px solid rgba(201,168,76,0.25);
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
}
@media (max-width: 900px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 36px; padding: 52px 24px 40px; }
}
@media (max-width: 680px) {
  .footer-cols { grid-template-columns: 1fr; gap: 32px; }
  .footer-col ul { gap: 0; }
  .footer-col a { display: inline-block; padding: 10px 0; font-size: 15px; }
}

/* ---------- Breakpoints (matching index.html) ---------- */
@media (max-width: 900px) {
  .wrap { padding: 0 24px; }
  section { padding: 84px 0; }
  .nav-links { gap: 24px; }
}

@media (max-width: 680px) {
  section { padding: 64px 0; }
  .wrap { padding: 0 20px; }
  .page-head { padding: 84px 20px 64px; }
  .card { padding: 26px 22px; }
  .btn-primary, .btn-ghost { width: 100%; }

  /* Mobile nav: slide-in panel, matching index.html */
  nav { padding: 16px 20px; }
  #nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    z-index: 1001;
    height: 100vh;
    height: 100svh;
    width: 78%;
    max-width: 320px;
    background: var(--ink);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 28px;
    padding: 40px;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
    box-shadow: -20px 0 60px rgba(0,0,0,0.3);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 17px; }
  .nav-links .cta-btn { margin-top: 8px; }
}

@media (max-width: 480px) {
  .section-head h2 { font-size: 27px; }
  .page-head h1 { font-size: 32px; }
}

@media (max-width: 390px) {
  .wrap { padding: 0 16px; }
  .page-head { padding: 76px 16px 56px; }
}
