/* Pinwheel's site. Dark like the app: the canvas, the six place colours, one blue for actions. */
:root {
  --accent: #2F8FEA;
  --accent-2: #63B4FF;
  --bg: #0F0F14;
  --surface: #1B1B22;
  --ink: #F4F4F7;
  --muted: #A6A8B5;
  --line: #2A2B35;
  --coral: #FF5E57; --mint: #30D18C; --amber: #FFB52E; --sky: #40A3FF; --violet: #A17DFF; --rose: #FF70AB;
  --radius: 22px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Hiragino Sans", "Noto Sans JP", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-underline-offset: 3px; }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.wrap.narrow, .narrow { max-width: 760px; }
.lead.narrow { margin-left: 0; }

/* header and footer */
header.site { position: sticky; top: 0; z-index: 50; 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 color-mix(in srgb, var(--line) 70%, transparent); }
.bar { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.brand img { border-radius: 7px; display: block; }
header.site nav { display: flex; gap: 22px; margin-left: auto; }
header.site nav a { color: var(--muted); text-decoration: none; font-size: 15px; white-space: nowrap; }
header.site nav a:hover { color: var(--ink); }
.cta { padding: 8px 16px; border-radius: 999px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
@media (max-width: 760px) { header.site nav { display: none; } .cta { margin-left: auto; } }
footer.site { padding: 36px 0 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--ink); }
footer.site .langs { margin-top: 16px; }
footer.site .langs span { color: var(--ink); }

/* type */
h1 { font-size: clamp(40px, 6.2vw, 74px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; margin: 0 0 20px; text-wrap: balance; }
h2 { font-size: clamp(28px, 3.8vw, 44px); line-height: 1.1; letter-spacing: -0.025em; font-weight: 750; margin: 0 0 18px; text-wrap: balance; }
h3 { font-size: 19px; line-height: 1.3; margin: 0 0 6px; letter-spacing: -0.01em; }
p { margin: 0 0 16px; }
.lead { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.5; color: var(--muted); max-width: 34em; margin: 0 0 26px; }
.note { font-size: 14px; color: var(--muted); }
.badge { display: inline-block; padding: 15px 26px; border-radius: 999px; background: var(--ink); color: #0b0b10; text-decoration: none; font-weight: 650; font-size: 17px; }
.badge:hover { background: #fff; }
.badge + .note { margin-top: 14px; }

/* sections */
main > section { padding: clamp(56px, 8vw, 104px) 0; border-top: 1px solid var(--line); overflow-x: clip; }
main > section:first-child { border-top: 0; }
.hero { padding-top: clamp(36px, 6vw, 72px); overflow: hidden; }
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 56px; }
  .split.flip .words { order: 2; }
}
.words p { color: var(--muted); max-width: 33em; }
.stage { position: relative; margin: 0; display: grid; justify-items: center; }
.stage::before { /* the lit slice of the wheel behind the phone */
  content: ""; position: absolute; inset: -12% -22%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow, var(--sky)) 26%, transparent), transparent 72%);
}
#wheel .stage { --glow: var(--amber); }
#tray .stage { --glow: var(--coral); }
#locked .stage { --glow: var(--violet); }
.stage .pw-phone { width: min(100%, 330px); }
/* The first phone fits the window, so its caption is in view without scrolling. */
.hero .stage .pw-phone { width: min(100%, 340px, max(250px, calc((100svh - 190px) * 0.46))); }
.stage figcaption { margin-top: 18px; font-size: 14px; color: var(--muted); text-align: center; max-width: 24em; }

/* how it goes */
.numbered { list-style: none; counter-reset: step; margin: 30px 0 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 820px) { .numbered { grid-template-columns: repeat(3, 1fr); } }
.numbered li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.numbered li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 16px; border-radius: 50%; font-weight: 700; color: #0b0b10; background: var(--sky); }
.numbered li:nth-child(2)::before { background: var(--amber); }
.numbered li:nth-child(3)::before { background: var(--coral); }
.numbered p { margin: 0; color: var(--muted); }

/* the six places */
.places { margin: 26px 0 0; display: grid; gap: 14px 26px; }
@media (min-width: 560px) { .places { grid-template-columns: 1fr 1fr; } }
.places div { position: relative; padding-left: 22px; }
.places div::before { content: ""; position: absolute; left: 0; top: 9px; width: 11px; height: 11px; border-radius: 50%; background: var(--c, var(--sky)); }
.places [data-place="0"] { --c: var(--mint); } .places [data-place="1"] { --c: var(--coral); }
.places [data-place="2"] { --c: var(--amber); } .places [data-place="3"] { --c: var(--violet); }
.places [data-place="4"] { --c: var(--rose); } .places [data-place="5"] { --c: var(--sky); }
.places dt { font-weight: 650; }
.places dd { margin: 2px 0 0; color: var(--muted); font-size: 15.5px; line-height: 1.45; }

.ticks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; color: var(--muted); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 14px; height: 8px; border-left: 2.5px solid var(--mint); border-bottom: 2.5px solid var(--mint); transform: rotate(-45deg); }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 9px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 15.5px; }

/* cards */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 28px; }
@media (min-width: 720px) { .grid.cols-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 620px) { .grid.cols-4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card p { margin: 0; color: var(--muted); }
.plan .price { font-size: 38px; font-weight: 750; letter-spacing: -0.03em; margin: 6px 0 0; }
.plan .per { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.plan .note { margin: 0; line-height: 1.45; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan.free h3 { color: var(--mint); }
.terms { margin-top: 20px; max-width: 760px; }

details { border-bottom: 1px solid var(--line); padding: 16px 0; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 10px 0 0; }

.cards { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 720px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .wide .cards, #guides .cards { grid-template-columns: repeat(3, 1fr); } }
.cards a { display: block; height: 100%; padding: 18px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.cards a:hover { border-color: color-mix(in srgb, var(--accent) 70%, var(--line)); }
.cards b { display: block; font-weight: 650; line-height: 1.3; }
.cards span { display: block; margin-top: 6px; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.more { margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }

.closing { text-align: center; }
.closing .lead { margin-left: auto; margin-right: auto; }

/* reading pages: guides, comparisons, privacy, terms, support */
.prose { max-width: 760px; padding-top: 34px; padding-bottom: 72px; }
.prose.wide { max-width: 1040px; }
.prose h1 { font-size: clamp(32px, 4.6vw, 50px); line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 18px; }
.prose h2 { font-size: 25px; letter-spacing: -0.015em; margin: 40px 0 12px; }
.prose h3 { margin: 22px 0 4px; }
.prose p, .prose li { color: #D3D5DE; }
.prose .lead { color: var(--ink); max-width: none; }
.prose li { margin: 6px 0; }
.prose .note { color: var(--muted); }
.crumbs { margin: 0 0 22px; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 8px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs i { font-style: normal; opacity: 0.5; }
.steps { padding-left: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 12px 0 12px 46px; border-bottom: 1px solid var(--line); margin: 0; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 11px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 650; font-size: 14px; }
.own { margin: 34px 0; border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.own h2 { margin-top: 0; font-size: 21px; }
.own p, .own ul { margin-bottom: 18px; }
.links { padding-left: 20px; }
.sources { padding-left: 20px; }
.scroll { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
.compare { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.compare tr:first-child th { font-size: 16px; border-bottom-color: #3a3b48; }
.compare th[scope="row"] { width: 21%; color: var(--muted); font-weight: 500; }
.compare td:nth-child(2) { width: 39.5%; background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--ink); }
.compare tr:first-child th:nth-child(2) { background: color-mix(in srgb, var(--accent) 9%, transparent); border-radius: 14px 14px 0 0; }
.compare td:nth-child(3) { color: #D3D5DE; }

/* Japanese: break headings between phrases, not inside a word, where the browser can. */
:lang(ja) :is(h1, h2, h3, .lead) { word-break: auto-phrase; line-break: strict; }
:lang(ja) h1 { line-height: 1.16; letter-spacing: -0.01em; }
:lang(ja) h2 { line-height: 1.25; letter-spacing: 0; }
