/* Offload: the app's own palette and the iPhone's own font. Calm, centred, the app's screens up front. */
:root {
  --ground: #FFFFFF;
  --ink: #1B2420;
  --muted: #4A5550;
  --green: #2E6B4E;
  --deep: #1F4D37;
  --soft: #E3F0E8;
  --pale: #A9D3BA;
  --peach: #FDEBDF;
  --mist: #E6EEF5;
  --tile: #F2F5F3;
  --line: #E4E9E6;
  --white: #FFFFFF;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --t-display: clamp(40px, 5.4vw, 76px);
  --t-head: clamp(30px, 3.2vw, 44px);
  --t-body: 18px;
  --t-small: 15px;

  --margin: clamp(16px, 4vw, 72px);
  --wrap: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--font); font-size: var(--t-body); line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2 { margin: 0; font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; }
p { margin: 0; }
figure { margin: 0; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--pale); }

/* The one button shape on the page. */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--green); color: var(--white);
  font-weight: 600; text-decoration: none; border: 0; cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease);
}
.pill:hover { background: var(--deep); transform: translateY(-2px); }
.pill:active { transform: scale(.97); }
.pill-big { min-height: 56px; padding: 0 30px; font-size: 17px; }
.pill-small { min-height: 42px; padding: 0 20px; font-size: var(--t-small); background: var(--soft); color: var(--deep); }
.pill-small:hover { background: var(--pale); }

/* ------------------------------------------------------------------ bar */
.bar {
  max-width: calc(var(--wrap) + 2 * var(--margin)); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--margin);
}
.wordmark { font-size: 24px; font-weight: 800; letter-spacing: -0.04em; text-decoration: none; color: var(--green); }
.bar nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); }
.bar nav a:not(.pill) { font-size: var(--t-small); font-weight: 600; text-decoration: none; color: var(--muted); }
.bar nav a:not(.pill):hover { color: var(--green); }

/* ---------------------------------------------------------------- phone */
/* A plain iPhone outline around each real screenshot. */
.phone {
  width: 260px; flex: none; padding: 9px; border-radius: 46px;
  background: #121614; box-shadow: 0 30px 60px -30px rgba(27, 36, 32, .45);
}
.phone img { border-radius: 38px; width: 100%; }

/* ----------------------------------------------------------------- hero */
.hero { padding: clamp(48px, 8vw, 110px) 0 0; text-align: center; overflow: hidden; }
.hero-copy { padding: 0 var(--margin); }
.hero h1 { font-size: var(--t-display); max-width: 17ch; margin: 0 auto; text-wrap: balance; }
.lead { margin: 22px auto 0; font-size: 20px; color: var(--muted); max-width: 40ch; text-wrap: balance; }
.hero .pill { margin-top: 32px; }

.rail {
  margin-top: clamp(56px, 7vw, 88px); display: flex; justify-content: center; gap: clamp(20px, 3vw, 44px);
  padding-bottom: 40px;
}
.rail .phone { transition: transform .9s var(--ease), opacity .9s var(--ease); }
.rail .phone-centre { transform: translateY(-24px); }

/* ---------------------------------------------------------- three items */
.three {
  max-width: var(--wrap); margin: clamp(72px, 9vw, 120px) auto 0; padding: 0 var(--margin);
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.three-item { padding: 8px 32px 12px; border-left: 1px solid var(--line); }
.three-item:first-child { border-left: 0; padding-left: 0; }
.three-item svg { width: 44px; height: 44px; }
.three-item p { margin-top: 22px; font-size: 19px; color: var(--muted); max-width: 22ch; }

/* --------------------------------------------------------------- feature */
.feature { max-width: calc(var(--wrap) + 2 * var(--margin)); margin: clamp(120px, 13vw, 180px) auto 0; padding: 0 var(--margin); }
.feature-copy { text-align: center; max-width: 560px; margin: 0 auto; }
.feature h2 { font-size: var(--t-head); }
.feature-copy p { margin-top: 18px; color: var(--muted); }
.panel {
  margin-top: 48px; border-radius: 32px; padding: clamp(48px, 7vw, 96px) 24px;
  display: flex; justify-content: center; gap: clamp(20px, 4vw, 56px);
}
.panel .phone { width: 280px; }
.panel-soft { background: var(--soft); }
.panel-mist { background: var(--mist); }
.panel-peach { background: var(--peach); }
.panel-tile { background: var(--tile); }

/* ------------------------------------------------------------------- faq */
.faq { max-width: 760px; margin: clamp(120px, 13vw, 180px) auto 0; padding: 0 var(--margin); }
.faq h2 { font-size: var(--t-head); text-align: center; }
.faq-list { margin-top: 40px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative;
  font-size: 19px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 26px; font-weight: 400; color: var(--green); transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 0 24px; color: var(--muted); max-width: 62ch; }

/* ------------------------------------------------------------------- end */
.end { margin: clamp(140px, 14vw, 200px) auto 0; text-align: center; padding: 0 var(--margin); overflow: hidden; }
.end h2 { font-size: var(--t-head); }
.end .pill { margin-top: 28px; }
.end-phones { margin-top: 64px; display: flex; justify-content: center; align-items: flex-end; }
.end-phones .phone { width: 230px; margin: 0 -28px; transform: translateY(40px) scale(.9); }
.end-phones .phone-front { width: 270px; position: relative; z-index: 2; transform: none; }

/* ------------------------------------------------------------------ foot */
.foot { max-width: calc(var(--wrap) + 2 * var(--margin)); margin: 0 auto; padding: 0 var(--margin) 48px; }
.foot-cols {
  border-top: 1px solid var(--line); padding-top: 48px;
  display: grid; grid-template-columns: 1fr 1fr 1.4fr 1.4fr; gap: 32px;
  font-size: var(--t-small);
}
.foot-head { font-weight: 700; margin-bottom: 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; line-height: 2.1; }
.foot a { text-decoration: none; color: var(--muted); }
.foot a:hover { color: var(--green); text-decoration: underline; }
.foot-brand svg { width: 36px; height: 36px; }
.foot-brand p { margin-top: 10px; color: var(--muted); }

/* ------------------------------------------------- privacy, terms, support */
.doc { max-width: 720px; margin: 0 auto; padding: 72px var(--margin) 96px; }
.doc h1 { font-size: clamp(40px, 5.4vw, 64px); }
.doc h2 { font-size: 24px; letter-spacing: -0.02em; margin: 44px 0 12px; line-height: 1.2; }
.doc p, .doc li { font-size: 18px; }
.doc p + p { margin-top: 14px; }
.doc ul { padding-left: 22px; }
.doc .updated { margin-top: 16px; color: var(--muted); font-size: var(--t-small); }
.doc a { color: var(--green); }

/* ------------------------------------------------------------------ blog */
.doc .intro { margin-top: 18px; font-size: 20px; color: var(--muted); }
.crumb { font-size: var(--t-small); font-weight: 600; margin-bottom: 14px; }
.crumb a { text-decoration: none; }
.post article h2 { font-size: 26px; }
.post article { margin-top: 32px; }
.post article p { line-height: 1.65; }
.post-list { list-style: none; padding: 0 !important; margin: 40px 0 0; display: grid; gap: 16px; }
.post-card {
  display: block; padding: 26px 28px; border-radius: 24px; background: var(--tile);
  text-decoration: none; color: var(--ink) !important;
  transition: transform .18s var(--ease), background-color .18s var(--ease);
}
.post-card:hover { background: var(--soft); transform: translateY(-2px); }
.post-card h2 { font-size: 22px !important; margin: 0 0 8px !important; line-height: 1.25; letter-spacing: -0.02em; }
.post-card p { font-size: 16px !important; color: var(--muted); }
.post-meta { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--green); }
.post-cta { margin-top: 56px; padding: 36px 32px; border-radius: 28px; background: var(--soft); text-align: center; }
.post-cta p { color: var(--deep); }
.post-cta-head { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px; color: var(--ink) !important; }
.post-cta .pill { margin-top: 22px; color: var(--white) !important; text-decoration: none; }
.more { margin-top: 64px; }
.more > h2 { margin-top: 0 !important; }

/* The home page's words about putting things off, and the latest posts. */
.stuck { max-width: calc(var(--wrap) + 2 * var(--margin)); margin: 0 auto; padding: 96px var(--margin) 24px; text-align: center; }
.stuck-copy { max-width: 760px; margin: 0 auto; }
.stuck h2 { font-size: var(--t-head); }
.stuck-copy p { margin-top: 18px; font-size: 19px; color: var(--muted); }
.stuck .post-list { text-align: left; grid-template-columns: repeat(3, 1fr); }
.stuck-all { display: inline-block; margin-top: 28px; font-weight: 600; color: var(--green); }
@media (max-width: 900px) { .stuck .post-list { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- motion */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .rail .phone { opacity: 0; transform: translateY(40px); }
.js .rail.is-in .phone { opacity: 1; transform: none; }
.js .rail.is-in .phone-centre { transform: translateY(-24px); }
.rail .phone:nth-child(2) { transition-delay: .08s; }
.rail .phone:nth-child(3) { transition-delay: 0s; }
.rail .phone:nth-child(4) { transition-delay: .08s; }
.rail .phone:nth-child(1), .rail .phone:nth-child(5) { transition-delay: .16s; }
.panel .phone { transition: transform .5s var(--ease); }
.panel:hover .phone { transform: translateY(-6px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .rail .phone { opacity: 1; transform: none; transition: none; }
  .js .rail .phone-centre { transform: translateY(-24px); }
  .panel:hover .phone, .pill:hover { transform: none; }
}

/* ----------------------------------------------------------------- phone */
@media (max-width: 900px) {
  .rail { justify-content: flex-start; padding: 28px calc(50vw - 110px) 40px; margin-top: 28px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail .phone { scroll-snap-align: center; }
  .rail .phone { width: 220px; }
  .three { grid-template-columns: 1fr; gap: 28px; }
  .three-item, .three-item:first-child { border-left: 0; padding: 0; display: flex; align-items: center; gap: 18px; }
  .three-item p { margin-top: 0; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .bar nav a:not(.pill) { display: none; }
  .lead { font-size: 18px; }
  .panel { border-radius: 24px; padding: 40px 16px; }
  .panel .phone { width: 220px; }
  .panel-pair .phone { width: 46%; padding: 6px; border-radius: 30px; }
  .panel-pair .phone img { border-radius: 25px; }
  .end-phones .phone { width: 150px; margin: 0 -24px; }
  .end-phones .phone-front { width: 180px; }
  .phone { padding: 7px; border-radius: 38px; }
  .phone img { border-radius: 31px; }
}
