/* ============================================================
   Viewy — viewyapp.com
   Palette + type mirror the app (lib/ui.ts): warm gold on
   near-black, cinematic. The film-strip motif is lifted from
   the wordmark, where the "V" is a folded reel of film.
   ============================================================ */

:root {
  --ink:        #0a0a0b;
  --ink-2:      #0d0d0f;
  --panel:      #151518;
  --panel-2:    #1b1b20;
  --line:       rgba(217, 180, 95, 0.16);
  --line-soft:  rgba(245, 241, 232, 0.08);
  --cream:      #f5f1e8;
  --muted:      #aca28f;
  --muted-2:    #7d7566;
  --gold:       #d9b45f;
  --gold-hi:    #efcf87;
  --gold-soft:  rgba(217, 180, 95, 0.14);
  --teal:       #7dc8c2;
  --coral:      #ff8b7b;
  --green:      #7dd3a4;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1120px;
  --pad: clamp(20px, 5vw, 48px);
  --radius: 16px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Faint warm vignette so the near-black never reads as flat. A fixed,
   non-painting overlay instead of background-attachment:fixed (which forces a
   full repaint on every scroll frame and janks badly on mobile Safari). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(217, 180, 95, 0.10), transparent 60%),
    radial-gradient(90% 60% at 100% 0%, rgba(125, 200, 194, 0.05), transparent 55%);
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

::selection { background: var(--gold); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- layout ---------- */

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 20px;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.02; margin: 0; }

/* ---------- top nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(140%) blur(14px);
  background: linear-gradient(to bottom, rgba(10,10,11,0.86), rgba(10,10,11,0.5));
  border-bottom: 1px solid var(--line-soft);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.nav__logo img { height: 26px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 28px; font-size: 14px; color: var(--muted); }
.nav__links a { transition: color .18s ease; }
.nav__links a:hover { color: var(--cream); }
.nav__cta {
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  color: var(--ink); background: var(--gold);
  padding: 9px 16px; border-radius: 999px;
  transition: transform .16s ease, box-shadow .16s ease;
}
.nav__cta:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(217,180,95,0.28); }
@media (max-width: 720px) { .nav__links .navlink { display: none; } }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-body); font-weight: 600; font-size: 16px;
  padding: 14px 24px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(217,180,95,0.30); }
.btn--ghost { background: transparent; color: var(--cream); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-hi); }

/* ---------- film strip motif ---------- */
/* A dark reel with two rows of sprocket holes, straight from the wordmark. */

.filmstrip {
  --hole: 7px;
  position: relative;
  background: linear-gradient(180deg, #141317, #0e0d10);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 16px;
}
.filmstrip::before, .filmstrip::after {
  content: ""; position: absolute; left: 10px; right: 10px; height: var(--hole);
  background-image: repeating-linear-gradient(
    90deg,
    rgba(217,180,95,0.55) 0, rgba(217,180,95,0.55) var(--hole),
    transparent var(--hole), transparent calc(var(--hole) * 2.6)
  );
  border-radius: 2px; opacity: 0.5;
}
.filmstrip::before { top: 7px; }
.filmstrip::after  { bottom: 7px; }

/* ---------- hero ---------- */

.hero { padding: clamp(48px, 9vw, 104px) 0 clamp(40px, 7vw, 80px); }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } }

.hero h1 { font-size: clamp(40px, 7vw, 74px); }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero__sub { color: var(--muted); font-size: clamp(17px, 2.2vw, 21px); max-width: 30ch; margin: 24px 0 34px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero__meta { margin-top: 22px; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.06em; color: var(--muted-2); }

/* the signature: an Arena duel rendered as two film cells */
.duel__q { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); text-align: center; margin: 0 0 16px; }
.duel__cells { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.cell {
  position: relative; aspect-ratio: 2/3; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line-soft);
  display: flex; align-items: flex-end; padding: 12px;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.cell span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: rgba(245,241,232,0.66); }
.cell--a { background: linear-gradient(150deg, #3a2f4b, #14101d 78%); }
.cell--b { background: linear-gradient(150deg, #1d3a3a, #0f1a1a 78%); }
.cell.is-win { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 18px 40px rgba(217,180,95,0.20); transform: translateY(-4px); }
.cell.is-lose { opacity: 0.5; filter: saturate(0.7); }
.vs {
  width: 46px; height: 46px; border-radius: 999px; display: grid; place-items: center;
  font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 18px; color: var(--gold);
  background: radial-gradient(circle at 50% 40%, var(--panel-2), var(--ink));
  border: 1px solid var(--line);
}
.duel__result { margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 26px; }
.chip {
  font-family: var(--font-mono); font-weight: 700; font-size: 13px;
  color: var(--ink); background: var(--gold); padding: 4px 10px; border-radius: 8px;
  opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .4s ease;
}
.chip.is-on { opacity: 1; transform: none; }
.duel__result small { color: var(--muted); font-size: 12.5px; }

/* ---------- section shell ---------- */

.section { padding: clamp(56px, 9vw, 104px) 0; border-top: 1px solid var(--line-soft); }
.section__head { max-width: 60ch; margin-bottom: clamp(36px, 5vw, 56px); }
.section__head h2 { font-size: clamp(30px, 4.6vw, 46px); }
.section__head p { color: var(--muted); font-size: clamp(16px, 2vw, 19px); margin: 18px 0 0; }

/* ---------- pillars ---------- */

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  background: linear-gradient(180deg, var(--panel), var(--ink-2));
  border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 28px;
  transition: border-color .2s ease, transform .2s ease;
}
.pillar:hover { border-color: var(--line); transform: translateY(-3px); }
.pillar__num { font-family: var(--font-mono); font-size: 12px; color: var(--gold); letter-spacing: 0.1em; }
.pillar h3 { font-size: 23px; margin: 14px 0 10px; }
.pillar p { color: var(--muted); font-size: 15.5px; margin: 0; }
.pillar__tag { display: inline-block; margin-top: 16px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); }

/* ---------- bands (sentiment scale) ---------- */

.bands { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 8px; }
.band { display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 18px; }
@media (max-width: 640px) { .band { grid-template-columns: 96px 1fr; } .band__range { grid-column: 2; justify-self: start; } }
.band__label { font-family: var(--font-display); font-size: 20px; }
.band__track { height: 10px; border-radius: 999px; background: var(--panel-2); position: relative; overflow: hidden; }
.band__fill { position: absolute; inset: 0; border-radius: 999px; }
.band--loved   .band__fill { background: linear-gradient(90deg, var(--gold), var(--gold-hi)); width: 100%; }
.band--liked   .band__fill { background: linear-gradient(90deg, var(--teal), #a7ded9); width: 67%; }
.band--disliked .band__fill { background: linear-gradient(90deg, var(--coral), #ffb2a6); width: 33%; }
.band__range { font-family: var(--font-mono); font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ---------- compare (vs Letterboxd) ---------- */

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .compare { grid-template-columns: 1fr; } }
.compare__col { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 26px 28px; background: var(--ink-2); }
.compare__col--them { opacity: 0.82; }
.compare__col--us { border-color: var(--line); background: linear-gradient(180deg, var(--panel), var(--ink-2)); }
.compare__col h3 { font-size: 19px; margin-bottom: 18px; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
.compare__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.compare__col li { display: flex; gap: 11px; font-size: 15.5px; color: var(--muted); }
.compare__col--us li { color: var(--cream); }
.mark { flex: none; width: 20px; font-family: var(--font-mono); font-size: 14px; }
.mark--no { color: var(--muted-2); }
.mark--yes { color: var(--gold); }

/* ---------- cta band ---------- */

.cta-band { text-align: center; padding: clamp(60px, 10vw, 120px) 0; }
.cta-band h2 { font-size: clamp(32px, 5.4vw, 56px); }
.cta-band p { color: var(--muted); font-size: 18px; margin: 20px auto 34px; max-width: 44ch; }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--line-soft); padding: 56px 0 64px; color: var(--muted); font-size: 14px; }
.footer__grid { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; }
.footer__logo img { height: 30px; margin-bottom: 14px; }
.footer__cols { display: flex; flex-wrap: wrap; gap: 48px; }
.footer__col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 14px; font-weight: 500; }
.footer__col a { display: block; color: var(--muted); padding: 4px 0; transition: color .16s ease; }
.footer__col a:hover { color: var(--gold); }
.footer__legalnote { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line-soft); font-size: 12.5px; color: var(--muted-2); line-height: 1.7; max-width: 70ch; }

/* ---------- legal document pages ---------- */

.legal { padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 9vw, 112px); }
.legal__doc { max-width: 720px; margin: 0 auto; }
.legal__back { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 28px; display: inline-block; }
.legal__back:hover { color: var(--gold); }
.legal h1 { font-size: clamp(34px, 6vw, 54px); margin-bottom: 12px; }
.legal__updated { font-family: var(--font-mono); font-size: 13px; color: var(--muted-2); margin-bottom: 8px; }
.legal__intro { color: var(--muted); font-size: 18px; margin: 26px 0 8px; }
.legal h2 { font-size: 22px; margin: 40px 0 12px; color: var(--gold-hi); font-weight: 600; }
.legal p { color: rgba(245,241,232,0.86); margin: 0 0 16px; }
.legal a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.legal__foot { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted-2); }

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
