/* Tradecraft landing page. The app's colours, type and logo (css/styles.css); dark "stage" bands for the hero and the
   closing call, the rest in the visitor's light or dark theme. Phone first. */
:root {
  --bg: #F5F5F7; --surface: #FFFFFF;
  --fill: rgba(118, 118, 128, 0.12); --sep: rgba(60, 60, 67, 0.12);
  --label: #1D1D1F; --label-2: #5C5C61; --label-3: #6E6E73;
  --blue: #0066CC; --blue-hover: #0071E3;
  --green: #34C759;
  --ring: #0A84FF; --bezel: #1D1D1F;
  --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --mark: linear-gradient(145deg, #0A84FF, #5E5CE6);
  --grad-text: linear-gradient(100deg, #4DA3FF 0%, #8E8CFF 55%, #C07CFF 100%);
  --ink: #07080D;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, 'Segoe UI', Roboto, 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --gutter: max(20px, env(safe-area-inset-left));
  --maxw: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #000000; --surface: #121318;
    --fill: rgba(118, 118, 128, 0.24); --sep: rgba(255, 255, 255, 0.09);
    --label: #F5F5F7; --label-2: #A1A1A6; --label-3: #8E8E93;
    --blue: #0A84FF; --blue-hover: #409CFF;
    --green: #30D158;
    --bezel: #2C2C30; --shadow-2: 0 0 0 1px rgba(255, 255, 255, 0.02);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--label); font: 17px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--blue); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
h2 { font-size: clamp(32px, 7vw, 52px); line-height: 1.06; letter-spacing: -0.03em; font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; }
h3 { letter-spacing: -0.015em; }
main > section, .stage > section { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.grad { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kicker { margin: 0 0 12px; color: var(--blue); font-size: 15px; font-weight: 600; text-align: center; }
.section-sub { margin: 14px auto 0; max-width: 620px; color: var(--label-2); font-size: 18px; text-align: center; text-wrap: balance; }
main > section > h2 { text-align: center; }

/* ───────── buttons ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; min-height: 46px; padding: 0 22px; border: 0; border-radius: 980px; background: var(--fill); color: var(--blue); font: 600 16px/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background 0.15s, transform 0.15s; }
.btn:hover { background: rgba(118, 118, 128, 0.2); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-hover); }
.btn.big { min-height: 54px; padding: 0 28px; font-size: 17px; }
.btn.small { min-height: 34px; padding: 0 16px; font-size: 14px; }
.btn.ghost { background: rgba(255, 255, 255, 0.08); color: #F5F5F7; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.14); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.cta-row.center { justify-content: center; }

/* ───────── header: always dark, like the stage ───────── */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(7, 8, 13, 0.78); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: var(--maxw); margin: 0 auto; padding: 10px var(--gutter); }
.brand { display: flex; align-items: center; gap: 10px; color: #F5F5F7; font: 700 19px/1 var(--font-display); letter-spacing: -0.02em; text-decoration: none; }
.brand .mark { width: 28px; height: 28px; border-radius: 8px; background: var(--mark); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(10, 132, 255, 0.4); }
.brand .mark svg { width: 17px; height: 17px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nav-links { display: none; gap: 28px; }
.nav-links a { color: #A1A1A6; font-size: 14px; text-decoration: none; }
.nav-links a:hover { color: #F5F5F7; }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-signin { color: #F5F5F7; font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.nav-signin:hover { color: #fff; text-decoration: underline; }

/* ───────── stage: the dark bands ───────── */
.stage {
  --label: #F5F5F7; --label-2: #A1A1A6; --label-3: #8E8E93; --sep: rgba(255, 255, 255, 0.1); --blue: #0A84FF; --blue-hover: #409CFF;
  position: relative; isolation: isolate; overflow: hidden; background: var(--ink); color: var(--label);
}
.stage::before { content: ''; position: absolute; inset: 0; z-index: -2; background: radial-gradient(60% 55% at 12% -5%, rgba(10, 132, 255, 0.34), transparent 70%), radial-gradient(45% 50% at 92% 8%, rgba(94, 92, 230, 0.32), transparent 70%); }
.stage::after { content: ''; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(75% 60% at 50% 25%, #000, transparent 80%); mask-image: radial-gradient(75% 60% at 50% 25%, #000, transparent 80%); }

/* ───────── hero ───────── */
.hero { padding-top: 48px; padding-bottom: 8px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 14px; border-radius: 980px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); color: var(--label-2); font-size: 14px; font-weight: 500; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #30D158; box-shadow: 0 0 10px #30D158; }
.hero h1 { margin-top: 22px; font-size: clamp(42px, 11.5vw, 78px); line-height: 1.02; letter-spacing: -0.04em; font-weight: 700; text-wrap: balance; }
.lede { margin: 20px 0 0; max-width: 34em; color: var(--label-2); font-size: clamp(17px, 2.3vw, 20px); line-height: 1.55; }
.hero-price { margin: 20px 0 0; color: var(--label-3); font-size: 15px; }
.hero-price [data-price] { color: var(--label); font-weight: 600; }
.hero-note { margin: 6px 0 0; color: var(--label-3); font-size: 14px; }

.hero-visual { position: relative; width: 100%; max-width: 420px; aspect-ratio: 420 / 560; margin: 44px auto 0; }
.hero-visual .glow { position: absolute; inset: 12% 8% 10%; z-index: -1; border-radius: 50%; background: radial-gradient(circle, rgba(10, 132, 255, 0.5), rgba(94, 92, 230, 0.25) 45%, transparent 70%); filter: blur(30px); }
.phone { margin: 0; border: 7px solid #2A2A2E; border-radius: 40px; overflow: hidden; background: #000; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08); }
.phone img { display: block; width: 100%; height: auto; }
.hero-visual .phone { position: absolute; }
.hero-visual .back { left: 5%; top: 9%; width: 48%; transform: rotate(-4deg); opacity: 0.85; }
.hero-visual .front { right: 4%; top: 1%; width: 54%; transform: rotate(3deg); }

/* ───────── stats and ticker ───────── */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; margin-top: 8px; }
.stats div { padding: 20px 0; border-top: 1px solid var(--sep); }
.stats b { display: block; font: 700 clamp(36px, 8vw, 52px)/1 var(--font-display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.stats span { display: block; margin-top: 6px; color: var(--label-3); font-size: 15px; }
.ticker { margin-top: 36px; padding: 18px 0; border-top: 1px solid var(--sep); overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.ticker-track { display: flex; width: max-content; margin: 0; padding: 0; list-style: none; animation: ticker 70s linear infinite; }
.ticker-track li { display: flex; align-items: center; gap: 22px; padding-right: 22px; color: var(--label-3); font-size: 15px; white-space: nowrap; }
.ticker-track li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--blue); opacity: 0.8; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ───────── sections ───────── */
.features, .levels, .pricing, .faq { padding-top: 88px; }

/* ───────── features ───────── */
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 44px; }
.bento .shot-tile { grid-column: span 2; }
.tile { display: flex; flex-direction: column; padding: 28px; border-radius: 26px; background: var(--surface); box-shadow: var(--shadow-2), 0 0 0 1px var(--sep); overflow: hidden; }
.tile h3 { font-size: 22px; line-height: 1.2; }
.tile p { margin: 10px 0 0; color: var(--label-2); font-size: 16px; line-height: 1.55; }
.tile p b { color: var(--label); }
.shot-tile .tile-text { flex: 1; }
.screen { width: min(220px, 72%); margin: 28px auto 0; border: 7px solid var(--bezel); border-radius: 34px; overflow: hidden; background: #000; }
.screen img { display: block; width: 100%; height: auto; }
.tile.small { padding: 20px; }
.tile.small h3 { font-size: 17px; }
.tile.small p { font-size: 14px; line-height: 1.5; }
.tile.small .ico { width: 38px; height: 38px; margin-bottom: 14px; }
.ico { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 18px; border-radius: 12px; background: var(--mark); box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3); }
.ico svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ───────── levels ───────── */
.goals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 36px auto 0; padding: 0; list-style: none; }
.goals li { padding: 16px; border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1px var(--sep); }
.goals b { display: block; font-size: 16px; line-height: 1.3; }
.goals span { display: block; margin-top: 4px; color: var(--label-2); font-size: 14px; line-height: 1.4; }
/* The course's shape: the core levels, numbered, then the subjects, named, under their groups. On a phone each group
   is one card; from a tablet up each subject is a card like a level's, and on a wide screen the groups' rows line up
   with the core's three columns: the group's name, then its subjects. */
.course-map { display: grid; gap: 36px; margin: 40px auto 0; }
.lv-group-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 0 4px 14px; }
.lv-group-top h3 { font-size: 21px; line-height: 1.2; }
.lv-group-top p { margin: 0; color: var(--label-3); font-size: 14px; }
.level-list, .subject-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.level-list li, .subject-list li { display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 14px 16px; border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1px var(--sep); }
.subject-list { gap: 0; border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1px var(--sep); overflow: hidden; }
.subject-list li { min-height: 54px; border-radius: 0; background: none; box-shadow: none; }
.subject-list li + li { border-top: 1px solid var(--sep); }
.lv-num { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--mark); color: #fff; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lv-title { min-width: 0; overflow-wrap: break-word; font-weight: 600; font-size: 16px; line-height: 1.3; }
/* A subject has no number: a small mark in its place. */
.subject-list li::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--mark); }
.subject-group + .subject-group { margin-top: 18px; }
.subject-group h4 { margin: 0 4px 8px; color: var(--label-2); font: 600 14px/1.3 var(--font); }

/* ───────── pricing ───────── */
.plans { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 820px; margin: 44px auto 0; }
.plan { position: relative; display: flex; flex-direction: column; padding: 30px; border-radius: 26px; background: var(--surface); box-shadow: var(--shadow-2), 0 0 0 1px var(--sep); container-type: inline-size; }
.plan h3 { color: var(--label-2); font-size: 17px; font-weight: 600; }
/* Sized to the card, so the widest price ("CHF 149.90") fits on a phone and in two columns; "/ month" stays whole,
   and goes under the price when there's no room beside it (the space before it is where the line can break). The cap
   (16% of the card's width) keeps it inside in a wide font too, where the screen width alone let it run past the card. */
.price { margin: 10px 0 0; font: 700 clamp(36px, 11vw, 60px)/1 var(--font-display); font-size: min(clamp(36px, 11vw, 60px), 16cqi); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.price small { color: var(--label-2); font: 500 17px/1 var(--font); letter-spacing: 0; white-space: nowrap; }
.plan-note { flex: 1; margin: 14px 0 26px; color: var(--label-2); }
.plan .btn { width: 100%; }
.plan.featured { border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--mark) border-box; box-shadow: 0 24px 60px rgba(10, 132, 255, 0.18); }
.badge { position: absolute; top: 24px; right: 24px; padding: 5px 11px; border-radius: 980px; background: var(--mark); color: #fff; font-size: 13px; font-weight: 700; }
.included { max-width: 820px; margin: 16px auto 0; padding: 28px 30px; border-radius: 26px; background: var(--surface); box-shadow: var(--shadow-2), 0 0 0 1px var(--sep); }
.included h3 { font-size: 17px; }
.included ul { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 28px; margin: 18px 0 0; padding: 0; list-style: none; }
.included li { position: relative; padding-left: 30px; color: var(--label-2); font-size: 16px; line-height: 1.45; }
.included li::before { content: ''; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid var(--green); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.included b { color: var(--label); }
.fine-print { margin: 18px auto 0; max-width: 620px; color: var(--label-3); font-size: 14px; text-align: center; text-wrap: balance; }

/* ───────── questions ───────── */
.faq { max-width: 780px; }
.faq h2 { margin-bottom: 28px; }
.faq details { margin-bottom: 10px; padding: 0 20px; border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1px var(--sep); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; color: var(--label-3); font-size: 22px; font-weight: 400; line-height: 1; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--label-2); line-height: 1.6; }

/* ───────── closing call ───────── */
.stage-end { margin-top: 104px; }
.final { padding-top: 96px; padding-bottom: 100px; text-align: center; }
.final h2 { font-size: clamp(36px, 8vw, 64px); }
.final .lede { margin-left: auto; margin-right: auto; }

/* ───────── footer ───────── */
.foot { border-top: 1px solid var(--sep); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; max-width: var(--maxw); margin: 0 auto; padding: 28px var(--gutter) max(36px, env(safe-area-inset-bottom)); }
.foot .brand { color: var(--label); font-size: 17px; }
/* The links wrap on a phone: on one line, Privacy and Refunds ran off the screen. */
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.foot-links a { color: var(--label-2); font-size: 14px; text-decoration: none; white-space: nowrap; }
.foot-links a:hover { color: var(--label); }
.foot-note { flex-basis: 100%; margin: 0; color: var(--label-3); font-size: 13px; }

/* ───────── narrow phones ───────── */
@media (max-width: 480px) {
  /* Tight enough for the brand, "Sign in" and "Get Tradecraft" on a 360 px phone in a wide font too. */
  .nav-in { padding-left: 16px; padding-right: 16px; gap: 8px; }
  .nav-actions { gap: 10px; }
  .brand { font-size: 17px; gap: 8px; }
  .nav .btn.small { padding: 0 11px; }
  .hero .cta-row .btn { flex: 1 1 100%; }
}
@media (max-width: 359px) {
  .nav-signin { display: none; }
}

/* ───────── wider screens ───────── */
@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .goals { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .level-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subject-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
  .subject-list li { min-height: 62px; border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1px var(--sep); }
  .subject-list li + li { border-top: 0; }
  .included ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price { font-size: clamp(36px, 5.6vw, 60px); font-size: min(clamp(36px, 5.6vw, 60px), 16cqi); }
  .bento { gap: 16px; }
  .bento .shot-tile { grid-column: span 1; }
  .tile.small { padding: 28px; }
  .tile.small h3 { font-size: 18px; }
  .tile.small p { font-size: 15px; }
  .tile.small .ico { width: 42px; height: 42px; margin-bottom: 18px; }
}
@media (min-width: 820px) {
  .nav-links { display: flex; }
}
@media (min-width: 960px) {
  .hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; gap: 40px; padding-top: 72px; }
  .hero-visual { max-width: 440px; margin-top: 0; }
  .stats { margin-top: 32px; }
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bento .shot-tile { grid-column: span 2; }
  .level-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .subject-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 10px; }
  .subject-group + .subject-group { margin-top: 10px; }
  .subject-group h4 { margin: 0 4px; font-size: 16px; }
  .subject-group .subject-list { grid-column: 2 / 4; }
  .features, .levels, .pricing, .faq { padding-top: 120px; }
  .stage-end { margin-top: 136px; }
  .final { padding-top: 128px; padding-bottom: 132px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; }
  .btn, .faq summary::after { transition: none; }
}
/* A promo code from a shared link, said next to the prices (js/landing.js). */
.promo-note { display: table; margin: 14px 0 0; padding: 6px 14px; border-radius: 999px; background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--label); font-size: 14px; }
.promo-note[hidden] { display: none; }
.promo-note.center { margin: 16px auto 0; }
.promo-note b { font-weight: 600; letter-spacing: 0.03em; }
