/* Learnwall site. Palette and type follow the app (docs/SPEC.md §1). */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque.ttf") format("truetype");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans.ttf") format("truetype");
  font-weight: 100 700;
  font-stretch: 85% 100%;
  font-display: swap;
}

:root {
  --bg: #f2f4f7;
  --ink: #101828;
  --ink-2: #475467;
  --accent: #2f54eb;
  --accent-strong: #1d39c4;
  --accent-soft: #eef2ff;
  --accent-border: #c7d2fe;
  --success: #067647;
  --success-soft: #ecfdf3;
  --success-border: #abefc6;
  --paper: #ffffff;
  --border: #d0d5dd;
  --divider: #e4e7ec;
  --lock: #0b1220;
  --lock-surface: #1d2939;
  --on-lock-2: #d0d5dd;
  --streak: #b54708;
  --heading: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --wrap: 1120px;
}

*,
*::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-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--heading);
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-strong);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 20px;
  top: 12px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
}

/* Header */

.site-header {
  padding: 18px 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--heading);
  font-weight: 700;
  font-size: 22px;
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand img {
  width: 36px;
  height: 36px;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  font-weight: 500;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 12px;
}

.site-nav a:hover {
  background: var(--divider);
  color: var(--ink);
}

.site-nav .lang {
  border: 1.5px solid var(--border);
  background: var(--paper);
  font-weight: 600;
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 40px 0 72px;
}

/* A faint brick wall behind the phone: the "wall" in Learnwall. */
.hero::before {
  content: "";
  position: absolute;
  inset: -40px -10% 0 35%;
  background-image:
    linear-gradient(var(--border) 1.5px, transparent 1.5px),
    linear-gradient(90deg, var(--border) 1.5px, transparent 1.5px),
    linear-gradient(90deg, var(--border) 1.5px, transparent 1.5px);
  background-size: 96px 44px, 96px 88px, 96px 88px;
  background-position: 0 0, 0 0, 48px 44px;
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(closest-side, #000 20%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 20%, transparent 100%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 48px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px 12px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(40px, 6.4vw, 72px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.lead {
  max-width: 34em;
  margin-top: 20px;
  color: var(--ink-2);
  font-size: clamp(18px, 2vw, 20px);
  line-height: 1.5;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 32px;
}

.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}

.soon::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #47cd89;
}

.cta-row a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.fine {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 14px;
}

/* Phone mock of the lock screen */

/* Proportions of a real handset: 9:20, like the Pixel 9 Pro XL screen (1344 x 2992). */
.phone {
  justify-self: center;
  display: flex;
  flex-direction: column;
  width: min(300px, 78vw);
  aspect-ratio: 9 / 20;
  padding: 10px 14px 8px;
  border: 8px solid var(--lock-surface);
  border-radius: 44px;
  background: var(--lock);
  color: var(--paper);
  box-shadow: 0 30px 60px -24px rgba(16, 24, 40, 0.45);
  font-size: 14px;
  line-height: 1.45;
}

.phone-status {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 22px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
}

/* Punch-hole camera */
.phone-status::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 11px;
  margin: -5.5px 0 0 -5.5px;
  border-radius: 999px;
  background: var(--lock-surface);
}

/* Battery */
.phone-status i {
  width: 22px;
  height: 11px;
  border-radius: 4px;
  background: var(--paper);
}

.phone-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 14px;
}

.phone-top img {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 13px;
  background: var(--lock-surface);
}

.phone-top strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.phone-top span {
  display: block;
  color: var(--on-lock-2);
  font-size: 11.5px;
}

.flash {
  padding: 18px;
  border-radius: 22px;
  background: var(--paper);
  color: var(--ink);
}

.lbl {
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.flash .lbl.accent {
  color: var(--accent);
}

.flash h3 {
  margin: 10px 0 12px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}

.flash hr {
  height: 1px;
  margin: 0 0 12px;
  border: 0;
  background: var(--divider);
}

.flash .answer {
  margin: 8px 0 10px;
  font-size: 15.5px;
  font-weight: 500;
}

.flash .src {
  color: var(--ink-2);
  font-size: 12px;
}

.flash .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 14px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--paper);
  font-size: 15px;
  font-weight: 600;
}

/* Pinned to the bottom of the screen, as in the app. */
.phone-foot {
  margin-top: auto;
  padding-top: 16px;
  color: var(--on-lock-2);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.phone-foot span {
  display: block;
  padding: 5px 0;
}

/* Gesture bar */
.phone-foot::after {
  content: "";
  display: block;
  width: 96px;
  height: 4px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: var(--paper);
  opacity: 0.85;
}

/* Sections */

.section {
  padding: 64px 0;
}

.section.alt {
  background: var(--paper);
  border-block: 1px solid var(--divider);
}

.section h2 {
  max-width: 18em;
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section .sub {
  max-width: 36em;
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 18px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding: 24px;
  border: 1px solid var(--divider);
  border-radius: 18px;
  background: var(--bg);
}

.steps li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--heading);
  font-size: 20px;
  font-weight: 700;
}

.steps h3,
.cards h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}

.steps p,
.cards p {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 16px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
}

.cards article {
  padding: 24px;
  border: 1px solid var(--divider);
  border-radius: 18px;
  background: var(--paper);
}

/* Dark stat band */

.band {
  padding: 56px 0;
  background: var(--ink);
  color: var(--paper);
}

.band .wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 32px;
}

.band .num {
  font-family: var(--heading);
  font-size: clamp(72px, 12vw, 128px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.band p {
  max-width: 26em;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.4;
}

.band small {
  display: block;
  margin-top: 10px;
  color: var(--on-lock-2);
  font-size: 14px;
}

/* Privacy teaser */

.checks {
  display: grid;
  gap: 12px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
  font-size: 17px;
}

.checks li {
  position: relative;
  padding-left: 34px;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  background: url("/img/check.svg") center / contain no-repeat;
}

.more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 20px;
  font-weight: 600;
}

/* Footer */

.site-footer {
  padding: 36px 0 48px;
  color: var(--ink-2);
  font-size: 14px;
}

.site-footer .wrap {
  display: grid;
  gap: 10px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 500;
}

/* Legal pages */

.legal {
  padding: 24px 0 72px;
}

.legal .wrap {
  max-width: 780px;
}

.legal h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.legal .meta {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 15px;
}

.legal .summary {
  margin-top: 28px;
  padding: 20px 22px;
  border: 1px solid var(--accent-border);
  border-radius: 18px;
  background: var(--accent-soft);
}

.legal .summary p + p {
  margin-top: 10px;
}

.legal h2 {
  margin-top: 44px;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
}

.legal h3 {
  margin-top: 24px;
  font-family: var(--body);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
}

.legal p,
.legal ul {
  margin-top: 12px;
}

.legal ul {
  padding-left: 22px;
}

.legal li + li {
  margin-top: 6px;
}

.table-scroll {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--divider);
  border-radius: 14px;
  background: var(--paper);
}

.legal table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15.5px;
}

.legal th,
.legal td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--divider);
  text-align: left;
  vertical-align: top;
}

.legal th {
  background: var(--bg);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.legal tr:last-child td {
  border-bottom: 0;
}

/* 404 */

.notfound {
  padding: 96px 0;
  text-align: center;
}

.notfound h1 {
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 700;
  line-height: 1;
}

.notfound p {
  margin-top: 16px;
  color: var(--ink-2);
}

@media (max-width: 860px) {
  .hero {
    padding: 16px 0 56px;
  }

  .hero::before {
    inset: 45% -30% 0 -30%;
  }

  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .steps,
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .section {
    padding: 48px 0;
  }

  .band .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
