/* The homepage (owner's request, 20 October 2026): one minimal scrolling
   page, phones first, like the app's first-launch tour. The opening, then a
   section per feature, each a heading, a line or two and a real screen in a
   plain device frame; side by side and alternating on wider screens. The
   app's "Glow" skin: the logo's gradient, Outfit and Plus Jakarta Sans,
   light and dark. Other pages keep styles.css. */

@font-face {
  font-family: 'Outfit';
  src: url('/fonts/Outfit-700.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('/fonts/Outfit-800.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/fonts/PlusJakartaSans-400.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/fonts/PlusJakartaSans-600.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}

:root {
  --ground: #f4f6fb;
  --text: #0b1830;
  --muted: #4f5d75;
  --line: #dde3ef;
  --bezel: #111827;
  --on-gradient: #062033;
  --glow: rgba(17, 182, 235, 0.28);
  --wash: rgba(74, 138, 217, 0.16);
  --gradient: linear-gradient(100deg, #4a8ad9 0%, #099696 50%, #0d9c74 100%);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #070b14;
    --text: #e8edf7;
    --muted: #9aa6bd;
    --line: #1f2a40;
    --bezel: #1c2638;
    --glow: rgba(17, 182, 235, 0.32);
    --wash: rgba(9, 150, 150, 0.22);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 400 17px/1.6 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

main, footer {
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
}

h1, h2 {
  font-family: 'Outfit', system-ui, sans-serif;
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-weight: 800;
  font-size: clamp(40px, 10vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-weight: 800;
  font-size: clamp(30px, 7vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

p { margin: 0; }

.lead {
  font-size: clamp(18px, 4.6vw, 21px);
  color: var(--muted);
  text-wrap: pretty;
}

/* The opening: logo, promise and the first screen, on a soft wash of the
   gradient's blue. */
.hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 18px;
  padding-block: calc(48px + env(safe-area-inset-top, 0px)) 24px;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0 50% auto 50%;
  width: 100vw;
  height: 70%;
  transform: translateX(-50%);
  background: radial-gradient(60% 60% at 50% 20%, var(--wash), transparent 70%);
  z-index: -1;
  pointer-events: none;
}
.hero .lead { max-width: 34ch; }
.mark { width: 88px; height: 88px; }

.soon {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 16px;
  background: var(--gradient);
  color: var(--on-gradient);
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 700;
  font-size: 17px;
  box-shadow: 0 8px 28px var(--glow);
}

/* A screen in a plain frame: never a real phone's outline, so no maker's
   design is borrowed. */
.device {
  margin: 0;
  width: min(300px, 78vw);
  padding: 9px;
  background: var(--bezel);
  border-radius: 46px;
  box-shadow: 0 24px 60px rgba(6, 32, 51, 0.22), 0 0 0 1px var(--line);
}
.device img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 37px;
}
.hero .device { margin-top: 18px; }

/* A feature: the words, then the screen; on wider screens side by side,
   the screen swapping sides each time. */
.feature {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 28px;
  padding-block: 72px;
  border-top: 1px solid var(--line);
}
.feature .words {
  display: grid;
  gap: 14px;
  max-width: 30ch;
  min-width: 0;
}
.feature .words p {
  font-size: clamp(18px, 4.6vw, 20px);
  color: var(--muted);
}

@media (min-width: 760px) {
  .feature {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    text-align: left;
    gap: 56px;
    padding-block: 88px;
  }
  .feature .words { justify-self: end; max-width: 26ch; }
  .feature .device { justify-self: start; }
  .feature:nth-of-type(odd) .words { order: 2; justify-self: start; }
  .feature:nth-of-type(odd) .device { order: 1; justify-self: end; }
}

.closing {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 16px;
  padding-block: 80px 72px;
  border-top: 1px solid var(--line);
}
.closing .lead { max-width: 32ch; }

footer {
  padding-block: 24px calc(32px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
footer a { color: var(--muted); }
footer a:focus-visible { outline: 3px solid #099696; outline-offset: 2px; }

/* Each section rises into place as it scrolls into view, where the browser
   ties animation to scrolling; elsewhere, and for anyone who asks for less
   motion, everything simply stands still. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .feature .words, .feature .device, .closing {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: none; }
}

/* The sign-in link to the web app, top right over the opening. */
.topbar {
  display: flex;
  justify-content: flex-end;
  padding-top: max(16px, env(safe-area-inset-top, 0px));
  max-width: 1040px;
  margin-inline: auto;
}
.topbar .signin {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  font: 600 15px/1 'Plus Jakarta Sans', system-ui, sans-serif;
  text-decoration: none;
}
/* Lit on keyboard focus, and on hover only where a pointer really hovers:
   a touchscreen keeps a tapped link "hovered", so on a phone the button
   flickered between the two looks (owner, 20 October 2026). */
.topbar .signin:focus-visible {
  border-color: transparent;
  background: var(--gradient);
  color: var(--on-gradient);
}
@media (hover: hover) and (pointer: fine) {
  .topbar .signin:hover {
    border-color: transparent;
    background: var(--gradient);
    color: var(--on-gradient);
  }
}

/* The store badges, each store's own artwork unaltered (Google Play 28
   October 2026, the App Store 9 November 2026), and the browser line.
   Google's image has its clear space built in; Apple's has none, so its
   link carries a quarter of the badge's height around it, as Apple asks,
   and it is drawn at the height of Google's badge proper. */
.stores { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 12px; }
.stores .badges { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 4px; }
.stores .play, .stores .apple { display: inline-block; line-height: 0; border-radius: 12px; }
.stores .play img { width: 220px; height: auto; }
.stores .apple { padding: 15px; }
.stores .apple img { width: auto; height: 57px; }
.stores .play:focus-visible, .stores .apple:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.web-too { margin: 0; color: var(--muted); }
/* Side by side on a phone: both a little smaller, Apple's still above its
   40-pixel minimum. */
@media (max-width: 480px) {
  .stores .play img { width: 176px; }
  .stores .apple { padding: 12px; }
  .stores .apple img { height: 46px; }
}
.legal { flex-basis: 100%; font-size: 12px; color: var(--muted); }

/* A pointer for people switching from another app (31 October 2026). */
.switching { margin-top: 20px; color: var(--muted); }
/* The languages the app comes in, each under its own name (17 November 2026). */
.in-languages { margin-top: 20px; color: var(--muted); }

/* Guides on the homepage (31 October 2026). */
.topbar { gap: 12px; align-items: center; }
.topbar .guides-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  color: var(--text);
  font: 600 15px/1 'Plus Jakarta Sans', system-ui, sans-serif;
  text-decoration: none;
}
.topbar .guides-link:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 8px; }
@media (hover: hover) and (pointer: fine) { .topbar .guides-link:hover { text-decoration: underline; } }
.from-guides { display: grid; gap: 16px; max-width: 640px; margin-inline: auto; text-align: center; padding-block: 72px 64px; border-top: 1px solid var(--line); }
.from-guides h2, .from-guides p { margin: 0; }
.guide-teaser {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: left;
  color: var(--text);
  text-decoration: none;
}
.guide-teaser span { color: var(--muted); }
.guide-teaser:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .guide-teaser:hover strong { text-decoration: underline; } }

/* The language menu, at the top of every page (16 November 2026): the
   markup is put in by tool/site_languages.py, and works with no script. */
.languages { position: relative; margin-left: 0; font: 600 15px/1 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.languages summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.languages summary::-webkit-details-marker { display: none; }
.languages summary:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.languages ul {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--ground);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}
.languages li { margin: 0; padding: 0; }
.languages li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.languages li a[aria-current] { color: var(--link); }
.languages li a:focus-visible { outline: 3px solid var(--link); outline-offset: -3px; }
@media (hover: hover) and (pointer: fine) { .languages li a:hover { background: var(--line); } }
@media (max-width: 420px) { .languages summary span { display: none; } .languages summary { padding: 0 12px; } }
@media print { .languages { display: none; } }
