/* Profmode shared styles. One accent colour, lots of white space. */
:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --ink: #111114;
  --muted: #62626b;
  --line: #e7e6e1;
  --accent: #6d28d9;
  --accent-ink: #ffffff;
  --accent-soft: #f1eaff;
  --good: #15803d;
  --good-soft: #e7f6ec;
  --bad: #b91c1c;
  --bad-soft: #fdecec;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(17, 17, 20, .05), 0 12px 32px -12px rgba(17, 17, 20, .14);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6.2vw, 4.4rem); font-weight: 750; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }
a { color: inherit; }
.muted { color: var(--muted); }
.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 40px); margin-inline: auto; }
.center { text-align: center; }
.hidden { display: none !important; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(250, 250, 247, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { font-weight: 750; font-size: 1.15rem; letter-spacing: -.02em; text-decoration: none; }
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { text-decoration: none; font-size: .95rem; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 620px) { .nav-links .hide-sm { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .98rem;
  padding: 11px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); border-color: #cfcdc6; }
.btn:active { transform: translateY(0); }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, .flash:focus-visible {
  outline: 3px solid rgba(109, 40, 217, .35); outline-offset: 2px;
}
.btn.primary {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
  box-shadow: 0 8px 24px -8px rgba(109, 40, 217, .6);
}
.btn.primary:hover { box-shadow: 0 12px 30px -8px rgba(109, 40, 217, .7); }
.nav-links a.btn.primary, .nav-links a.btn.primary:hover { color: var(--accent-ink); }
.btn.big { padding: 15px 28px; font-size: 1.05rem; }
.btn.small { padding: 7px 14px; font-size: .88rem; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* Hero */
.hero { position: relative; padding: 92px 0 72px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto; height: 620px; z-index: -1;
  background:
    radial-gradient(40% 50% at 30% 40%, rgba(109, 40, 217, .20), transparent 70%),
    radial-gradient(35% 45% at 72% 30%, rgba(236, 72, 153, .13), transparent 70%);
  animation: drift 16s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(4%, 6%, 0) scale(1.08); } }
.pill {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: .85rem; font-weight: 600; margin-bottom: 22px;
}
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 580px; margin-inline: auto; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.fine { font-size: .85rem; color: var(--muted); margin-top: 14px; }

/* Flip card (landing demo and app) */
.flash {
  perspective: 1400px; width: min(560px, 100%); height: 300px; margin: 48px auto 0;
  cursor: pointer; border: 0; background: none; padding: 0; display: block; font: inherit; color: inherit;
}
.flash-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform .55s cubic-bezier(.2, .8, .2, 1); transform-style: preserve-3d;
}
.flash.flipped .flash-inner { transform: rotateX(180deg); }
.flash-face {
  position: absolute; inset: 0; backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 28px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 24px; box-shadow: var(--shadow); font-size: 1.35rem; font-weight: 600; overflow: auto;
}
.flash-face.back { transform: rotateX(180deg); font-weight: 500; }
.flash-face small { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.source-tag { margin-top: 14px; font-size: .8rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }

/* Sections */
section { padding: 76px 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
@media (max-width: 860px) { .grid3 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: transform .2s ease, box-shadow .2s ease;
}
.card.lift:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .num { font-size: .85rem; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }
.strike { color: var(--muted); font-size: .93rem; }

/* Pricing */
.price { font-size: 2.4rem; font-weight: 750; letter-spacing: -.03em; margin: 6px 0 2px; }
.price small { font-size: .95rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 24px; }
.plan li { padding: 6px 0 6px 26px; position: relative; font-size: .97rem; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.plan .btn { width: 100%; }
.plan.featured { border-color: var(--accent); box-shadow: 0 20px 50px -24px rgba(109, 40, 217, .55); position: relative; }
.plan .tag { position: absolute; top: -12px; left: 24px; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-weight: 700; transition: transform .2s ease; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 12px 0 0; color: var(--muted); }

footer { border-top: 1px solid var(--line); padding: 34px 0; font-size: .9rem; color: var(--muted); }

/* Legal pages */
.legal h1 { font-size: 2.4rem; margin-top: 24px; }
.legal h3 { margin-top: 2em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .4em; }

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

/* ---------- App ---------- */
.app-main { padding: 36px 0 80px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 14px; }
.set-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 24px; }
.set-card { text-decoration: none; display: block; }
.set-card h3 { margin-bottom: 4px; overflow-wrap: anywhere; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
input[type=text], textarea {
  width: 100%; font: inherit; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
textarea { min-height: 220px; resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: .92rem; }
.hint { font-size: .86rem; color: var(--muted); margin-top: 6px; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0; }
@media (max-width: 700px) { .modes { grid-template-columns: 1fr; } }
.mode { text-decoration: none; text-align: left; }
.terms { margin-top: 26px; }
.term-row { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.term-row b { font-weight: 600; }
.bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 14px 0 26px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .35s ease; }
.q { font-size: 1.3rem; font-weight: 600; margin: 8px 0 20px; overflow-wrap: anywhere; }
.q-label { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.opts { display: grid; gap: 10px; }
.opt {
  text-align: left; font: inherit; padding: 14px 16px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); overflow-wrap: anywhere;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.opt:hover:not([disabled]) { border-color: var(--accent); transform: translateX(2px); }
.opt.picked { border-color: var(--accent); background: var(--accent-soft); }
.opt.right { border-color: var(--good); background: var(--good-soft); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.feedback { margin-top: 16px; padding: 14px 16px; border-radius: 12px; font-weight: 500; }
.feedback.good { background: var(--good-soft); color: var(--good); }
.feedback.bad { background: var(--bad-soft); color: var(--bad); }
.test-q { padding: 22px 0; border-bottom: 1px solid var(--line); }
.score { font-size: 3.4rem; font-weight: 750; letter-spacing: -.03em; color: var(--accent); }
.notice { background: var(--accent-soft); color: #4c1d95; border-radius: 12px; padding: 12px 16px; font-size: .92rem; }
.pop { animation: pop .3s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
