/* PocketDPE — site styles.
   Plain CSS, mobile-first. Tokens follow the app (constants/theme.ts: warm peach
   canvas, coral accent) and the App Store screenshots (DM Sans 800 headline with a
   Source Serif 4 italic second line). */

@font-face {
  font-family: 'DM Sans';
  src: url('/assets/fonts/dm-sans-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/assets/fonts/source-serif-4-600-italic-latin.woff2') format('woff2');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;

  --bg: #fff6ea;
  --bg-warm: #ffeedb;
  --surface: #fffbf5;
  --white: #ffffff;
  --ink: #241b15;
  --ink-2: #5e4f41;
  --ink-3: #7a6653;
  --line: rgba(60, 40, 20, 0.12);
  --line-soft: rgba(60, 40, 20, 0.07);

  --coral: #ff7558;
  --coral-strong: #e24c21; /* screenshot accent — large text only */
  --coral-text: #b83a17; /* small coral text, 5:1 on --bg */
  --coral-soft: #ffe2c9;

  --radius: 22px;

  --sans: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --serif: 'Source Serif 4', ui-serif, Georgia, 'Times New Roman', serif;

  --gutter: 20px;
  --max: 1160px;
}

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }
}

/* ── base ─────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg,
picture {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

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

ul[role='list'],
ol[role='list'] {
  list-style: none;
  padding: 0;
}

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

::selection {
  background: var(--coral-soft);
}

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.nowrap {
  white-space: nowrap;
}

/* ── type ─────────────────────────────────────────────────────────────── */
.display,
.h2 {
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
}

.display {
  font-size: clamp(2.65rem, 9.4vw, 5rem);
  line-height: 0.98;
}

.h2 {
  font-size: clamp(2.1rem, 6.4vw, 3.6rem);
  line-height: 1.02;
}

.display em,
.h2 em {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.012em;
  font-size: 1.04em;
  line-height: 1.04;
  color: var(--coral-strong);
}

.kicker {
  margin-bottom: 14px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral-text);
}

.lede {
  font-size: clamp(1.1rem, 2.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

.section {
  padding-block: clamp(72px, 12vw, 128px);
}

.section-head {
  max-width: 760px;
  margin: 0 auto clamp(48px, 8vw, 80px);
  text-align: center;
}

/* ── header ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 246, 234, 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.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-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 4px 12px -4px rgba(4, 0, 117, 0.45);
}

.nav {
  display: none;
}

.nav a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav a:hover {
  color: var(--ink);
  background: rgba(60, 40, 20, 0.06);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn--dark {
  background: var(--ink);
  color: #fff8ef;
  box-shadow: 0 10px 22px -12px rgba(36, 27, 21, 0.8);
}

.btn--dark:hover {
  background: #3a2d23;
  transform: translateY(-1px);
}

.btn svg {
  width: 16px;
  height: 16px;
}

@media (min-width: 720px) {
  .nav {
    display: flex;
    gap: 2px;
  }
}

/* ── screenshot frame (App Store screenshots, shown whole) ────────────── */
.shot {
  display: block;
  overflow: hidden;
  /* the same circular corner on a 1290×2796 frame at any size */
  border-radius: 8.6% / 3.97%;
  background: #f4e2cf;
  box-shadow:
    0 0 0 1px rgba(60, 40, 20, 0.08),
    0 34px 60px -30px rgba(70, 35, 10, 0.45);
}

.shot img {
  width: 100%;
}

/* ── hero ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 88% 8%, rgba(255, 176, 112, 0.42) 0%, rgba(255, 176, 112, 0) 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-warm) 100%);
  border-bottom: 1px solid var(--line-soft);
}

.hero__grid {
  display: grid;
  gap: 44px;
  padding-top: clamp(36px, 8vw, 72px);
}

.hero__copy {
  position: relative;
  z-index: 1;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 7px 14px 7px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line-soft);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
}

.eyebrow__icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--coral);
  color: var(--white);
}

.eyebrow__icon svg {
  width: 13px;
  height: 13px;
}

.hero .lede {
  max-width: 34ch;
  margin: 22px auto 0;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 22px;
  margin-top: 32px;
}

.store-badge {
  display: inline-block;
  border-radius: 12px;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.store-badge:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 10px 14px rgba(36, 27, 21, 0.25));
}

.store-badge img {
  width: 180px;
  height: 60px;
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--ink-2);
  line-height: 1.3;
}

.rating strong {
  color: var(--ink);
}

.stars {
  position: relative;
  display: inline-block;
  width: 88px;
  height: 17px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 17'%3E%3Cg fill='%23E9D5C0'%3E%3Cpath id='s' d='M8.5 0l2.6 5.3 5.9.9-4.3 4.1 1 5.8-5.2-2.7-5.2 2.7 1-5.8L0 6.2l5.9-.9z'/%3E%3Cuse href='%23s' x='17.8'/%3E%3Cuse href='%23s' x='35.6'/%3E%3Cuse href='%23s' x='53.4'/%3E%3Cuse href='%23s' x='71.2'/%3E%3C/g%3E%3C/svg%3E")
    no-repeat;
}

.stars::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 94%; /* 4.7 of 5 */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 17'%3E%3Cg fill='%23FF8A3D'%3E%3Cpath id='s' d='M8.5 0l2.6 5.3 5.9.9-4.3 4.1 1 5.8-5.2-2.7-5.2 2.7 1-5.8L0 6.2l5.9-.9z'/%3E%3Cuse href='%23s' x='17.8'/%3E%3Cuse href='%23s' x='35.6'/%3E%3Cuse href='%23s' x='53.4'/%3E%3Cuse href='%23s' x='71.2'/%3E%3C/g%3E%3C/svg%3E")
    no-repeat left center / 88px 17px;
}

.certs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
}

.cert {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line-soft);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
}

.cert b {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--white);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

/* label tints darkened from the app's rating colours for 5:1 white text */
.cert--ppl {
  --tint: #c43f22;
}
.cert--ir {
  --tint: #177a6c;
}
.cert--cpl {
  --tint: #3468b3;
}

.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding-bottom: clamp(56px, 12vw, 72px);
}

/* a warm glow behind the screenshot */
.hero__visual::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 45%;
  width: min(140vw, 640px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 150, 95, 0.42), rgba(255, 150, 95, 0));
  pointer-events: none;
}

.hero__visual .shot {
  position: relative;
  width: min(74vw, 300px);
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    align-items: center;
    gap: 24px;
    padding-top: 0;
  }

  .hero__copy {
    padding-block: 64px;
    text-align: left;
  }

  .hero .display {
    font-size: clamp(3.6rem, 6.6vw, 5rem);
  }

  .hero .lede {
    margin-left: 0;
  }

  .store-row,
  .certs {
    justify-content: flex-start;
  }

  .hero__visual {
    padding-block: 56px;
  }

  .hero__visual .shot {
    width: 318px;
  }
}

/* ── screenshot tour ──────────────────────────────────────────────────── */
.tour {
  display: grid;
  gap: clamp(72px, 13vw, 128px);
  margin: 0;
}

.tour__item {
  --accent: var(--coral-strong);
  display: grid;
  justify-items: center;
  gap: 32px;
}

/* title colours are each screenshot's own accent (large text, 3:1+) */
.tour__item--oral {
  --accent: #e2532c;
}
.tour__item--examiners {
  --accent: #9d4b37;
}
.tour__item--teach {
  --accent: #ba5336;
}
.tour__item--far {
  --accent: #2f6a53;
}
.tour__item--written {
  --accent: #416794;
}
.tour__item--plates {
  --accent: #317158;
}
.tour__item--progress {
  --accent: #d6461d;
}
.tour__item--flashcards {
  --accent: #a5653f;
}

.tour__media {
  width: min(78vw, 320px);
}

.tour__copy {
  max-width: 460px;
  text-align: center;
}

.tour__title {
  font-size: clamp(1.65rem, 5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--accent);
  text-wrap: balance;
}

.tour__text {
  margin-top: 12px;
  font-size: clamp(1.075rem, 2.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

@media (min-width: 860px) {
  .tour__item {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    column-gap: clamp(48px, 7vw, 96px);
  }

  .tour__media {
    width: 330px;
    justify-self: end;
  }

  .tour__copy {
    justify-self: start;
    text-align: left;
  }

  .tour__item:nth-child(even) .tour__media {
    order: 2;
    justify-self: start;
  }

  .tour__item:nth-child(even) .tour__copy {
    justify-self: end;
  }
}

/* ── faq ──────────────────────────────────────────────────────────────── */
.faq-section {
  background: var(--bg-warm);
  border-block: 1px solid var(--line-soft);
}

.faq {
  max-width: 820px;
  margin-inline: auto;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  padding: 22px 52px 22px 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  position: absolute;
  right: 2px;
  top: 50%;
  width: 34px;
  height: 34px;
  margin-top: -17px;
  border-radius: 50%;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 12px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 12px no-repeat,
    var(--white);
  border: 1px solid var(--line);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq summary:hover {
  color: var(--coral-text);
}

.faq__answer {
  padding: 0 52px 24px 0;
  color: var(--ink-2);
}

.faq__answer p + p {
  margin-top: 12px;
}

.faq__answer a {
  color: var(--coral-text);
  font-weight: 600;
}

/* ── final cta ────────────────────────────────────────────────────────── */
.cta {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: clamp(48px, 8vw, 80px) 24px;
  border-radius: 36px;
  text-align: center;
  background:
    radial-gradient(80% 100% at 100% 0%, rgba(255, 170, 120, 0.4) 0%, rgba(255, 170, 120, 0) 70%),
    linear-gradient(135deg, #c9451f 0%, #a8360f 60%, #85290c 100%);
  box-shadow: 0 40px 80px -40px rgba(150, 45, 15, 0.7);
}

.cta .h2 {
  color: var(--white);
}

.cta .h2 em {
  color: #ffcfae;
}

.cta p {
  max-width: 36ch;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--white);
  text-wrap: balance;
}

.cta .store-badge {
  margin-top: 8px;
}

/* ── footer ───────────────────────────────────────────────────────────── */
.site-footer {
  position: relative;
  padding-block: 56px 40px;
  background: #1d1611;
  color: #e9dccd;
  font-size: 0.9375rem;
}

.footer__top {
  display: grid;
  gap: 28px;
}

.site-footer .brand {
  color: #fff8ef;
}

.footer__tag {
  margin-top: 12px;
  color: #c9b8a6;
}

.footer__formerly {
  margin-top: 6px;
  color: #c9b8a6;
}

.footer__formerly strong {
  color: #fff1e2;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer__links a {
  color: #fff1e2;
  font-weight: 600;
  text-decoration: none;
}

.footer__links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer__legal {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #a8978a;
  font-size: 0.8125rem;
  line-height: 1.6;
}

.footer__legal p + p {
  margin-top: 8px;
}

@media (min-width: 820px) {
  .footer__top {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}

/* ── document pages (privacy, 404) ────────────────────────────────────── */
.doc {
  max-width: 760px;
  margin-inline: auto;
  padding-block: clamp(48px, 9vw, 88px) clamp(80px, 12vw, 128px);
}

.doc .h2 {
  margin-top: 6px;
}

.doc__meta {
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 0.9375rem;
}

.doc__note {
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.975rem;
}

.doc__note a {
  color: var(--coral-text);
  font-weight: 600;
}

.doc__body {
  margin-top: 36px;
  color: var(--ink-2);
}

.doc__body h2 {
  margin-top: 44px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--ink);
}

.doc__body h3 {
  margin-top: 26px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
}

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

.doc__body ul {
  padding-left: 1.25em;
}

.doc__body li + li {
  margin-top: 8px;
}

.doc__body strong {
  color: var(--ink);
}

.doc__body a {
  color: var(--coral-text);
  font-weight: 600;
  text-underline-offset: 2px;
}

.notfound {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding-block: clamp(56px, 12vw, 120px);
  text-align: center;
}

.notfound .lede {
  max-width: 36ch;
}

.notfound .kicker {
  margin-bottom: 0;
}

.notfound__icon img {
  width: 112px;
  height: 112px;
  margin-bottom: 8px;
  border-radius: 25px;
  box-shadow: 0 22px 40px -20px rgba(4, 0, 117, 0.6);
}

/* ── motion ───────────────────────────────────────────────────────────── */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 42%;
    }

    @keyframes reveal {
      from {
        opacity: 0;
        transform: translateY(28px);
      }
      to {
        opacity: 1;
        transform: none;
      }
    }
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
