/* The getmaatje.app home page. Its look comes from the app icon: warm paper,
   ink, and one orange highlighter stroke. The stroke is the only loud thing on
   the page, and it is used the way the app uses it: to mark the words that
   matter. Vazirmatn is the app's own face and carries Latin and Persian with
   the same weight, which matters on a page that shows both. */

@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/Vazirmatn.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #f2ead9;
  --paper-deep: #eadfc8;
  --sheet: #fbf7ee;
  --ink: #241e18;
  --ink-soft: #4a4037;
  --muted: #6e6458;
  --line: rgba(36, 30, 24, 0.14);
  --marker: #ff9a2e;
  --marker-pool: #f07f12;
  --marker-ink: #8a4300;
  --pattern-a: #2f6f8f;
  --pattern-b: #a3402a;
  --focus: #241e18;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1b1712;
    --paper-deep: #241f18;
    --sheet: #2a241c;
    --ink: #f2ead9;
    --ink-soft: #d9cfbd;
    --muted: #a59a8a;
    --line: rgba(242, 234, 217, 0.14);
    --marker: #ff9a2e;
    --marker-pool: #f07f12;
    --marker-ink: #ffb766;
    --pattern-a: #8cc4de;
    --pattern-b: #f19a82;
    --focus: #ffb766;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Vazirmatn", -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }

/* The highlighter. A band behind the text, slightly rotated and ragged at the
   bottom edge where the ink pools, like the icon. */
.hl {
  position: relative;
  white-space: nowrap;
  z-index: 0;
}
.hl::before {
  content: "";
  position: absolute;
  inset: 0.08em -0.18em 0.02em -0.18em;
  background: linear-gradient(to bottom, var(--marker) 0 82%, var(--marker-pool) 82% 100%);
  opacity: 0.85;
  transform: rotate(-1.2deg) scaleX(var(--sweep, 1));
  transform-origin: left center;
  z-index: -1;
  border-radius: 2px 6px 3px 5px;
}
@media (prefers-color-scheme: dark) {
  .hl { color: #241e18; }
}

/* Header */
header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0;
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.01em; }
.brand svg { width: 40px; height: 40px; border-radius: 10px; flex: none; box-shadow: 0 0 0 1px var(--line); }
nav.top { display: flex; align-items: center; gap: 1.6rem; font-size: 0.95rem; }
nav.top a { text-decoration: none; color: var(--ink-soft); }
nav.top a:hover { color: var(--ink); text-decoration: underline; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
}
.button:hover { background: var(--ink-soft); }
.button svg.android { width: 1.15em; height: 1.15em; flex: none; }
.button.small { min-height: 40px; padding: 0.45rem 1rem; font-size: 0.92rem; color: var(--paper) !important; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 4rem;
  align-items: center;
  padding: 3.5rem 0 5rem;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 850;
  margin: 0 0 1.5rem;
}
.lede { font-size: 1.25rem; line-height: 1.55; color: var(--ink-soft); max-width: var(--measure); margin: 0 0 2rem; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.cta-note { color: var(--muted); font-size: 0.95rem; }

/* The lesson panel: a still frame of a real lesson. */
.lesson {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 1.5rem;
  box-shadow: 0 30px 60px -30px rgba(60, 40, 10, 0.35);
}
.lesson-head { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; color: var(--muted); margin-bottom: 1.25rem; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--marker-pool); box-shadow: 0 0 0 4px rgba(240, 127, 18, 0.18); }
.turn { margin: 0 0 0.85rem; max-width: 88%; }
.turn .who { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.15rem; }
.turn p { margin: 0; font-size: 1.12rem; line-height: 1.45; }
.turn.you { margin-left: auto; text-align: right; }
.turn.you p { color: var(--ink-soft); }
.turn.you .slip { text-decoration: line-through; text-decoration-color: var(--pattern-b); text-decoration-thickness: 2px; }

.lesson-tools { display: grid; grid-template-columns: 1.35fr 1fr; gap: 0.85rem; margin-top: 1.25rem; }
.tool { border: 1px solid var(--line); border-radius: 16px; padding: 0.9rem 1rem; background: var(--paper); }
.tool .label { font-size: 0.78rem; color: var(--muted); margin: 0 0 0.45rem; }
.board-row { display: flex; gap: 0.4rem; font-size: 1rem; line-height: 1.7; }
.board-row b { font-weight: 700; }
.pa { color: var(--pattern-a); }
.pb { color: var(--pattern-b); }
.drawing { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.drawing svg { width: 100%; max-width: 130px; height: auto; color: var(--ink); }
.drawing .word { font-weight: 700; margin-top: 0.15rem; }

/* Sections */
section.band { padding: 5.5rem 0; border-top: 1px solid var(--line); }
section.band.deep { background: var(--paper-deep); }
h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin: 0 0 1.25rem;
  max-width: 22ch;
}
.intro { font-size: 1.15rem; color: var(--ink-soft); max-width: var(--measure); margin: 0 0 3rem; }
h3 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 0.6rem; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
.cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem; }
.cols p { color: var(--ink-soft); }
.channel-mark { display: block; width: 44px; height: 44px; margin-bottom: 1.1rem; color: var(--ink); }

/* Mistakes: a real sequence, so it is numbered. */
.loop { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; align-items: start; }
ol.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
ol.steps li { counter-increment: step; position: relative; padding: 0 0 1.6rem 3.25rem; }
ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
}
ol.steps li:last-child::before { background: var(--marker); border-color: var(--marker); color: #241e18; }
ol.steps h3 { margin-bottom: 0.25rem; font-size: 1.12rem; }
ol.steps p { color: var(--ink-soft); margin: 0; }

.mistake {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.75rem;
  position: sticky;
  top: 2rem;
}
.mistake .row { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.mistake .row:last-child { border-bottom: 0; padding-bottom: 0; }
.mistake .row:first-child { padding-top: 0; }
.mistake .k { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.2rem; }
.mistake .said { font-size: 1.2rem; color: var(--ink-soft); }
.mistake .said s { text-decoration-color: var(--pattern-b); text-decoration-thickness: 2px; }
.mistake .fix { font-size: 1.3rem; font-weight: 700; }
.mistake .why { font-size: 1.12rem; line-height: 1.9; }
.mistake .tag { display: inline-block; font-size: 0.82rem; padding: 0.15rem 0.65rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); }
.mistake .progress { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; color: var(--ink-soft); }
.tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ink); display: inline-grid; place-items: center; }
.tick.done { background: var(--ink); color: var(--paper); }

/* Your words */
.capture { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; align-items: center; }
.letter {
  background: #fffdf8;
  color: #241e18;
  border-radius: 6px;
  padding: 2rem 2rem 2.25rem;
  font-size: 1.02rem;
  line-height: 1.75;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 24px 50px -28px rgba(60, 40, 10, 0.45);
  transform: rotate(-1.5deg);
  max-width: 30rem;
}
.letter .from { font-size: 0.82rem; color: #6e6458; margin-bottom: 1rem; }
.letter p { margin: 0 0 0.75rem; }
.letter .hl::before { opacity: 0.75; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { padding: 1rem 0; border-top: 1px solid var(--line); color: var(--ink-soft); }
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts b { color: var(--ink); }

/* Languages */
.langs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-bottom: 2.5rem; }
.lang { border: 1px solid var(--line); border-radius: 20px; padding: 1.5rem; background: var(--sheet); }
.lang .name { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 0.5rem; }
.lang .name[dir="rtl"] { letter-spacing: 0; }
.lang p { margin: 0; color: var(--ink-soft); }
.lang.deepest { border: 2px solid var(--marker-pool); }
.lang .depth { display: block; margin-top: 0.85rem; font-size: 0.92rem; color: var(--marker-ink); font-weight: 600; }
.classes { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.classes li { border: 1px solid var(--line); border-radius: 999px; padding: 0.4rem 0.95rem; font-size: 0.95rem; background: var(--sheet); }

/* Privacy */
.privacy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; }
.privacy-grid div { padding: 1.4rem 0; border-top: 1px solid var(--line); }
.privacy-grid h3 { font-size: 1.08rem; margin-bottom: 0.35rem; }
.privacy-grid p { color: var(--ink-soft); margin: 0; }

/* Closing */
.closing { padding: 6rem 0; text-align: left; }
.closing h2 { max-width: 18ch; font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.closing p { max-width: var(--measure); color: var(--ink-soft); font-size: 1.15rem; margin-bottom: 2rem; }

footer.bottom { border-top: 1px solid var(--line); padding: 2rem 0 3rem; font-size: 0.92rem; color: var(--muted); }
footer.bottom ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; margin: 0 0 0.75rem; padding: 0; }
footer.bottom a { color: var(--ink-soft); }

/* Store badges: drawn in the page's ink, the shape people already know as
   "this opens the store". */
.stores { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.store {
  display: inline-flex; align-items: center; gap: 0.6rem;
  min-height: 52px; min-width: 11.5rem; padding: 0.5rem 1.15rem 0.5rem 0.95rem;
  border-radius: 14px; background: var(--ink); color: var(--paper);
  text-decoration: none; font-weight: 700; font-size: 1.12rem; line-height: 1.1;
  transition: transform 0.15s ease, background 0.15s ease;
}
.store:hover { background: var(--ink-soft); transform: translateY(-1px); }
.store svg { width: 1.7rem; height: 1.7rem; flex: none; }
.store span { display: flex; flex-direction: column; white-space: nowrap; }
.store small { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.01em; opacity: 0.85; }
.stores.big .store { min-height: 60px; font-size: 1.25rem; }

/* The real app, in phone frames. */
.phones-band { overflow: hidden; }
.phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; align-items: start; max-width: 60rem; margin: 0 auto; }
.phone { margin: 0; }
.phone picture { display: block; }
.phone img {
  display: block; width: 100%; height: auto;
  border-radius: 13% / 6%;
  border: 8px solid #17130f;
  box-shadow: 0 0 0 1px var(--line), 0 40px 70px -35px rgba(60, 40, 10, 0.55);
  background: var(--sheet);
}
.phone.lift { transform: translateY(-1.75rem); }
.phone figcaption { margin-top: 1.1rem; font-size: 0.98rem; color: var(--ink-soft); text-align: center; }
.phone figcaption b { color: var(--ink); }

/* One moment of motion: the highlighter sweeps across the corrected word in
   the hero lesson, once. */
@media (prefers-reduced-motion: no-preference) {
  .lesson .hl::before { animation: sweep 0.7s cubic-bezier(.5, 0, .2, 1) 0.9s both; }
  @keyframes sweep { from { transform: rotate(-1.2deg) scaleX(0); } to { transform: rotate(-1.2deg) scaleX(1); } }
}

@media (max-width: 1100px) {
  .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 3rem; }
}

@media (max-width: 960px) {
  .hero, .loop, .capture { grid-template-columns: minmax(0, 1fr); gap: 3rem; }
  .cols, .langs { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .phones { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
  .phone.lift { transform: none; }
  .langs { gap: 1rem; }
  .privacy-grid { grid-template-columns: minmax(0, 1fr); }
  .mistake { position: static; }
  nav.top a:not(.button) { display: none; }
}

@media (max-width: 640px) {
  /* Phones scroll sideways on a phone, each one most of a screen wide. */
  .phones {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 -1rem; padding: 0 1rem 1rem; gap: 1rem; scrollbar-width: none;
  }
  .phones::-webkit-scrollbar { display: none; }
  .phone { flex: 0 0 72%; scroll-snap-align: center; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 1rem; }
  .store { min-width: 0; flex: 1 1 9rem; font-size: 1rem; padding-right: 0.8rem; }
  .store svg { width: 1.45rem; height: 1.45rem; }
  .hero { padding: 1.5rem 0 3.5rem; }
  .lesson { padding: 1.1rem; border-radius: 22px; }
  .lesson-tools { grid-template-columns: minmax(0, 1fr); }
  section.band { padding: 4rem 0; }
  .letter { padding: 1.5rem; }
}
