/* Axel marketing site. Palette and type follow the app (apps/mobile/src/theme.ts):
   deep violet ground, lavender accent, aqua secondary, Fraunces + Plus Jakarta Sans.
   The axolotl mascot sets the mood: soft water light, slow bubbles, calm motion.
   Every animation is decorative and switches off under prefers-reduced-motion. */

:root {
  --violet: #2a2245;
  --violet-deep: #1b1730;
  --violet-ink: #130f22;
  --violet-raised: #352c58;
  --lavender: #a288d3;
  --lavender-pressed: #9479c9;
  --lavender-bar: #7b5cc0;
  --lavender-soft: #ece6f7;
  --lavender-link: #6243a6;
  --aqua: #bcfafc;
  --aqua-ink: #195a63;
  --gill: #b04a7d;
  --peach: #ffd9c7;
  --sun: #ffe9a8;
  --canvas: #f6f4fb;
  --canvas-art: #eeeaf7;
  --surface: #ffffff;
  --ink: #1c1a24;
  --ink-on-accent: #1e1538;
  --ink-muted: #4a4854;
  --ink-faint: #615f6b;
  --ink-on-dark: #f4f1fa;
  --ink-on-dark-muted: #cdc7dd;
  --hairline: #dcdbe1;
  --line-on-dark: rgb(236 236 236 / 0.14);
  --warn-bg: #faf0d4;
  --warn-ink: #7c6012;
  --alert: #b8431f;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --text-display: clamp(3.1rem, 1.4rem + 6.6vw, 6.75rem);
  --text-title-xl: clamp(2.6rem, 1.4rem + 4.6vw, 5.25rem);
  --text-title: clamp(2.2rem, 1.5rem + 2.8vw, 3.75rem);
  --text-title-md: clamp(1.9rem, 1.5rem + 1.6vw, 2.75rem);
  --text-lead: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);

  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(88px, 11vw, 160px);
  --radius-card: 28px;
  --radius-art: 32px;
  --shadow-card: 0 1px 2px rgb(28 26 36 / 0.04), 0 10px 30px rgb(28 26 36 / 0.07);
  --shadow-float: 0 2px 4px rgb(19 15 34 / 0.12), 0 24px 48px rgb(19 15 34 / 0.32);
  --shadow-art: 0 30px 80px rgb(19 15 34 / 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
  interpolate-size: allow-keywords;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* body's overflow propagates to the viewport, which mobile browsers still let
   widen to fit the tilted ticker and off-edge stickers. Clipping on <main>
   (a normal element) really contains them; `clip` keeps sticky children working. */
main {
  overflow-x: clip;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

a {
  color: var(--lavender-link);
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

::selection {
  background: var(--lavender);
  color: var(--ink-on-accent);
}

:focus-visible {
  outline: 3px solid var(--lavender);
  outline-offset: 3px;
  border-radius: 8px;
}

.container {
  width: 100%;
  max-width: 1220px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: 840px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Type ---------- */

.display,
.title {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: 'opsz' 144;
  letter-spacing: -0.02em;
}

.display {
  font-size: var(--text-display);
  line-height: 0.98;
  color: var(--ink-on-dark);
}

.display .line {
  display: block;
}

.display em,
.title em {
  font-style: italic;
  font-weight: 500;
  color: var(--lavender-link);
}

.display em {
  color: var(--lavender);
}

.title {
  font-size: var(--text-title);
}

.title--xl {
  font-size: var(--text-title-xl);
  line-height: 1;
}

.title--md {
  font-size: var(--text-title-md);
}

.title--on-dark {
  color: var(--ink-on-dark);
}

.title--on-dark em {
  color: var(--lavender);
}

.kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lavender-link);
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.kicker::before {
  content: '';
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.6;
}

.kicker--on-dark {
  color: var(--lavender);
}

.lead {
  font-size: var(--text-lead);
  color: var(--ink-muted);
  max-width: 34em;
  margin-top: 22px;
}

.lead--on-dark {
  color: var(--ink-on-dark-muted);
}

.lead a {
  font-weight: 600;
}

.section {
  position: relative;
  padding-block: var(--section);
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(48px, 6vw, 80px);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center .lead {
  margin-inline: auto;
}

.section-head--center .kicker::after {
  content: '';
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.6;
}

.section-head--split {
  max-width: none;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px 64px;
  align-items: end;
}

.section-head--split .lead {
  margin-top: 0;
}

/* ---------- Buttons, badges, tags ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  transition:
    transform 0.3s var(--spring),
    background-color 0.2s,
    box-shadow 0.3s;
}

.btn--small {
  min-height: 40px;
  padding: 8px 18px;
  font-size: 0.9rem;
}

.btn--accent {
  background: var(--lavender);
  color: var(--ink-on-accent);
  box-shadow: 0 6px 20px rgb(162 136 211 / 0.35);
}

.btn--accent:hover {
  background: #b39be0;
  transform: translateY(-2px);
}

.btn--accent span {
  transition: transform 0.3s var(--spring);
}

.btn--accent:hover span {
  transform: translateX(3px);
}

.btn:active {
  transform: scale(0.96);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 22px 10px 18px;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.15;
  box-shadow: 0 10px 30px rgb(19 15 34 / 0.25);
  transition: transform 0.35s var(--spring);
}

.badge svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  flex: none;
}

.badge small {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-faint);
}

.badge strong {
  font-size: 1.08rem;
  white-space: nowrap;
}

.badge:hover {
  transform: translateY(-3px) rotate(-1deg);
}

span.badge {
  cursor: default;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.tag--warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
}

.tag--ok {
  background: var(--lavender-soft);
  color: var(--lavender-link);
}

.tag--lav {
  background: var(--lavender);
  color: var(--ink-on-accent);
}

.tag--aqua {
  background: var(--aqua);
  color: var(--aqua-ink);
}

.tag--plain {
  background: var(--canvas-art);
  color: var(--ink-muted);
}

.text-link {
  display: inline-flex;
  gap: 8px;
  margin-top: 28px;
  font-weight: 700;
  text-decoration: none;
}

.text-link span {
  transition: transform 0.3s var(--spring);
}

.text-link:hover span {
  transform: translateX(4px);
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--ink-on-accent);
}

.avatar--lav {
  background: #cdbcf0;
}

.avatar--aqua {
  background: var(--aqua);
  color: var(--aqua-ink);
}

.avatar--peach {
  background: var(--peach);
  color: #7a3a1c;
}

.avatar--sun {
  background: var(--sun);
  color: var(--warn-ink);
}

/* ---------- Header ---------- */

.progress {
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  z-index: 120;
  pointer-events: none;
}

.progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--aqua), var(--lavender), var(--gill));
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
}

.site-header {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 100;
  padding-inline: var(--gutter);
  pointer-events: none;
}

.site-header__inner {
  pointer-events: auto;
  max-width: 1180px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition:
    background-color 0.4s,
    border-color 0.4s,
    box-shadow 0.4s,
    max-width 0.5s var(--ease);
}

.site-header.is-scrolled .site-header__inner,
.page-doc .site-header__inner {
  background: rgb(27 23 48 / 0.72);
  border-color: rgb(255 255 255 / 0.1);
  box-shadow: 0 12px 40px rgb(19 15 34 / 0.3);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.site-header.is-scrolled .site-header__inner {
  max-width: 980px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-on-dark);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  transition: transform 0.5s var(--spring);
}

.brand:hover img {
  transform: rotate(-10deg) scale(1.08);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a:not(.btn) {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-on-dark-muted);
  font-size: 0.93rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    color 0.2s,
    background-color 0.2s;
}

.site-nav a:not(.btn):hover {
  color: #fff;
  background: rgb(255 255 255 / 0.08);
}

.site-nav .btn {
  margin-left: 8px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.1);
  cursor: pointer;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.35s var(--ease);
}

.nav-toggle span:first-child {
  transform: translateY(-4px);
}

.nav-toggle span:last-child {
  transform: translateY(4px);
}

.nav-toggle[aria-expanded='true'] span:first-child {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded='true'] span:last-child {
  transform: rotate(-45deg);
}

/* ---------- Atmosphere: aurora, grain, bubbles ---------- */

.aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}

.aurora__blob--1 {
  width: 46vw;
  height: 46vw;
  left: -12vw;
  top: -14vw;
  background: #6a4fb0;
  animation: drift-a 22s ease-in-out infinite alternate;
}

.aurora__blob--2 {
  width: 38vw;
  height: 38vw;
  right: -8vw;
  top: 10%;
  background: #8a3f74;
  opacity: 0.38;
  animation: drift-b 26s ease-in-out infinite alternate;
}

.aurora__blob--3 {
  width: 30vw;
  height: 30vw;
  left: 34%;
  bottom: -16vw;
  background: #2f8a93;
  opacity: 0.32;
  animation: drift-a 30s ease-in-out infinite alternate-reverse;
}

@keyframes drift-a {
  to {
    transform: translate(8vw, 6vw) scale(1.15);
  }
}

@keyframes drift-b {
  to {
    transform: translate(-6vw, 8vw) scale(0.9);
  }
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.bubbles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.bubbles span {
  position: absolute;
  bottom: -40px;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  border: 1px solid rgb(205 240 255 / 0.4);
  background:
    radial-gradient(circle at 32% 28%, rgb(255 255 255 / 0.7) 0 9%, transparent 16%),
    radial-gradient(circle at 50% 50%, transparent 55%, rgb(188 250 252 / 0.16) 100%);
  box-shadow: inset 0 0 6px rgb(188 250 252 / 0.15);
  animation: rise var(--t) linear var(--delay) infinite;
  opacity: 0;
}

@keyframes rise {
  0% {
    transform: translate(0, 0);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  50% {
    transform: translate(var(--sway), -55vh);
  }
  90% {
    opacity: 0.7;
  }
  100% {
    transform: translate(0, -110vh);
    opacity: 0;
  }
}

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

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(120px, 14vh, 160px) clamp(72px, 10vh, 120px);
  background:
    radial-gradient(120% 80% at 70% 0%, #3a2d66 0%, transparent 60%),
    linear-gradient(180deg, var(--violet) 0%, var(--violet-deep) 100%);
  color: var(--ink-on-dark);
  overflow: hidden;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: center;
}

.pill-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 7px 16px 7px 12px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.07);
  border: 1px solid rgb(255 255 255 / 0.12);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-on-dark-muted);
  backdrop-filter: blur(8px);
}

.pill-label__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 0 rgb(188 250 252 / 0.6);
  animation: ping 2.2s infinite;
}

@keyframes ping {
  70% {
    box-shadow: 0 0 0 10px rgb(188 250 252 / 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgb(188 250 252 / 0);
  }
}

.display .word {
  display: inline-block;
}

.word--accent {
  position: relative;
  padding-right: 0.08em;
}

.scribble {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.12em;
  width: 100%;
  height: 0.3em;
  overflow: visible;
}

.scribble path {
  fill: none;
  stroke: var(--aqua);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 360;
  stroke-dashoffset: 0;
}

.hero__actions {
  margin-top: 36px;
}

.hero__proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-on-dark-muted);
}

.hero__proof li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero__proof svg {
  width: 18px;
  height: 18px;
  padding: 3px;
  border-radius: 50%;
  background: rgb(188 250 252 / 0.15);
  fill: none;
  stroke: var(--aqua);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  translate: -50% 0;
  width: 26px;
  height: 42px;
  border-radius: 999px;
  border: 2px solid rgb(255 255 255 / 0.3);
}

.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--aqua);
  animation: cue 1.8s var(--ease) infinite;
}

@keyframes cue {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    transform: translateY(14px);
    opacity: 0;
  }
}

/* The stage: phone + floating cards, tilted toward the pointer. */

.stage {
  --rx: 0deg;
  --ry: 0deg;
  --px: 0;
  --py: 0;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 640px;
  perspective: 1400px;
}

.stage__glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(162 136 211 / 0.45), transparent 65%);
  filter: blur(20px);
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgb(205 199 221 / 0.22);
  animation: spin 60s linear infinite;
}

.orbit-ring--1 {
  width: 560px;
  height: 560px;
}

.orbit-ring--2 {
  width: 420px;
  height: 420px;
  border-style: solid;
  border-color: rgb(205 199 221 / 0.08);
  animation-direction: reverse;
  animation-duration: 45s;
}

.orbit-ring--1::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 16px var(--aqua);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.phone {
  position: relative;
  z-index: 2;
  width: 292px;
  aspect-ratio: 292 / 600;
  padding: 11px;
  border-radius: 50px;
  background: linear-gradient(145deg, #4b4366, #17132a 40%, #2b2546);
  box-shadow:
    inset 0 0 0 1.5px rgb(255 255 255 / 0.18),
    var(--shadow-art),
    0 0 0 1px rgb(0 0 0 / 0.4);
  transform: rotateY(calc(-12deg + var(--ry))) rotateX(calc(5deg + var(--rx))) rotateZ(1.5deg);
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease);
}

.phone__screen {
  position: relative;
  height: 100%;
  border-radius: 40px;
  overflow: hidden;
  background: #ecebf1;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.35;
}

.phone__island {
  position: absolute;
  top: 9px;
  left: 50%;
  translate: -50% 0;
  width: 86px;
  height: 25px;
  border-radius: 999px;
  background: #0b0915;
  z-index: 5;
}

.phone__status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 24px 0 28px;
  font-weight: 700;
  font-size: 11.5px;
}

.phone__status-icons {
  display: flex;
  gap: 3px;
  align-items: flex-end;
}

.phone__status-icons i {
  width: 3px;
  background: var(--ink);
  border-radius: 1px;
}

.phone__status-icons i:nth-child(1) {
  height: 5px;
}
.phone__status-icons i:nth-child(2) {
  height: 7px;
}
.phone__status-icons i:nth-child(3) {
  height: 9px;
  width: 16px;
  margin-left: 4px;
  border-radius: 3px;
}

.toast {
  position: absolute;
  z-index: 6;
  top: 40px;
  left: 10px;
  right: 10px;
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 9px 11px;
  border-radius: 18px;
  background: rgb(255 255 255 / 0.88);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 24px rgb(19 15 34 / 0.18);
  transform: translateY(calc(-100% - 56px));
  transition: transform 0.6s var(--spring);
}

.toast.is-in {
  transform: translateY(0);
}

.toast img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.toast small {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.toast b {
  font-size: 11px;
}

.app {
  padding: 22px 14px 0;
}

.app__hello {
  font-size: 10.5px;
  color: var(--ink-faint);
  font-weight: 600;
}

.app__title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.app__hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 14px 14px 16px;
  border-radius: 22px;
  background: var(--violet);
  color: var(--ink-on-dark);
  margin-bottom: 10px;
}

.app__hero small {
  display: block;
  color: var(--ink-on-dark-muted);
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.app__hero strong {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.ring {
  width: 44px;
  height: 44px;
  transform: rotate(-90deg);
}

.ring circle {
  fill: none;
  stroke-width: 5;
}

.ring__track {
  stroke: rgb(255 255 255 / 0.14);
}

.ring__bar {
  --p: 0.333;
  stroke: var(--aqua);
  stroke-linecap: round;
  stroke-dasharray: 113.1;
  stroke-dashoffset: calc(113.1 * (1 - var(--p)));
  transition: stroke-dashoffset 0.9s var(--ease);
}

.doses {
  list-style: none;
  margin: 0;
  padding: 4px;
  border-radius: 20px;
  background: #fff;
}

.dose {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 15px;
  transition: background-color 0.4s;
}

.dose + .dose {
  border-top: 1px solid #f0eff3;
}

.dose__check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  border: 2px solid #c9c7d1;
  transition:
    background-color 0.35s,
    border-color 0.35s,
    transform 0.45s var(--spring);
}

.dose__check svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: #fff;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset 0.4s 0.15s var(--ease);
}

.dose.is-done .dose__check {
  background: var(--lavender-bar);
  border-color: var(--lavender-bar);
  transform: scale(1.08);
}

.dose.is-done .dose__check svg {
  stroke-dashoffset: 0;
}

.dose__name {
  flex: 1;
  min-width: 0;
}

.dose__name b {
  display: block;
  font-size: 11.5px;
  transition: color 0.3s;
}

.dose.is-done .dose__name b {
  color: var(--ink-faint);
  text-decoration: line-through;
  text-decoration-color: rgb(97 95 107 / 0.5);
}

.dose__name small {
  font-size: 9.5px;
  color: var(--ink-faint);
}

.dose__time {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-faint);
}

.dose__take {
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  transition:
    opacity 0.3s,
    transform 0.3s;
}

.dose.is-due {
  background: var(--lavender-soft);
}

.dose.is-done .dose__take {
  opacity: 0;
  transform: scale(0.6);
}

.dose.is-tap .dose__take {
  transform: scale(0.88);
}

.app__section {
  margin: 14px 4px 7px;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

.feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.feed li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 15px;
  background: #fff;
  font-size: 10.5px;
}

.feed li.is-new {
  animation: feed-in 0.7s var(--spring);
}

@keyframes feed-in {
  from {
    transform: translateY(-8px) scale(0.96);
    opacity: 0;
  }
}

.feed .avatar {
  width: 24px;
  height: 24px;
  font-size: 8px;
}

.tabbar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  justify-content: space-around;
  padding: 13px;
  border-radius: 22px;
  background: var(--violet-deep);
}

.tabbar i {
  width: 18px;
  height: 4px;
  border-radius: 4px;
  background: rgb(255 255 255 / 0.25);
}

.tabbar i.is-on {
  background: var(--lavender);
}

.float {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 16px 11px 11px;
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-float);
  font-size: 0.86rem;
  line-height: 1.25;
  white-space: nowrap;
  translate: calc(var(--px) * var(--depth, 1) * 18px) calc(var(--py) * var(--depth, 1) * 18px);
  transition: translate 0.6s var(--ease);
}

.float small {
  display: block;
  color: var(--ink-faint);
  font-size: 0.78rem;
}

.float > * {
  animation: bob 6s ease-in-out infinite;
}

@keyframes bob {
  50% {
    transform: translateY(-6px);
  }
}

.float--visit {
  top: 13%;
  right: -2%;
  --depth: 1.6;
}

.float--family {
  bottom: 17%;
  left: -4%;
  --depth: 1.1;
}

.float--heart {
  bottom: 6%;
  right: 4%;
  --depth: 2.2;
  padding-right: 18px;
}

.float--heart .heart {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffe3ee;
  color: #d0457a;
  font-size: 16px;
  animation: beat 1.6s ease-in-out infinite;
}

@keyframes beat {
  0%,
  100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.18);
  }
  30% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.12);
  }
}

.date-tile {
  display: grid;
  place-items: center;
  width: 42px;
  height: 46px;
  border-radius: 12px;
  background: var(--aqua);
  color: var(--aqua-ink);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1;
}

.date-tile small {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--aqua-ink);
}

.stack {
  display: flex;
}

.stack .avatar {
  width: 30px;
  height: 30px;
  border: 2px solid #fff;
}

.stack .avatar + .avatar {
  margin-left: -9px;
}

/* ---------- Ticker ---------- */

.ticker {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: 18px 0;
  background: var(--lavender);
  color: var(--ink-on-accent);
  transform: rotate(-1.6deg) scale(1.04);
  margin-block: -22px;
  box-shadow: 0 18px 40px rgb(19 15 34 / 0.18);
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: marquee 42s linear infinite;
}

.ticker span {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1rem + 1.2vw, 2rem);
  font-style: italic;
  font-weight: 500;
  white-space: nowrap;
}

.ticker span::after {
  content: '✦';
  font-style: normal;
  font-size: 0.7em;
  color: var(--violet);
  opacity: 0.6;
}

.ticker i {
  font-style: normal;
  color: var(--violet);
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Story: the group chat ---------- */

.story {
  background:
    radial-gradient(60% 50% at 90% 30%, rgb(162 136 211 / 0.18), transparent 70%), var(--canvas);
  padding-top: calc(var(--section) + 24px);
}

.story__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.story__stats {
  display: flex;
  gap: clamp(24px, 4vw, 48px);
  margin: 44px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
}

.story__stats div {
  display: grid;
}

.story__stats dt {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.8rem + 2vw, 3.5rem);
  font-weight: 600;
  line-height: 1;
  color: var(--lavender-bar);
}

.story__stats dd {
  margin: 6px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.chat {
  position: relative;
  isolation: isolate;
  max-width: 440px;
  justify-self: center;
  width: 100%;
  border-radius: 34px;
  transform: rotate(1.5deg);
}

/* Card face (::after) over a tilted lavender backing card (::before). */
.chat::before,
.chat::after {
  content: '';
  position: absolute;
  border-radius: 34px;
}

.chat::before {
  inset: 22px -22px -22px 22px;
  z-index: -2;
  background: var(--lavender-soft);
  transform: rotate(-4deg);
}

.chat::after {
  inset: 0;
  z-index: -1;
  background: #fff;
  box-shadow:
    0 2px 4px rgb(28 26 36 / 0.04),
    0 40px 80px -20px rgb(42 34 69 / 0.28);
}

.chat__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid #efedf3;
}

.chat__head small {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.chat__avatars {
  display: flex;
}

.chat__avatars .avatar {
  border: 2px solid #fff;
}

.chat__avatars .avatar + .avatar {
  margin-left: -8px;
}

.chat__body {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.bubble {
  justify-self: start;
  max-width: 82%;
  padding: 10px 15px 11px;
  border-radius: 20px 20px 20px 6px;
  background: #f2f1f6;
  font-size: 0.94rem;
  line-height: 1.4;
}

.bubble b {
  display: block;
  font-size: 0.72rem;
  color: var(--lavender-link);
  margin-bottom: 1px;
}

.bubble--me {
  justify-self: end;
  border-radius: 20px 20px 6px 20px;
  background: var(--lavender-soft);
}

.bubble--uh {
  background: #fff1e8;
}

.bubble--uh b {
  color: #9a3b1e;
}

.typing {
  display: none;
}

.chat__fix {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 8px;
  padding: 16px;
  border-radius: 22px;
  background: var(--violet);
  color: var(--ink-on-dark-muted);
  font-size: 0.92rem;
  line-height: 1.45;
  box-shadow: 0 16px 30px rgb(42 34 69 / 0.3);
}

.chat__fix img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex: none;
}

.chat__fix b {
  display: block;
  color: var(--aqua);
  margin-bottom: 2px;
}

/* Scripted chat (JS): bubbles pop in one by one, then Axel resolves it. */
.js .chat__body > * {
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  transition:
    opacity 0.5s var(--ease),
    transform 0.6s var(--spring);
}

.js .chat__body > .typing {
  display: flex;
  justify-self: start;
  gap: 4px;
  height: 0;
  padding: 0;
  overflow: hidden;
}

.js .chat.is-live .chat__body > * {
  opacity: 1;
  transform: none;
}

.js .chat.is-live .chat__body > :nth-child(1) {
  transition-delay: 0.1s;
}
.js .chat.is-live .chat__body > :nth-child(2) {
  transition-delay: 0.7s;
}
.js .chat.is-live .chat__body > :nth-child(3) {
  transition-delay: 1.3s;
}
.js .chat.is-live .chat__body > :nth-child(4) {
  transition-delay: 1.9s;
}
.js .chat.is-live .chat__body > :nth-child(6) {
  transition-delay: 3.3s;
}

.js .chat.is-live .chat__body > .typing {
  animation: typing-show 1.1s 2.3s both;
  padding: 12px 16px;
  border-radius: 20px;
  background: #f2f1f6;
}

@keyframes typing-show {
  0% {
    height: 0;
    opacity: 0;
    padding-block: 0;
    margin-block: -5px;
  }
  15%,
  85% {
    height: 38px;
    opacity: 1;
    padding-block: 12px;
    margin-block: 0;
  }
  100% {
    height: 0;
    opacity: 0;
    padding-block: 0;
    margin-block: -5px;
  }
}

.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a3a1ab;
  animation: dot 1s infinite;
}

.typing span:nth-child(2) {
  animation-delay: 0.15s;
}
.typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes dot {
  50% {
    transform: translateY(-4px);
    opacity: 0.5;
  }
}

/* ---------- A day in the loop ---------- */

.day {
  --phase: 0;
  isolation: isolate;
  background: var(--violet);
  color: var(--ink-on-dark-muted);
  overflow: clip;
}

.day__sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, var(--violet-deep) 0%, var(--violet) 40%, var(--violet) 100%);
}

.day__sun {
  position: absolute;
  top: 12%;
  left: calc(15% + var(--phase) * 30%);
  width: 640px;
  height: 640px;
  margin-left: -320px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    hsl(calc(42 - var(--phase) * 12) 100% 78% / 0.22),
    hsl(calc(270 - var(--phase) * 20) 60% 60% / 0.12) 40%,
    transparent 70%
  );
  transition:
    left 1.2s var(--ease),
    background 1.2s;
}

.day__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
}

.day__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.day__steps::before {
  content: '';
  position: absolute;
  left: 39px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: var(--line-on-dark);
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  min-height: 72vh;
  align-content: center;
  padding-block: 40px;
}

.step__time span {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 80px;
  height: 36px;
  border-radius: 999px;
  background: var(--violet-raised);
  border: 1px solid var(--line-on-dark);
  color: var(--ink-on-dark-muted);
  font-family: var(--font-display);
  font-weight: 600;
  transition:
    background-color 0.4s,
    color 0.4s,
    transform 0.5s var(--spring);
}

.step__body {
  transition:
    opacity 0.5s,
    transform 0.6s var(--ease);
}

.step__body > p:not(.kicker) {
  margin-top: 16px;
  font-size: 1.06rem;
  max-width: 30em;
}

.js .step:not(.is-active) .step__body {
  opacity: 0.32;
}

.step.is-active .step__time span {
  background: var(--lavender);
  color: var(--ink-on-accent);
  border-color: transparent;
  transform: scale(1.08);
  box-shadow: 0 0 0 8px rgb(162 136 211 / 0.18);
}

.checks {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.checks li {
  display: flex;
  gap: 12px;
  align-items: center;
}

.checks li::before {
  content: '';
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  background: rgb(188 250 252 / 0.14)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23BCFAFC' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E")
    center / 14px no-repeat;
}

.checks--on-dark {
  color: var(--ink-on-dark);
}

.step__art {
  display: none;
  margin: 28px 0 0;
}

.step__art img {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-art);
}

.day__stage {
  position: sticky;
  top: 96px;
  align-self: start;
  height: calc(100vh - 128px);
  max-height: 860px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
}

.day__clock {
  font-family: var(--font-display);
  font-size: clamp(4rem, 2rem + 6vw, 7.5rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgb(205 199 221 / 0.35);
  font-variant-numeric: tabular-nums;
  margin-bottom: -0.32em;
  z-index: 0;
}

.day__frames {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  height: 100%;
  min-height: 0;
}

.day__frames img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius-art);
  box-shadow: var(--shadow-art);
  opacity: 0;
  transform: translateY(30px) scale(0.94) rotate(2deg);
  transition:
    opacity 0.6s var(--ease),
    transform 0.8s var(--ease);
}

.day__frames img.is-active {
  opacity: 1;
  transform: none;
}

.day__dots {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.day__dots li {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.2);
  transition:
    width 0.4s var(--ease),
    background-color 0.4s;
}

.day__dots li.is-active {
  width: 28px;
  background: var(--lavender);
}

/* ---------- Bento ---------- */

.more {
  background: var(--canvas);
}

.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(190px, auto);
  gap: 16px;
}

.cell {
  --mx: 50%;
  --my: 50%;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  border: 1px solid rgb(28 26 36 / 0.04);
  transition:
    transform 0.5s var(--ease),
    box-shadow 0.5s var(--ease);
}

.cell::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    420px circle at var(--mx) var(--my),
    rgb(162 136 211 / 0.18),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s;
}

.cell:hover {
  transform: translateY(-4px);
  box-shadow:
    0 2px 4px rgb(28 26 36 / 0.04),
    0 24px 50px rgb(42 34 69 / 0.14);
}

.cell:hover::before {
  opacity: 1;
}

.cell h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.cell h3 em {
  font-weight: 500;
  color: var(--lavender-link);
}

.cell p {
  color: var(--ink-muted);
  font-size: 0.97rem;
}

.cell__icon {
  width: 48px;
  height: 48px;
  padding: 11px;
  margin-bottom: auto;
  border-radius: 15px;
  background: var(--lavender-soft);
  fill: none;
  stroke: var(--lavender-link);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.5s var(--spring);
}

.cell--icon h3 {
  margin-top: 28px;
  font-size: 1.25rem;
}

.cell:hover .cell__icon {
  transform: rotate(-8deg) scale(1.1);
}

.cell--vitals {
  grid-column: span 6;
  grid-row: span 2;
  background: linear-gradient(160deg, var(--violet-raised), var(--violet) 60%);
  color: var(--ink-on-dark);
  border: 0;
}

.cell--vitals::before {
  background: radial-gradient(
    420px circle at var(--mx) var(--my),
    rgb(188 250 252 / 0.14),
    transparent 60%
  );
}

.cell--vitals p {
  color: var(--ink-on-dark-muted);
  max-width: 26em;
}

.cell--vitals h3 {
  font-size: clamp(1.8rem, 1.4rem + 1vw, 2.3rem);
}

.vitals-chart {
  position: relative;
  margin-top: auto;
  padding-top: 40px;
}

.vitals-chart svg {
  width: 100%;
  height: 170px;
  overflow: visible;
}

.vitals-chart__area {
  fill: url(#vg);
}

.vitals-chart__line {
  fill: none;
  stroke: var(--aqua);
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.vitals-chart__dot {
  fill: var(--aqua);
  stroke: var(--violet);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.js .cell--vitals:not(.is-visible) .vitals-chart__line {
  stroke-dashoffset: 1;
}

.js .cell--vitals .vitals-chart__line {
  transition: stroke-dashoffset 2s 0.3s var(--ease);
}

.reading {
  position: absolute;
  top: 0;
  right: 0;
  padding: 8px 14px;
  border-radius: 14px;
  background: rgb(255 255 255 / 0.08);
  border: 1px solid rgb(255 255 255 / 0.1);
  font-size: 0.9rem;
}

.reading b {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: #fff;
}

.reading small {
  color: var(--ink-on-dark-muted);
}

.vitals-chart__days {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-on-dark-muted);
}

.cell--stock,
.cell--alert {
  grid-column: span 3;
}

.stock {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
  font-size: 0.9rem;
}

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

.stock__bar {
  height: 8px;
  border-radius: 8px;
  background: var(--canvas-art);
  overflow: hidden;
  margin-bottom: 6px;
}

.stock__bar span {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: var(--lavender-bar);
  transition: width 1.4s 0.3s var(--ease);
}

.stock__bar:first-of-type span {
  background: #d4a429;
}

.js .cell--stock:not(.is-visible) .stock__bar span {
  width: 100%;
}

.cell--alert {
  background: linear-gradient(160deg, #fff, #fff3ee);
}

.sos {
  position: relative;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: auto auto 0;
  border-radius: 50%;
  background: var(--alert);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 24px rgb(184 67 31 / 0.4);
}

.sos::before,
.sos::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--alert);
  animation: sonar 2.4s var(--ease) infinite;
}

.sos::after {
  animation-delay: 1.2s;
}

@keyframes sonar {
  from {
    transform: scale(1);
    opacity: 0.7;
  }
  to {
    transform: scale(2);
    opacity: 0;
  }
}

.cell--lang {
  grid-column: span 6;
  background: linear-gradient(140deg, #e9fdfd, #fff 55%);
}

.lang {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: auto;
  padding-top: 18px;
}

.lang__switch {
  display: inline-flex;
  flex: none;
  padding: 4px;
  border-radius: 999px;
  background: var(--canvas-art);
}

.lang__switch button {
  min-width: 52px;
  min-height: 40px;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition:
    background-color 0.3s,
    color 0.3s,
    box-shadow 0.3s;
}

.lang__switch button[aria-pressed='true'] {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 4px 12px rgb(42 34 69 / 0.3);
}

.lang__rows {
  flex: 1;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lang__rows li {
  padding: 8px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--hairline);
  font-weight: 700;
  font-size: 0.92rem;
}

.lang__rows span {
  display: inline-block;
  transition:
    opacity 0.2s,
    transform 0.3s var(--ease),
    filter 0.2s;
}

.lang__rows.is-swapping span {
  opacity: 0;
  transform: translateY(6px);
  filter: blur(3px);
}

.cell--roles {
  grid-column: span 6;
}

.roles {
  display: grid;
  gap: 10px;
  margin: auto 0 0;
  padding: 18px 0 0;
  list-style: none;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.roles li {
  display: flex;
  gap: 12px;
  align-items: center;
}

.roles .tag {
  min-width: 88px;
  justify-content: center;
}

.cell--vault,
.cell--offline {
  grid-column: span 3;
}

.cell--lock,
.cell--reports,
.cell--info {
  grid-column: span 4;
}

/* ---------- Watch ---------- */

.watch {
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(70% 60% at 80% 50%, rgb(162 136 211 / 0.3), transparent 70%), var(--violet-deep);
}

.watch__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.watch__device {
  position: relative;
  justify-self: center;
}

.watch__frame {
  position: relative;
  width: min(340px, 80vw);
  padding: 10px;
  border-radius: 46px;
  background: linear-gradient(145deg, #4b4366, #17132a 40%, #2b2546);
  box-shadow:
    inset 0 0 0 1.5px rgb(255 255 255 / 0.18),
    var(--shadow-art);
  transform: rotate(-3deg);
  transition: transform 0.8s var(--ease);
}

.watch__device:hover .watch__frame {
  transform: rotate(0deg) scale(1.02);
}

.watch__frame video {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 37px;
  background: var(--violet);
}

.watch__play {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.9);
  color: var(--violet);
  cursor: pointer;
  box-shadow: 0 0 0 0 rgb(255 255 255 / 0.4);
  animation: ping-white 2.4s infinite;
  transition: transform 0.4s var(--spring);
}

.watch__play:hover {
  transform: scale(1.1);
}

.watch__play svg {
  width: 34px;
  height: 34px;
  margin-left: 4px;
  fill: currentColor;
}

@keyframes ping-white {
  70% {
    box-shadow: 0 0 0 22px rgb(255 255 255 / 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgb(255 255 255 / 0);
  }
}

.js .watch__frame:not(.is-playing) video::-webkit-media-controls {
  display: none;
}

.watch__frame.is-playing .watch__play,
html:not(.js) .watch__play {
  display: none;
}

.watch__sticker {
  position: absolute;
  top: 12%;
  right: -38px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--aqua);
  color: var(--aqua-ink);
  font-weight: 800;
  font-size: 0.9rem;
  transform: rotate(8deg);
  box-shadow: 0 12px 24px rgb(19 15 34 / 0.3);
  animation: bob 5s ease-in-out infinite;
}

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

.privacy {
  background:
    radial-gradient(50% 60% at 10% 20%, rgb(188 250 252 / 0.35), transparent 70%), var(--canvas-art);
}

.privacy__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.vault-lock {
  width: 76px;
  height: 76px;
  margin-bottom: 28px;
  padding: 14px;
  border-radius: 24px;
  background: var(--violet);
  box-shadow: 0 16px 32px rgb(42 34 69 / 0.3);
}

.vault-lock svg {
  overflow: visible;
  fill: none;
  stroke: var(--aqua);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vault-lock__shackle {
  transform-origin: 43px 28px;
  animation: lock 4s var(--spring) infinite;
}

@keyframes lock {
  0%,
  20% {
    transform: translateY(-6px) rotate(18deg);
  }
  35%,
  100% {
    transform: none;
  }
}

.pledges {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pledges li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 24px;
  padding: 28px 30px;
  border-radius: var(--radius-card);
  background: rgb(255 255 255 / 0.75);
  border: 1px solid rgb(255 255 255 / 0.9);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
  transition: transform 0.5s var(--ease);
}

.pledges li:hover {
  transform: translateX(8px);
}

.pledges__n {
  grid-row: span 2;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--lavender-bar);
}

.pledges h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
}

.pledges p {
  color: var(--ink-muted);
}

/* ---------- FAQ ---------- */

.faq {
  background: var(--canvas);
}

.faq__grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.faq__head {
  position: sticky;
  top: 120px;
}

.faq__list {
  display: grid;
  gap: 12px;
}

.faq details {
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  border: 1px solid rgb(28 26 36 / 0.04);
  transition:
    background-color 0.3s,
    box-shadow 0.3s;
}

.faq details[open] {
  box-shadow:
    0 0 0 2px var(--lavender),
    var(--shadow-card);
}

.faq summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 18px 72px 18px 26px;
  font-weight: 700;
  font-size: 1.08rem;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  position: absolute;
  right: 20px;
  top: 50%;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  border-radius: 50%;
  background: var(--lavender-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236243A6' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E")
    center / 16px no-repeat;
  transition:
    transform 0.4s var(--spring),
    background-color 0.3s;
}

.faq details[open] summary::after {
  transform: rotate(135deg);
  background-color: var(--lavender);
}

.faq details::details-content {
  block-size: 0;
  overflow: hidden;
  transition:
    block-size 0.45s var(--ease),
    content-visibility 0.45s allow-discrete;
}

.faq details[open]::details-content {
  block-size: auto;
}

.faq__a {
  padding: 0 26px 24px;
  color: var(--ink-muted);
}

/* ---------- CTA ---------- */

.cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(110px, 14vw, 190px);
  background: var(--violet);
  text-align: center;
}

.aurora--cta .aurora__blob--1 {
  left: 10%;
  top: -20vw;
}

.aurora--cta .aurora__blob--2 {
  right: 5%;
  top: auto;
  bottom: -20vw;
}

.cta__inner {
  position: relative;
  display: grid;
  justify-items: center;
}

.cta__mascot {
  position: relative;
  margin-bottom: 36px;
}

.cta__mascot img {
  width: 128px;
  height: 128px;
  border-radius: 36px;
  box-shadow: 0 24px 60px rgb(19 15 34 / 0.5);
  animation: swim 7s ease-in-out infinite;
}

.cta__mascot::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -26px;
  width: 90px;
  height: 14px;
  margin-left: -45px;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.35);
  filter: blur(8px);
  animation: shadow 7s ease-in-out infinite;
}

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

@keyframes shadow {
  50% {
    transform: scale(0.75);
    opacity: 0.6;
  }
}

.cta .title {
  max-width: 13em;
}

.cta .lead {
  margin-inline: auto;
}

.cta .badges {
  justify-content: center;
  margin-top: 36px;
}

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

.site-footer {
  position: relative;
  overflow: hidden;
  padding-top: clamp(64px, 8vw, 100px);
  background: var(--violet-ink);
  color: var(--ink-on-dark-muted);
  font-size: 0.95rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
}

.site-footer__brand p {
  margin-top: 16px;
  max-width: 24em;
}

.site-footer__made {
  font-weight: 600;
  color: var(--ink-on-dark);
}

.site-footer__heart {
  color: #e56b9c;
}

.brand--light {
  color: #fff;
}

.site-footer nav {
  display: grid;
  align-content: start;
  gap: 10px;
}

.site-footer h2 {
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lavender);
}

.site-footer nav a {
  color: var(--ink-on-dark-muted);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 0.2s;
}

.site-footer nav a:hover {
  color: #fff;
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line-on-dark);
  font-size: 0.86rem;
}

.site-footer__word {
  margin: 24px 0 -0.22em;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(7rem, 30vw, 26rem);
  font-weight: 600;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: transparent;
  background: linear-gradient(180deg, rgb(162 136 211 / 0.4), rgb(162 136 211 / 0) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
}

.site-footer__word em {
  color: rgb(188 250 252 / 0.5);
  -webkit-text-fill-color: rgb(188 250 252 / 0.5);
}

/* ---------- Docs (support, legal, 404) ---------- */

.page-doc {
  background: var(--canvas);
}

.doc {
  position: relative;
  isolation: isolate;
  padding: 150px 0 var(--section);
}

.doc::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 420px;
  z-index: -1;
  background:
    radial-gradient(60% 90% at 80% 0%, #4a3a80, transparent 70%),
    linear-gradient(180deg, var(--violet-deep), var(--violet));
}

.doc__card {
  padding: clamp(28px, 6vw, 64px);
  border-radius: 32px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgb(42 34 69 / 0.16);
}

.prose {
  font-size: 1.04rem;
  color: var(--ink-muted);
  overflow-wrap: break-word;
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.5em;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 1.9em;
  padding-top: 1.2em;
  border-top: 1px solid var(--hairline);
}

.prose h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 1.6em;
}

.prose strong {
  color: var(--ink);
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose li::marker {
  color: var(--lavender-bar);
}

.prose table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.prose th,
.prose td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--canvas-art);
  color: var(--ink);
}

.prose blockquote {
  margin-inline: 0;
  padding: 18px 22px;
  border-radius: 18px;
  border-left: 4px solid var(--alert);
  background: #fff3ee;
  color: var(--ink);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin-block: 2em;
}

.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--canvas-art);
  font-size: 0.9em;
}

.lost {
  text-align: center;
}

.lost__fish {
  display: inline-block;
  margin-bottom: 24px;
  animation: lost 6s ease-in-out infinite;
}

.lost__fish img {
  width: 120px;
  height: 120px;
  border-radius: 34px;
  box-shadow: 0 20px 40px rgb(42 34 69 / 0.25);
}

@keyframes lost {
  0%,
  100% {
    transform: translate(-30px, 0) rotate(-8deg);
  }
  50% {
    transform: translate(30px, -12px) rotate(8deg);
  }
}

.lost p {
  margin-inline: auto;
  max-width: 28em;
}

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

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease) var(--d, 0s),
    transform 1s var(--ease) var(--d, 0s);
}

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

.js .bento .reveal:nth-child(3n + 2) {
  --d: 0.08s;
}
.js .bento .reveal:nth-child(3n) {
  --d: 0.16s;
}
.js .pledges .reveal:nth-child(2),
.js .faq__list .reveal:nth-child(2) {
  --d: 0.08s;
}
.js .pledges .reveal:nth-child(3),
.js .faq__list .reveal:nth-child(3) {
  --d: 0.16s;
}

/* Hero intro (JS): words rise, scribble draws, stage floats in. */
.js .hero .display .word {
  opacity: 0;
  transform: translateY(0.5em) rotate(4deg);
  filter: blur(8px);
  transition:
    opacity 0.9s var(--ease),
    transform 1.1s var(--ease),
    filter 0.9s var(--ease);
}

.js .hero.is-in .display .word {
  opacity: 1;
  transform: none;
  filter: none;
}

.js .hero .line:nth-child(1) .word:nth-child(2) {
  transition-delay: 0.08s;
}
.js .hero .line:nth-child(2) .word {
  transition-delay: 0.16s;
}
.js .hero .line:nth-child(3) .word {
  transition-delay: 0.28s;
}

.js .hero .scribble path {
  stroke-dashoffset: 360;
  transition: stroke-dashoffset 1.2s 0.9s var(--ease);
}

.js .hero.is-in .scribble path {
  stroke-dashoffset: 0;
}

.js .hero .stage {
  opacity: 0;
  transform: translateY(60px) scale(0.94);
  transition:
    opacity 1.2s 0.3s var(--ease),
    transform 1.4s 0.3s var(--ease);
}

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

.js .hero .reveal {
  transition-delay: var(--d, 0s);
}

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

@media (max-width: 1100px) {
  .float--visit {
    right: 0;
  }
  .float--family {
    left: 0;
  }
}

@media (max-width: 1000px) {
  .hero__grid,
  .story__grid,
  .watch__grid,
  .privacy__grid,
  .faq__grid,
  .section-head--split {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero__copy {
    text-align: center;
  }

  .hero__copy .lead {
    margin-inline: auto;
  }

  .hero__actions .badges,
  .hero__proof {
    justify-content: center;
  }

  .scroll-cue {
    display: none;
  }

  .faq__head {
    position: static;
  }

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

  .day__stage {
    display: none;
  }

  .step__art {
    display: block;
    max-width: 420px;
  }

  .step {
    min-height: 0;
  }

  .js .step:not(.is-active) .step__body {
    opacity: 1;
  }

  .watch__copy {
    text-align: center;
  }

  .watch__copy .lead {
    margin-inline: auto;
  }

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

  .cell--vitals,
  .cell--lang,
  .cell--roles,
  .cell--info {
    grid-column: span 6;
  }

  .cell--vitals {
    grid-row: auto;
    min-height: 420px;
  }

  .cell--lock,
  .cell--reports {
    grid-column: span 3;
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .site-header__inner {
    position: relative;
    background: rgb(27 23 48 / 0.72);
    border-color: rgb(255 255 255 / 0.1);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px;
    border-radius: 28px;
    background: rgb(27 23 48 / 0.96);
    border: 1px solid rgb(255 255 255 / 0.1);
    box-shadow: 0 24px 60px rgb(19 15 34 / 0.5);
    backdrop-filter: blur(18px);
    /* phones in landscape: keep every link reachable inside the fixed header */
    max-height: calc(100vh - 110px);
    max-height: calc(100dvh - 110px);
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transform-origin: top center;
    transition:
      opacity 0.3s var(--ease),
      transform 0.4s var(--ease),
      visibility 0.3s;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav a:not(.btn) {
    padding: 14px 16px;
    font-size: 1.05rem;
  }

  .site-nav .btn {
    margin: 8px 0 0;
    min-height: 52px;
  }

  html:not(.js) .site-nav {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 112px;
  }

  .stage {
    min-height: 560px;
    margin-inline: calc(var(--gutter) * -1);
    overflow: hidden;
  }

  .phone {
    width: 252px;
  }

  .phone__screen {
    font-size: 10px;
  }

  .orbit-ring--1 {
    width: 440px;
    height: 440px;
  }

  .orbit-ring--2 {
    width: 330px;
    height: 330px;
  }

  .float {
    font-size: 0.78rem;
    padding: 8px 12px 8px 8px;
  }

  .float--visit {
    top: 8%;
    right: 2%;
  }

  .float--family {
    bottom: 16%;
    left: 2%;
  }

  .float--heart {
    bottom: 3%;
    right: 3%;
  }

  .date-tile {
    width: 36px;
    height: 40px;
    font-size: 1.1rem;
  }

  .step {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-block: 28px;
  }

  .day__steps::before {
    display: none;
  }

  .story__stats {
    gap: 20px;
  }

  .chat {
    transform: none;
  }

  .chat::before {
    inset: 14px -8px -14px 8px;
  }

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

  .bento > .cell {
    grid-column: auto;
  }

  .lang {
    flex-direction: column;
    align-items: stretch;
  }

  .lang__switch {
    align-self: flex-start;
  }

  .pledges li {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .pledges__n {
    grid-row: auto;
    margin-bottom: 8px;
  }

  .watch__sticker {
    right: -8px;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  /* side by side while both fit, stacked full-width on narrow phones */
  .badge {
    flex: 1 1 150px;
    justify-content: center;
    padding-inline: 12px;
    gap: 10px;
  }

  .bento {
    grid-auto-rows: auto;
  }

  .cell--icon h3 {
    margin-top: 18px;
  }
}

/* Small phones (iPhone SE, Galaxy Fold cover screen). */
@media (max-width: 380px) {
  .pill-label {
    gap: 8px;
    padding: 6px 12px 6px 10px;
    font-size: 0.76rem;
  }

  .pill-label__dot {
    flex: none;
  }

  .float {
    gap: 8px;
    padding: 6px 10px 6px 6px;
    border-radius: 16px;
    font-size: 0.7rem;
  }

  .float small {
    font-size: 0.66rem;
  }

  .float .avatar {
    width: 24px;
    height: 24px;
    font-size: 0.55rem;
  }

  .float .avatar + .avatar {
    margin-left: -8px;
  }

  .float--visit {
    right: 0;
  }

  .float--family {
    left: 0;
  }

  .float--heart {
    right: 0;
  }

  .watch__sticker {
    right: 0;
    padding: 7px 12px;
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }

  .bubbles,
  .scroll-cue {
    display: none;
  }
}
