/* RefDeck website. The page is the board: same colour and dot grid as the app. */
:root {
  --page: #1D1E22;        /* the app's board */
  --chrome: #141518;      /* the app's top bar */
  --panel: #25262B;       /* the app's floating panels */
  --panel-2: #2C2D33;
  --well: #17181B;
  --line: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.14);

  --text: #E8E9EC;
  --muted: #9A9DA5;
  --dim: #6B6E76;
  --off: #4A4D55;

  --accent: #5F94FF;      /* selection blue in the app */
  --accent-text: #8DB4FF;
  --accent-soft: rgba(95,148,255,0.14);
  --success: #46C28E;
  --warning: #F5B544;
  --danger: #E5484D;

  --r: 6px;
  --r-lg: 10px;

  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --wrap: 1160px;

  /* legacy names used by the pricing / download markup */
  --tertiary: var(--dim);
  --disabled: var(--off);
  --bg-board: var(--page);
  --bg-chrome: var(--chrome);
  --border: var(--line);
  --border-hover: var(--line-2);
  --hair: var(--line);
  --btn2: #34353B;
  --btn2-hover: #3D3E45;
  --panel-bot: var(--panel);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font: 15.5px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background-color: var(--page);
  background-image: radial-gradient(rgba(255,255,255,0.075) 1.1px, transparent 1.4px);
  background-size: 32px 32px;
  background-attachment: fixed;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: #B3CCFF; }
::selection { background: var(--accent-soft); }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.02em; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.tert { color: var(--dim); }
.center { text-align: center; }

/* ---------- Top bar (like the app's) ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--chrome); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 52px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 600; font-size: 15px; }
.brand:hover { color: var(--text); }
.brand img { width: 22px; height: 22px; border-radius: 5px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { color: var(--muted); padding: 6px 10px; border-radius: var(--r); font-size: 14px; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav .spacer { flex: 1; }
.nav-burger { display: none; background: none; border: 0; color: var(--text); padding: 8px; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--r);
  font: 500 14.5px/1 var(--font); border: 1px solid var(--line-2); cursor: pointer;
  color: var(--text); background: transparent; white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: #ECEDEF; color: #141518; border-color: #ECEDEF; }
.btn-primary:hover { background: #fff; color: #141518; }
.btn-ghost { border-color: transparent; color: var(--muted); }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn svg { width: 17px; height: 17px; }

kbd {
  font: 500 11.5px/1 var(--mono); color: var(--muted);
  background: var(--well); border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 4px; padding: 3px 6px; white-space: nowrap;
}
/* small labels (used to be pills) */
.chip { display: inline-block; font: 500 12px/1 var(--mono); color: var(--muted); border: 1px solid var(--line-2); padding: 5px 8px; border-radius: 4px; }
.grad { color: var(--muted); }
.eyebrow { font: 500 12.5px/1 var(--mono); color: var(--dim); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 28px; }
.hero-grid { display: none; }
.hero-copy { max-width: 760px; }
.hero h1 { font-size: clamp(36px, 5.6vw, 64px); line-height: 1.02; margin: 0 0 20px; letter-spacing: -0.035em; }
.hero p.lead { font-size: clamp(16px, 1.8vw, 18.5px); color: var(--muted); max-width: 600px; margin: 0 0 28px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-meta { margin-top: 14px; font-size: 13.5px; color: var(--dim); }

.intro { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: end; }
.intro h1 { margin: 0; }
.intro p { margin: 0 0 22px; color: var(--muted); font-size: 17.5px; max-width: 520px; }

/* ---------- Feature carousel (real screenshots) ---------- */
.show { margin-top: 44px; }
.show-frame {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--chrome);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.show-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.show-frame img.on { opacity: 1; }
.show-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 20px; margin-top: 18px; }
.show-tabs button {
  position: relative; text-align: left; background: none; border: 0; border-top: 2px solid var(--line-2);
  padding: 14px 0 0; color: var(--dim); cursor: pointer; font: inherit;
}
.show-tabs button::before {
  content: ""; position: absolute; left: 0; top: -2px; height: 2px; width: 0; background: var(--text);
}
.show-tabs button.on::before { width: var(--p, 100%); }
.show-tabs b { display: block; color: var(--muted); font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.show-tabs span { display: block; font-size: 13.5px; line-height: 1.5; }
.show-tabs button.on b { color: var(--text); }
.show-tabs button.on span { color: var(--muted); }
.show-tabs button:hover b { color: var(--text); }
.show-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.formats-line { margin-top: 28px; color: var(--dim); font: 500 13px/1.7 var(--mono); }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.section-title { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.12; margin: 0 0 12px; letter-spacing: -0.025em; }
.section-lead { color: var(--muted); font-size: 16.5px; max-width: 620px; margin: 0; }
.center .section-lead { margin-inline: auto; }
.head { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; }

/* panels like the app's (flat, one border) */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }

/* feature list: plain columns with hairlines, no icon tiles */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; margin-top: 40px; }
.feature { padding: 22px 0 26px; border-top: 1px solid var(--line); }
.feature h3 { margin: 0 0 6px; font-size: 16.5px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }
.feature .keys { margin-top: 12px; display: flex; gap: 5px; flex-wrap: wrap; }

/* comparison */
.compare { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.compare th, .compare td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.compare th { color: var(--dim); font-weight: 500; font-size: 13.5px; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; }
.compare tr:last-child td { border-bottom: 0; }
.compare .us { background: rgba(255,255,255,0.03); }
.compare th.us { color: var(--text); }
.yes { color: var(--success); font-weight: 600; }
.no { color: var(--off); }
.part { color: var(--warning); font-size: 13px; }
.table-scroll { overflow-x: auto; }

/* shortcuts */
.shortcuts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 32px; margin-top: 32px; }
.sc { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.sc span:last-child { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

/* closing call to action */
.cta-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding: 36px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cta-row h2 { margin: 0 0 4px; font-size: 24px; }
.cta-row p { margin: 0; color: var(--muted); }

/* ---------- Pricing ---------- */
.billing-note { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 44px; align-items: stretch; }
.plan { padding: 26px; display: flex; flex-direction: column; position: relative; }
.plan.featured { border-color: rgba(95,148,255,0.55); }
.plan .ribbon { position: absolute; top: -10px; left: 24px; font: 500 11.5px/1 var(--mono); color: #141518; background: #ECEDEF; padding: 5px 8px; border-radius: 4px; }
.plan h3 { margin: 0; font-size: 18px; }
.plan .who { color: var(--dim); font-size: 13.5px; margin: 4px 0 20px; }
.price { display: flex; align-items: baseline; gap: 6px; min-height: 56px; }
.price .amt { font-size: 44px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.price .per { color: var(--dim); font-size: 13.5px; }
.price-sub { color: var(--muted); font-size: 13.5px; min-height: 22px; margin: 6px 0 20px; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 9px; font-size: 14px; color: var(--muted); }
.plan ul li { display: flex; gap: 10px; }
.plan ul li::before { content: "✓"; color: var(--text); flex: none; }
.plan ul li.off::before { content: "–"; color: var(--off); }
.plan ul li.off { color: var(--dim); }
.plan .grow { flex: 1; align-content: start; }

.pwyw { margin: 4px 0 18px; }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.presets button { height: 34px; border-radius: var(--r); border: 1px solid var(--line); cursor: pointer; background: var(--well); color: var(--muted); font: 500 13.5px/1 var(--font); }
.presets button:hover { color: var(--text); border-color: var(--line-2); }
.presets button.on { color: var(--text); border-color: var(--text); }
.field { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; background: var(--well); border: 1px solid var(--line); border-radius: var(--r); }
.field:hover { border-color: var(--line-2); }
.field:focus-within { border-color: var(--accent); }
.field input, .field select { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: 500 15px var(--font); }
.field select option { background: var(--page); }
.field .cur { color: var(--dim); font-weight: 600; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 10px 0 2px; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--text) var(--p, 30%), #3A3B42 var(--p, 30%)); }
input[type=range]::-moz-range-track { height: 3px; border-radius: 2px; background: #3A3B42; }
input[type=range]::-moz-range-progress { height: 3px; border-radius: 2px; background: var(--text); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; margin-top: -5.5px; cursor: grab; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; cursor: grab; }

.seats { display: flex; align-items: center; background: var(--well); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; height: 40px; }
.seats button { width: 40px; height: 100%; background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; }
.seats button:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.seats input { flex: 1; width: 40px; text-align: center; background: none; border: 0; color: var(--text); font: 600 15px var(--font); outline: none; -moz-appearance: textfield; }
.seats input::-webkit-inner-spin-button { -webkit-appearance: none; }
.tiers { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.tiers span { font-size: 11.5px; color: var(--dim); background: var(--well); border-radius: 4px; padding: 4px 7px; border: 1px solid transparent; }
.tiers span.on { color: var(--success); border-color: rgba(70,194,142,.35); }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--muted); margin-top: 12px; }
.switch { position: relative; width: 34px; height: 20px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #3A3B42; cursor: pointer; transition: background .15s; }
.switch span::after { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(14px); }

.currency { display: inline-flex; padding: 3px; background: var(--chrome); border: 1px solid var(--line); border-radius: 8px; }
.currency button { border: 0; background: none; color: var(--muted); font: 500 13.5px/1 var(--font); padding: 8px 14px; border-radius: 5px; cursor: pointer; }
.currency button.on { background: var(--btn2); color: var(--text); }

.pay-methods { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.pay-methods span { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); border: 1px solid var(--line); padding: 8px 12px; border-radius: var(--r); }
.pay-methods svg { width: 16px; height: 16px; color: var(--dim); }

.faq { max-width: 820px; margin: 36px 0 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 2px; font-weight: 600; font-size: 16px; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--dim); font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 2px 20px; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 36px; counter-reset: s; }
.step { padding: 22px; }
.step::before { counter-increment: s; content: "0" counter(s); display: block; color: var(--dim); font: 500 13px var(--mono); margin-bottom: 12px; }
.step h4 { margin: 0 0 6px; font-size: 15px; }
.step p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* ---------- Download ---------- */
.dl-card { padding: 32px; display: grid; grid-template-columns: auto 1fr auto; gap: 26px; align-items: center; }
.dl-card img { width: 80px; height: 80px; border-radius: 16px; }
.dl-card h2 { margin: 0 0 4px; font-size: 24px; }
.dl-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--dim); font-size: 13px; margin-top: 8px; }
.reqs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 20px; }
.reqs .card { padding: 24px; }
.reqs dl { display: grid; grid-template-columns: 120px 1fr; gap: 10px 16px; margin: 14px 0 0; font-size: 14px; }
.reqs dt { color: var(--dim); }
.reqs dd { margin: 0; color: var(--muted); }
.changelog { margin-top: 20px; }
.changelog .ver { display: flex; align-items: center; gap: 10px; }
.changelog ul { color: var(--muted); font-size: 14px; padding-left: 20px; }

/* ---------- Modal (like the app's Save dialog) ---------- */
.modal-dim { position: fixed; inset: 0; z-index: 100; background: rgba(8,9,11,0.62); display: none; place-items: center; padding: 16px; }
.modal-dim.open { display: grid; animation: fade .15s ease-out; }
.modal { width: min(440px, 100%); padding: 24px; }
.modal h3 { margin: 0 0 8px; font-size: 17px; }
.modal p { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.modal .sum { display: flex; justify-content: space-between; padding: 12px 14px; background: var(--well); border: 1px solid var(--line); border-radius: var(--r); margin: 16px 0; font-size: 14px; }
.modal .sum b { font-size: 16px; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
@keyframes fade { from { opacity: 0; } }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); opacity: 0; z-index: 120;
  background: var(--chrome); border: 1px solid var(--line-2); border-radius: var(--r); padding: 10px 14px;
  font-size: 13px; color: var(--text); transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 44px 0 36px; background: var(--chrome); margin-top: 48px; }
.foot { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.foot h5 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--text); }
.foot a { display: block; color: var(--muted); font-size: 14px; padding: 3px 0; }
.foot a:hover { color: var(--text); }
.foot p { color: var(--dim); font-size: 13.5px; max-width: 300px; }
.copy { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--dim); font-size: 12.5px; }

/* gentle fade-in, no slide-ups */
.reveal { opacity: 0; transition: opacity .5s ease; }
.reveal.in { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transition: none; }
  .show-frame img { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .intro { grid-template-columns: 1fr; gap: 20px; }
  .features, .plans { grid-template-columns: 1fr 1fr; }
  .plans .plan:last-child { grid-column: span 2; }
  .shortcuts, .steps { grid-template-columns: 1fr 1fr; }
  .show-tabs { grid-template-columns: 1fr 1fr; gap: 18px 20px; }
  .foot { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  section { padding: 60px 0; }
  .hero { padding-top: 44px; }
  .nav-links { display: none; position: absolute; top: 52px; left: 0; right: 0; flex-direction: column; background: var(--chrome); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 4px; }
  .nav-burger { display: block; }
  .nav .btn-download { display: none; }
  .features, .plans, .shortcuts, .steps, .reqs { grid-template-columns: minmax(0, 1fr); }
  .plans .plan:last-child { grid-column: auto; }
  .show-tabs span { display: none; }
  .dl-card { grid-template-columns: 1fr; padding: 24px 20px; }
  .foot { grid-template-columns: 1fr; }
  .reqs dl { grid-template-columns: 100px 1fr; }
}
