/* Idle — a movement page for putting idle phones to work.
   The whole site is deliberately nocturnal: night is when a phone is charging,
   on wifi and free to work, and every illustration is set then. So there is one
   committed dark theme rather than a light/dark pair, and every colour is
   painted explicitly so nothing borrows the host background. */

:root {
  --night:   #0B1020;
  --night-2: #111831;
  --deep:    #070B16;
  --raised:  #16203C;

  --ink:   #EDF1FA;
  --ink-2: #9EAAC8;
  --ink-3: #6E7A9C;
  --line:  #1E2842;
  --line-2:#2B3758;

  --mint:  #4FE8A8;
  --mint-2:#2FBF83;
  --amber: #FFC46B;
  --lav:   #9B8CFF;

  --sh-1: 0 1px 2px rgba(0,0,0,.5), 0 6px 18px rgba(0,0,0,.35);
  --sh-2: 0 2px 8px rgba(0,0,0,.55), 0 22px 50px rgba(0,0,0,.45);
  --sh-3: 0 4px 12px rgba(0,0,0,.6), 0 34px 80px rgba(6,10,22,.7);

  --r: 20px;
  --r-sm: 13px;
  --gutter: 20px;
  --maxw: 1140px;

  --ease: cubic-bezier(.22,.61,.24,1);
  --ease-soft: cubic-bezier(.33,.9,.28,1);

  --s--1: clamp(.83rem, .81rem + .1vw, .89rem);
  --s-0:  clamp(1rem, .97rem + .15vw, 1.08rem);
  --s-1:  clamp(1.12rem, 1.04rem + .4vw, 1.32rem);
  --s-2:  clamp(1.35rem, 1.2rem + .75vw, 1.8rem);
  --s-3:  clamp(1.9rem, 1.45rem + 2.1vw, 3.1rem);
  --s-4:  clamp(2.4rem, 1.55rem + 4vw, 4.7rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--night); color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--s-0); line-height: 1.6; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:where(a, button, [tabindex]):focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 8px; }

/* ───── motion ───── */
.reveal { opacity: 0; transform: translateY(20px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease); }
.d1.in { transition-delay: .08s } .d2.in { transition-delay: .16s }
.d3.in { transition-delay: .24s } .d4.in { transition-delay: .32s }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* ───── scaffolding ───── */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.center { text-align: center; }
.center-x { margin-inline: auto; }
p.center-x { text-align: center; }
.center-row { justify-content: center; }

section { padding-block: clamp(4rem, 8vw, 7.5rem); position: relative; }
.deep { background: var(--deep); }
.soft { background: var(--night-2); }
.ink  { background: linear-gradient(170deg, #0D1428, #060A14); }

/* ───── type ───── */
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.034em; line-height: 1.05; text-wrap: balance; }
h1, .hero-h1 { font-size: var(--s-4); }
h2 { font-size: var(--s-3); max-width: 20ch; margin-inline: auto; }
h3 { font-size: var(--s-2); letter-spacing: -.025em; line-height: 1.2; }
p { margin: 0 0 1em; } p:last-child { margin-bottom: 0; }

.eyebrow { display: block; font-size: var(--s--1); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--mint); margin-bottom: 1rem; }
.lede { font-size: var(--s-1); line-height: 1.55; color: var(--ink-2); max-width: 56ch; }
.lede b { color: var(--ink); }
.note { font-size: var(--s--1); color: var(--ink-3); max-width: 70ch; line-height: 1.55; margin-top: 1.4rem; }

/* ───── nav ───── */
header.nav { position: sticky; top: 14px; z-index: 60; padding-inline: var(--gutter); }
.pill {
  max-width: 880px; margin-inline: auto; display: flex; align-items: center; gap: 1.25rem;
  padding: .45rem .45rem .45rem 1.15rem; border-radius: 999px;
  background: rgba(17,24,49,.78); backdrop-filter: saturate(170%) blur(18px);
  border: 1px solid var(--line-2); box-shadow: var(--sh-1);
}
.mark { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; letter-spacing: -.035em; font-size: 1.08rem; text-decoration: none; flex: none; }
.logo { width: 19px; height: 19px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 14px rgba(79,232,168,.65); flex: none; position: relative; }
.logo::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--night); }
.pill-links { display: flex; gap: 1.3rem; margin-inline: auto; }
.pill-links a { text-decoration: none; font-size: .9rem; font-weight: 600; color: var(--ink-2); transition: color .3s var(--ease-soft); }
.pill-links a:hover { color: var(--ink); }
@media (max-width: 880px) { .pill-links { display: none } .mark { margin-right: auto } }

/* ───── buttons ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; font: inherit;
  font-weight: 700; font-size: .95rem; padding: .8rem 1.4rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--mint), var(--mint-2)); color: #052117;
  border: 0; text-decoration: none; cursor: pointer; position: relative; overflow: hidden;
  box-shadow: 0 2px 10px rgba(79,232,168,.3), 0 12px 30px rgba(79,232,168,.18);
  transition: transform .3s var(--ease-soft), box-shadow .3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(79,232,168,.4), 0 18px 40px rgba(79,232,168,.26); }
.btn::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-18deg); transition: left .6s var(--ease);
}
.btn:hover::after { left: 130%; }
.btn-sm { padding: .55rem 1.1rem; font-size: .88rem; }
.btn-lg { padding: .95rem 1.8rem; font-size: 1rem; }
.btn.ghost { background: rgba(255,255,255,.06); color: var(--ink); border: 1px solid var(--line-2); box-shadow: none; }
.btn.ghost:hover { background: rgba(255,255,255,.1); box-shadow: none; }
.btn.ghost::after { background: linear-gradient(100deg, transparent, rgba(255,255,255,.12), transparent); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.1rem; }

.badge {
  display: inline-flex; align-items: center; gap: .55rem; padding: .42rem .95rem; border-radius: 999px;
  background: rgba(79,232,168,.1); border: 1px solid rgba(79,232,168,.26);
  font-size: .85rem; font-weight: 600; color: var(--mint); margin-bottom: 1.6rem;
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); animation: blip 2.6s var(--ease) infinite; }
@keyframes blip { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(79,232,168,.5) } 50% { opacity: .6; box-shadow: 0 0 0 7px rgba(79,232,168,0) } }

/* ───── hero ───── */
.hero { padding-top: clamp(3.5rem, 9vw, 6rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.hero-h1 { max-width: 19ch; margin-inline: auto; }
.hero-h1 .ln { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-h1 .ln > span { display: block; transform: translateY(105%); animation: lineUp 1.05s cubic-bezier(.16,.84,.26,1) forwards; }
.hero-h1 .ln:nth-child(1) > span { animation-delay: .1s }
.hero-h1 .ln:nth-child(2) > span { animation-delay: .22s }
@keyframes lineUp { to { transform: none } }
.grad {
  background-image: linear-gradient(100deg, var(--mint) 0%, var(--amber) 34%, var(--lav) 62%, var(--mint) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: sweep 9s linear infinite; padding-bottom: .05em;
}
@keyframes sweep { to { background-position: -250% 0 } }
@supports not (background-clip: text) { .grad { color: var(--mint); -webkit-text-fill-color: currentColor } }
@media (prefers-reduced-motion: reduce) {
  .hero-h1 .ln > span { transform: none; animation: none }
  .grad { animation: none }
}
.hero .lede { margin: 1.6rem auto 0; }

.hero-art { margin: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 3.5rem); position: relative; }
.hero-art img { width: 100%; height: auto; }
.hero-art::after {   /* feather the illustration into the page */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, var(--night) 0%, transparent 16%, transparent 76%, var(--night) 100%),
              linear-gradient(to right, var(--night) 0%, transparent 12%, transparent 88%, var(--night) 100%);
}

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; border-top: 1px solid var(--line); padding-top: 2rem; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr; gap: 1.6rem; } }
.stats > div { text-align: center; }
.s-n { display: block; font-size: clamp(2.1rem, 1.6rem + 2.2vw, 3.1rem); font-weight: 800; letter-spacing: -.045em; line-height: 1; color: var(--mint); font-variant-numeric: tabular-nums; }
.s-k { display: block; margin-top: .6rem; font-size: .88rem; color: var(--ink-3); max-width: 24ch; margin-inline: auto; }

/* ───── two-column with illustration ───── */
.duo { display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(2rem, 4.5vw, 4rem); align-items: center; }
@media (max-width: 920px) { .duo { grid-template-columns: 1fr; } .duo.reverse .duo-art { order: 2 } }
.duo-copy h2 { margin-inline: 0; max-width: 18ch; }
.duo-copy .lede { margin-top: 1.1rem; }
.duo-copy p:not(.lede) { color: var(--ink-2); margin-top: 1rem; }
.duo-copy p b { color: var(--ink); }
.duo-art img { width: 100%; border-radius: var(--r); border: 1px solid var(--line-2); box-shadow: var(--sh-3); }

.facts { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.1rem; }
.facts li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.1rem; align-items: baseline; padding-top: 1.1rem; border-top: 1px solid var(--line); }
@media (max-width: 520px) { .facts li { grid-template-columns: 1fr; gap: .3rem } }
.f-n { font-size: 1.22rem; font-weight: 800; letter-spacing: -.035em; color: var(--amber); font-variant-numeric: tabular-nums; }
.f-k { font-size: .95rem; color: var(--ink-2); }

/* ───── steps ───── */
.steps { list-style: none; margin: clamp(2.5rem,5vw,3.5rem) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto } }
.steps li {
  background: var(--raised); border: 1px solid var(--line-2); border-radius: var(--r); padding: 1.6rem;
  transition: transform .34s var(--ease-soft), box-shadow .34s, border-color .34s;
}
.steps li:hover { transform: translateY(-5px); box-shadow: var(--sh-2); border-color: rgba(79,232,168,.3); }
.st-n {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(140deg, var(--mint), var(--mint-2)); color: #052117;
  font-weight: 800; font-size: .95rem; margin-bottom: 1.1rem; box-shadow: 0 4px 14px rgba(79,232,168,.3);
}
.steps h3 { font-size: var(--s-1); margin-bottom: .5rem; }
.steps p { font-size: .94rem; color: var(--ink-2); }

.wide-art { margin: clamp(2.5rem,5vw,3.5rem) 0 0; }
.wide-art img { width: 100%; border-radius: var(--r); border: 1px solid var(--line-2); box-shadow: var(--sh-3); }

/* ───── the five rules ───── */
.rules { display: grid; grid-template-columns: repeat(5, 1fr); gap: .9rem; margin-top: clamp(2.5rem,5vw,3.5rem); }
@media (max-width: 1040px) { .rules { grid-template-columns: repeat(2, 1fr) } }
@media (max-width: 560px) { .rules { grid-template-columns: 1fr } }
.rule {
  background: rgba(255,255,255,.035); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 1.4rem; transition: transform .34s var(--ease-soft), background .34s;
}
.rule:hover { transform: translateY(-5px); background: rgba(79,232,168,.07); }
.r-i { display: block; font-family: "DM Mono", ui-monospace, Menlo, monospace; font-size: .8rem; color: var(--mint); margin-bottom: .9rem; }
.rule h3 { font-size: 1.05rem; margin-bottom: .45rem; letter-spacing: -.02em; }
.rule p { font-size: .88rem; color: var(--ink-2); }

/* ───── money ───── */
.money { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: clamp(2.5rem,5vw,3.25rem); }
@media (max-width: 820px) { .money { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto } }
.m-card { background: var(--raised); border: 1px solid var(--line-2); border-radius: var(--r); padding: 1.7rem 1.3rem; text-align: center; }
.m-card.win { background: linear-gradient(150deg, rgba(79,232,168,.18), rgba(47,191,131,.05)); border-color: rgba(79,232,168,.34); }
.m-n { display: block; font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.4rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.m-card.win .m-n { color: var(--mint); }
.m-k { display: block; margin-top: .7rem; font-size: .9rem; color: var(--ink-2); }

/* ───── manifesto ───── */
.creed { list-style: none; counter-reset: creed; margin: clamp(2.5rem,5vw,3.5rem) auto 0; padding: 0; max-width: 820px; display: grid; gap: 0; }
.creed li {
  counter-increment: creed; position: relative;
  padding: 1.6rem 0 1.6rem 4.5rem; border-bottom: 1px solid var(--line);
  font-size: 1.04rem; color: var(--ink-2); line-height: 1.6;
}
.creed li:first-child { border-top: 1px solid var(--line); }
.creed li::before {
  content: counter(creed, decimal-leading-zero); position: absolute; left: 0; top: 1.65rem;
  font-family: "DM Mono", ui-monospace, Menlo, monospace; font-size: .92rem; color: var(--mint);
}
.creed b { color: var(--ink); font-weight: 800; display: block; margin-bottom: .25rem; font-size: 1.1rem; letter-spacing: -.015em; }
@media (max-width: 520px) { .creed li { padding-left: 3.2rem } }

/* ───── footer ───── */
footer { background: var(--deep); border-top: 1px solid var(--line); padding-block: 3rem 2.5rem; }
.foot-top { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; align-items: center; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.foot-links a { color: var(--ink-2); text-decoration: none; font-size: .9rem; }
.foot-links a:hover { color: var(--ink); }
.fine { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.fine p { font-size: .79rem; color: var(--ink-3); max-width: 90ch; margin-bottom: .65rem; line-height: 1.6; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: .5rem; z-index: 100; background: var(--mint); color: #052117; padding: .6rem 1rem; border-radius: 8px; }

/* Images must take their height from their own aspect ratio. Without this an
   out-of-date height attribute wins over the CSS width and the picture is
   stretched - which is exactly what happened to the bedside illustration. */
.duo-art img, .wide-art img, .hero-art img { height: auto; }

.wide-art figcaption { margin-top: .9rem; font-size: var(--s--1); color: var(--ink-3); text-align: center; }
.wide-art img { background: var(--night); }
