/* Morwen's site: white pages and one ink blue, as in the app. The leaf is the only colour. */

:root {
  --bg: #ffffff;
  --bg-soft: #f4f6fa;
  --ink: #142038;
  --text: #2b3243;
  --muted: #646d7f;
  --line: #e4e8ef;
  --accent: #23407a;
  --accent-hover: #1a3264;
  --on-accent: #ffffff;
  --glow: rgba(72, 112, 205, 0.16);
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(20, 32, 56, 0.05), 0 8px 24px rgba(20, 32, 56, 0.06);
  --phone-shadow: 0 2px 6px rgba(20, 32, 56, 0.12), 0 30px 60px -12px rgba(20, 32, 56, 0.28);
  --bezel: #0e1117;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0e14;
    --bg-soft: #11161f;
    --ink: #f1f3f8;
    --text: #d3d8e2;
    --muted: #97a0b2;
    --line: #222a37;
    --accent: #7c9beb;
    --accent-hover: #93adf0;
    --on-accent: #0b0e14;
    --glow: rgba(110, 145, 235, 0.18);
    --card: #121822;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
    --phone-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 30px 60px -12px rgba(0, 0, 0, 0.7);
    --bezel: #2a303b;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

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

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

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); margin-inline: auto; }

h1, h2, h3 { color: var(--ink); line-height: 1.12; letter-spacing: -0.022em; margin: 0; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.1rem); font-weight: 750; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 720; }
h3 { font-size: 1.12rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; }

/* The app's quiet monospaced captions, such as "WEDNESDAY AFTERNOON". */
.eyebrow {
  font: 500 0.78rem/1 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Header ---- */

.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }

.brand { display: flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; }
.brand img { height: 30px; width: auto; }
.brand svg { height: 22px; width: auto; }

.nav { display: flex; gap: 22px; align-items: center; font-size: 0.95rem; }
.nav a { color: var(--text); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { font-weight: 600; }

/* ---- Buttons ---- */

.button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; font-size: 1rem; text-decoration: none;
  box-shadow: 0 1px 1px rgba(20, 32, 56, 0.12), 0 6px 16px -6px rgba(35, 64, 122, 0.5);
  transition: background 0.15s, transform 0.15s;
}
.button:hover { background: var(--accent-hover); color: var(--on-accent); transform: translateY(-1px); }
.button.quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.button.quiet:hover { background: var(--bg-soft); color: var(--ink); }
.button[aria-disabled="true"] { pointer-events: none; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.small-print { font-size: 0.88rem; color: var(--muted); }

/* ---- Phones ---- */

.phone {
  position: relative;
  border-radius: 13.5% / 6.2%;
  padding: 2.4%;
  background: var(--bezel);
  box-shadow: var(--phone-shadow);
}
.phone img, .phone video {
  width: 100%; height: auto;
  border-radius: 11.6% / 5.35%;
  background: #fff;
}

/* ---- Hero ---- */

.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { display: grid; gap: 22px; justify-items: start; }
.hero-copy .lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--text); max-width: 32ch; }
.hero-leaf { height: 64px; width: auto; margin-bottom: 4px; }

.hero-phones { position: relative; height: clamp(440px, 52vw, 620px); }
.hero-phones::before {
  content: ""; position: absolute; inset: 8% -6% 4% 2%;
  background: radial-gradient(closest-side, var(--glow), transparent 72%);
}
.hero-phones .phone { position: absolute; width: clamp(200px, 21vw, 270px); }
.hero-phones .back { right: 0; top: 0; }
.hero-phones .front { left: 4%; top: 12%; }

/* ---- Sections ---- */

section { scroll-margin-top: 72px; }
.band { padding: clamp(64px, 9vw, 112px) 0; }
.band.soft { background: var(--bg-soft); }
.section-head { display: grid; gap: 14px; max-width: 46rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.center { text-align: center; margin-inline: auto; justify-items: center; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); }
.pillar { display: grid; gap: 10px; align-content: start; }
.pillar .num { font: 500 0.8rem/1 var(--mono); color: var(--muted); letter-spacing: 0.14em; }
.pillar p { color: var(--text); }

/* ---- The film ---- */

.film { display: grid; gap: 18px; }
.film video {
  width: 100%; aspect-ratio: 16 / 9; height: auto;
  border-radius: 22px; background: var(--bg-soft);
  box-shadow: var(--shadow); border: 1px solid var(--line);
}

/* ---- Features ---- */

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature {
  display: grid; gap: 8px; align-content: start;
  padding: 24px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--line);
}
.band.soft .feature { border-color: transparent; box-shadow: var(--shadow); }
.feature svg { width: 28px; height: 28px; color: var(--accent); margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 0.98rem; }

/* ---- Screens ---- */

.screens {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr);
  gap: clamp(18px, 3vw, 32px);
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px 4px 28px;
  scrollbar-width: thin;
}
.screens figure { margin: 0; display: grid; gap: 16px; scroll-snap-align: center; }
.screens figcaption { text-align: center; color: var(--muted); font-size: 0.95rem; }
.screens figcaption strong { display: block; color: var(--ink); font-weight: 600; }

/* ---- iPhone Duo ---- */

.duo-layout { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.duo-layout .section-head { margin-bottom: 0; }
.duo-layout .section-head p + p { margin-top: 14px; }
.duo-pair { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: clamp(14px, 2.4vw, 28px); }
.duo-pair::before {
  content: ""; position: absolute; inset: 6% 4% 0;
  background: radial-gradient(closest-side, var(--glow), transparent 72%);
}
/* The Duo's screens are wider than a phone's, so their corners are set in pixels, not percentages. */
.duo-pair .phone { border-radius: clamp(18px, 2.6vw, 30px); padding: clamp(5px, 0.7vw, 9px); }
.duo-pair .phone img { border-radius: clamp(13px, 1.9vw, 22px); }
.duo-open { width: 64%; }
.duo-folded { width: 30%; margin-bottom: 4%; }

/* ---- Where it thinks ---- */

.where { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.where .place {
  display: grid; gap: 10px; align-content: start;
  padding: 28px; border-radius: 22px;
  background: var(--card); border: 1px solid var(--line);
}
.place .tile {
  width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
  background: var(--bg-soft); color: var(--accent); margin-bottom: 6px;
}
.place .tile svg { width: 26px; height: 26px; }
.place p { color: var(--muted); }

/* ---- Privacy strip ---- */

.promise { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 4vw, 48px); align-items: center; }
.promise .seal {
  width: clamp(88px, 12vw, 132px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow);
}
.promise .seal img { height: 52%; width: auto; }
.promise p { color: var(--text); font-size: 1.1rem; max-width: 44rem; margin-top: 12px; }

/* ---- Needs ---- */

.needs { display: grid; gap: 0; border-top: 1px solid var(--line); }
.needs li {
  list-style: none; display: grid; grid-template-columns: 2.2rem 1fr; gap: 12px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.needs li::before { content: counter(need, decimal-leading-zero); counter-increment: need; font: 500 0.8rem/1.9 var(--mono); color: var(--muted); }
.needs { counter-reset: need; padding: 0; margin: 0; }

/* ---- Closing ---- */

.closing { display: grid; gap: 22px; justify-items: center; text-align: center; }
.closing img { height: 72px; width: auto; }

/* ---- Long pages (privacy, support) ---- */

.page { padding: clamp(40px, 7vw, 80px) 0 clamp(56px, 8vw, 96px); }
.page header { display: grid; gap: 14px; margin-bottom: 40px; }
.page header p { color: var(--muted); font-size: 1.1rem; }
.prose h2 { font-size: 1.45rem; margin: 44px 0 12px; }
.prose h3 { margin: 28px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--ink); font-weight: 620; }

.routes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 8px; }
.routes .place { padding: 22px; }
.routes .place h3 { margin: 0; }

details.qa { border-bottom: 1px solid var(--line); }
details.qa:first-of-type { border-top: 1px solid var(--line); }
details.qa summary {
  cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative;
  color: var(--ink); font-weight: 600;
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.2s;
}
details.qa[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details.qa p { padding: 0 0 20px; color: var(--text); }

.contact-card {
  display: grid; gap: 10px; padding: 26px; margin-top: 18px; border-radius: 20px;
  background: var(--bg-soft);
}
.contact-card a { font-weight: 600; font-size: 1.1rem; }

/* ---- Footer ---- */

.foot { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 0.92rem; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 22px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ---- Narrow screens ---- */

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-copy { justify-items: center; text-align: center; }
  .hero-copy .lede { margin-inline: auto; }
  .hero-copy .actions { justify-content: center; }
  .hero-phones { height: clamp(420px, 110vw, 560px); width: min(460px, 100%); margin-inline: auto; }
  .hero-phones .phone { width: min(56%, 250px); }
  .features, .where, .pillars, .routes { grid-template-columns: 1fr 1fr; }
  .duo-layout { grid-template-columns: 1fr; }
  .duo-pair { width: min(620px, 100%); margin-inline: auto; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .nav { gap: 16px; font-size: 0.9rem; }
  .nav .hide-small { display: none; }
  .features, .where, .pillars, .routes { grid-template-columns: 1fr; }
  .promise { grid-template-columns: 1fr; justify-items: start; }
  .screens { grid-auto-columns: 62%; }
}

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