/* Self-hosted (SIL Open Font License), so visitors' browsers never contact Google. */

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("fonts/bricolage-grotesque-500-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("fonts/bricolage-grotesque-500-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;

  --paper: #ffffff;
  --ground: #f7f5ff;
  --line: #e7e3f4;
  --ink: #241f38;
  --muted: #615b78;
  --violet: #6d5dfb;
  --violet-ink: #5546c9;
  --violet-soft: #efedff;
  --note: #2f2947;

  /* Three of the extension's six highlight colours, exactly as it draws them. */
  --hl-violet: #ddd6fe;
  --hl-yellow: #fde68a;
  --hl-pink: #fbcfe8;

  --sans: "Atkinson Hyperlegible", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--violet-ink);
}

a:focus-visible,
.button:focus-visible {
  outline: 3px solid rgba(109, 93, 251, 0.4);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 0 24px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h3 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.15;
}

h3 {
  font-size: 18px;
  line-height: 1.3;
}

/* ---------- buttons ---------- */

.button {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 9px;
  background: var(--violet);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: var(--violet-ink);
}

.button-small {
  padding: 8px 14px;
  font-size: 14px;
}

/* "Coming soon to Chrome" until the store listing is public: not a link. */
.button-soon,
.button-soon:hover {
  background: var(--violet-soft);
  color: var(--violet-ink);
  cursor: default;
}

/* ---------- header ---------- */

html {
  /* Keeps in-page anchors (#how) clear of the sticky header. */
  scroll-padding-top: 80px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.mark {
  display: block;
  flex: none;
  width: 28px;
  height: 28px;
}

nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
}

nav a:not(.button) {
  color: var(--muted);
  text-decoration: none;
}

nav a:not(.button):hover {
  color: var(--ink);
}

/* ---------- hero ---------- */

.hero {
  padding: 72px 0 88px;
  background: var(--ground);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: 56px;
}

h1 {
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.lead {
  max-width: 34em;
  margin: 22px 0 32px;
  color: var(--muted);
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin: 0;
}

.hero-note {
  color: var(--muted);
  font-size: 15px;
}

/* The page's one memorable moment: real prose, marked up the way the
   extension marks it, with the highlights drawn in on load. */
.specimen {
  margin: 0;
}

.sheet {
  padding: 36px 36px 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 24px 60px -28px rgba(54, 40, 140, 0.35);
}

.prose {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(21px, 2.3vw, 26px);
  line-height: 1.75;
}

.hl {
  padding: 1px 2px;
  border-radius: 3px;
  background: linear-gradient(var(--hl), var(--hl)) no-repeat;
  background-size: 100% 100%;
  color: #1f1a33;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hl-violet {
  --hl: var(--hl-violet);
}

.hl-yellow {
  --hl: var(--hl-yellow);
}

.hl-pink {
  --hl: var(--hl-pink);
}

.note {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 360px;
  margin-top: 26px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--note);
  color: #f8f7ff;
  font-size: 15px;
  line-height: 1.45;
}

.note-tag {
  color: #c9c1ff;
  font-size: 13px;
  font-weight: 700;
}

.specimen figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

@media (prefers-reduced-motion: no-preference) {
  .hl {
    background-size: 0% 100%;
    animation: draw 520ms cubic-bezier(0.3, 0.7, 0.4, 1) forwards;
  }

  .hl-violet {
    animation-delay: 350ms;
  }

  .hl-yellow {
    animation-delay: 650ms;
  }

  .hl-pink {
    animation-delay: 950ms;
  }

  .note {
    opacity: 0;
    transform: translateY(6px);
    animation: settle 360ms ease-out 1.5s forwards;
  }
}

@keyframes draw {
  to {
    background-size: 100% 100%;
  }
}

@keyframes settle {
  to {
    opacity: 1;
    transform: none;
  }
}

/* Parallax, tied to scrolling rather than to time, in CSS alone (the site has no
   script). The pictures move a little against the text as they pass through the
   window: the hero's sheet lags as the hero scrolls away, each screenshot rises
   past its text, and the two flashcards fan in from apart. Only where the browser
   has scroll-driven animations and the visitor has not asked for less motion;
   everywhere else the page is simply still. The motion uses the `translate` and
   `rotate` properties, which add to the `transform` some of these already have. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    :root {
      --drift: 44px;
    }

    .hero {
      view-timeline: --hero block;
    }

    .specimen {
      animation: lag linear both;
      animation-timeline: --hero;
      animation-range: exit;
    }

    .step,
    .showcase {
      view-timeline: --shot block;
    }

    .step .shot,
    .showcase .shot {
      animation: rise linear both;
      animation-timeline: --shot;
      animation-range: cover;
    }

    .cards {
      view-timeline: --cards block;
    }

    .cards .card {
      animation: fan-front ease-out both;
      animation-timeline: --cards;
      animation-range: entry 10% cover 55%;
    }

    .cards .card-back {
      animation-name: fan-back;
    }
  }
}

@keyframes lag {
  to {
    translate: 0 calc(var(--drift) * 2.5);
  }
}

@keyframes rise {
  from {
    translate: 0 var(--drift);
  }

  to {
    translate: 0 calc(var(--drift) * -1);
  }
}

@keyframes fan-front {
  from {
    translate: 0 calc(var(--drift) * 1.2);
    rotate: -5deg;
  }

  to {
    translate: 0 0;
    rotate: 0deg;
  }
}

@keyframes fan-back {
  from {
    translate: 0 calc(var(--drift) * -0.6);
    rotate: 6deg;
  }

  to {
    translate: 0 0;
    rotate: 0deg;
  }
}

/* ---------- sections ---------- */

.section {
  padding: 88px 0;
}

.section-tinted {
  background: var(--ground);
}

/* The maker's own reason, set like a short letter: one column, signed. */
.why {
  max-width: 680px;
}

.why p {
  margin: 16px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.55;
}

.why .why-sign {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
}

/* A real sequence, so it is numbered. Text and screenshot alternate sides. */
.walkthrough {
  display: grid;
  gap: 88px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  align-items: center;
  gap: 64px;
  counter-increment: step;
}

.step:nth-child(even) .step-text {
  order: 2;
}

.step-text::before {
  content: counter(step);
  display: block;
  margin-bottom: 14px;
  color: var(--violet);
  font: 700 44px/1 var(--display);
}

.step-text p,
.showcase-text p {
  max-width: 30em;
  margin: 10px 0 0;
  color: var(--muted);
}

/* Screenshots: 2x captures of the real extension, framed as a plain window. */
.shot {
  margin: 0;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot-window,
.shot-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 28px 64px -34px rgba(54, 40, 140, 0.4);
}

.shot-panel,
.shot-narrow {
  justify-self: center;
  width: 100%;
}

.shot-panel {
  max-width: 440px;
}

.shot-narrow {
  max-width: 540px;
}

.shot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--ground);
}

.shot-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #dcd6ef;
}

.shot-bar span {
  margin-left: 10px;
  padding: 2px 12px;
  border-radius: 6px;
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
}

.showcase {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  align-items: center;
  gap: 56px;
}

.anki {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: 56px;
}

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

/* Two flashcards made from the hero's note, laid down like a small stack. */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 40px 22px 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  text-align: center;
  box-shadow: 0 20px 44px -28px rgba(54, 40, 140, 0.4);
  transform: rotate(-2deg);
}

.card-back {
  transform: rotate(1.5deg) translateY(10px);
}

.card p {
  margin: 0;
}

.card-front {
  font: 600 34px/1.2 var(--serif);
}

.card-label {
  position: absolute;
  top: 12px;
  left: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--hl-yellow);
  color: #5b4300;
  font-size: 13px;
  font-weight: 700;
}

.features dd,
.faq p {
  margin: 8px 0 0;
  color: var(--muted);
}

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 56px;
  margin: 40px 0 0;
}

.features > div {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.features dt {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
}

.features dd {
  margin-left: 0;
}

.section-flush {
  padding-top: 0;
}

.pro {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: center;
  gap: 56px;
}

.pro p {
  max-width: 36em;
  margin: 12px 0 0;
  color: var(--muted);
}

.pro .pro-note {
  color: var(--ink);
  font-weight: 700;
}

.pro-list {
  margin: 24px 0 0;
}

.pro-list > div {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.pro-list dt {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
}

.pro-list dd {
  margin: 4px 0 0;
  color: var(--muted);
}

/* Export to Anki, shown as part of Lexe Pro: a tinted panel above the plan. */
.anki-pro {
  margin-bottom: 64px;
  padding: 44px 48px 52px;
  border-radius: 18px;
  background: var(--ground);
}

.anki-pro h3 {
  font-size: 24px;
  font-weight: 700;
}

.pro-side {
  display: grid;
  gap: 24px;
}

.waitlist {
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: 14px;
  background: var(--ground);
}

.waitlist label {
  display: grid;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
}

.waitlist input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.waitlist input:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 1px;
  border-color: var(--violet);
}

.waitlist .button {
  justify-self: start;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.pro .waitlist p {
  margin: 0;
  font-size: 14px;
}

/* The honeypot: off-screen for people, still in the form for bots. */
.waitlist .hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Shown only when the Worker sends the visitor back to #waitlist-error. */
.form-error {
  display: none;
}

.form-error:target {
  display: block;
  color: #b42318;
  font-weight: 700;
}

.thanks {
  padding: 96px 20px;
}

.thanks p {
  max-width: 36em;
  margin: 16px 0 0;
  color: var(--muted);
}

/* A saved word met again: dotted, not filled, until the reader has guessed. */
.recall-demo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0;
  padding: 44px 28px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  font-family: var(--serif);
  font-size: 28px;
}

.recall-word {
  border-bottom: 3px dotted var(--violet);
}

.recall-hint {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--note);
  color: #f8f7ff;
  font: 500 16px/1.3 var(--sans);
  letter-spacing: 0.04em;
}

.privacy {
  max-width: 760px;
  padding: 36px 40px;
  border-radius: 14px;
  background: var(--violet-soft);
}

.privacy p {
  margin: 12px 0 0;
  color: var(--ink);
}

.faq {
  max-width: 760px;
}

.faq h2 {
  margin-bottom: 12px;
}

.faq h3 {
  margin-top: 30px;
}

.closing {
  padding: 88px 0 96px;
  background: var(--ground);
  text-align: center;
}

.closing h2 {
  margin-bottom: 26px;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.languages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding-bottom: 28px;
  font-size: 13px;
}

.languages a {
  color: var(--muted);
  text-decoration: none;
}

.languages a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.languages a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}

/* ---------- privacy policy page ---------- */

.policy {
  max-width: 720px;
  padding-top: 64px;
  padding-bottom: 88px;
}

.policy h1 {
  font-size: clamp(32px, 4vw, 42px);
}

.policy .updated {
  margin: 12px 0 0;
  color: var(--muted);
}

.policy h2 {
  margin-top: 44px;
  font-size: 22px;
}

.policy p,
.policy li {
  color: var(--ink);
}

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

/* ---------- narrow screens ---------- */

@media (max-width: 900px) {
  .hero {
    padding: 48px 0 64px;
  }

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

  .step,
  .showcase,
  .anki,
  .features,
  .pro {
    grid-template-columns: minmax(0, 1fr);
  }

  .step {
    gap: 28px;
  }

  .step:nth-child(even) .step-text {
    order: 0;
  }

  .walkthrough {
    gap: 64px;
  }

  .showcase,
  .anki {
    gap: 32px;
  }

  .anki-pro {
    margin-bottom: 48px;
    padding: 28px 20px 36px;
  }

  .pro {
    gap: 28px;
  }

  .section {
    padding: 64px 0;
  }
}

@media (max-width: 560px) {
  :root {
    --drift: 22px;
  }

  .wrap {
    padding: 0 16px;
  }

  nav a:not(.button) {
    display: none;
  }

  /* Some languages' "Add to Chrome" runs long; keep the header one line. */
  .button-small {
    padding: 7px 11px;
    font-size: 13px;
    white-space: nowrap;
  }

  .sheet {
    padding: 24px 20px 20px;
  }

  .privacy {
    padding: 26px 22px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 6px;
  }
}

/* ---------- uninstall survey (/bye/) ---------- */

.bye fieldset {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}

.bye legend {
  margin-bottom: 6px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
}

.bye fieldset label {
  display: flex;
  gap: 10px;
  align-items: center;
}

.bye-comment {
  display: grid;
  gap: 6px;
  margin: 24px 0 18px;
  font-weight: 700;
}

.bye textarea {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 400;
}

.bye .button {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.bye-notice {
  font-size: 14px;
}
