/* =========================================================================
   Nowadays — site.css
   Shared design system (Obys-inspired editorial, LIGHT theme).
   Palette: dark ink type on warm light grey; brand yellow on CTA + glows.
   Dark app screenshots pop against the light page.
   ========================================================================= */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---- Tokens ---- */
:root {
  --bg:        #e9e7e2;   /* warm light grey (page) */
  --bg-2:      #f4f3ef;   /* raised surface / cards */
  --ink:       #1a1a1a;   /* primary text */
  --ink-dim:   rgba(26,26,26,0.64);
  --muted:     #6f6c65;   /* secondary text */
  --line:      rgba(0,0,0,0.12);
  --line-2:    rgba(0,0,0,0.20);
  --yellow:    #d4c870;   /* brand accent — CTA, glows, marks */
  --yellow-2:  #c9ba52;
  --yellow-soft: rgba(212,200,112,0.22);

  --font-display: "Clash Display", "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    "General Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-serif:   "Instrument Serif", Georgia, "Times New Roman", serif;

  --maxw: 1280px;
  --pad:  clamp(20px, 5vw, 64px);
  --nav-h: 84px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Base ---- */
html { background: var(--bg); }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection { background: var(--yellow); color: #1a1a1a; }

/* Lenis smooth-scroll plumbing */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---- Type primitives ---- */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.02em;
}
.serif-em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
.accent { color: var(--ink); }

.eyebrow,
.section-no {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Layout ---- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.rule { height: 1px; background: var(--line); border: 0; }

/* ---- Grain overlay (fixed, cheap) ---- */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* ---- Custom cursor (enabled by JS on fine pointers only) ---- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot  { width: 6px; height: 6px; background: var(--ink); }
.cursor-ring {
  width: 38px; height: 38px;
  border: 1px solid var(--line-2);
  transition: width .25s var(--ease), height .25s var(--ease),
              background-color .25s var(--ease), border-color .25s var(--ease);
}
html.has-cursor.cursor-active .cursor-dot,
html.has-cursor.cursor-active .cursor-ring { opacity: 1; }
html.has-cursor.cursor-hover .cursor-ring {
  width: 64px; height: 64px;
  background: var(--yellow-soft);
  border-color: transparent;
}
html.has-cursor * { cursor: none; }

/* ---- Nav ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  background: linear-gradient(to bottom, rgba(233,231,226,0.88), rgba(233,231,226,0));
  transition: background .3s var(--ease), backdrop-filter .3s var(--ease), height .3s var(--ease);
}
.nav.is-stuck {
  background: rgba(233,231,226,0.86);
  backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav__brand { display: flex; align-items: center; gap: 14px; font-family: var(--font-display); font-weight: 700; font-size: 30px; text-transform: uppercase; letter-spacing: 0.02em; }
.nav__brand img { width: 42px; height: 42px; border-radius: 10px; }
.nav__links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 38px); }
.nav__links a { font-size: 16px; color: var(--ink-dim); transition: color .2s; }
.nav__links a:hover { color: var(--ink); }
.nav__cta { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.nav__cta::after { content: " ↗"; color: var(--ink); }
.nav__back { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-dim); transition: color .2s; }
.nav__back:hover { color: var(--ink); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px;
  border-radius: 980px;
  font-weight: 600; font-size: 16px;
  background: var(--yellow); color: #1a1a1a;
  transition: transform .15s var(--ease), box-shadow .3s var(--ease), background-color .2s var(--ease);
  will-change: transform;
}
.btn svg { width: 19px; height: 19px; fill: #1a1a1a; }
.btn:hover { background: var(--yellow-2); box-shadow: 0 16px 44px rgba(212,200,112,0.45); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink);
}
.btn-ghost .arrow { color: var(--ink); transition: transform .25s var(--ease); }
.btn-ghost:hover .arrow { transform: translateX(6px); }

/* ---- Footer ---- */
.foot {
  border-top: 1px solid var(--line);
  padding: 48px var(--pad);
  display: flex; flex-wrap: wrap; gap: 20px;
  align-items: center; justify-content: space-between;
}
.foot__left { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.foot__left img { width: 22px; height: 22px; border-radius: 6px; }
.foot__links { display: flex; gap: 26px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.foot__links a { color: var(--muted); transition: color .2s; }
.foot__links a:hover { color: var(--ink); }
.foot__social { display: flex; align-items: center; gap: 16px; }
.foot__social a { color: var(--muted); display: inline-flex; transition: color .2s, transform .2s var(--ease); }
.foot__social a:hover { color: var(--ink); transform: translateY(-2px); }
.foot__social svg { width: 20px; height: 20px; display: block; fill: currentColor; }

/* ---- Reveal (only armed when JS confirms motion is allowed) ---- */
.has-motion [data-reveal] { opacity: 0; }
.has-motion [data-reveal="up"]   { transform: translateY(42px); }
.has-motion [data-reveal="fade"] { transform: none; }

/* =========================================================================
   Prose — legal pages (privacy.html, terms.html)
   ========================================================================= */
.legal { padding: calc(var(--nav-h) + 56px) var(--pad) 40px; }
.prose { max-width: 720px; margin: 0 auto; }
.prose h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(38px, 6vw, 64px); line-height: 1; letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.prose .updated { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 48px; }
.prose h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.01em;
  margin: 52px 0 16px; padding-top: 28px; border-top: 1px solid var(--line);
}
.prose h3 { font-family: var(--font-display); font-weight: 500; font-size: 19px; margin: 30px 0 12px; color: var(--ink); }
.prose p  { font-size: 16.5px; line-height: 1.75; color: var(--ink-dim); margin-bottom: 18px; }
.prose ul { padding-left: 22px; margin-bottom: 18px; }
.prose li { font-size: 16.5px; line-height: 1.75; color: var(--ink-dim); margin-bottom: 9px; }
.prose li::marker { color: var(--muted); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--ink); border-bottom: 2px solid var(--yellow); transition: border-color .2s, color .2s; }
.prose a:hover { color: var(--yellow-2); border-color: var(--yellow-2); }
.prose code {
  font-family: var(--font-mono); font-size: 0.86em;
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 5px; color: #4a463a;
}
.prose .foot-note { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* =========================================================================
   Feedback — shared form, modal (landing), and standalone page
   ========================================================================= */
.fb-form { display: grid; gap: 18px; }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fb-field { display: grid; gap: 8px; }
.fb-field label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.fb-field label span { text-transform: none; letter-spacing: 0; color: var(--muted); opacity: 0.8; }
.fb-field input, .fb-field textarea {
  font-family: var(--font-body); font-size: 16px; color: var(--ink);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 14px; width: 100%;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.fb-field input::placeholder, .fb-field textarea::placeholder { color: var(--muted); opacity: 0.7; }
.fb-field textarea { resize: vertical; min-height: 124px; line-height: 1.55; }
.fb-field input:focus, .fb-field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--yellow-soft); }
.fb-form .btn { justify-self: start; border: 0; }
.fb-status { font-size: 14px; line-height: 1.5; color: var(--muted); min-height: 1.2em; margin: 0; }
.fb-status.is-ok  { color: #2f7d31; }
.fb-status.is-err { color: #b23b3b; }
/* let form fields keep a normal caret/cursor even with the custom cursor on */
html.has-cursor input, html.has-cursor textarea, html.has-cursor select, html.has-cursor label { cursor: auto; }

/* ---- Modal ---- */
.modal { position: fixed; inset: 0; z-index: 200; display: none; }
.modal.is-open { display: block; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(20,18,14,0.45); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s var(--ease); }
.modal.is-open .modal__backdrop { opacity: 1; }
.modal__panel {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -46%);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 56px); overflow-y: auto;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 20px;
  padding: clamp(28px, 5vw, 44px);
  box-shadow: 0 40px 120px rgba(0,0,0,0.30);
  opacity: 0; transition: opacity .3s var(--ease), transform .35s var(--ease);
}
.modal.is-open .modal__panel { opacity: 1; transform: translate(-50%, -50%); }
.modal__close { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); font-size: 18px; transition: background .2s, color .2s; }
.modal__close:hover { background: var(--bg-2); color: var(--ink); }
.modal__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.015em; margin-bottom: 8px; }
.modal__sub { color: var(--ink-dim); font-size: 16px; line-height: 1.55; margin-bottom: 26px; max-width: 42ch; }
body.modal-lock { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .modal__backdrop, .modal__panel { transition: none; }
  .modal.is-open .modal__panel { transform: translate(-50%, -50%); }
}

/* ---- Standalone feedback page ---- */
.fb-page { max-width: 620px; margin: 0 auto; }
.fb-page__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(34px, 6vw, 60px); line-height: 1.0; letter-spacing: -0.02em; margin: 12px 0 14px; }
.fb-page__sub { color: var(--ink-dim); font-size: 18px; line-height: 1.6; margin-bottom: 40px; max-width: 46ch; }

/* ---- Reduced motion: strip every motion affordance ---- */
@media (prefers-reduced-motion: reduce) {
  .grain { display: none; }
  * { scroll-behavior: auto !important; }
}

/* ---- Mobile ---- */
@media (max-width: 720px) {
  :root { --nav-h: 68px; }
  .nav__brand { font-size: 24px; }
  .nav__brand img { width: 34px; height: 34px; }
  .nav__links { gap: 16px; }
  .nav__links a:not(.nav__cta) { display: none; }   /* keep brand + CTA on small screens */
  .foot { flex-direction: column; align-items: flex-start; }
}
