/* ==========================================================================
   ContoZ — Design System (light, "Sweet Hearts")
   --------------------------------------------------------------------------
   Colours and the heart texture come straight from the app's default pink
   theme and its "Sweet Hearts" chat texture.

    1. Tokens            7. Navigation        13. Download
    2. Reset & base      8. Hero & devices    14. Footer
    3. Atmosphere        9. Sections          15. About
    4. Layout           10. Bento             16. Legal
    5. Typography       11. Security          17. Motion
    6. Buttons & chips  12. Journey           18. Responsive
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --bg: #FAF5F5;
  --surface: #FFFFFF;
  --surface-2: #FFF8F9;
  --surface-3: #FFF0F2;
  --glass: rgba(250, 245, 245, 0.82);
  --border: #F1E3E6;
  --border-strong: #E7D0D6;

  --primary: #FF7FA7;
  --primary-dark: #F75B8D;
  --primary-deep: #E5407A;
  --primary-light: #FFD6E2;
  --blush: #FFF0F2;
  --rose-text: #D23A6C;
  --lavender: #B794F6;
  --mint: #2FB75A;

  --text: #2D2A2A;
  --text-2: #6B6363;
  --text-3: #9C9393;

  --grad-primary: linear-gradient(135deg, #FF8FB2 0%, #F75B8D 55%, #E5407A 100%);
  --grad-text: linear-gradient(100deg, #F75B8D 0%, #FF7FA7 45%, #B794F6 100%);

  --font-display: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.875rem);
  --step-0: clamp(0.95rem, 0.92rem + 0.15vw, 1.0625rem);
  --step-1: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
  --step-2: clamp(1.4rem, 1.2rem + 0.9vw, 1.9rem);
  --step-3: clamp(1.9rem, 1.45rem + 2vw, 3rem);
  --step-4: clamp(2.4rem, 1.6rem + 3.6vw, 4.6rem);

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --nav-h: 72px;

  --soft-shadow: 0 1px 2px rgba(126, 74, 86, 0.05);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. Reset & base ---------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

::selection { background: var(--primary-light); color: var(--text); }

:focus-visible {
  outline: 2px solid var(--primary-dark);
  outline-offset: 3px;
  border-radius: 6px;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: #fff;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: none; }

/* 3. Atmosphere ------------------------------------------------------------ */
/* The app's "Sweet Hearts" texture over the whole page, with soft pink light. */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 50% -5%, rgba(255, 127, 167, 0.16), transparent 70%),
    radial-gradient(ellipse 45% 35% at 100% 30%, rgba(183, 148, 246, 0.10), transparent 70%),
    radial-gradient(ellipse 45% 35% at 0% 75%, rgba(255, 183, 204, 0.16), transparent 70%),
    var(--bg);
}
.atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/texture-hearts.svg");
  background-size: 2500px 2500px;
}

/* 4. Layout ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(72px, 10vw, 140px); position: relative; }
.section--tight { padding-block: clamp(56px, 7vw, 96px); }

.section__head {
  max-width: 720px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.section__head--center { margin-inline: auto; text-align: center; }

.divider {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

/* 5. Typography ------------------------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--text);
}
.display { font-size: var(--step-4); letter-spacing: -0.035em; line-height: 1.04; }
.h2 { font-size: var(--step-3); }
.h3 { font-size: var(--step-2); line-height: 1.15; }
.h4 { font-size: var(--step-1); line-height: 1.3; letter-spacing: -0.015em; }

.lead { font-size: var(--step-1); color: var(--text-2); line-height: 1.6; }
.muted { color: var(--text-2); }
.fine { font-size: var(--step--1); color: var(--text-3); line-height: 1.55; }

.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose-text);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary-dark);
  box-shadow: 0 0 0 4px var(--primary-light);
}

/* 6. Buttons & chips ------------------------------------------------------- */
.btn {
  --btn-h: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--btn-h);
  padding-inline: 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease), opacity 0.25s;
}
.btn .icon { width: 18px; height: 18px; }
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--grad-primary);
  background-size: 140% 140%;
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(229, 64, 122, 0.6);
}
.btn--primary:hover { transform: translateY(-1px); background-position: 100% 0; }

.btn--ghost {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--primary); }

.btn--sm { --btn-h: 40px; padding-inline: 18px; font-size: 0.875rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  font-size: var(--step--1);
  color: var(--text-2);
}
.chip .icon { width: 16px; height: 16px; color: var(--primary-dark); }

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 58px;
  padding: 0 22px 0 18px;
  border-radius: 16px;
  background: #1F1B1C;
  color: #fff;
  transition: transform 0.25s var(--ease), background-color 0.25s;
}
.store-btn:hover { transform: translateY(-2px); background: #000; }
.store-btn .icon { width: 26px; height: 26px; stroke-width: 1.5; }
.store-btn__text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store-btn__text small { font-size: 0.7rem; color: rgba(255, 255, 255, 0.7); letter-spacing: 0.02em; }
.store-btn__text strong { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: -0.01em; }

/* 7. Navigation ------------------------------------------------------------ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s;
}
.nav.is-scrolled {
  background: var(--glass);
  border-bottom-color: var(--border);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}
.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.brand__icon {
  width: 38px; height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(247, 91, 141, 0.25));
}
.brand__word {
  height: 26px;
  width: auto;
  /* The app's soft-pink wordmark needs a touch more depth on a light page. */
  filter: saturate(1.6) brightness(0.9) drop-shadow(0 1px 1px rgba(126, 74, 86, 0.3));
}
.brand--lg .brand__icon { width: 48px; height: 48px; }
.brand--lg .brand__word { height: 32px; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav__links a {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.2s, background-color 0.2s;
}
.nav__links a:hover,
.nav__links a[aria-current="page"] { color: var(--text); background: var(--blush); }

.nav__actions { display: flex; align-items: center; gap: 10px; }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  place-items: center;
}
.nav__toggle .icon { width: 22px; height: 22px; }
.drawer__close { display: grid; }

.drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  visibility: hidden;
  pointer-events: none;
}
.drawer.is-open { visibility: visible; pointer-events: auto; }
.drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(45, 42, 42, 0.32);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(88vw, 360px);
  padding: 20px var(--gutter) 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.drawer__panel nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}
.drawer__panel nav a .icon { color: var(--text-3); width: 18px; height: 18px; }
.drawer__panel .btn { margin-top: auto; }

/* 8. Hero & devices -------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: clamp(40px, 6vw, 88px);
  padding-bottom: clamp(64px, 8vw, 120px);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(40px, 6vw, 80px);
}
.hero__title { margin-bottom: 24px; }
.hero__lead { max-width: 540px; margin-bottom: 36px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.hero__proof { display: flex; flex-wrap: wrap; gap: 10px; }

.hero__visual {
  position: relative;
  height: clamp(520px, 52vw, 640px);
  perspective: 1400px;
}
.hero__planet {
  position: absolute;
  left: -4%;
  top: -6%;
  width: 52%;
  z-index: 0;
  filter: drop-shadow(0 20px 40px rgba(247, 91, 141, 0.22));
  animation: float 7s ease-in-out infinite;
}
.hero__glow {
  position: absolute;
  inset: 12% 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 127, 167, 0.32), rgba(183, 148, 246, 0.12) 45%, transparent 70%);
  filter: blur(40px);
}

.device {
  position: absolute;
  width: clamp(240px, 23vw, 290px);
  aspect-ratio: 9 / 19.5;
  padding: 10px;
  border-radius: 46px;
  background: linear-gradient(160deg, #3A3236, #1F1B1C 45%, #141112);
  box-shadow: 0 30px 60px -30px rgba(126, 74, 86, 0.45);
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease);
  will-change: transform;
}
.device--front { right: 6%; top: 4%; z-index: 2; }
.device--back { left: 2%; top: 14%; z-index: 1; transform: rotate(-6deg) scale(0.9); }

.device__screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 37px;
  background: #FAF5F5;
  color: #2D2A2A;
  font-size: 11px;
  line-height: 1.4;
}
.device__island {
  position: absolute;
  top: 9px; left: 50%;
  width: 34%; height: 22px;
  transform: translateX(-50%);
  border-radius: 20px;
  background: #0B0A0A;
  z-index: 5;
}
.device__status {
  display: flex;
  justify-content: space-between;
  padding: 11px 22px 0;
  font-weight: 600;
  font-size: 10.5px;
  color: #2D2A2A;
}

/* Chat mock — mirrors the app's chat screen on the Sweet Hearts texture */
.mock-chat {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: url("../assets/texture-hearts-sm.svg") 0 0 / 260px 260px, #FAF5F5;
}
.mock-chat__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 40px 14px 10px;
}
.mock-avatar {
  width: 32px; height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid #fff;
  background: linear-gradient(135deg, #FF8FB2, #C4A1F7);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}
.mock-who { flex: 1; min-width: 0; }
.mock-who strong { display: block; font-size: 12.5px; color: #2D2A2A; }
.mock-who span { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; color: #22A447; font-weight: 600; }
.mock-who span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #4CD964; }

.mock-heartbeat {
  position: relative;
  width: 30px; height: 22px;
}
.mock-heartbeat svg { width: 100%; height: 100%; overflow: visible; }
.mock-heartbeat .hb-heart { fill: #FF3B5C; }
.mock-heartbeat .hb-arc { stroke: #FF3B5C; stroke-width: 2.6; }
.mock-tune { width: 18px; height: 18px; color: #2D2A2A; }

.mock-chat__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 8px 12px 10px;
}
.bubble {
  max-width: 78%;
  padding: 7px 11px;
  border-radius: 15px;
  font-size: 11px;
  line-height: 1.35;
}
.bubble small { display: block; margin-top: 2px; font-size: 8.5px; opacity: 0.6; text-align: right; }
.bubble--in { align-self: flex-start; background: #fff; color: #2D2A2A; border-bottom-left-radius: 5px; }
.bubble--out { align-self: flex-end; background: #262626; color: #fff; border-bottom-right-radius: 5px; }


.mock-collage {
  align-self: flex-end;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 64%;
  border-radius: 14px;
  overflow: hidden;
}
.mock-collage span { aspect-ratio: 1; background-size: cover; background-position: center; }
.mock-collage span:last-child { position: relative; }
.mock-collage span:last-child::after {
  content: "+3";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}

.mock-chat__input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 22px;
}
.mock-round {
  width: 30px; height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
}
.mock-round .icon { width: 16px; height: 16px; }
.mock-field {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  padding: 0 4px 0 12px;
  border-radius: 16px;
  background: #FFFDFC;
  border: 1px solid #F1E3E6;
  color: #9E9E9E;
  font-size: 10.5px;
}
.mock-send {
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #262626;
  color: #fff;
}
.mock-send .icon { width: 13px; height: 13px; }

/* Journey card mock */
.mock-journey {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
}
.mock-journey__photo {
  position: relative;
  height: 56%;
  background-size: cover;
  background-position: center;
}
.mock-journey__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 45%, #FFFFFF 100%);
}
.mock-journey__body { position: relative; margin-top: -42px; padding: 0 18px 18px; z-index: 1; }
.mock-journey__label { font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--rose-text); font-weight: 700; }
.mock-journey__days { font-family: var(--font-display); font-weight: 800; font-size: 34px; letter-spacing: -0.04em; line-height: 1.05; margin: 4px 0 2px; color: #2D2A2A; }
.mock-journey__since { font-size: 10px; color: #8A8181; }
.mock-journey__list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 7px; }
.mock-journey__list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  background: #FFF0F2;
  font-size: 10px;
  color: #2D2A2A;
}
.mock-journey__list li span { color: #8A8181; }

.float-tag {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 12px 30px -18px rgba(126, 74, 86, 0.45);
  animation: float 6s ease-in-out infinite;
}
.float-tag .icon { width: 18px; height: 18px; color: var(--primary-dark); }
.float-tag--a { left: 0; bottom: 14%; }
.float-tag--b { right: 0; top: 0; animation-delay: -3s; }

/* 9. Sections -------------------------------------------------------------- */
.marquee {
  border-block: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  overflow: hidden;
}
.marquee__track {
  display: flex;
  gap: 48px;
  width: max-content;
  padding-block: 22px;
  animation: marquee 40s linear infinite;
}
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-2);
  font-family: var(--font-display);
  font-weight: 600;
  white-space: nowrap;
}
.marquee__item .icon { width: 18px; height: 18px; color: var(--primary-dark); }

/* 10. Bento ---------------------------------------------------------------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: minmax(220px, auto);
  gap: 16px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(22px, 2.4vw, 32px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
  isolation: isolate;
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease), border-color 0.3s;
  will-change: transform;
}
.card:hover { border-color: var(--primary-light); }
.card::after {
  /* Pointer-follow blush, positioned by main.js */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 127, 167, 0.12), transparent 60%);
  transition: opacity 0.35s;
}
.card:hover::after { opacity: 1; }

.card__icon {
  width: 44px; height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--blush);
  border: 1px solid var(--primary-light);
  color: var(--primary-deep);
}
.card__icon .icon { width: 22px; height: 22px; }
.card h3 { font-size: var(--step-1); letter-spacing: -0.02em; line-height: 1.25; }
.card p { color: var(--text-2); font-size: 0.95rem; line-height: 1.6; }
.card__note { margin-top: auto; font-size: var(--step--1); color: var(--text-3); }

.card--heartbeat { grid-column: span 4; grid-row: span 2; }
.card--diary { grid-column: span 2; grid-row: span 2; }
.card--journey { grid-column: span 2; }
.card--presence { grid-column: span 2; }
.card--consent { grid-column: span 2; }
.card--spaces { grid-column: span 6; }

.heartbeat-stage {
  position: relative;
  flex: 1;
  min-height: 260px;
  display: grid;
  place-items: center;
  margin: 8px -8px 0;
  border-radius: 22px;
  background: radial-gradient(circle at 50% 45%, var(--blush), transparent 65%);
}
.heartbeat-stage svg { width: min(360px, 86%); height: auto; overflow: visible; filter: drop-shadow(0 14px 30px rgba(247, 91, 141, 0.25)); }
.heartbeat-stage .hb-arc { stroke: var(--primary-dark); stroke-width: 1.1; }
.heartbeat-stage .hb-wave { stroke: rgba(247, 91, 141, 0.45); stroke-width: 0.5; stroke-dasharray: 72; animation: ecg 3.2s linear infinite; }

.memory-visual {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding-top: 8px;
}
.memory-visual__diary {
  width: 44%;
  max-width: 160px;
  filter: drop-shadow(0 16px 28px rgba(247, 91, 141, 0.25));
  animation: float 7s ease-in-out infinite;
}
.memory-card {
  position: relative;
  width: 100%;
  margin-top: -18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 14px 30px -22px rgba(126, 74, 86, 0.45);
}
.memory-card__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rose-text);
}
.memory-card__label .icon { width: 15px; height: 15px; }
.memory-card p { margin-top: 8px; color: var(--text); font-size: 0.95rem; line-height: 1.55; }
.memory-card__by { display: block; margin-top: 8px; font-size: 0.78rem; color: var(--text-3); }

.mini-map {
  position: relative;
  height: 130px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background:
    linear-gradient(transparent 49%, rgba(126, 74, 86, 0.07) 50%, transparent 51%) 0 0 / 100% 26px,
    linear-gradient(90deg, transparent 49%, rgba(126, 74, 86, 0.07) 50%, transparent 51%) 0 0 / 26px 100%,
    radial-gradient(ellipse at 30% 40%, rgba(183, 148, 246, 0.14), transparent 60%),
    var(--surface-2);
}
.mini-map__road { position: absolute; inset: 0; width: 100%; height: 100%; }
.mini-map__road path { stroke: rgba(126, 74, 86, 0.14); stroke-width: 6; fill: none; stroke-linecap: round; }
.pin {
  position: absolute;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid #fff;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  transform: translate(-50%, -50%);
}
.pin::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: 0;
  animation: ping 2.4s var(--ease-soft) infinite;
}
.pin--a { left: 28%; top: 62%; background: linear-gradient(135deg, #FF8FB2, #F75B8D); color: #F75B8D; }
.pin--b { left: 72%; top: 36%; background: linear-gradient(135deg, #C4A1F7, #9B6BEA); color: #9B6BEA; }
.pin span { color: #fff; }
.battery-chip {
  position: absolute;
  right: 10px; bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text);
}
.battery-chip .icon { width: 15px; height: 15px; color: var(--mint); }

.consent-visual { display: grid; gap: 8px; }
.consent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}
.consent-row .icon { width: 18px; height: 18px; color: var(--mint); }
.consent-row--wait .icon { color: var(--text-3); }

.journey-mini {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.journey-mini strong { font-family: var(--font-display); font-size: 2rem; letter-spacing: -0.04em; line-height: 1; color: var(--primary-deep); }
.journey-mini span { font-size: 0.78rem; color: var(--text-2); padding-bottom: 3px; }

.spaces { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; align-items: center; }
.spaces__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.space {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 500;
}
.space img { width: 44px; height: 44px; object-fit: contain; flex: none; }

/* 11. Security ------------------------------------------------------------- */
.security {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.security__sticky { position: sticky; top: calc(var(--nav-h) + 32px); }

.vault {
  position: relative;
  margin-top: 36px;
  aspect-ratio: 1;
  max-width: 380px;
  display: grid;
  place-items: center;
  /* The spinning ring's rotated box must not widen the page on phones. */
  contain: paint;
}
.vault__ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px dashed var(--primary-light);
}
.vault__ring--1 { inset: 0; animation: spin 60s linear infinite; }
.vault__ring--2 { inset: 14%; border-style: solid; border-color: rgba(247, 91, 141, 0.25); background: rgba(255, 255, 255, 0.5); }
.vault__ring--3 { inset: 28%; border-color: rgba(183, 148, 246, 0.35); animation: spin 40s linear infinite reverse; }
.vault__core {
  position: relative;
  width: 34%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #FFB7CC, #FF7FA7 45%, #E5407A);
  box-shadow: 0 16px 40px -10px rgba(229, 64, 122, 0.55);
}
.vault__core .icon { width: 42%; height: 42%; color: #fff; stroke-width: 1.5; }
.vault__node {
  position: absolute;
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--primary-deep);
}
.vault__node .icon { width: 22px; height: 22px; }
.vault__node--n { top: 4%; left: 50%; transform: translateX(-50%); }
.vault__node--e { right: 4%; top: 50%; transform: translateY(-50%); }
.vault__node--s { bottom: 4%; left: 50%; transform: translateX(-50%); }
.vault__node--w { left: 4%; top: 50%; transform: translateY(-50%); }

.pillars { display: grid; gap: 14px; }
.pillar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--soft-shadow);
}
.pillar .card__icon { width: 42px; height: 42px; }
.pillar h3 { font-size: 1.05rem; letter-spacing: -0.015em; margin-bottom: 6px; line-height: 1.3; }
.pillar p { color: var(--text-2); font-size: 0.93rem; }

/* 12. Journey -------------------------------------------------------------- */
.journey {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.photo {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-3);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(45, 42, 42, 0) 55%, rgba(45, 42, 42, 0.55));
  pointer-events: none;
}
.photo--tall { aspect-ratio: 4 / 5; }
.photo--wide { aspect-ratio: 16 / 10; }
.photo__caption {
  position: absolute;
  left: 20px; right: 20px; bottom: 18px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #fff;
}
.photo__caption .icon { width: 18px; height: 18px; color: var(--primary-light); }

.timeline { list-style: none; padding: 0; margin: 32px 0 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 19px; top: 8px; bottom: 8px;
  width: 1.5px;
  background: linear-gradient(180deg, var(--primary), rgba(183, 148, 246, 0.5), transparent);
}
.timeline li { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding-bottom: 26px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline__dot {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--primary-light);
  color: var(--primary-deep);
  z-index: 1;
}
.timeline__dot .icon { width: 18px; height: 18px; }
.timeline h3 { font-size: 1.02rem; letter-spacing: -0.01em; margin: 8px 0 4px; line-height: 1.3; }
.timeline p { color: var(--text-2); font-size: 0.93rem; }

/* 13. Download ------------------------------------------------------------- */
.download {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 40px;
  align-items: center;
  padding: clamp(32px, 5vw, 64px);
  border-radius: 36px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 90% at 100% 0%, rgba(255, 127, 167, 0.28), transparent 60%),
    radial-gradient(ellipse 60% 80% at 0% 100%, rgba(183, 148, 246, 0.2), transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
}
.download::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/texture-hearts.svg") 0 0 / 2500px 2500px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%);
  mask-image: linear-gradient(90deg, transparent, #000 70%);
  pointer-events: none;
}
.download > * { position: relative; }
.download__stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.download__art {
  justify-self: center;
  width: min(100%, 340px);
  filter: drop-shadow(0 24px 40px rgba(247, 91, 141, 0.3));
  animation: float 7s ease-in-out infinite;
}

/* 14. Footer --------------------------------------------------------------- */
.footer { padding-block: 72px 40px; border-top: 1px solid var(--border); background: rgba(255, 255, 255, 0.72); }
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.footer__mission { max-width: 340px; margin-top: 18px; color: var(--text-2); font-size: 0.93rem; }
.footer h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 16px;
}
.footer ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.footer ul a { color: var(--text-2); font-size: 0.93rem; transition: color 0.2s; }
.footer ul a:hover { color: var(--primary-deep); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: var(--step--1);
  color: var(--text-3);
}

/* 15. About ---------------------------------------------------------------- */
.page-hero { padding-block: clamp(56px, 8vw, 112px) clamp(40px, 5vw, 72px); }
.page-hero__lead { max-width: 640px; margin-top: 22px; }
.page-hero--art { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: 40px; align-items: center; }
.page-hero__art { width: min(100%, 360px); justify-self: end; filter: drop-shadow(0 20px 40px rgba(247, 91, 141, 0.25)); animation: float 7s ease-in-out infinite; }

.manifesto {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.prose-xl p { font-size: var(--step-1); line-height: 1.7; color: var(--text-2); }
.prose-xl p + p { margin-top: 1.2em; }
.prose-xl strong { color: var(--text); font-weight: 600; }

.contrast {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.contrast__col {
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}
.contrast__col--ours {
  border-color: var(--primary-light);
  background: linear-gradient(180deg, var(--blush), var(--surface) 70%);
}
.contrast__col h3 { font-size: var(--step-1); margin-bottom: 18px; }
.contrast__col ul { list-style: none; padding: 0; display: grid; gap: 14px; }
.contrast__col li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; color: var(--text-2); font-size: 0.95rem; }
.contrast__col li .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--text-3); }
.contrast__col--ours li .icon { color: var(--primary-deep); }

.values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.value__num { font-family: var(--font-display); font-size: 0.85rem; font-weight: 700; color: var(--text-3); letter-spacing: 0.1em; }

.ethics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

/* 16. Legal ---------------------------------------------------------------- */
.legal {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  padding-bottom: clamp(72px, 10vw, 120px);
}
.legal__meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.toc {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  max-height: calc(100vh - var(--nav-h) - 48px);
  overflow-y: auto;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.toc h2 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 12px;
}
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.toc a {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--text-2);
  transition: color 0.2s, background-color 0.2s;
}
.toc a:hover { color: var(--text); background: var(--surface-2); }
.toc a.is-active { color: var(--primary-deep); background: var(--blush); font-weight: 500; }

.prose {
  max-width: 780px;
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--border);
}
.prose > section { padding-top: 8px; margin-bottom: 44px; }
.prose > section:last-child { margin-bottom: 0; }
.prose h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: var(--step-2);
  margin-bottom: 18px;
}
.prose h2 .num { font-size: 0.55em; color: var(--primary-dark); font-weight: 700; letter-spacing: 0.04em; }
.prose h3 { font-size: 1.08rem; margin: 26px 0 10px; letter-spacing: -0.01em; line-height: 1.35; }
.prose p, .prose li { color: var(--text-2); }
.prose p + p { margin-top: 14px; }
.prose ul { padding-left: 0; margin: 14px 0; list-style: none; display: grid; gap: 10px; }
.prose ul li { position: relative; padding-left: 22px; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 4px; top: 0.72em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
}
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--rose-text); text-decoration: underline; text-decoration-color: var(--primary-light); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--rose-text); }

.callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  margin: 20px 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--primary-light);
  background: var(--blush);
}
.callout .icon { width: 20px; height: 20px; color: var(--primary-deep); margin-top: 3px; }
.callout p { color: var(--text); font-size: 0.95rem; }

.steps { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; counter-reset: none; }
.steps li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.steps li::before { content: none; }
.steps__num {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
}

.table-wrap { overflow-x: auto; margin: 18px 0; border-radius: var(--radius); border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 560px; background: var(--surface); }
.table th, .table td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.table th { font-weight: 600; color: var(--text); background: var(--blush); font-size: 0.82rem; letter-spacing: 0.02em; }
.table td { color: var(--text-2); }
.table tr:last-child td { border-bottom: 0; }

/* 17. Motion --------------------------------------------------------------- */
.reveal { opacity: 0; transform: translate3d(0, 24px, 0); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.no-js .reveal { opacity: 1; transform: none; }

@keyframes lubdub {
  0%, 100% { transform: scale(1); }
  8% { transform: scale(1.16); }
  16% { transform: scale(0.97); }
  24% { transform: scale(1.1); }
  40% { transform: scale(1); }
}
/* Arcs travel outward from the heart on each beat, like the app's button. */
@keyframes ripple-l {
  0% { opacity: 0.95; transform: none; }
  45% { opacity: 0; transform: translateX(-45%); }
  46%, 100% { opacity: 0.95; transform: none; }
}
@keyframes ripple-r {
  0% { opacity: 0.95; transform: none; }
  45% { opacity: 0; transform: translateX(45%); }
  46%, 100% { opacity: 0.95; transform: none; }
}
@keyframes ecg { from { stroke-dashoffset: 72; } to { stroke-dashoffset: -72; } }
@keyframes ping { 0% { opacity: 0.8; transform: scale(0.6); } 100% { opacity: 0; transform: scale(1.6); } }
@keyframes float { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -10px, 0); } }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }

.hb-heart { transform-box: fill-box; transform-origin: center; animation: lubdub 1.6s var(--ease-soft) infinite; }
.hb-arc { fill: none; stroke-linecap: round; transform-box: fill-box; }
.hb-arc.l { animation: ripple-l 1.6s var(--ease-soft) infinite; }
.hb-arc.r { animation: ripple-r 1.6s var(--ease-soft) infinite; }
.hb-arc.outer { animation-delay: 0.12s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* 18. Responsive ----------------------------------------------------------- */
@media (min-width: 1800px) {
  :root { --container: 1360px; }
}
@media (min-width: 2400px) {
  html { font-size: 125%; }
  :root { --container: 1560px; --nav-h: 88px; }
}

@media (max-width: 1080px) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card--heartbeat { grid-column: span 4; grid-row: auto; }
  .card--diary { grid-column: span 2; grid-row: auto; }
  .card--journey, .card--presence { grid-column: span 2; }
  .card--consent { grid-column: span 4; }
  .card--spaces { grid-column: span 4; }
  .spaces { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 920px) {
  .nav__links, .nav__actions .btn { display: none; }
  .nav__toggle { display: grid; }
  .hero__grid, .security, .journey, .download, .manifesto, .page-hero--art { grid-template-columns: minmax(0, 1fr); }
  .page-hero__art { justify-self: start; width: min(60%, 260px); }
  .hero__visual { height: clamp(500px, 110vw, 620px); max-width: 560px; width: 100%; margin-inline: auto; }
  .device { width: clamp(220px, 46vw, 280px); }
  .security__sticky { position: static; }
  .vault { max-width: 300px; margin-inline: auto; }
  .download__art { width: min(70%, 260px); order: -1; }
  .legal { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: none; }
  .values { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .card--heartbeat, .card--diary, .card--journey, .card--presence, .card--consent, .card--spaces { grid-column: auto; }
  .spaces__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .space { padding: 12px; gap: 10px; font-size: 0.85rem; line-height: 1.3; }
  .space img { width: 34px; height: 34px; }
  .contrast, .ethics { grid-template-columns: minmax(0, 1fr); }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .float-tag { font-size: 0.75rem; padding: 8px 12px; }
  .float-tag--b { top: -2%; }
  .device--back { left: 0; }
  .device--front { right: 0; }
  .store-btn { flex: 1 1 200px; }
  .prose { padding: 20px 18px; }
}

@media (max-width: 380px) {
  .hero__actions .btn { width: 100%; }
  .spaces__list { grid-template-columns: minmax(0, 1fr); }
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .device { width: 70vw; }
  .device--back { display: none; }
  .device--front { left: 50%; right: auto; transform: translateX(-50%); }
}
