/* Learns by Challengers — learns.ch */

@font-face { font-family: "Libron"; src: url("/assets/fonts/Libron-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Libron"; src: url("/assets/fonts/Libron-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Libron"; src: url("/assets/fonts/Libron-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Libron"; src: url("/assets/fonts/Libron-BoldItalic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  --sand: #DFCBA3;
  --sand-1: #E8C98F;
  --sand-2: #F0DBB5;
  --sky: #92C1E3;
  --sky-soft: #A0CBE7;
  --deep: #4990C4;
  --signature: linear-gradient(100deg, #DFCBA3 18.8%, #92C1E3 59.4%, #4990C4 100%);

  --bg: #F4EFE6;
  --bg-2: #EFE8DB;
  --card: #FFFCF7;
  --line: #E7DCC8;
  --ink: #141F38;
  --ink-2: #3D475E;
  --muted: #6B7285;
  --link: #2F6E9E;
  --shadow: 0 1px 2px rgba(20,31,56,.05), 0 10px 30px rgba(20,31,56,.07);
  --sky-opacity: .95;

  --serif: "Libron", "New York", ui-serif, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 24px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1424;
    --bg-2: #121A2D;
    --card: #172036;
    --line: #26304A;
    --ink: #EEF1F6;
    --ink-2: #C6CCD9;
    --muted: #98A0B3;
    --link: #A0CBE7;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.35);
    --sky-opacity: .32;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  min-height: 100vh; position: relative; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--deep); outline-offset: 3px; border-radius: 6px; }

/* Moving sand → sky background */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; opacity: var(--sky-opacity); }
.sky::before {
  content: ""; position: absolute; inset: -30%;
  background: linear-gradient(135deg, #DFCBA3 18.8%, #92C1E3 59.4%, #4990C4 100%);
  background-size: 200% 200%;
  animation: drift 28s ease-in-out infinite alternate;
}
.sky span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .85; will-change: transform; }
.sky .b1 { width: 60vmax; height: 60vmax; left: -15vmax; top: -20vmax; background: #E8C98F; animation: float1 34s ease-in-out infinite alternate; }
.sky .b2 { width: 55vmax; height: 55vmax; right: -18vmax; top: 10vmax; background: #92C1E3; animation: float2 40s ease-in-out infinite alternate; }
.sky .b3 { width: 50vmax; height: 50vmax; left: 20vmax; bottom: -25vmax; background: #4990C4; opacity: .6; animation: float3 46s ease-in-out infinite alternate; }
.sky .b4 { width: 35vmax; height: 35vmax; left: 35vmax; top: -5vmax; background: #F0DBB5; animation: float2 38s ease-in-out infinite alternate-reverse; }
.sky::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 0, color-mix(in srgb, var(--bg) 55%, transparent) 70vh, color-mix(in srgb, var(--bg) 72%, transparent) 100%); }
@keyframes drift { 0% { background-position: 0% 0%; } 100% { background-position: 100% 100%; } }
@keyframes float1 { to { transform: translate(18vmax, 12vmax) scale(1.15); } }
@keyframes float2 { to { transform: translate(-20vmax, 10vmax) scale(.9); } }
@keyframes float3 { to { transform: translate(-12vmax, -16vmax) scale(1.2); } }

.container { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; backdrop-filter: saturate(1.4) blur(18px); -webkit-backdrop-filter: saturate(1.4) blur(18px); background: color-mix(in srgb, var(--bg) 62%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav-link { color: var(--ink-2); text-decoration: none; font-size: .95rem; padding: 6px 10px; border-radius: 999px; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--ink); background: color-mix(in srgb, var(--card) 70%, transparent); }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--card) 75%, transparent); border: 1px solid var(--line); margin-left: 6px; }
.seg a { font-size: .8rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); text-decoration: none; padding: 4px 10px; border-radius: 999px; }
.seg a[aria-current="true"] { background: var(--signature); color: #141F38; }
@media (max-width: 640px) { .nav .nav-link { display: none; } }

/* Buttons and badge */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 24px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 0; cursor: pointer; font-size: 1rem; }
.btn-primary { background: var(--signature); color: #141F38; box-shadow: 0 6px 20px rgba(73,144,196,.28); }
.btn-primary:hover { filter: brightness(1.04); }
.btn-ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.badge-link { display: inline-block; line-height: 0; border-radius: 10px; }
.badge-link img { height: 52px; width: auto; }

/* Hero */
.hero { padding: clamp(48px, 9vw, 110px) 0 40px; }
.hero .container { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .hero .container { grid-template-columns: 1.1fr .9fr; } }
.hero-mark { width: 92px; height: 92px; border-radius: 22px; box-shadow: var(--shadow); margin-bottom: 26px; }
.eyebrow, .label { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 14px; }
.hero h1 { margin-bottom: .3em; }
.hero .lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--ink-2); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 28px; }
.platforms { font-size: .92rem; color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--ink-2); }

/* Devices */
.phone { position: relative; width: min(300px, 78vw); margin-inline: auto; border-radius: 46px; padding: 11px; background: #10131c; box-shadow: 0 30px 60px rgba(20,31,56,.22), 0 0 0 1px rgba(255,255,255,.06) inset; }
.phone img, .phone .shot-empty { border-radius: 36px; width: 100%; aspect-ratio: 720 / 1500; object-fit: cover; object-position: top; background: var(--bg-2); }
.phone.tilt { transform: rotate(2deg); }
.phones { display: flex; justify-content: center; gap: 18px; }
.phones .phone { width: min(250px, 44vw); }
.phones .phone:nth-child(2) { margin-top: 48px; }
.shot-empty { display: grid; place-items: center; text-align: center; padding: 20px; color: var(--muted); font-size: .9rem; border: 2px dashed var(--line); }
.tablet, .mac { border-radius: 26px; background: #10131c; padding: 12px; box-shadow: var(--shadow); }
.tablet .shot-empty { aspect-ratio: 4 / 3; border-radius: 16px; }
.mac { border-radius: 18px 18px 6px 6px; padding: 10px 10px 18px; }
.mac .shot-empty { aspect-ratio: 16 / 10; border-radius: 8px; }
.mac-base { height: 12px; margin: 0 -6%; background: linear-gradient(#cfd3da, #a9aeb8); border-radius: 0 0 14px 14px; }

/* Sections */
section { position: relative; }
.band { padding: clamp(56px, 8vw, 96px) 0; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head.center { text-align: center; margin-inline: auto; }
.rule { width: 56px; height: 4px; border-radius: 4px; background: var(--signature); margin: 0 0 18px; }
.center .rule { margin-inline: auto; }

.feature { display: grid; gap: 40px; align-items: center; padding: clamp(40px, 6vw, 72px) 0; }
@media (min-width: 900px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 72px; }
  .feature.flip .feature-media { order: -1; }
}
.feature-num { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1.05rem; margin-bottom: 8px; display: block; }
.feature ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.feature li { position: relative; padding-left: 26px; color: var(--ink-2); }
.feature li::before { content: ""; position: absolute; left: 0; top: .62em; width: 12px; height: 4px; border-radius: 4px; background: var(--signature); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 18px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.card .muted { color: var(--muted); }
.icon-dot { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--sand-2) 70%, var(--card)); margin-bottom: 14px; color: #141F38; }
@media (prefers-color-scheme: dark) { .icon-dot { background: #2A3550; color: var(--ink); } }
.icon-dot svg { width: 22px; height: 22px; }

.devices { display: grid; gap: 28px; align-items: end; }
@media (min-width: 900px) { .devices { grid-template-columns: 1.15fr 1.5fr .62fr; } }
.devices figure { margin: 0; }
.devices figcaption { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 12px; }

.privacy-band .card { background: color-mix(in srgb, var(--card) 88%, transparent); }
.quote { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.35; text-align: center; max-width: 760px; margin: 0 auto; color: var(--ink); }
.quote cite { display: block; font-style: normal; font-family: var(--sans); font-size: .95rem; color: var(--muted); margin-top: 14px; }

.cta-final { text-align: center; }
.cta-final .card { padding: clamp(36px, 6vw, 64px); background: var(--signature); border: 0; color: #141F38; }
.cta-final .card p { color: #1F2B47; }

/* Inner pages */
.page-head { padding: clamp(48px, 8vw, 88px) 0 24px; }
.page-head .lead { margin-bottom: 0; }
.meta { color: var(--muted); font-size: .92rem; margin-top: 14px; }
.prose { padding-bottom: 80px; }
.prose h2 { font-size: 1.45rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.4em; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose .card { margin: 1.4em 0; }
.prose address { font-style: normal; color: var(--ink-2); line-height: 1.7; }
.todo { background: #FFF1C9; color: #5A4300; padding: 1px 6px; border-radius: 6px; font-size: .95em; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .todo { background: #4A3C12; color: #FFE6A3; } }

.contact-card { display: grid; gap: 14px; justify-items: start; }
.faq { display: grid; gap: 10px; margin-top: 10px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 600; color: var(--ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 1.4rem; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding-bottom: 18px; }
.faq details > div p:last-child { margin-bottom: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 85%, transparent); padding: 48px 0 32px; margin-top: 40px; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.3fr 1fr auto; align-items: start; } }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-end { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.footer-end .seg { margin-left: 0; }
.muted { color: var(--muted); }
.copy { margin: 32px 0 0; font-size: .88rem; color: var(--muted); }

/* 404 */
.notfound { text-align: center; padding: 120px 0; }

/* Entrance */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

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

/* Spaced repetition explainer */
.mem { padding: clamp(20px, 4vw, 36px); }
.mem-wrap { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; }
.mem-yaxis { writing-mode: vertical-rl; transform: rotate(180deg); font-size: .8rem; color: var(--muted); text-align: center; }
.mem-plot { position: relative; }
.mem-plot svg { display: block; width: 100%; height: clamp(200px, 32vw, 300px); border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.mem-xaxis { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin: 6px 0 18px 30px; }
.mem-band { fill: var(--sand-1); opacity: .45; }
.mem-floor { stroke: var(--muted); stroke-dasharray: 4 5; stroke-width: 1; opacity: .6; }
.mem-ghost { fill: none; stroke: var(--muted); stroke-width: 1.5; opacity: .45; }
.mem-curve { fill: none; stroke: var(--deep); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.mem-dot { fill: var(--deep); stroke: var(--card); stroke-width: 3; }
.mem-dot.forgot { fill: #D9534F; } .mem-dot.early { fill: var(--sky); } .mem-dot.good { fill: #2E9E6B; } .mem-dot.late { fill: #E0A030; }
.mem-label { font-weight: 600; margin: 4px 0 6px 30px; }
.mem-tracks { display: grid; gap: 4px; margin-left: 30px; }
.mem-range { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; background: transparent; margin: 0; cursor: grab; }
.mem-range::-webkit-slider-runnable-track { height: 3px; background: var(--line); border-radius: 3px; }
.mem-range::-moz-range-track { height: 3px; background: var(--line); border-radius: 3px; }
.mem-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 30px; margin-top: -13.5px; border-radius: 11px; background: var(--deep); border: 3px solid var(--card); box-shadow: 0 2px 6px rgba(20,31,56,.25); }
.mem-range::-moz-range-thumb { width: 16px; height: 24px; border-radius: 11px; background: var(--deep); border: 3px solid var(--card); }
.mem-range.forgot::-webkit-slider-thumb { background: #D9534F; } .mem-range.forgot::-moz-range-thumb { background: #D9534F; }
.mem-range.good::-webkit-slider-thumb { background: #2E9E6B; } .mem-range.good::-moz-range-thumb { background: #2E9E6B; }
.mem-range.early::-webkit-slider-thumb { background: var(--sky); } .mem-range.early::-moz-range-thumb { background: var(--sky); }
.mem-range.late::-webkit-slider-thumb { background: #E0A030; } .mem-range.late::-moz-range-thumb { background: #E0A030; }
.mem-range:focus-visible { outline: none; }
.mem-range:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--deep); outline-offset: 2px; }
.mem-result { min-height: 3.2em; margin: 18px 0 14px; font-size: 1.05rem; color: var(--ink); }
.mem-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.mem-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .85rem; color: var(--muted); margin: 0 0 14px 30px; padding: 0; list-style: none; }
.mem-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.mem-credit { font-size: .85rem; color: var(--muted); margin-top: 16px; }
.mini-feats { display: grid; gap: 18px; padding: clamp(40px, 6vw, 72px) 0; }
@media (min-width: 800px) { .mini-feats { grid-template-columns: 1fr 1fr; } }
.mini-feats ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.mini-feats li { position: relative; padding-left: 22px; color: var(--ink-2); }
.mini-feats li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 4px; border-radius: 4px; background: var(--signature); }
