/*
  Rym — Production stylesheet
  Single bundle: tokens + components + responsive.
  Dark-first. Lavender (soft) + Indigo (assertive) accents.
*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --rym-lavender:        #B7A6F5;
  --rym-lavender-pressed:#9B86EE;
  --rym-lavender-soft:   #C7B9F8;
  --rym-lavender-tint:   rgba(183,166,245, 0.16);

  --rym-indigo:          #5538EE;
  --rym-indigo-pressed:  #4327D8;
  --rym-indigo-tint:     rgba(85, 56, 238, 0.16);

  --bg-0: #000005;
  --bg-1: #0B0B12;
  --bg-2: #14141C;
  --bg-3: #1E1E27;
  --bg-4: #2A2A34;
  --bg-5: #3A3A46;

  --fg-1: #FFFFFF;
  --fg-2: #BFBFC9;
  --fg-3: #8A8A94;
  --fg-4: #5B5B66;

  --border-subtle: rgba(255,255,255, 0.08);
  --border-strong: rgba(255,255,255, 0.16);

  --success:        #5EE38A;
  --success-bg:     rgba(94, 227, 138, 0.14);
  --success-strong: #22C55E;

  --warning:        #F5B946;
  --warning-bg:     rgba(245, 185, 70, 0.16);

  --danger:         #FF4F6E;
  --danger-soft:    #FF7F6E;
  --danger-bg:      rgba(255, 79, 110, 0.16);

  --info:           #3B82F6;
  --info-bg:        rgba(59, 130, 246, 0.16);

  --activity-run:    #3B82F6;
  --activity-cycle:  #F5B946;
  --activity-walk:   #FF4F6E;
  --activity-other:  #B7A6F5;

  --ring-self:    #B7A6F5;
  --ring-friend:  #5EE38A;
  --ring-search:  #6FE7DA;
  --ring-stranger:#9B7BFF;
  --ring-blank:   #3A3A46;

  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  --r-xs:   6px;
  --r-sm:   10px;
  --r-md:   16px;
  --r-lg:   20px;
  --r-xl:   28px;
  --r-pill: 999px;
  --r-app:  22%;

  --shadow-1: 0 1px 2px rgba(0,0,0, 0.40);
  --shadow-2: 0 4px 10px rgba(0,0,0, 0.45);
  --shadow-3: 0 14px 32px rgba(0,0,0, 0.55);
  --shadow-cta: 0 8px 24px rgba(85, 56, 238, 0.35);
  --shadow-lav: 0 10px 24px rgba(183, 166, 245, 0.18);

  --ease-out: cubic-bezier(.2,.7,.2,1);
  --ease-in-out: cubic-bezier(.4,.0,.2,1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 320ms;
}

html[data-accent="indigo"] {
  --rym-lavender: #8C7BFF;
  --rym-lavender-pressed: #6D58F0;
  --rym-lavender-soft: #A99DFF;
  --rym-lavender-tint: rgba(85,56,238,0.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-0);
  color: var(--fg-1);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

/* ─── Layout ──────────────────────────────────────────────── */
.page {
  width: 100%;
  position: relative;
  overflow: hidden;
}
.page-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 40px 80px;
  position: relative;
  z-index: 1;
}

.ambient {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 1000px;
  pointer-events: none;
  background:
    radial-gradient(ellipse 900px 600px at 20% 18%, rgba(183,166,245,0.12), transparent 70%),
    radial-gradient(ellipse 800px 500px at 85% 30%, rgba(85,56,238,0.10), transparent 70%);
  z-index: 0;
}

/* ─── Nav ─────────────────────────────────────────────────── */
.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 56px;
  gap: 16px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-brand img { width: 32px; height: 32px; border-radius: 22%; }
.nav-brand b {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--fg-2); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--fg-1); }

.lang-switch {
  display: inline-flex;
  background: var(--bg-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-pill);
  padding: 3px;
  gap: 0;
}
.lang-switch button {
  background: transparent;
  border: 0;
  color: var(--fg-3);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.lang-switch button.active {
  background: var(--rym-lavender-tint);
  color: var(--rym-lavender);
}
.lang-switch button:hover:not(.active) { color: var(--fg-1); }

.nav-cta {
  background: var(--rym-lavender);
  color: #1a1428;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  border: none;
  font-weight: 700;
  font-size: 14px;
  font-family: var(--font-body);
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  box-shadow: var(--shadow-lav);
}
.nav-cta:hover { background: var(--rym-lavender-pressed); transform: translateY(-1px); }

/* ─── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  min-height: 620px;
  padding-bottom: 80px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 6.5vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 24px;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--rym-lavender); display: block; }
.hero h1 .punct { color: var(--rym-lavender); }

.hero p.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-2);
  margin: 0 0 36px;
  max-width: 520px;
}

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  color: var(--fg-1);
  padding: 14px 22px;
  border-radius: var(--r-md);
  transition: all var(--dur-fast) var(--ease-out);
  min-width: 180px;
}
.store-btn:hover { background: var(--bg-3); transform: translateY(-1px); }
.store-btn svg { flex-shrink: 0; }
.store-btn .lbl { display: flex; flex-direction: column; line-height: 1.1; }
.store-btn .lbl small { font-size: 11px; color: var(--fg-3); font-weight: 500; }
.store-btn .lbl span { font-family: var(--font-display); font-weight: 700; font-size: 16px; }

.store-btn.soon {
  opacity: 0.62;
  cursor: default;
}
.store-btn.soon:hover { background: var(--bg-2); transform: none; }
.store-btn .soon-chip {
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  margin-left: 8px;
  text-transform: uppercase;
}

.hero-social {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.avatar-stack { display: flex; }
.avatar-stack .av {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--bg-0);
  margin-left: -10px;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.avatar-stack .av:first-child { margin-left: 0; }
.avatar-stack .av::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--ring);
}
.avatar-stack .av img { width: 60%; height: 60%; object-fit: contain; }
.hero-social .copy { font-size: 14px; color: var(--fg-2); line-height: 1.4; }
.hero-social .copy b { color: var(--fg-1); font-weight: 700; }

/* ─── Phones ──────────────────────────────────────────────── */
.phone-wrap {
  position: relative;
  height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.phone {
  position: absolute;
  width: 280px;
  filter: drop-shadow(0 40px 80px rgba(0,0,0,0.55))
          drop-shadow(0 20px 40px rgba(85,56,238,0.16));
  transition: transform 700ms var(--ease-out), filter 700ms var(--ease-out);
  animation: phoneFloat 7s var(--ease-in-out) infinite;
}
.phone img {
  width: 100%;
  height: auto;
  display: block;
}
.phone.center {
  z-index: 3;
  transform: translateY(0) rotate(-1deg);
  width: 300px;
  animation-delay: 0s;
}
.phone.left {
  z-index: 1;
  left: 50%;
  transform: translateX(calc(-50% - 180px)) translateY(28px) rotate(-9deg) scale(0.86);
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.55)) brightness(0.85);
  animation-delay: -2.3s;
}
.phone.right {
  z-index: 2;
  left: 50%;
  transform: translateX(calc(-50% + 180px)) translateY(56px) rotate(8deg) scale(0.86);
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.55)) brightness(0.85);
  animation-delay: -4.5s;
}

.phone-wrap:hover .phone.center {
  transform: translateY(-6px) rotate(0deg);
}
.phone-wrap:hover .phone.left {
  transform: translateX(calc(-50% - 200px)) translateY(20px) rotate(-12deg) scale(0.86);
}
.phone-wrap:hover .phone.right {
  transform: translateX(calc(-50% + 200px)) translateY(48px) rotate(11deg) scale(0.86);
}

@keyframes phoneFloat {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -10px; }
}

/* Float cards */
.float-card {
  position: absolute;
  background: var(--bg-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-3);
  z-index: 10;
  opacity: 0;
  transform: translateY(16px);
}
.float-card.in {
  animation: cardIn 600ms var(--ease-out) forwards;
}
.float-card.float-training.in { animation-delay: 700ms; }
.float-card.float-friend.in   { animation-delay: 900ms; }
.float-card.float-stat.in     { animation-delay: 1100ms; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.float-card.settled { animation: floatLoop 6s var(--ease-in-out) infinite; opacity: 1; transform: none; }
.float-card.float-training.settled { animation-delay: 0s; }
.float-card.float-friend.settled   { animation-delay: -3s; }
.float-card.float-stat.settled     { animation-delay: -1.5s; }
@keyframes floatLoop {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.float-training {
  top: 160px;
  left: -20px;
  width: 240px;
}
.float-friend {
  bottom: 100px;
  right: -30px;
  width: 230px;
}
.float-stat {
  bottom: 10px;
  left: 30px;
  width: 200px;
}

.fc-row { display: flex; align-items: center; gap: 12px; }
.fc-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.fc-icon .material-symbols-rounded { font-size: 22px; }
.fc-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--fg-1); }
.fc-sub { font-size: 12px; color: var(--fg-3); margin-top: 2px; }
.fc-chip {
  margin-left: auto;
  background: var(--success-bg);
  color: var(--success);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-pill);
}
.fc-friend-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--ring-friend);
  background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.fc-friend-avatar img { width: 24px; height: 24px; }
.fc-stat-row { display: flex; gap: 16px; align-items: baseline; margin-top: 4px; }
.fc-stat-val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--rym-lavender);
}
.fc-stat-val small { font-size: 12px; color: var(--fg-3); margin-left: 2px; font-weight: 600; }

/* ─── Sections ────────────────────────────────────────────── */
.section { padding: 72px 0; position: relative; }
.section-eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--rym-lavender);
  font-size: 14px;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.section h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  text-wrap: balance;
  max-width: 720px;
}
.section h2 .accent { color: var(--rym-lavender); }
.section p.sub {
  font-size: 17px;
  line-height: 1.5;
  color: var(--fg-2);
  max-width: 560px;
  margin: 0 0 48px;
}

/* ─── Features ─────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  background: var(--bg-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: all var(--dur-base) var(--ease-out);
  min-height: 280px;
  display: flex;
  flex-direction: column;
}
.feature:hover {
  border-color: var(--border-strong);
  background: var(--bg-2);
  transform: translateY(-2px);
}
.feature-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--rym-lavender-tint);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
}
.feature-icon .material-symbols-rounded { font-size: 28px; color: var(--rym-lavender); }
.feature h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.feature p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--fg-2);
  margin: 0;
  flex: 1;
}
.feature-foot {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--rym-lavender);
  font-size: 13px;
  font-weight: 600;
}

/* ─── Activities ───────────────────────────────────────── */
.activities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.activity {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  border: 1px solid var(--border-subtle);
  isolation: isolate;
  transition: transform var(--dur-base) var(--ease-out);
  --activity-color: var(--rym-lavender);
}
.activity:hover { transform: translateY(-4px); }
.activity-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--bg-2);
}
.activity-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1) brightness(0.45);
  transition: transform 900ms var(--ease-out), filter 500ms var(--ease-out);
}
.activity:hover .activity-bg img {
  transform: scale(1.06);
  filter: grayscale(1) contrast(1.05) brightness(0.52);
}
.activity-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg,
      rgba(0, 0, 5, 0.55) 0%,
      rgba(0, 0, 5, 0.70) 45%,
      color-mix(in srgb, var(--activity-color) 28%, rgba(0, 0, 5, 0.95)) 100%);
  transition: opacity var(--dur-base) var(--ease-out);
}
.activity-icon {
  position: absolute;
  top: 22px;
  left: 22px;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(20, 20, 28, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.10);
}
.activity-icon .material-symbols-rounded { font-size: 26px; color: var(--activity-color); }
.activity-chip {
  position: absolute;
  top: 24px;
  right: 22px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--activity-color);
  background: rgba(20, 20, 28, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 10px;
  border-radius: var(--r-pill);
}
.activity h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  margin: 0 0 4px;
  letter-spacing: -0.025em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.activity-meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
  margin-bottom: 14px;
}
.activity-stat-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.activity-stat-val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--activity-color);
  letter-spacing: -0.015em;
}
.activity-stat-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
}
.activity.run   { --activity-color: var(--activity-run);   }
.activity.cycle { --activity-color: var(--activity-cycle); }
.activity.walk  { --activity-color: var(--activity-walk);  }

/* ─── Social ───────────────────────────────────────────── */
.social-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.friend-graph {
  position: relative;
  height: 500px;
  background: var(--bg-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.friend-graph svg.connectors {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.flow-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--rym-lavender);
  box-shadow: 0 0 10px rgba(183, 166, 245, 0.65),
              0 0 22px rgba(183, 166, 245, 0.35);
  pointer-events: none;
  opacity: 0;
}
.friend-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}
.friend-graph.in .friend-node {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.friend-graph.in .friend-node:nth-child(3)  { transition-delay: 200ms; }
.friend-graph.in .friend-node:nth-child(4)  { transition-delay: 320ms; }
.friend-graph.in .friend-node:nth-child(5)  { transition-delay: 440ms; }
.friend-graph.in .friend-node:nth-child(6)  { transition-delay: 560ms; }
.friend-graph.in .friend-node:nth-child(7)  { transition-delay: 680ms; }
.friend-graph.in .friend-node:nth-child(8)  { transition-delay: 800ms; }
.friend-node .ring {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 2.5px solid var(--ring, var(--ring-stranger));
  background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: transform var(--dur-base) var(--ease-out);
}
.friend-node:hover .ring { transform: scale(1.08); }
.friend-node .ring img { width: 32px; height: 32px; }
.friend-node .name {
  font-size: 12px;
  color: var(--fg-2);
  font-weight: 600;
}
.friend-node.self .ring {
  width: 88px; height: 88px;
  border-color: var(--rym-lavender);
  border-width: 3px;
  box-shadow: 0 0 0 6px var(--rym-lavender-tint);
}
.friend-node.self .ring img { width: 52px; height: 52px; }
.friend-node.self .name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--fg-1);
}
.friend-node.self .ring::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid var(--rym-lavender);
  opacity: 0;
  animation: pulseRing 2.6s var(--ease-out) infinite;
}
@keyframes pulseRing {
  0%   { opacity: 0.7; transform: scale(0.85); }
  100% { opacity: 0;   transform: scale(1.35); }
}

.connectors line {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  transition: stroke-dashoffset 1200ms var(--ease-out);
}
.friend-graph.in .connectors line { stroke-dashoffset: 0; }

.ring-legend {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 14px 20px 16px;
  background: linear-gradient(180deg, transparent 0%, rgba(11, 11, 18, 0.85) 60%);
  z-index: 4;
}
.ring-legend .item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--fg-3);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.ring-legend .swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ring, var(--ring-self));
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.06),
              0 0 8px var(--ring, var(--ring-self));
}

.social-copy h2 { max-width: 480px; }

.suggestion-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border-subtle);
  padding: 8px 14px 8px 8px;
  border-radius: var(--r-pill);
  margin-top: 28px;
}
.suggestion-pill .av {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--ring-stranger);
  background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
}
.suggestion-pill .av img { width: 16px; height: 16px; }
.suggestion-pill .copy { font-size: 13px; color: var(--fg-2); }
.suggestion-pill .copy b { color: var(--fg-1); font-weight: 700; }
.suggestion-pill .add-btn {
  background: var(--rym-indigo);
  color: white;
  border: none;
  border-radius: 50%;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  margin-left: 4px;
}
.suggestion-pill .add-btn .material-symbols-rounded { font-size: 16px; }

/* ─── Final CTA ───────────────────────────────────────── */
.final-cta {
  margin-top: 40px;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: 72px 56px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 500px 300px at 80% 50%, rgba(85,56,238,0.18), transparent 70%),
    radial-gradient(ellipse 400px 300px at 10% 80%, rgba(183,166,245,0.12), transparent 70%);
  pointer-events: none;
}
.final-cta h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  position: relative;
}
.final-cta h2 .accent { color: var(--rym-lavender); }
.final-cta p {
  font-size: 16px;
  color: var(--fg-2);
  margin: 0;
  max-width: 440px;
  position: relative;
}
.final-cta .cta-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

/* ─── Footer ───────────────────────────────────────────── */
.footer {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--fg-3);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 16px;
}
.footer .nav-brand b { font-size: 16px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a:hover, .footer-links button:hover { color: var(--fg-1); }
.footer-links button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* ─── Animations / reveal ─────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.entrance > * {
  opacity: 0;
  animation: fadeUp 700ms var(--ease-out) forwards;
}
.entrance > *:nth-child(1) { animation-delay: 100ms; }
.entrance > *:nth-child(2) { animation-delay: 200ms; }
.entrance > *:nth-child(3) { animation-delay: 320ms; }
.entrance > *:nth-child(4) { animation-delay: 460ms; }
.entrance > *:nth-child(5) { animation-delay: 600ms; }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  will-change: transform, opacity;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Sheet (legal modal) ─────────────────────────────── */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 5, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms var(--ease-out);
}
.sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.sheet {
  background: var(--bg-1);
  border-top: 1px solid var(--border-strong);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  width: 100%;
  max-width: 760px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 320ms var(--ease-out), opacity 240ms var(--ease-out);
  box-shadow: 0 -20px 60px rgba(0,0,0,0.7);
  position: relative;
}
.sheet-backdrop.open .sheet {
  transform: translateY(0);
  opacity: 1;
}
.sheet::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 4px;
  background: var(--bg-5);
  border-radius: 999px;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 32px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.sheet-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.02em;
  margin: 0;
}
.sheet-head h2 .accent { color: var(--rym-lavender); }
.sheet-head .meta {
  font-size: 12px;
  color: var(--fg-3);
  margin-top: 4px;
}
.sheet-close {
  background: var(--bg-3);
  border: 1px solid var(--border-subtle);
  color: var(--fg-2);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}
.sheet-close:hover { background: var(--bg-4); color: var(--fg-1); }
.sheet-body {
  padding: 24px 32px 40px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-4) transparent;
}
.sheet-body::-webkit-scrollbar { width: 8px; }
.sheet-body::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 999px; }
.sheet-toc {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.sheet-toc a {
  font-size: 12px;
  font-weight: 600;
  color: var(--rym-lavender);
  background: var(--rym-lavender-tint);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  transition: background var(--dur-fast) var(--ease-out);
}
.sheet-toc a:hover { background: rgba(183,166,245,0.28); }

.legal h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--rym-lavender);
  margin: 32px 0 12px;
  letter-spacing: -0.005em;
}
.legal h3:first-child { margin-top: 0; }
.legal p, .legal li {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--fg-2);
  margin: 0 0 12px;
}
.legal ul {
  padding-left: 18px;
  margin: 0 0 14px;
}
.legal li { margin-bottom: 6px; }
.legal strong { color: var(--fg-1); font-weight: 600; }
.legal a { color: var(--rym-lavender); text-decoration: underline; text-underline-offset: 3px; }

/* ─── Reduced motion ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .entrance > *,
  .float-card,
  .reveal,
  .phone,
  .friend-node,
  .friend-node.self .ring::before,
  .flow-dot {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 1100px) {
  .float-training { left: 10px; }
  .float-friend { right: 10px; }
}

/* ── Tablet ─────────────────────────────────────────────── */
@media (max-width: 960px) {
  .page-inner { padding: 20px 24px 60px; }
  .nav { padding: 14px 0 32px; }
  .nav-links { gap: 12px; }
  .nav-links a:not(.nav-cta) { display: none; }

  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: auto;
    padding-bottom: 40px;
    text-align: left;
  }
  .hero-copy { max-width: 100%; }
  .phone-wrap { height: 580px; }
  .phone.center { width: 260px; }
  .phone.left, .phone.right { width: 220px; }
  .features, .activities { grid-template-columns: 1fr; }
  .social-layout { grid-template-columns: 1fr; gap: 32px; }
  .final-cta { grid-template-columns: 1fr; padding: 48px 32px; }
  .float-training { left: 4%; top: 40px; width: 220px; }
  .float-friend { right: 4%; bottom: 60px; width: 210px; }
  .float-stat { display: none; }
  .section { padding: 56px 0; }
}

/* ── Mobile (≤ 640px) ───────────────────────────────────
   Hero is redesigned: phone moves into normal flow (centred), and all
   THREE floating cards stay visible — alternating sides (top-left,
   middle-right, bottom-left) so they rhythm around the phone without
   covering its centre. */
@media (max-width: 640px) {
  .page-inner { padding: 14px 16px 48px; }

  /* Smaller ambient glow — less visual noise on a small screen */
  .ambient {
    height: 620px;
    background: radial-gradient(ellipse 600px 420px at 50% 14%, rgba(183,166,245,0.12), transparent 70%);
  }

  /* Nav: tighter to fit brand + lang-switch + CTA on one row.
     Bigger bottom padding so it doesn't kiss the hero headline. */
  .nav { padding: 10px 0 40px; gap: 8px; flex-wrap: nowrap; }
  .nav-brand { gap: 8px; min-width: 0; }
  .nav-brand img { width: 28px; height: 28px; }
  .nav-brand b { font-size: 18px; }
  .nav-links { gap: 8px; }
  .nav-cta { padding: 8px 14px; font-size: 13px; }
  .lang-switch { padding: 3px; }
  .lang-switch button { padding: 4px 8px; font-size: 11px; }

  /* Hero copy */
  .hero { gap: 8px; padding-bottom: 16px; }
  .hero h1 {
    font-size: clamp(32px, 8.4vw, 48px);
    line-height: 1.06;
    margin-bottom: 14px;
  }
  .hero p.lede {
    font-size: 15.5px;
    line-height: 1.5;
    margin-bottom: 24px;
    max-width: 100%;
  }

  /* CTAs full-width, stacked */
  .cta-row { flex-direction: column; gap: 10px; }
  .store-btn { min-width: 0; width: 100%; justify-content: center; padding: 12px 18px; }
  .store-btn .soon-chip { margin-left: auto; }

  /* Social proof row */
  .hero-social { margin-top: 22px; gap: 12px; }
  .hero-social .copy { font-size: 13px; }
  .avatar-stack .av { width: 32px; height: 32px; }

  /* PHONE COMPOSITION — fan of three phones (centre + two back),
     same idea as desktop but scaled down. All three screenshots are
     visible so the hero shows depth, not just one image. */
  .phone-wrap {
    position: relative;
    height: 440px;
    padding: 0;
    margin-top: 24px;
    overflow: visible;
  }
  .phone.left, .phone.right { display: block; }
  .phone.center {
    position: absolute;
    top: 0;
    left: 50%;
    margin: 0;
    width: 200px;
    transform: translateX(-50%) rotate(-1deg);
    z-index: 3;
  }
  .phone.left {
    position: absolute;
    top: 0;
    left: 50%;
    width: 165px;
    transform: translateX(calc(-50% - 95px)) translateY(28px) rotate(-9deg) scale(0.86);
    filter: drop-shadow(0 18px 36px rgba(0,0,0,0.55)) brightness(0.82);
    z-index: 1;
  }
  .phone.right {
    position: absolute;
    top: 0;
    left: 50%;
    width: 165px;
    transform: translateX(calc(-50% + 95px)) translateY(46px) rotate(8deg) scale(0.86);
    filter: drop-shadow(0 18px 36px rgba(0,0,0,0.55)) brightness(0.82);
    z-index: 2;
  }
  /* Override desktop hover transforms — those push the back phones
     ±200px which is way off-viewport at this size. */
  .phone-wrap:hover .phone.center {
    transform: translateX(-50%) rotate(-1deg);
  }
  .phone-wrap:hover .phone.left {
    transform: translateX(calc(-50% - 95px)) translateY(28px) rotate(-9deg) scale(0.86);
  }
  .phone-wrap:hover .phone.right {
    transform: translateX(calc(-50% + 95px)) translateY(46px) rotate(8deg) scale(0.86);
  }

  /* ── 3 floating chips, alternating sides ──
     Override the 960px rule that hid .float-stat on tablet — on mobile
     we want all three back, just smaller and tucked to the edges. */
  .float-stat { display: block; }

  .float-training {
    top: 0;
    left: 0;
    bottom: auto;
    right: auto;
    width: 54%;
    max-width: 196px;
    padding: 9px 11px;
    border-radius: var(--r-md);
  }
  .float-friend {
    /* Middle-right, vertically centred-ish with the phone */
    top: 44%;
    right: 0;
    bottom: auto;
    left: auto;
    width: 50%;
    max-width: 184px;
    padding: 9px 11px;
    border-radius: var(--r-md);
  }
  .float-stat {
    /* Bottom-left, opposite to friend */
    bottom: 0;
    left: 0;
    top: auto;
    right: auto;
    width: 52%;
    max-width: 188px;
    padding: 9px 11px;
    border-radius: var(--r-md);
  }

  /* Smaller internals so chips don't feel cramped */
  .fc-row { gap: 9px; }
  .fc-icon { width: 30px; height: 30px; }
  .fc-icon .material-symbols-rounded { font-size: 18px; }
  .fc-friend-avatar { width: 30px; height: 30px; }
  .fc-friend-avatar img { width: 18px; height: 18px; }
  .fc-title { font-size: 12.5px; line-height: 1.2; }
  .fc-sub { font-size: 11px; line-height: 1.3; }
  .fc-stat-row { gap: 12px; margin-top: 2px; }
  .fc-stat-val { font-size: 19px; }
  .fc-stat-val small { font-size: 10px; margin-left: 1px; }

  /* The "Completed" badge in Morning run squeezes the title/sub at this
     width — hide it. The orange run icon already conveys "training",
     and "5.2 km · 26:14" reads cleaner without the trailing pill. */
  .float-training .fc-chip { display: none; }

  /* Sections */
  .section { padding: 48px 0; }
  .section h2 { font-size: clamp(28px, 7vw, 40px); }
  .section p.sub { font-size: 15px; margin-bottom: 32px; }

  .feature { padding: 22px; min-height: 0; }
  .feature-icon { width: 44px; height: 44px; margin-bottom: 18px; }
  .feature-icon .material-symbols-rounded { font-size: 24px; }
  .feature h3 { font-size: 20px; }

  .activity { min-height: 280px; padding: 20px; }
  .activity h3 { font-size: 26px; }
  .activity-icon { width: 40px; height: 40px; top: 18px; left: 18px; }
  .activity-chip { top: 20px; right: 18px; }
  .activity-stat-val { font-size: 20px; }

  .friend-graph { height: 380px; }
  .friend-node .ring { width: 44px; height: 44px; }
  .friend-node .ring img { width: 24px; height: 24px; }
  .friend-node.self .ring { width: 72px; height: 72px; }
  .friend-node.self .ring img { width: 42px; height: 42px; }
  .friend-node .name { font-size: 11px; }
  .ring-legend { gap: 10px; padding: 12px 12px 14px; }
  .ring-legend .item { font-size: 10px; }

  .final-cta { padding: 36px 22px; gap: 28px; }
  .final-cta .cta-actions { width: 100%; }
  .final-cta .cta-actions .store-btn { width: 100%; }

  .footer { flex-direction: column; align-items: flex-start; gap: 16px; padding-top: 24px; margin-top: 48px; }
  .footer-links { gap: 18px; }

  .sheet-head { padding: 24px 20px 14px; }
  .sheet-head h2 { font-size: 22px; }
  .sheet-body { padding: 20px 20px 32px; }
}

/* ── Small mobile (≤ 420px) ─────────────────────────────
   Keep the 3-phone fan AND the 3 chips, scaled a notch smaller. */
@media (max-width: 420px) {
  .nav { gap: 6px; padding: 8px 0 32px; }
  .nav-brand b { font-size: 16px; }
  .nav-cta { padding: 7px 12px; font-size: 12px; }
  .lang-switch { padding: 2px; }
  .lang-switch button { padding: 4px 7px; font-size: 10.5px; }

  .hero h1 { font-size: clamp(28px, 8vw, 40px); margin-bottom: 12px; }
  .hero p.lede { font-size: 14.5px; margin-bottom: 20px; }

  .phone-wrap { height: 400px; margin-top: 18px; }
  .phone.center { width: 180px; }
  .phone.left {
    width: 148px;
    transform: translateX(calc(-50% - 84px)) translateY(26px) rotate(-9deg) scale(0.86);
  }
  .phone.right {
    width: 148px;
    transform: translateX(calc(-50% + 84px)) translateY(42px) rotate(8deg) scale(0.86);
  }
  .phone-wrap:hover .phone.left {
    transform: translateX(calc(-50% - 84px)) translateY(26px) rotate(-9deg) scale(0.86);
  }
  .phone-wrap:hover .phone.right {
    transform: translateX(calc(-50% + 84px)) translateY(42px) rotate(8deg) scale(0.86);
  }

  .float-training { width: 52%; max-width: 174px; padding: 8px 10px; }
  .float-friend  { width: 48%; max-width: 162px; padding: 8px 10px; top: 46%; }
  .float-stat    { width: 50%; max-width: 168px; padding: 8px 10px; }

  .fc-title { font-size: 12px; }
  .fc-sub { font-size: 10.5px; }
  .fc-stat-val { font-size: 17px; }
}

/* ── Very small (≤ 340px, old iPhone SE-ish) ─────────────
   3 phones at this width touch the viewport edges, so the left back is
   dropped — centre + right keep the depth. Friend chip also drops to
   leave breathing room. */
@media (max-width: 340px) {
  .nav-cta { padding: 6px 10px; font-size: 11.5px; }
  .lang-switch button { padding: 3px 6px; }

  .phone-wrap { height: 380px; }
  .phone.center { width: 168px; }
  .phone.left { display: none; }
  .phone.right {
    width: 140px;
    transform: translateX(calc(-50% + 72px)) translateY(38px) rotate(8deg) scale(0.86);
  }
  .phone-wrap:hover .phone.right {
    transform: translateX(calc(-50% + 72px)) translateY(38px) rotate(8deg) scale(0.86);
  }

  .float-friend { display: none; }
  .float-training { width: 62%; max-width: 188px; }
  .float-stat    { width: 58%; max-width: 178px; }
}
