/* The app's paper and ink (Sources/DesignSystem/Palette.swift). Each month's ground and accent come
   with the page, from the app's own colours. */
:root {
  --paper: #f4efe6;
  --ink: #1b1a17;
  --muted: rgb(27 26 23 / .66);
  --rule: rgb(27 26 23 / .12);
  --card: rgb(27 26 23 / .06);
  --ink-on-ground: #1b1a17;
  --muted-on-ground: rgb(27 26 23 / .68);
  --rule-on-ground: rgb(27 26 23 / .14);
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, system-ui, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 5vw, 48px);
  --column: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12110f;
    --ink: #efe9dd;
    --muted: rgb(239 233 221 / .68);
    --rule: rgb(239 233 221 / .14);
    --card: rgb(239 233 221 / .07);
  }
}
@media (prefers-contrast: more) {
  :root { --muted: var(--ink); --muted-on-ground: var(--ink-on-ground); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul { margin: 0; }
h1, h2, h3, .month, .brand { font-family: var(--serif); }
h1, h2, .month { text-wrap: balance; letter-spacing: -.015em; }
p { text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 4px; }
.column { max-width: calc(var(--column) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -80px; z-index: 3; padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--paper); }
.skip:focus { top: 12px; }

/* The masthead */
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: calc(var(--column) + 2 * var(--gutter)); margin: 0 auto; padding: 16px var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 20px; font-weight: 600; text-decoration: none; }
.masthead nav { display: flex; gap: clamp(16px, 3vw, 28px); font-size: 15px; }
.masthead nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
@media (hover: hover) { nav a:hover { text-decoration: underline; } }
.home .masthead { position: absolute; inset: 0 0 auto; z-index: 2; color: var(--ink-on-ground); }

/* The almanac: the page is the month */
.almanac { background: var(--ground); color: var(--ink-on-ground); text-align: center; transition: background-color .45s ease-out; overflow: hidden; }
.almanac .title { position: relative; z-index: 1; padding: clamp(80px, 10vh, 112px) var(--gutter) 0; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-on-ground); }
.month { margin-top: 4px; font-size: clamp(44px, 16vw, 168px); font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.almanac h1 { margin-top: clamp(4px, 1vw, 12px); font-size: clamp(24px, 3vw, 36px); font-weight: 500; line-height: 1.2; }
.table { position: relative; aspect-ratio: var(--shape); width: 100%; max-width: 1760px; margin: -6% auto 0; }
.table img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mask-image: var(--fade); }
@media (min-width: 1760px) {
  .table img { mask-image: var(--fade), linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-composite: intersect; }
}
.foot { position: relative; z-index: 1; margin-top: clamp(-150px, -8vw, -24px); padding: 0 var(--gutter) clamp(56px, 8vw, 96px); }
.dial { display: inline-flex; max-width: 100%; min-width: 0; margin: 0; padding: 4px; border: 0; border-radius: 999px; background: rgb(255 255 255 / .42); box-shadow: 0 1px 2px rgb(60 40 20 / .08), 0 8px 24px rgb(60 40 20 / .08); }
.dial label { position: relative; flex: 1 1 44px; min-width: 0; width: 44px; }
.dial input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.dial span { display: grid; place-items: center; height: 44px; border-radius: 999px; font: 600 14px/1 ui-monospace, "SF Mono", Menlo, monospace; color: var(--muted-on-ground); transition: background-color .3s, color .3s; }
.dial input:checked + span { background: var(--ink-on-ground); color: #fff; }
.dial input:focus-visible + span { outline: 2px solid var(--ink-on-ground); outline-offset: 2px; }
@media (hover: hover) { .dial input:not(:checked):hover + span { background: rgb(27 26 23 / .08); color: var(--ink-on-ground); } }
.peak { max-width: 640px; min-height: 3.1em; margin: 16px auto 0; font-size: 15px; color: var(--muted-on-ground); }
.lede { max-width: 620px; margin: clamp(24px, 4vw, 40px) auto 0; font-size: clamp(19px, 2vw, 23px); line-height: 1.45; }
.store { display: inline-block; margin-top: 28px; padding: 14px 26px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; }
.almanac .store { background: var(--ink-on-ground); color: #fff; }

/* The leaves: one band a panel, each on its own month's ground */
.leaf { background: var(--ground); color: var(--ink-on-ground); overflow: hidden; }
.leaf .column { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(24px, 6vw, 96px); }
.leaf.left .words { order: 1; }
.leaf .phone { order: 0; }
.leaf.right .phone { order: 1; }
.leaf h2 { font-size: clamp(38px, 5.2vw, 68px); font-weight: 700; line-height: 1.04; }
.leaf p { max-width: 30em; margin-top: 20px; font-size: clamp(17px, 1.6vw, 20px); color: var(--muted-on-ground); }
.leaf .note { font-size: 14px; }
.phone { position: relative; height: clamp(560px, 62vw, 700px); display: flex; justify-content: center; padding-top: clamp(40px, 6vw, 72px); }
.phone > img:first-child { width: min(372px, 78vw); height: auto; align-self: flex-start; flex: none; filter: drop-shadow(0 18px 36px rgb(60 40 20 / .22)); }
.hero { position: absolute; bottom: -5%; width: clamp(220px, 27vw, 340px); filter: drop-shadow(0 16px 22px rgb(60 40 20 / .28)); }
/* Beside the phone, over the edge of its screen. */
.right .hero { left: calc(50% + min(90px, 18vw)); }
.left .hero { right: calc(50% + min(90px, 18vw)); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 60%; }
    @keyframes rise { from { translate: 0 90px; rotate: -5deg; } }
  }
}

/* Private by nature */
.private { background: var(--ground); color: var(--ink-on-ground); text-align: center; padding: clamp(64px, 9vw, 120px) 0; }
.private img { width: clamp(240px, 34vw, 420px); margin: 0 auto; filter: drop-shadow(0 24px 30px rgb(60 40 20 / .25)); }
.private h2 { margin-top: 24px; font-size: clamp(40px, 6vw, 80px); font-weight: 700; line-height: 1.04; }
.private p { max-width: 34em; margin: 20px auto 0; font-size: clamp(17px, 1.6vw, 20px); color: var(--muted-on-ground); }

/* Free, and Pro */
.pro { padding: clamp(72px, 10vw, 136px) 0; }
.pro h2 { max-width: 16em; font-size: clamp(34px, 4.6vw, 60px); font-weight: 700; line-height: 1.06; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: clamp(32px, 4vw, 56px); }
.plan { padding: clamp(24px, 3vw, 40px); border-radius: 24px; background: var(--card); }
.plan h3 { font-size: 24px; font-weight: 600; line-height: 1.2; }
.plan p { margin-top: 6px; color: var(--muted); }
.plan ul { margin-top: 20px; padding: 0; list-style: none; }
.plan li { padding: 13px 0; border-top: 1px solid var(--rule); }
.plan li:last-child { padding-bottom: 0; }
.pro .price { max-width: 44em; margin-top: 28px; color: var(--muted); font-size: 15px; }

/* Support, privacy and terms */
.sheet { max-width: calc(680px + 2 * var(--gutter)); margin: 0 auto; padding: clamp(24px, 6vw, 72px) var(--gutter) clamp(64px, 10vw, 120px); }
.sheet h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 700; line-height: 1.05; }
.sheet .date { margin-top: 12px; color: var(--muted); font-size: 15px; }
.sheet .summary { margin-top: 24px; font-family: var(--serif); font-size: clamp(20px, 2.4vw, 25px); line-height: 1.4; }
.sheet h2 { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 24px; font-weight: 600; line-height: 1.25; }
.sheet p, .sheet ul { margin-top: 14px; }
.sheet ul { padding-left: 1.2em; }
.sheet li + li { margin-top: 6px; }
.sheet li::marker { color: var(--muted); }
details { border-top: 1px solid var(--rule); }
h2 + details { border-top: 0; margin-top: 8px; }
summary { display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 52px; padding: 10px 0; cursor: pointer; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 9px; height: 9px; margin-right: 4px; border: solid var(--muted); border-width: 0 2px 2px 0; rotate: 45deg; translate: 0 -3px; transition: rotate .25s, translate .25s; }
details[open] summary::after { rotate: 225deg; translate: 0 3px; }
details p { margin: 0 0 18px; max-width: 38em; color: var(--muted); }

/* The foot of every page */
footer { border-top: 1px solid var(--rule); padding: 32px 0 max(48px, env(safe-area-inset-bottom)); font-size: 14px; color: var(--muted); }
footer nav { display: flex; flex-wrap: wrap; gap: 0 28px; }
footer nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; }
footer p { margin-top: 8px; }

.table { --shape: 2880 / 1320; --fade: linear-gradient(transparent, #000 26%, #000 72%, transparent); }
@media (max-width: 699px) {
  .table { --shape: 1320 / 1440; --fade: linear-gradient(transparent, #000 9%, #000 93%, transparent); margin-top: -4%; }
  .foot { margin-top: -8px; }
  .dial { display: flex; }
  .dial label { flex: 1 1 0; width: auto; }
  .leaf .column, .plans { grid-template-columns: 1fr; gap: 0; }
  .plans { gap: 16px; }
  .leaf .words, .leaf.left .words { order: 0; padding-top: 64px; }
  .leaf .phone, .leaf.right .phone { order: 1; height: 520px; }
  .hero { width: 180px; }
  .right .hero { left: calc(50% + 12vw); }
  .left .hero { right: calc(50% + 12vw); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .almanac, .dial span, summary::after { transition: none; }
}
