/* Vokabelkartei website: paper, index cards and the orange-pink-violet glow of the app. */

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader.woff2") format("woff2-variations"), url("fonts/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f7f3ef;
  --ink: #17140f;
  --ink-2: #3b352f;
  --dim: #645d56;
  --line: rgba(23, 20, 15, 0.1);
  --card: #fffdf9;
  --edge: #e9e0d6;
  --rule: #d7e1ee;
  --margin: #f1a5a0;
  --pen: #d93a3f;
  --orange: #ff9a3d;
  --pink: #f2559a;
  --violet: #a77cf2;
  --grey: #b9b1a8;
  --glass: rgba(255, 253, 249, 0.72);
  --shadow: 0 18px 40px -18px rgba(74, 46, 22, 0.35), 0 2px 6px rgba(74, 46, 22, 0.08);
  --serif: "Newsreader", ui-serif, "New York", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --max: 1120px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #110f10;
    --ink: #f4efea;
    --ink-2: #ddd5ce;
    --dim: #a8a098;
    --line: rgba(255, 255, 255, 0.1);
    --card: #1c191a;
    --edge: #2d2829;
    --rule: rgba(140, 165, 200, 0.2);
    --margin: rgba(241, 120, 115, 0.5);
    --grey: #6d655e;
    --glass: rgba(28, 25, 26, 0.75);
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: rgba(242, 85, 154, 0.55); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--pink); }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 6px; }

/* Colour drifting behind everything, like the backdrop in the app. */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--paper); pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.4; animation: drift 26s ease-in-out infinite alternate; }
.blob.b1 { width: 560px; height: 560px; left: -180px; top: -220px; background: var(--orange); }
.blob.b2 { width: 600px; height: 600px; right: -240px; top: -80px; background: var(--pink); animation-duration: 31s; opacity: 0.32; }
.blob.b3 { width: 620px; height: 620px; right: 8%; bottom: -320px; background: var(--violet); animation-duration: 35s; opacity: 0.3; }
.blob.b4 { width: 420px; height: 420px; left: 6%; bottom: -200px; background: var(--orange); animation-duration: 29s; opacity: 0.22; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(70px, 40px) scale(1.08); }
  100% { transform: translate(-30px, 80px) scale(0.96); }
}
@media (prefers-color-scheme: dark) { .blob { opacity: 0.2; } .blob.b2, .blob.b3 { opacity: 0.17; } }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

/* Header */
header.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 650; font-size: 21px; letter-spacing: -0.2px; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 4px 12px rgba(242, 85, 154, 0.28); }
nav.links { display: flex; gap: 22px; font-size: 15px; font-weight: 600; }
nav.links a { color: var(--ink-2); text-decoration: none; }
nav.links a:hover { color: var(--ink); }
@media (max-width: 760px) { nav.links { display: none; } }
a.back { font-size: 15px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
a.back:hover { color: var(--ink); }

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 700; color: var(--ink); }
h1 { font-size: clamp(44px, 7vw, 76px); line-height: 0.98; letter-spacing: -0.025em; margin: 0 0 22px; font-variation-settings: "opsz" 72; }
h2 { font-size: clamp(32px, 4.6vw, 48px); line-height: 1.04; letter-spacing: -0.02em; margin: 0 0 14px; font-variation-settings: "opsz" 60; }
h3 { font-size: 22px; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 6px; font-weight: 650; }
mark { color: inherit; background: none; position: relative; white-space: nowrap; z-index: 0; }
mark::before {
  content: ""; position: absolute; left: -0.06em; right: -0.06em; bottom: 0.08em; height: 0.36em; z-index: -1;
  border-radius: 0.2em; background: linear-gradient(90deg, var(--orange), var(--pink)); opacity: 0.45;
}
mark.pen::before { background: linear-gradient(90deg, #f06b6f, var(--pen)); opacity: 0.32; }
.lead { font-size: clamp(18px, 2.1vw, 21px); color: var(--ink-2); margin: 0 0 28px; max-width: 34em; }
.sub { font-size: 18px; color: var(--dim); margin: 0 0 34px; max-width: 40em; }
p { margin: 0 0 12px; }

/* Stamp like on the paper card box */
.stamp {
  display: inline-flex; align-items: center; gap: 0.45em;
  font: 650 13px/1 var(--sans); letter-spacing: 0.02em; color: var(--dim);
  padding: 7px 11px 7px 10px; border-radius: 8px; border: 1.5px solid var(--edge); background: var(--glass);
  transform: rotate(-2deg); transform-origin: left center; margin-bottom: 18px;
}
.stamp i { width: 7px; height: 7px; border-radius: 50%; background: var(--pink); }

/* Buttons: black pills as in the app */
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 24px; border-radius: 999px;
  font: 650 16px/1 var(--sans); text-decoration: none; color: var(--paper); background: var(--ink);
  box-shadow: 0 12px 26px -12px rgba(23, 20, 15, 0.6); transition: transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.soon { cursor: default; }
.btn.soon:hover { transform: none; }
.btn.soon small { font-weight: 500; opacity: 0.7; }
.btn.secondary { background: var(--glass); color: var(--ink); box-shadow: none; border: 1px solid var(--line); }
.note { font-size: 14px; color: var(--dim); margin-top: 18px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; padding: 48px 0 30px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding-top: 18px; } }
.hero-art { position: relative; height: 640px; }
@media (max-width: 900px) { .hero-art { height: auto; display: flex; justify-content: center; padding: 10px 0 20px; } }

/* Phone frame around a real screenshot (1320 x 2868) */
.phone {
  position: relative; width: 300px; padding: 9px; border-radius: 48px;
  background: linear-gradient(150deg, #3a3a3d 0%, #141416 22%, #1e1e21 60%, #0c0c0e 100%);
  box-shadow: inset 0 0 0 1.5px #55555a, inset 0 0 0 3px #0a0a0b, var(--shadow), 0 40px 70px -30px rgba(74, 46, 22, 0.45);
}
.phone img { width: 100%; height: auto; aspect-ratio: 1320 / 2868; border-radius: 39px; background: #fff; }
.phone::after {
  content: ""; position: absolute; left: 50%; top: calc(9px + 282px * 0.026); width: calc(282px * 0.285); height: calc(282px * 0.084);
  transform: translateX(-50%); border-radius: 999px; background: #050506;
}
.hero-art .phone.front { position: absolute; right: 40px; top: 0; z-index: 2; }
.hero-art .phone.back { position: absolute; right: 250px; top: 70px; width: 260px; transform: rotate(-7deg); z-index: 1; opacity: 0.96; }
.hero-art .phone.back::after { top: calc(9px + 242px * 0.026); width: calc(242px * 0.285); height: calc(242px * 0.084); }
@media (max-width: 900px) {
  .hero-art .phone.front { position: relative; right: auto; top: auto; width: min(300px, 76vw); }
  .hero-art .phone.front::after { top: calc(9px + (min(300px, 76vw) - 18px) * 0.026); width: calc((min(300px, 76vw) - 18px) * 0.285); height: calc((min(300px, 76vw) - 18px) * 0.084); }
  .hero-art .phone.back { display: none; }
}
.hero-art .floating-card { position: absolute; z-index: 3; left: -38px; bottom: 14px; width: 188px; transform: rotate(-5deg); padding: 54px 16px 16px; --lines-top: 85px; --lines-gap: 32px; }
.hero-art .floating-card .word { font-size: 27px; margin-top: 0; }
.hero-art .floating-card .answer { font-size: 22px; }
@media (max-width: 900px) { .hero-art .floating-card { display: none; } }

/* Index card */
.card-paper {
  position: relative; background-color: var(--card); border: 1px solid var(--edge); border-radius: 18px; box-shadow: var(--shadow);
  --lines-top: 76px;
  --lines-gap: 30px;
  background-image:
    linear-gradient(var(--margin), var(--margin)),
    repeating-linear-gradient(to bottom, var(--rule) 0, var(--rule) 1px, transparent 1px, transparent var(--lines-gap));
  background-size: 100% 1.5px, 100% calc(100% - var(--lines-top));
  background-position: 0 44px, 0 var(--lines-top);
  background-repeat: no-repeat;
  padding: 58px 20px 20px;
}
.card-paper .nr {
  position: absolute; left: 14px; top: 11px; font: 650 12px/1 var(--sans); color: var(--dim);
  padding: 5px 8px; border: 1px solid var(--edge); border-radius: 7px; background: var(--card);
}
.card-paper .tag-pro, .card-paper .tag-game {
  position: absolute; right: 14px; top: 11px; font: 700 11px/1 var(--sans); letter-spacing: 0.04em; color: #c2306f;
  padding: 5px 8px; border-radius: 999px; background: rgba(242, 85, 154, 0.12);
}
.card-paper .tag-game { color: #a35200; background: rgba(255, 154, 61, 0.16); }
@media (prefers-color-scheme: dark) { .card-paper .tag-pro { color: #ff8ec0; } .card-paper .tag-game { color: #ffb470; } }
.card-paper .word { font-family: var(--serif); font-weight: 650; font-size: 30px; line-height: 1.1; text-align: center; margin: 4px 0 6px; }
.card-paper .answer { font-family: var(--serif); font-weight: 600; font-size: 24px; text-align: center; }
.card-paper .answer span { position: relative; z-index: 0; }
.card-paper .answer span::before {
  content: ""; position: absolute; left: -0.1em; right: -0.1em; bottom: 0.08em; height: 0.38em; z-index: -1;
  border-radius: 0.2em; background: linear-gradient(90deg, var(--orange), var(--pink)); opacity: 0.38;
}

/* Sections */
section { padding: 64px 0; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 18px; }
@media (max-width: 980px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } }
.facts .card-paper { padding-top: 56px; --lines-top: 103px; --lines-gap: 26px; }
.facts .big { font-family: var(--serif); font-weight: 700; font-size: 36px; line-height: 44px; letter-spacing: -0.02em; margin-bottom: 8px; white-space: nowrap; }
/* The span gets room above the letters, otherwise the dots of «Ü» fall outside the clipped background. */
.facts .big span { display: inline-block; padding-top: 0.08em; background: linear-gradient(90deg, var(--orange), var(--pink), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.facts p { color: var(--dim); font-size: 15.5px; line-height: 26px; margin: 0; }

/* Steps with screenshots */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 24px 22px 22px; border-radius: 22px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.step::before {
  counter-increment: step; content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  margin-bottom: 14px; font: 700 15px/1 var(--sans); color: var(--paper); background: var(--ink);
}
.step p { color: var(--dim); font-size: 15.5px; margin: 0; }

/* The box with four compartments */
.box-wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 44px; align-items: center; }
@media (max-width: 900px) { .box-wrap { grid-template-columns: 1fr; } }
.leitner { position: relative; padding: 26px 22px 18px; border-radius: 26px; background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow); }
.leitner .row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; position: relative; container-type: inline-size; }
.compartment { text-align: center; }
.compartment .count { font: 700 26px/1 var(--sans); margin-bottom: 10px; }
.compartment .stack { position: relative; height: 92px; }
.compartment .stack i {
  position: absolute; left: 8%; right: 8%; height: 70px; border-radius: 8px; background: var(--card); border: 1px solid var(--edge);
  box-shadow: 0 1px 2px rgba(74, 46, 22, 0.08);
}
.compartment .stack i:nth-child(1) { top: 6px; transform: rotate(-2deg); }
.compartment .stack i:nth-child(2) { top: 13px; transform: rotate(1.5deg); }
.compartment .stack i:nth-child(3) { top: 20px; border-top: 3px solid var(--c); }
.compartment .front { height: 34px; margin-top: -12px; border-radius: 12px; background: var(--c); position: relative; z-index: 2; box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.08); }
.compartment .front::after { content: ""; position: absolute; left: 40%; right: 40%; top: 9px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.55); }
.compartment .label { font-size: 14px; font-weight: 600; color: var(--dim); margin-top: 10px; }
.c-new { --c: var(--grey); }
.c-learning { --c: var(--orange); }
.c-sure { --c: var(--pink); }
.c-master { --c: var(--violet); }
/* A card that knows its answer hops one compartment on. */
.hopper {
  --step: calc((100cqw + 12px) / 4);
  position: absolute; top: 30px; left: calc((100cqw - 36px) / 8 - 22px); width: 44px; height: 30px; border-radius: 6px; z-index: 3;
  background: var(--card); border: 1px solid var(--edge); border-top: 3px solid var(--pink); box-shadow: 0 6px 14px rgba(74, 46, 22, 0.22);
  animation: hop 9s cubic-bezier(0.5, 0, 0.3, 1) infinite;
}
@keyframes hop {
  0%, 14% { transform: translate(0, 0); }
  20% { transform: translate(calc(var(--step) * 0.5), -34px); }
  26%, 40% { transform: translate(var(--step), 0); }
  46% { transform: translate(calc(var(--step) * 1.5), -34px); }
  52%, 66% { transform: translate(calc(var(--step) * 2), 0); }
  72% { transform: translate(calc(var(--step) * 2.5), -34px); }
  78%, 92% { transform: translate(calc(var(--step) * 3), 0); }
  100% { transform: translate(calc(var(--step) * 3), 0); opacity: 0; }
}
.box-caption { font-size: 14px; color: var(--dim); text-align: center; margin: 14px 0 0; }

/* Practice modes as small index cards */
.modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.modes .card-paper { padding: 54px 18px 16px; --lines-top: 80px; --lines-gap: 26px; }
.modes h3 { font-size: 21px; line-height: 26px; margin: 0 0 4px; }
.modes p { color: var(--dim); font-size: 15px; line-height: 26px; margin: 0; }
.modes .auto { background: var(--ink); background-image: none; border-color: var(--ink); color: var(--paper); }
.modes .auto h3 { color: var(--paper); }
.modes .auto p { color: var(--paper); opacity: 0.78; }
.modes .auto .nr { background: transparent; color: var(--paper); border-color: rgba(255, 255, 255, 0.25); }
@media (prefers-color-scheme: dark) { .modes .auto { background: #f4efea; border-color: #f4efea; } .modes .auto .nr { border-color: rgba(0, 0, 0, 0.2); } }

/* Screenshot gallery */
.gallery {
  display: flex; gap: 26px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin;
  /* Runs to the edges of the window; the first phone lines up with the text (content width 1076px). */
  --inset: max(22px, calc(50vw - 538px));
  margin: 0 calc(-1 * var(--inset)); padding: 10px var(--inset) 34px; scroll-padding-inline: var(--inset);
}
.gallery figure { margin: 0; flex: none; scroll-snap-align: start; }
.gallery .phone { width: 236px; padding: 8px; border-radius: 38px; }
.gallery .phone img { border-radius: 31px; }
.gallery .phone::after { top: calc(8px + 220px * 0.026); width: calc(220px * 0.285); height: calc(220px * 0.084); }
.gallery figcaption { font-size: 14px; font-weight: 600; color: var(--dim); text-align: center; margin-top: 14px; }

/* Extras as a two-column list */
.extras { columns: 2; column-gap: 40px; padding: 0; margin: 0; list-style: none; }
@media (max-width: 760px) { .extras { columns: 1; } }
.extras li { break-inside: avoid; padding: 12px 0 12px 30px; border-top: 1px solid var(--line); position: relative; font-size: 16px; }
.extras li::before { content: ""; position: absolute; left: 6px; top: 20px; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--orange), var(--pink)); }
.extras li b { font-weight: 650; }

/* Pricing */
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 820px) { .pricing { grid-template-columns: 1fr; } }
.plan { padding: 28px; border-radius: 24px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.plan.pro {
  border: 2px solid transparent;
  background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, var(--orange), var(--pink), var(--violet)) border-box;
}
.plan h3 { font-size: 28px; margin: 0 0 4px; }
.plan .price { color: var(--dim); font-size: 15px; margin-bottom: 16px; }
.plan ul { list-style: none; padding: 0; margin: 0; }
.plan li { position: relative; padding: 8px 0 8px 26px; border-top: 1px solid var(--line); font-size: 15.5px; }
.plan li:first-child { border-top: 0; }
.plan li::before { content: "✓"; position: absolute; left: 2px; top: 8px; font-weight: 800; color: var(--pink); }
.plan .tag { display: inline-block; font: 700 11px/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: #17140f; padding: 6px 10px; border-radius: 999px; background: linear-gradient(90deg, var(--orange), var(--pink)); margin-bottom: 12px; }

/* Privacy */
.privacy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .privacy { grid-template-columns: 1fr; } }
.privacy div { padding: 22px; border-radius: 22px; background: var(--glass); border: 1px solid var(--line); }
.privacy p { color: var(--dim); font-size: 15.5px; margin: 0; }

/* FAQ */
.faq details { background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 16px 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 650; font-size: 17px; list-style: none; padding-right: 28px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: -2px; font-size: 22px; font-weight: 400; color: var(--dim); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); font-size: 16px; }

/* Support */
.support { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding: 30px; border-radius: 26px; background: var(--card); border: 1px solid var(--edge); box-shadow: var(--shadow); }
.support h2 { font-size: clamp(28px, 3.6vw, 38px); margin-bottom: 6px; }
.support p { color: var(--dim); margin: 0; max-width: 36em; }

/* Footer */
footer { padding: 40px 0 54px; margin-top: 30px; border-top: 1px solid var(--line); color: var(--dim); font-size: 14px; }
footer .cols { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--dim); margin-right: 18px; text-decoration: none; }
footer a:hover { color: var(--ink); }

/* Legal pages */
.legal { max-width: 780px; margin: 0 auto; }
article {
  background: var(--glass); border: 1px solid var(--line); border-radius: 26px; padding: 40px; margin-bottom: 20px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
@media (max-width: 560px) { article { padding: 24px 20px; border-radius: 20px; } }
article h1 { font-size: clamp(36px, 6vw, 52px); margin-bottom: 8px; }
article h2 { font-size: 24px; margin: 36px 0 10px; letter-spacing: -0.01em; }
article .meta { color: var(--dim); font-size: 14px; margin-bottom: 26px; }
article p, article li { font-size: 16px; color: var(--ink-2); }
article ul { padding-left: 20px; margin: 0 0 12px; }
article li { margin-bottom: 7px; }
article strong { color: var(--ink); }
.summary { padding: 16px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--edge); border-left: 4px solid var(--pink); margin-bottom: 8px; }
.summary p { margin: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
th { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
dl { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; margin: 0 0 12px; }
@media (max-width: 520px) { dl { grid-template-columns: 1fr; gap: 2px; } dd { margin-bottom: 10px; } }
dt { color: var(--dim); font-size: 15px; }
dd { margin: 0; color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob, .hopper { animation: none; }
  .hopper { display: none; }
  .btn { transition: none; }
}
