/* flipwright — standalone product page.
   Responsive contract: mobile <768, tablet 768-1279, desktop 1280-1919,
   TV 1920+. All type in rem, layout in grid/flex, no fixed content widths. */

:root {
  --ink: #0d1117;
  --ink-2: #151b24;
  --line: #263041;
  --text: #e6edf3;
  --muted: #93a1b5;
  --accent: #4ade80;
  --accent-dim: #14532d;
  --warn: #fbbf24;
  --radius: 0.9rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 72rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% -10%, #14251c 0%, transparent 45%),
    var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: #04140a; padding: 0.6rem 1rem; z-index: 20;
}
.skip:focus { left: 1rem; top: 1rem; }

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

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink) 85%, transparent);
  backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 10;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 3.75rem;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em;
  color: var(--text);
}
.wordmark:hover { text-decoration: none; }
.mark { color: var(--accent); font-size: 1.35rem; }
.nav { display: flex; align-items: center; gap: 1.25rem; font-size: 0.9rem; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav-cta {
  color: #04140a !important;
  background: var(--accent);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  min-height: 2.75rem;
  display: inline-flex; align-items: center;
}

/* mobile navigation: under 768 the links collapse into a menu button */
.menu-btn {
  display: none;
  flex-direction: column; justify-content: center; gap: 0.28rem;
  width: 2.75rem; height: 2.75rem; padding: 0.55rem;
  background: transparent; border: 1px solid var(--line); border-radius: 0.5rem;
  cursor: pointer;
}
.menu-btn span { display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px; }
.menu-btn[aria-expanded="true"] { border-color: var(--accent); }

@media (max-width: 767px) {
  .menu-btn { display: flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink-2); border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1rem;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 0.85rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav a:last-child { border-bottom: 0; }
  .nav-cta { justify-content: center; margin-top: 0.75rem; }
  .site-header { position: relative; }
}

/* ---------- hero ---------- */
.hero { padding: 3rem 1.25rem 2rem; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem;
  color: var(--accent); margin: 0 0 0.75rem;
}
h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 1rem;
}
h2 { font-size: 1.15rem; letter-spacing: -0.01em; margin: 0 0 1rem; }
.lede { font-size: 1.06rem; color: #c8d3e0; max-width: 46rem; margin: 0 0 1rem; }
.fine { color: var(--muted); font-size: 0.9rem; }
.tiny { font-size: 0.8rem; }

/* ---------- tool ---------- */
.tool-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: 1fr;
  align-items: start;
  padding-bottom: 1rem;
}
.card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
}
label {
  display: block; font-size: 0.82rem; font-weight: 600;
  color: var(--muted); margin: 0.85rem 0 0.35rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
label:first-of-type { margin-top: 0; }
.opt { text-transform: none; letter-spacing: 0; font-weight: 400; color: #64748b; }
input, select, button { font: inherit; }
input[type="text"], input[type="date"], input[type="number"], input[type="email"], select {
  width: 100%;
  background: #0b1017;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 0.55rem;
  padding: 0.7rem 0.8rem;
  min-height: 2.75rem;
}
input:focus, select:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.row2 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.checks {
  border: 1px solid var(--line); border-radius: 0.55rem;
  margin: 1.1rem 0 0; padding: 0.8rem 1rem;
}
.checks legend {
  font-size: 0.78rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.06em; padding: 0 0.35rem;
}
.check { display: flex; gap: 0.55rem; align-items: center; text-transform: none;
  letter-spacing: 0; font-weight: 400; color: var(--text); font-size: 0.92rem;
  margin: 0.35rem 0; }
.check input { min-height: auto; width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.9rem; padding: 0.7rem 1.2rem; margin-top: 1.1rem;
  background: var(--accent); color: #04140a; border: 0;
  border-radius: 0.6rem; font-weight: 700; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn.ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line); margin-top: 0;
}
.ghost:hover { border-color: var(--accent); color: var(--accent); }

.status { min-height: 1.2rem; font-size: 0.88rem; color: var(--warn); margin: 0.7rem 0 0; }
.status.ok { color: var(--accent); }
.status.err { color: #f87171; }

/* ---------- result ---------- */
.result h3 { font-size: 1.05rem; margin: 1.4rem 0 0.5rem; }
.result h3:first-child { margin-top: 0; }
.kv { display: grid; grid-template-columns: 1fr; gap: 0.4rem; margin: 0; }
.kv div { display: flex; justify-content: space-between; gap: 1rem;
  border-bottom: 1px dashed var(--line); padding: 0.4rem 0; font-size: 0.92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.badge {
  display: inline-block; background: var(--accent-dim); color: var(--accent);
  border-radius: 999px; padding: 0.1rem 0.6rem; font-size: 0.8rem;
  font-weight: 700; margin-right: 0.4rem;
}
.tbl { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.tbl th, .tbl td {
  text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.tbl th { color: var(--muted); font-weight: 600; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.05em; }
.note {
  border-left: 3px solid var(--warn); padding: 0.5rem 0 0.5rem 0.8rem;
  color: #e7d9b6; font-size: 0.9rem; margin: 0.8rem 0 0;
}
.share, .lead { margin-top: 1.4rem; border-top: 1px solid var(--line); padding-top: 1.1rem; }
.share-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.share-row input { flex: 1 1 12rem; }

/* ---------- sections ---------- */
.section { padding: 2.5rem 1.25rem; border-top: 1px solid var(--line); }
.steps { padding-left: 1.2rem; margin: 0; max-width: 52rem; }
.steps li { margin: 0.8rem 0; color: #c8d3e0; }
.steps strong { color: var(--text); }
.grid-2 { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.plan-title { font-family: var(--mono); font-size: clamp(1.6rem, 4vw, 2.4rem); }
.tier-line { font-size: 1rem; margin: 0 0 0.6rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 2rem; padding: 1.5rem 0; }
.footer-inner { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.85rem;
  color: var(--muted); }

/* ---------- tablet 768-1279 ---------- */
@media (min-width: 768px) {
  .wrap { padding: 0 1.75rem; }
  .hero, .section { padding-left: 1.75rem; padding-right: 1.75rem; }
  .row2 { grid-template-columns: 1fr 1fr; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .kv { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; }
  .hero { padding-top: 4rem; }
}

/* ---------- desktop 1280-1919 ---------- */
@media (min-width: 1280px) {
  body { font-size: 1.02rem; }
  .tool-grid { grid-template-columns: 1.05fr 1fr; gap: 1.75rem; }
  .hero { padding-top: 5rem; padding-bottom: 2.5rem; }
  .section { padding-top: 3.25rem; padding-bottom: 3.25rem; }
}

/* ---------- TV / large 1920+ ---------- */
@media (min-width: 1920px) {
  :root { --wrap: 100rem; }
  body { font-size: 1.12rem; }
  h1 { font-size: 3.9rem; }
  .card { padding: 1.9rem; }
}

/* ---------- print (the PDF path) ---------- */
@media print {
  body { background: #fff; color: #111; }
  .site-header, .site-footer, .nav, #plan-form, .share, .lead, .btn { display: none !important; }
  .card { border: 1px solid #ccc; background: #fff; break-inside: avoid; }
  .fine, .tbl th { color: #444; }
  a { color: #111; }
}

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