/* ==========================================================================
   Alarm Magic styles
   ========================================================================== */

:root {
  --bg: #120b22;
  --bg-app: #1a1030;
  --surface: #241941;
  --surface-2: #2f2255;
  --surface-3: #3a2c66;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --mint: #82d9b6;
  --mint-soft: rgba(130, 217, 182, 0.16);
  --star: #f2c14e;
  --star-soft: rgba(242, 193, 78, 0.18);
  --rose: #f08a7a;
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.68);
  --text-3: rgba(255, 255, 255, 0.42);
  --on-mint: #0f2019;
  --display: "Fraunces", Georgia, serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --wrap: 72rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 144;
}

h1 {
  font-size: clamp(2.9rem, 7.2vw, 5.4rem);
}

h2 {
  font-size: clamp(2.2rem, 4.8vw, 3.6rem);
}

h3 {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}

h1 em,
h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--mint);
}

p {
  margin: 0;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

::selection {
  background: var(--star);
  color: var(--bg);
}

/* --------------------------------------------------------------------------
   Sky
   -------------------------------------------------------------------------- */

.sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 15% -10%, rgba(88, 55, 150, 0.35), transparent 60%),
    radial-gradient(50rem 36rem at 90% 10%, rgba(130, 217, 182, 0.08), transparent 60%),
    linear-gradient(180deg, #150c28 0%, #120b22 40%, #0f0a1d 100%);
}

/* --------------------------------------------------------------------------
   Shared bits
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--mint);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--star);
  box-shadow: 0 0 0 4px var(--star-soft);
}

.section-head {
  max-width: var(--wrap);
  margin: 0 auto 3rem;
  padding: 0 var(--gutter);
}

.section-head h2 {
  margin-top: 0.9rem;
  max-width: 18ch;
}

.section-lede {
  max-width: 34rem;
  margin-top: 1.25rem;
  color: var(--text-2);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--mint);
  color: var(--on-mint);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 10px 30px -10px rgba(130, 217, 182, 0.55);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px -10px rgba(130, 217, 182, 0.7);
}

.button:active {
  transform: translateY(0) scale(0.98);
}

.button svg {
  width: 1.1em;
  fill: currentColor;
}

.button.small {
  padding: 0.55rem 1.05rem;
  font-size: 0.92rem;
}

.button.large {
  padding: 1.05rem 1.75rem;
  font-size: 1.05rem;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  backdrop-filter: blur(6px);
}

.button.ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.button.ghost svg {
  fill: var(--star);
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.9rem var(--gutter);
  transition: background 0.3s, box-shadow 0.3s;
}

.nav.is-scrolled {
  background: rgba(18, 11, 34, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 1px 0 var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--wrap);
  margin: 0 auto;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark svg {
  width: 1.25em;
  fill: var(--star);
  filter: drop-shadow(0 0 8px rgba(242, 193, 78, 0.55));
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: clamp(2rem, 6vw, 5rem) var(--gutter) clamp(4rem, 8vw, 7rem);
}

.hero-glow {
  position: absolute;
  top: 10%;
  right: 5%;
  width: min(48rem, 90vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(130, 217, 182, 0.16), rgba(105, 70, 180, 0.18) 40%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  max-width: var(--wrap);
  margin: 0 auto;
}

.hero-copy h1 {
  margin-top: 1.25rem;
  max-width: 12ch;
}

.lede {
  max-width: 32rem;
  margin: 1.75rem 0 2.25rem;
  color: var(--text-2);
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-3);
  font-size: 0.92rem;
  font-weight: 500;
}

.proof li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.proof li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  padding: 2rem 0;
}

/* Phone frame */

.phone {
  width: 100%;
  max-width: 300px;
  padding: 9px;
  border-radius: 46px;
  background: linear-gradient(160deg, #241a3d, #0b0716 60%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 40px 90px -20px rgba(0, 0, 0, 0.75),
    0 20px 40px -20px rgba(80, 40, 160, 0.5);
}

.phone-screen {
  position: relative;
  overflow: hidden;
  border-radius: 38px;
  background: var(--bg-app);
}

.phone-screen img {
  width: 100%;
  height: auto;
}

.island {
  position: absolute;
  top: 3%;
  left: 50%;
  width: 30%;
  height: 3.4%;
  border-radius: 999px;
  background: #000;
  transform: translateX(-50%);
}

.phone-hero {
  transform: rotate(-4deg);
  animation: hover-float 7s ease-in-out infinite;
}

@keyframes hover-float {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(-4deg) translateY(-10px); }
}

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem 0.75rem 0.85rem;
  border-radius: 18px;
  background: rgba(36, 25, 65, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 20px 40px -16px rgba(0, 0, 0, 0.7);
  font-size: 0.85rem;
  line-height: 1.25;
}

.float-card strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
}

.float-card span {
  color: var(--text-3);
}

.float-card svg {
  width: 1.5rem;
  fill: var(--star);
  filter: drop-shadow(0 0 6px rgba(242, 193, 78, 0.6));
}

.float-streak {
  top: 16%;
  left: -2%;
  animation: hover-float-b 8s ease-in-out infinite;
}

.float-count {
  bottom: 16%;
  right: -4%;
  animation: hover-float-b 9s ease-in-out infinite reverse;
}

.float-count .pulse {
  position: relative;
  width: 10px;
  height: 10px;
  margin: 0 0.25rem;
  border-radius: 50%;
  background: var(--mint);
}

.float-count .pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--mint);
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  from { transform: scale(0.6); opacity: 1; }
  to { transform: scale(1.8); opacity: 0; }
}

@keyframes hover-float-b {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* --------------------------------------------------------------------------
   How it works
   -------------------------------------------------------------------------- */

.how {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 1.75rem;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}

.step::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(30rem 12rem at 100% 0%, rgba(130, 217, 182, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.step:hover::after {
  opacity: 1;
}

.step-num {
  position: absolute;
  top: 1.4rem;
  right: 1.6rem;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-3);
}

.step-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.5rem;
  border-radius: 14px;
  background: var(--mint-soft);
}

.step-icon svg {
  width: 1.5rem;
  fill: none;
  stroke: var(--mint);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step:last-child .step-icon {
  background: var(--star-soft);
}

.step:last-child .step-icon svg {
  fill: var(--star);
  stroke: var(--star);
}

.step h3 {
  font-size: 1.3rem;
}

.step p {
  margin-top: 0.6rem;
  color: var(--text-2);
  font-size: 1rem;
}

/* --------------------------------------------------------------------------
   Awake check
   -------------------------------------------------------------------------- */

.check {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter);
}

.check-copy h2 {
  margin-top: 0.9rem;
}

.seg {
  display: flex;
  gap: 4px;
  margin-top: 2rem;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  max-width: 26rem;
}

.seg button {
  flex: 1;
  padding: 0.65rem 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.seg button:hover {
  color: var(--text);
}

.seg button[aria-selected="true"],
.seg button[aria-checked="true"] {
  background: var(--mint);
  color: var(--on-mint);
}

.seg-sub {
  margin-top: 0.5rem;
  max-width: 22rem;
}

.seg-sub button {
  padding: 0.5rem 0;
  font-size: 0.88rem;
}

.mode-text {
  min-height: 3.2em;
  max-width: 26rem;
  margin-top: 1rem;
  color: var(--text-2);
  font-size: 1rem;
}

.control-label {
  margin-top: 1.5rem;
  color: var(--text-3);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hint {
  margin-top: 1.75rem;
  color: var(--text-3);
  font-family: var(--display);
  font-style: italic;
  font-size: 1.05rem;
}

/* Playground */

.check-demo {
  display: grid;
  place-items: center;
}

.playground {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 24rem;
  min-height: 34rem;
  padding: 1.5rem;
  border-radius: 36px;
  background: linear-gradient(180deg, #2a1e4c, #1e1538);
  box-shadow:
    inset 0 0 0 1px var(--line-strong),
    0 40px 80px -30px rgba(0, 0, 0, 0.8),
    0 0 80px -20px rgba(130, 217, 182, 0.18);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.playground.is-shaking {
  animation: stage-shake 0.4s;
}

@keyframes stage-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

.pg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pg-time {
  display: block;
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
}

.pg-time small {
  margin-left: 0.2em;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-2);
}

.pg-sub {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-3);
  font-size: 0.85rem;
}

.playground.is-done .pg-sub {
  color: var(--mint);
}

.pg-bell {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--star-soft);
  transform-origin: 50% 20%;
  animation: ring 1.1s ease-in-out infinite;
}

.pg-bell svg {
  width: 1.35rem;
  fill: none;
  stroke: var(--star);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.playground.is-done .pg-bell {
  animation: none;
  background: var(--mint-soft);
}

.playground.is-done .pg-bell svg {
  stroke: var(--mint);
}

@keyframes ring {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(14deg); }
  30% { transform: rotate(-12deg); }
  45% { transform: rotate(9deg); }
  60% { transform: rotate(-6deg); }
  75% { transform: rotate(3deg); }
}

.pg-progress {
  display: flex;
  gap: 6px;
  margin-top: 1.25rem;
}

.pg-progress i {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.3s;
}

.pg-progress i.done {
  background: var(--mint);
}

.pg-stage {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
  padding: 1.25rem;
}

.pg-msg {
  min-height: 1.4em;
  margin-top: 1rem;
  text-align: center;
  color: var(--text-2);
  font-size: 0.92rem;
}

.pg-msg.is-bad {
  color: var(--rose);
}

.pg-msg.is-good {
  color: var(--mint);
}

/* Stars mode */

.pg-star {
  position: absolute;
  width: 92px;
  height: 92px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  animation: star-in 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

@keyframes star-in {
  from { transform: scale(0.4); opacity: 0; }
}

.pg-star svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.pg-star .ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 5;
}

.pg-star .ring {
  fill: none;
  stroke: var(--star);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 213.6;
  transform: rotate(-90deg);
  transform-origin: center;
}

.pg-star .glyph {
  fill: var(--star);
  filter: drop-shadow(0 0 8px rgba(242, 193, 78, 0.6));
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.15s;
}

.pg-star:hover .glyph {
  transform: scale(1.1);
}

.pg-star.is-hit {
  animation: star-hit 0.3s var(--ease) forwards;
  pointer-events: none;
}

@keyframes star-hit {
  to { transform: scale(1.6); opacity: 0; }
}

/* Math and type modes */

.pg-sum {
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-align: center;
}

.pg-sentence {
  max-width: 18rem;
  font-family: var(--display);
  font-size: 1.3rem;
  line-height: 1.4;
  text-align: center;
}

.pg-form {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: 18rem;
}

.pg-form input,
.pg-form textarea {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 0.95rem;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
}

.pg-form textarea {
  resize: none;
  line-height: 1.45;
}

.pg-form input::placeholder,
.pg-form textarea::placeholder {
  color: var(--text-3);
}

.pg-form.is-col {
  flex-direction: column;
}

.pg-form .button {
  padding: 0.75rem 1.1rem;
  box-shadow: none;
}

/* Shake mode */

.pg-shake {
  position: relative;
  width: 160px;
  height: 160px;
}

.pg-shake svg {
  width: 100%;
  height: 100%;
}

.pg-shake .ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 6;
}

.pg-shake .ring {
  fill: none;
  stroke: var(--mint);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 414.7;
  stroke-dashoffset: 414.7;
  transform: rotate(-90deg);
  transform-origin: center;
}

.pg-shake .phone-glyph {
  fill: none;
  stroke: var(--mint);
  stroke-width: 4;
  stroke-linejoin: round;
  transform-origin: center;
}

.pg-shake.is-active .phone-glyph {
  animation: wobble 0.12s ease-in-out infinite alternate;
}

@keyframes wobble {
  from { transform: rotate(-10deg); }
  to { transform: rotate(10deg); }
}

.pg-hold {
  padding: 0.85rem 1.6rem;
  border: 0;
  border-radius: 999px;
  background: var(--mint);
  color: var(--on-mint);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s;
}

.pg-hold:active {
  transform: scale(0.96);
}

/* Done state */

.pg-done {
  text-align: center;
}

.pg-done .big-star {
  width: 84px;
  margin: 0 auto 1rem;
  fill: var(--star);
  filter: drop-shadow(0 0 18px rgba(242, 193, 78, 0.7));
  animation: pop 0.6s var(--ease);
}

@keyframes pop {
  0% { transform: scale(0) rotate(-30deg); }
  70% { transform: scale(1.15) rotate(5deg); }
  100% { transform: scale(1) rotate(0); }
}

.pg-done h3 {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 500;
}

.pg-done p {
  margin-top: 0.4rem;
  color: var(--text-2);
}

.pg-done .button {
  margin-top: 1.5rem;
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   Screens
   -------------------------------------------------------------------------- */

.screens {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.screens-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: end;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.screen {
  margin: 0;
}

.screen .phone {
  max-width: 280px;
  margin: 0 auto;
}

.screen-raised {
  padding-bottom: 3rem;
}

.screen figcaption {
  max-width: 280px;
  margin: 1.5rem auto 0;
  color: var(--text-2);
  font-size: 0.95rem;
}

.screen figcaption strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--text);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Details (bento)
   -------------------------------------------------------------------------- */

.details {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  list-style: none;
}

.card {
  position: relative;
  padding: 1.5rem;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 1.25rem;
  border-radius: 12px;
  background: var(--mint-soft);
}

.card-icon svg {
  width: 1.3rem;
  fill: none;
  stroke: var(--mint);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  font-size: 1.05rem;
}

.card p {
  margin-top: 0.4rem;
  color: var(--text-2);
  font-size: 0.95rem;
}

.card p a {
  color: var(--mint);
  text-decoration-color: rgba(130, 217, 182, 0.4);
  text-underline-offset: 3px;
}

.card-star .card-icon {
  background: var(--star-soft);
}

.card-star .card-icon svg {
  fill: var(--star);
  stroke: var(--star);
}

.card-wide {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(130, 217, 182, 0.14), rgba(255, 255, 255, 0.02) 60%);
}

.streak-strip {
  display: flex;
  gap: 4px;
  margin-top: 1.1rem;
}

.streak-strip i {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--star);
  opacity: 0.55;
}

.streak-strip i.today {
  opacity: 1;
  box-shadow: 0 0 10px rgba(242, 193, 78, 0.8);
}

/* --------------------------------------------------------------------------
   Close (dawn)
   -------------------------------------------------------------------------- */

.close {
  padding: clamp(3rem, 8vw, 6rem) var(--gutter) 0;
}

.dawn {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) var(--gutter) clamp(5rem, 10vw, 8rem);
  border-radius: 36px;
  text-align: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, #1f1540 0%, #34225e 40%, #6b3f6c 68%, #d07a62 88%, #f2b45a 100%);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 40px 100px -40px rgba(242, 180, 90, 0.35);
}

.dawn .sun {
  position: absolute;
  left: 50%;
  bottom: -22rem;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe08a 0%, #f2b45a 35%, rgba(242, 180, 90, 0) 70%);
  transform: translateX(-50%);
  opacity: 0.9;
  pointer-events: none;
  animation: sunrise 1.6s var(--ease) both;
  animation-play-state: paused;
}

.dawn.in .sun {
  animation-play-state: running;
}

@keyframes sunrise {
  from { transform: translate(-50%, 6rem); opacity: 0.4; }
  to { transform: translate(-50%, 0); opacity: 0.9; }
}

.dawn h2 {
  position: relative;
  max-width: 16ch;
  margin: 0 auto;
  font-size: clamp(2.4rem, 5.6vw, 4.2rem);
}

.dawn h2 em {
  color: var(--star);
}

.dawn .actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.dawn .button.ghost {
  background: rgba(20, 12, 38, 0.35);
}

.fine {
  position: relative;
  margin-top: 1.5rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  padding: 3rem var(--gutter) 3rem;
  color: var(--text-3);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: var(--wrap);
  margin: 0 auto;
}

.footer .wordmark {
  color: var(--text);
  font-size: 0.95rem;
}

.footer nav {
  display: flex;
  gap: 1.75rem;
}

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

.footer a:hover {
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Privacy page
   -------------------------------------------------------------------------- */

.privacy {
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter) 2rem;
}

.privacy h1 {
  margin-top: 0.9rem;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
}

.privacy .lede {
  margin-bottom: 0;
}

.privacy-body {
  margin-top: 3rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
}

.privacy-body section {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.privacy-body h2 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
}

.privacy-body p {
  color: var(--text-2);
}

.privacy .fine {
  margin-top: 2.5rem;
  color: var(--text-3);
}

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal:nth-child(6) { transition-delay: 0.4s; }
.reveal:nth-child(7) { transition-delay: 0.48s; }
.reveal:nth-child(8) { transition-delay: 0.56s; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-copy h1 {
    max-width: 14ch;
  }

  .hero-visual {
    padding: 2rem 0 1rem;
  }

  .phone-hero {
    max-width: 260px;
  }

  .float-streak {
    left: 4%;
  }

  .float-count {
    right: 4%;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .check {
    grid-template-columns: 1fr;
  }

  .screens-row {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .screen-raised {
    padding-bottom: 0;
  }

  .bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-star {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding-top: 1.5rem;
  }

  .hero-actions .button {
    width: 100%;
  }

  .float-card {
    font-size: 0.78rem;
    padding: 0.6rem 0.8rem;
  }

  .float-streak {
    left: 0;
    top: 12%;
  }

  .float-count {
    right: 0;
    bottom: 12%;
  }

  .playground {
    min-height: 30rem;
    padding: 1.25rem;
    border-radius: 30px;
  }

  .bento {
    grid-template-columns: 1fr;
  }

  .card-wide,
  .card-star {
    grid-column: auto;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .privacy-body section {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .phone-hero,
  .float-streak,
  .float-count,
  .float-count .pulse::after,
  .pg-bell,
  .dawn .sun,
  .pg-shake.is-active .phone-glyph {
    animation: none;
  }

  .phone-hero {
    transform: rotate(-4deg);
  }
}
