/* Flicto — vintage editorial landing.
   Same language as the app: aged paper, brick red, serif nameplate,
   black-mounted photo frames. */

:root {
  --paper: #f1ece2;
  --paper-deep: #e8e0d2;
  --ink: #251f19;
  --ink-muted: #6b6459;
  --red: #c0392b;
  --red-deep: #94271c;
  --tan: #d9ad5f;
  --frame: #1c1a15;
  --rule: rgba(37, 31, 25, 0.22);
  --max: 1120px;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper) url("../assets/paper.png") repeat-y center top / 100% auto;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.wrap { width: min(var(--max), calc(100% - 44px)); margin-inline: auto; }

.caps {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
}

/* ── Masthead ───────────────────────────────────────────── */
.masthead { padding: 26px 0 0; }
.issue-row { display: flex; justify-content: space-between; align-items: center; }
.rule-thin { height: 1px; background: var(--rule); margin-top: 14px; }
.rule-heavy { height: 3px; background: var(--ink); margin-top: 10px; }

.nameplate { display: block; margin: 22px auto 12px; width: min(430px, 74%); }

/* ── Hero ───────────────────────────────────────────────── */
.hero { padding: 46px 0 12px; text-align: center; }
.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.1rem);
  line-height: 1.05;
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.hero p.lede {
  font-size: clamp(1.02rem, 2.4vw, 1.22rem);
  color: var(--ink-muted);
  max-width: 33ch;
  margin: 0 auto 30px;
}

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 700;
  background: var(--tan); color: #3a2c10;
  padding: 8px 16px; border-radius: 5px; margin-bottom: 22px;
  box-shadow: 0 1px 0 rgba(0,0,0,.12);
}

.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--red); color: #fff; text-decoration: none;
  font-family: var(--sans); font-weight: 700; font-size: 1.02rem;
  padding: 17px 40px; border-radius: 13px;
  box-shadow: 0 10px 26px rgba(148, 39, 28, 0.26);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.cta:hover { transform: translateY(-2px); background: var(--red-deep); box-shadow: 0 14px 32px rgba(148,39,28,.32); }
.cta:active { transform: translateY(0); }
.cta-note { display: block; margin-top: 13px; }

/* ── Photo frame (mirrors the app's PolaroidFrame) ─────── */
.frame {
  background: var(--frame);
  border-radius: 18px;
  padding: 11px;
  position: relative;
  box-shadow: 0 18px 44px rgba(28, 26, 21, 0.26);
}
/* height:auto is load-bearing — the width/height attributes on the <img>
   (kept for CLS) are presentational hints that otherwise beat aspect-ratio
   and pin every frame to a fixed 360px. */
.frame img { border-radius: 9px; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.frame .film-top,
.frame .film-bottom {
  position: absolute; left: 16px; right: 16px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(255,255,255,.82); pointer-events: none;
}
.frame .film-top { top: 15px; }
.frame .film-bottom { bottom: 15px; }
.frame .film-top span:nth-child(2) { color: rgba(255,255,255,.9); }
.frame .mark { color: var(--red); }

/* ── Before / after slider ─────────────────────────────── */
.compare { position: relative; user-select: none; touch-action: pan-y; }
.compare .after,
.compare .before { position: absolute; inset: 11px; border-radius: 9px; overflow: hidden; }
.compare .before { z-index: 2; }
.compare .before img,
.compare .after img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; border-radius: 0; }
.compare .spacer { visibility: hidden; }
.compare .handle {
  position: absolute; top: 11px; bottom: 11px; width: 2px; background: #fff; z-index: 3;
  box-shadow: 0 0 10px rgba(0,0,0,.45); pointer-events: none;
}
.compare .knob {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%; background: #fff;
  display: grid; place-items: center; color: var(--ink);
  box-shadow: 0 4px 14px rgba(0,0,0,.34); font-size: 15px; letter-spacing: -2px;
}
.compare input[type="range"] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; z-index: 4;
}
.compare .tag {
  position: absolute; top: 22px; z-index: 3;
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: #fff; background: rgba(20,18,15,.58); padding: 5px 10px; border-radius: 30px;
}
.compare .tag-before { left: 22px; }
.compare .tag-after { right: 22px; }

/* ── Sections ──────────────────────────────────────────── */
section { padding: 70px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 {
  font-size: clamp(1.85rem, 4.6vw, 2.65rem);
  margin: 10px 0 12px; font-weight: 800; letter-spacing: -0.01em;
}
.section-head p { color: var(--ink-muted); max-width: 46ch; margin: 0 auto; }

.hero-frame { width: min(430px, 88%); margin: 40px auto 0; }

/* ── Style grid ────────────────────────────────────────── */
.styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 20px; }
.style { text-align: center; }
.style .frame { padding: 8px; border-radius: 13px; }
.style .frame img { border-radius: 7px; }
.style .name { margin-top: 11px; font-weight: 700; font-size: 0.94rem; }
.style .kind { font-family: var(--mono); font-size: 0.58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }

/* ── Steps ─────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 34px; }
.step { text-align: center; }
.step .num {
  width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 15px;
  display: grid; place-items: center; background: var(--red); color: #fff;
  font-family: var(--mono); font-weight: 700; font-size: 1rem;
}
.step h3 { margin: 0 0 8px; font-size: 1.24rem; }
.step p { margin: 0; color: var(--ink-muted); font-size: 0.98rem; }

/* ── Pricing ───────────────────────────────────────────── */
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); gap: 20px; max-width: 780px; margin-inline: auto; }
.pack {
  border: 1px solid var(--rule); border-radius: 15px; padding: 28px 22px;
  text-align: center; background: rgba(255,255,255,.34); position: relative;
}
.pack.featured { border: 2px solid var(--red); }
.pack .tokens { font-size: 2.15rem; font-weight: 800; line-height: 1; }
.pack .unit { font-family: var(--mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted); margin-top: 7px; }
.pack .price { margin-top: 15px; font-size: 1.32rem; font-weight: 700; color: var(--red); }
.pack .flag {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--red); color: #fff; font-family: var(--mono);
  font-size: .56rem; letter-spacing: .15em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 20px; white-space: nowrap;
}
.pricing-note { text-align: center; margin-top: 26px; }

/* ── FAQ ───────────────────────────────────────────────── */
.faq { max-width: 720px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--rule); padding: 19px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.06rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--red); font-size: 1.4rem; line-height: 1; flex-shrink: 0; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--ink-muted); margin: 12px 0 0; font-size: 1rem; }

/* ── Footer ────────────────────────────────────────────── */
footer { padding: 52px 0 46px; border-top: 1px solid var(--rule); margin-top: 34px; }
.foot-row { display: flex; flex-wrap: wrap; gap: 14px 26px; justify-content: center; }
.foot-row a { text-decoration: none; }
.foot-row a:hover { color: var(--red); }
.copyright { text-align: center; margin-top: 22px; }

/* ── Legal pages ───────────────────────────────────────── */
.legal { max-width: 720px; margin-inline: auto; padding: 26px 0 60px; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.6rem); margin-bottom: 6px; }
.legal h2 { font-size: 1.28rem; margin: 34px 0 10px; }
.legal p, .legal li { color: var(--ink-muted); font-size: 1rem; }
.legal a { color: var(--red); }

/* ── Scroll reveal ─────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .cta { transition: none; }
}

@media (max-width: 620px) {
  body { font-size: 17px; }
  section { padding: 54px 0; }
  .styles { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 15px; }
}
