/*
 * The app's own palette, so the site and the product are plainly the same
 * thing. Values are copied from
 * app/src/main/java/com/notyet/blocker/ui/theme/Color.kt and, for the life
 * grid, from OnboardingScreen.kt — if one moves, move both.
 */
:root {
  --ink: #0b0c0d;
  --panel: #161718;
  --panel-high: #212325;
  --line: #2a2c2f;
  --accent: #6e9bd1;
  --accent-bright: #9cc0e6;
  --accent-dim: #27384a;
  --green: #62b584;
  --brick: #c96a5e;
  --text: #f1f2f3;
  --text-2: #a8acb0;
  --text-3: #7c8084;

  --year-lived: #272b2f;
  --year-sleep: #5a5e93;
  --year-work: #8e7550;
  --year-basics: #6e6a63;

  --gut: 24px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 var(--gut);
}

a { color: var(--accent); }

/* ------------------------------- header ------------------------------- */

header { padding: 26px 0 0; }

header nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

header .mark {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  font-size: 19px;
}

header nav a.link {
  color: var(--text-3);
  text-decoration: none;
  font-size: 15px;
  transition: color .2s;
}

header nav a.link:hover { color: var(--text-2); }
header .spacer { flex: 1; }

/* ---------------------------- shared pieces ---------------------------- */

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 700;
  margin: 0 0 18px;
}

h1 {
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 18px;
}

h2 {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 18px;
}

.lede, .hero-copy p {
  color: var(--text-2);
  margin: 0 0 28px;
  max-width: 30em;
}

section { padding: clamp(64px, 10vw, 120px) 0; }
section + section { border-top: 1px solid var(--line); }

/*
 * The whole page arrives this way: up and in, once, and never again. Gated on
 * .js, set by an inline script in the head of the body: without scripting
 * nothing would ever add .is-in, and the page would be a blank screen.
 */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.22, .8, .3, 1), transform .7s cubic-bezier(.22, .8, .3, 1);
}

.js .reveal.is-in { opacity: 1; transform: none; }

/* ------------------------------ the phone ------------------------------
 * A frame drawn in CSS rather than a bezel image: it stays sharp at every
 * size and carries no other manufacturer's shape.
 */

.phone {
  width: min(280px, 72vw);
  padding: 9px;
  border-radius: 40px;
  background: linear-gradient(160deg, #3a3d42, #191a1c 46%, #303338);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, .55),
    0 2px 0 rgba(255, 255, 255, .06) inset;
}

.phone-screen {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  background: var(--ink);
  aspect-ratio: 620 / 1280;
}

.phone-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .16s ease;
}

.phone-screen img.fading { opacity: 0; }

/* -------------------------------- hero -------------------------------- */

.hero { padding-top: clamp(48px, 7vw, 84px); }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}

.hero-phone { display: flex; justify-content: flex-end; }
.hero-phone.reveal { transition-delay: .1s; }

/* the Google Play badge, plainly not a button yet */
.get { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }

.badge {
  position: relative;
  display: inline-block;
  line-height: 0;
}

.badge img {
  width: 180px;
  height: auto;
  filter: grayscale(1) brightness(.72);
}

/* A ribbon over the badge, not a change to the badge art underneath. */
.badge-soon {
  position: absolute;
  top: -9px;
  right: -12px;
  background: var(--accent);
  color: #10161d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  padding: 6px 11px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
}

.get-note { color: var(--text-3); font-size: 14px; }

/* ------------------------------ life grid ------------------------------ */

.life-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
}

.life-board.reveal { transition-delay: .08s; }

.cells {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: min(10px, 1.4vw);
  max-width: 420px;
}

.cell {
  aspect-ratio: 1;
  border-radius: 28%;
  background: var(--accent-dim);
  opacity: .22;
  transform: scale(.72);
  transition: opacity .35s ease, transform .35s cubic-bezier(.3, 1.5, .5, 1), background-color .35s ease;
}

.cell.on { opacity: 1; transform: none; }

.cell[data-key="lived"]  { background: var(--year-lived); }
.cell[data-key="sleep"]  { background: var(--year-sleep); }
.cell[data-key="work"]   { background: var(--year-work); }
.cell[data-key="basics"] { background: var(--year-basics); }
.cell[data-key="free"]   { background: var(--green); }
.cell[data-key="phone"]  { background: var(--brick); }

/* the one moment of drama on the page: a free year becoming a phone year */
.cell.hit { animation: hit .5s cubic-bezier(.3, 1.4, .4, 1); }

@keyframes hit {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.45) rotate(-8deg); }
  100% { transform: scale(1) rotate(0); }
}

.keys {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
  font-size: 15px;
  color: var(--text-3);
}

.keys li {
  display: flex;
  align-items: center;
  gap: 9px;
  opacity: .3;
  transition: opacity .4s ease;
}

.keys li.on { opacity: 1; color: var(--text-2); }
.keys b { color: var(--text); font-weight: 700; }

/*
 * Free time reads 10 until the phone takes its eight. Then the 10 is struck
 * through and what is actually left stands next to it, which is the same
 * subtraction the squares are doing.
 */
.keys .now {
  display: none;
  margin-left: 8px;
}

.keys.taken .was {
  color: var(--text-3);
  text-decoration: line-through;
  text-decoration-color: var(--brick);
  text-decoration-thickness: 2px;
}

.keys.taken .now { display: inline; }

.keys i {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex: none;
  background: var(--accent-dim);
}

.keys li[data-key="lived"] i  { background: var(--year-lived); }
.keys li[data-key="sleep"] i  { background: var(--year-sleep); }
.keys li[data-key="work"] i   { background: var(--year-work); }
.keys li[data-key="basics"] i { background: var(--year-basics); }
.keys li[data-key="free"] i   { background: var(--green); }
.keys li[data-key="phone"] i  { background: var(--brick); }

.life-punch { color: var(--text-2); margin: 0; max-width: 24em; }
.life-punch b { color: var(--brick); font-weight: 700; }

/* -------------------------------- steps -------------------------------- */

.steps-grid {
  display: grid;
  grid-template-columns: 1fr .8fr;
  gap: 52px;
  align-items: center;
}

.step-list {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
}

.step-list li { counter-increment: step; }

.step {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-left: 2px solid var(--line);
  color: inherit;
  font: inherit;
  padding: 16px 16px 16px 54px;
  cursor: pointer;
  transition: border-color .3s ease, background-color .3s ease;
}

.step::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 18px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--panel-high);
  color: var(--text-3);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .3s ease, color .3s ease;
}

.step b { display: block; color: var(--text-2); font-weight: 500; transition: color .3s ease; }
.step span { display: block; color: var(--text-3); font-size: 15px; }

.step:hover { background: rgba(255, 255, 255, .02); }

.step.is-on { border-left-color: var(--accent); }
.step.is-on b { color: var(--text); font-weight: 700; }
.step.is-on::before { background: var(--accent-dim); color: var(--accent-bright); }

.steps-phone { display: flex; justify-content: center; }

/* ------------------------------- the code ------------------------------- */

.code-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
}

.code-card {
  background: linear-gradient(170deg, #12171d, var(--panel));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 30px 28px 26px;
  text-align: center;
  max-width: 400px;
  width: 100%;
  justify-self: center;
}

.code-card.reveal { transition-delay: .08s; }

.code-label {
  display: block;
  color: var(--text-2);
  font-size: 15px;
  margin-bottom: 14px;
}

.digits {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 3vw, 22px);
  font-size: clamp(46px, 9vw, 68px);
  font-weight: 500;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: 22px;
}

/*
 * A fixed box per digit. tabular-nums alone does not hold here — the widths
 * measured 38 to 46px — and without it the whole code shuffles sideways every
 * time a minute turns over.
 */
.digits span {
  display: block;
  width: 0.68em;
  text-align: center;
}
.digits span.roll { animation: roll .42s cubic-bezier(.22, .9, .3, 1) both; }

@keyframes roll {
  0%   { opacity: 0; transform: translateY(-.34em); }
  100% { opacity: 1; transform: none; }
}

.bar {
  height: 4px;
  border-radius: 999px;
  background: var(--accent-dim);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 1s linear;
}

.code-foot {
  display: block;
  margin-top: 12px;
  color: var(--text-3);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------- what you get back ---------------------------- */

.back-grid {
  display: grid;
  grid-template-columns: .8fr 1fr;
  gap: 52px;
  align-items: center;
}

.back-phone { display: flex; justify-content: center; }
.back-copy.reveal { transition-delay: .08s; }

.figures {
  display: flex;
  gap: 44px;
  margin: 0 0 24px;
  flex-wrap: wrap;
}

.figures b {
  display: block;
  font-size: clamp(38px, 6vw, 52px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.figures span { color: var(--text-3); font-size: 15px; }

/* ------------------------------- privacy ------------------------------- */

.privacy .dots {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.privacy .dots li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  color: var(--text-2);
  font-size: 15px;
}

.fine { color: var(--text-3); font-size: 15px; margin: 0; max-width: 40em; }

/* ----------------------------- legal pages ----------------------------- */

.wrap.legal { max-width: 720px; }

.legal h1 {
  font-size: clamp(28px, 5vw, 34px);
  letter-spacing: -0.02em;
  margin: 48px 0 8px;
}

.legal .updated { color: var(--text-3); font-size: 14px; margin: 0 0 12px; }

.legal h2 {
  font-size: 20px;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 40px 0 12px;
  font-weight: 700;
}

.legal p, .legal li { color: var(--text-2); }

.legal section {
  border-top: none;
  padding: 0;
}

.legal footer { margin-top: 56px; }

.legal p { margin: 0 0 16px; }
.legal strong { color: var(--text); font-weight: 700; }

.summary {
  background: var(--panel);
  border-radius: 16px;
  padding: 22px 24px;
  margin: 26px 0 8px;
}

.summary p { margin: 0; color: var(--text); }

ul.plain { list-style: none; padding: 0; margin: 0; }

ul.plain li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  color: var(--text-2);
}

ul.plain li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/*
 * Deliberately loud. These are the things that must be filled in before the
 * page goes up, and a quiet placeholder is a placeholder that ships.
 */
.fill {
  background: #4a2f12;
  color: #ffcf8a;
  padding: 1px 7px;
  border-radius: 5px;
  font-weight: 700;
  font-size: 0.94em;
}

/* -------------------------------- footer -------------------------------- */

footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 56px;
  color: var(--text-3);
  font-size: 14px;
}

footer a { color: var(--text-2); text-decoration: none; transition: color .2s; }
footer a:hover { color: var(--text); }

footer .row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

footer .row .spacer { flex: 1; }

/* ------------------------------ narrower ------------------------------ */

@media (max-width: 880px) {
  .hero-grid, .life-grid, .steps-grid, .code-grid, .back-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-phone, .steps-phone, .back-phone { justify-content: center; }
  .back-phone { order: 2; }
  .cells { max-width: 360px; margin: 0 auto; }
  .life-punch { max-width: none; }
}

@media (max-width: 560px) {
  :root { --gut: 20px; }
  body { font-size: 16px; }
  .keys { grid-template-columns: 1fr; }
  .figures { gap: 32px; }
}

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

  .reveal, .cell, .phone-screen img, .bar i, .step, .step::before {
    transition: none !important;
  }

  .cell.hit, .digits span.roll { animation: none !important; }
}
