/* ─── Cooing App — Retro Dark Theme ────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ─── Design Tokens ──────────────────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-page:    #0e0f18;
  --bg-card:    #12141c;
  --bg-screen:  #04040e;
  --bg-header:  #06060f;
  --bg-button:  #0a0c14;
  --bg-canvas:  #020208;

  /* Borders */
  --border-card:    #232636;
  --border-divider: #0d0f1c;
  --border-subtle:  #1a1e2e;
  --border-input:   #252a38;

  /* Text */
  --text-primary: #e8eeff;
  --text-muted:   #6b7094;
  --text-dim:     #3a3e58;
  --text-ghost:   #252a3a;

  /* Brand */
  --teal:  #00d4aa;
  --amber: #ffa31a;
  --pink:  #ff5080;
  --red:   #ff3850;

  /* Zone tints */
  --tint-quiet:  #001a12;
  --tint-cooing: #1a0e00;
  --tint-loud:   #1a0009;

  /* Layout */
  --max-width: 1100px;
  --radius:    8px;
  --radius-lg: 16px;
}

/* ─── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ─── Typography ─────────────────────────────────────────────────────────────── */
.mono { font-family: 'Space Mono', monospace; }

h1, h2, h3 {
  font-family: 'Space Mono', monospace;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.1rem; }

/* ─── Layout Utilities ───────────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section--tight {
  padding: 64px 0;
}

/* ─── Sticky Header ──────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--teal); }
  50%       { opacity: 0.5; box-shadow: 0 0 4px var(--teal); }
}

.logo__name {
  font-family: 'Space Mono', monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.logo__name span { color: var(--teal); }

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

.site-nav a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.15s;
}

.site-nav a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

/* ─── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 30%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,170,0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* Split layout: copy left, phone right */
.hero__split {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 64px;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero__copy .download-row {
  justify-content: flex-start;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--tint-quiet);
  border: 1px solid rgba(0,212,170,0.25);
  border-radius: 100px;
  padding: 6px 14px;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--teal);
  margin-bottom: 32px;
  letter-spacing: 0.05em;
}

.hero__badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 6px var(--teal);
  animation: pulse-dot 2s ease-in-out infinite;
}

.hero h1 {
  margin-bottom: 24px;
  color: var(--text-primary);
  text-align: left;
}

.hero h1 em {
  font-style: normal;
  color: var(--teal);
}

.hero__sub {
  max-width: 480px;
  margin: 0 0 40px;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ─── Phone Mockup ───────────────────────────────────────────────────────────── */
.hero__mockup-wrap {
  position: relative;
  flex-shrink: 0;
}

.phone-outer {
  position: relative;
  width: 248px;
  background: linear-gradient(160deg, #1e2234 0%, #131620 100%);
  border-radius: 48px;
  /* Layered box-shadow: inner glass sheen + metallic ring + dark gap + deep shadow + glow */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.07),
    inset 0 -1px 0 rgba(0,0,0,0.4),
    0 0 0 2px #2c3048,
    0 0 0 4px #090b14,
    0 50px 120px rgba(0,0,0,0.9),
    0 0 80px rgba(0,212,170,0.05);
  padding: 14px 10px 10px;
  overflow: visible;
}

/* ── Side hardware buttons ── */
.phone-side {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.phone-side--left  { left: -6px; top: 108px; }
.phone-side--right { right: -6px; top: 136px; }

.psb {
  display: block;
  width: 4px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, #2e3248, #1c1f2e);
  box-shadow: inset 1px 0 0 rgba(255,255,255,0.06);
}
.phone-side--right .psb {
  border-radius: 2px 0 0 2px;
}
.psb--mute  { height: 22px; }
.psb--vol   { height: 30px; }
.psb--power { height: 46px; }

/* ── Dynamic island ── */
.phone-island {
  width: 88px;
  height: 26px;
  background: #04040e;
  border-radius: 100px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  gap: 6px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
/* ── Glass shine overlay — diagonal gloss across phone body ── */
.phone-outer::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    138deg,
    rgba(255,255,255,0.09) 0%,
    rgba(255,255,255,0.04) 28%,
    rgba(255,255,255,0.01) 48%,
    transparent 62%
  );
  pointer-events: none;
  z-index: 40;
}

/* Camera dot inside island */
.phone-island::after {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #1e2030, #0a0b14);
  border: 1px solid #1e2234;
  box-shadow: 0 0 4px rgba(0,212,170,0.15);
}

.phone-island--sm {
  width: 66px;
  height: 20px;
}
.phone-island--sm::after {
  width: 7px;
  height: 7px;
}

/* ── Screen area ── */
.phone-screen-wrap {
  /* Inner screen radius is small on real phones — don't clip corners of content */
  border-radius: 14px;
  overflow: hidden;
  background: #04040e;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
  /* Scale 0.56 gives breathing room so vol-bar clears the bottom corner */
  width: calc(390px * 0.56);    /* ~218px */
  height: calc(840px * 0.56);   /* ~470px — taller to show full app */
}

.phone-screen-wrap iframe {
  display: block;
  width: 390px;
  height: 840px;   /* taller iframe so bottom bar isn't at the very edge */
  border: none;
  transform: scale(0.56);
  transform-origin: top left;
  pointer-events: none;
}

/* ── Smaller variant for child phone ── */
.phone-outer--sm {
  width: 192px;
}

.phone-screen-wrap--sm {
  width: calc(390px * 0.42) !important;   /* ~164px */
  height: calc(840px * 0.42) !important;  /* ~353px */
}
.phone-screen-wrap--sm iframe {
  height: 840px !important;
  transform: scale(0.42) !important;
}

/* ── Bottom home bar ── */
.phone-home-bar {
  width: 72px;
  height: 4px;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
  margin: 9px auto 0;
}

/* Glow under phone */
.phone-glow {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 80px;
  background: radial-gradient(ellipse, rgba(0,212,170,0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* ─── Download Badges ────────────────────────────────────────────────────────── */
.download-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 12px 20px;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color 0.2s, background 0.2s;
  cursor: default;
  opacity: 0.55;
}

.badge-btn__label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.badge-btn__soon {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  color: var(--amber);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-btn__store {
  font-weight: 600;
  font-size: 0.95rem;
}

/* ─── How It Works ───────────────────────────────────────────────────────────── */
.how {
  background: var(--bg-screen);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 16px;
}

.section-title {
  margin-bottom: 56px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.step {
  background: var(--bg-card);
  padding: 40px 32px;
  position: relative;
}

.step__num {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.step__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.step__icon--teal  { background: var(--tint-quiet);  border: 1px solid rgba(0,212,170,0.2); }
.step__icon--amber { background: var(--tint-cooing); border: 1px solid rgba(255,163,26,0.2); }
.step__icon--pink  { background: var(--tint-loud);   border: 1px solid rgba(255,80,128,0.2); }

.step h3 { margin-bottom: 8px; }
.step p   { color: var(--text-muted); font-size: 0.95rem; }

/* ─── Privacy Callout ────────────────────────────────────────────────────────── */
.privacy-band {
  background: var(--tint-quiet);
  border-top: 1px solid rgba(0,212,170,0.15);
  border-bottom: 1px solid rgba(0,212,170,0.15);
  padding: 64px 0;
  text-align: center;
}

.privacy-band__icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.privacy-band h2 {
  color: var(--teal);
  margin-bottom: 16px;
}

.privacy-band p {
  max-width: 540px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* ─── Features Grid ──────────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feature {
  background: var(--bg-card);
  padding: 32px 28px;
}

.feature__icon {
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.feature h3 {
  font-family: 'Space Mono', monospace;
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.feature p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── Trust / SOC2 ───────────────────────────────────────────────────────────── */
.trust-band {
  background: var(--bg-canvas);
  border-top: 1px solid var(--border-divider);
  border-bottom: 1px solid var(--border-divider);
  padding: 48px 0;
}

.trust-band__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 14px 20px;
}

.trust-badge__icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: rgba(0,212,170,0.1);
  border: 1px solid rgba(0,212,170,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.trust-badge__text strong {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-primary);
}

.trust-badge__text span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ─── About / Origin Story ───────────────────────────────────────────────────── */
.about {
  text-align: center;
}

.about__card {
  max-width: 620px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  position: relative;
}

.about__card::before {
  content: '"';
  position: absolute;
  top: -24px;
  left: 40px;
  font-family: 'Space Mono', monospace;
  font-size: 5rem;
  color: var(--amber);
  opacity: 0.3;
  line-height: 1;
}

.about__quote {
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.75;
  margin-bottom: 24px;
}

.about__quote em { font-style: normal; color: var(--amber); }

.about__byline {
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.about__byline span { color: var(--pink); }

/* ─── Download Section ───────────────────────────────────────────────────────── */
.download {
  text-align: center;
  background: var(--bg-screen);
  border-top: 1px solid var(--border-subtle);
}

.download h2 { margin-bottom: 12px; }
.download p  { color: var(--text-muted); margin-bottom: 40px; }

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-header);
  border-top: 1px solid var(--border-divider);
  padding: 32px 0;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer__copy {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.site-footer__links {
  display: flex;
  gap: 24px;
}

.site-footer__links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color 0.15s;
}

.site-footer__links a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

/* ─── Reset Password Page ────────────────────────────────────────────────────── */
.reset-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--bg-page);
}

.reset-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
}

.reset-card__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.reset-card h1 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.reset-card__sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.03em;
}

.form-input {
  width: 100%;
  background: var(--bg-button);
  border: 1px solid var(--border-input);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: 'Space Mono', monospace;
}

.form-input:focus { border-color: var(--teal); }

.form-input-wrap {
  position: relative;
}

.form-input-wrap .form-input { padding-right: 44px; }

.toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 0;
  transition: color 0.15s;
}

.toggle-pw:hover { color: var(--text-primary); }

.btn-primary {
  display: block;
  width: 100%;
  padding: 13px;
  background: var(--teal);
  color: #001a12;
  border: none;
  border-radius: var(--radius);
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 24px;
  letter-spacing: 0.03em;
}

.btn-primary:hover   { opacity: 0.88; }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

/* State panels */
.state-panel {
  display: none;
  text-align: center;
  padding: 8px 0;
}

.state-panel.visible { display: block; }

.state-panel__icon { font-size: 2.5rem; margin-bottom: 16px; }

.state-panel h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.state-panel p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.btn-link {
  font-family: 'Space Mono', monospace;
  font-size: 0.82rem;
  color: var(--teal);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.error-msg {
  display: none;
  font-size: 0.82rem;
  color: var(--pink);
  margin-top: 8px;
  font-family: 'Space Mono', monospace;
}

.error-msg.visible { display: block; }

/* ─── Privacy / Terms Pages ──────────────────────────────────────────────────── */
.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px;
}

.legal-page h1 { margin-bottom: 8px; }

.legal-meta {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 48px;
}

.legal-page h2 {
  font-size: 1.1rem;
  margin: 40px 0 12px;
  color: var(--teal);
}

.legal-page p, .legal-page li {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 12px;
}

.legal-page ul { padding-left: 20px; }

.legal-page li { margin-bottom: 6px; }

/* ─── Two-phone floating hero ────────────────────────────────────────────────── */
.phones-duo {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

/* Float animations — different phase per phone */
@keyframes float-a {
  0%, 100% { transform: translateY(0px)   rotate(-3deg); }
  50%       { transform: translateY(-14px) rotate(-3deg); }
}
@keyframes float-b {
  0%, 100% { transform: translateY(-8px)  rotate(2deg); }
  50%       { transform: translateY(6px)  rotate(2deg); }
}

.phone-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.phone-wrap--child  { animation: float-a 4s ease-in-out infinite; }
.phone-wrap--parent { animation: float-b 4.4s ease-in-out infinite; }

.phone-label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  order: 2; /* label below phone */
}

/* Smaller phone for child side */
.phone-outer--sm {
  width: 180px !important;
}

.phone-screen-wrap--sm {
  width: calc(390px * 0.425) !important;  /* ~166px */
  height: calc(700px * 0.425) !important; /* ~297px */
}

.phone-screen-wrap--sm iframe {
  transform: scale(0.425) !important;
}

/* Connection line between phones */
.phones-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.phones-connector svg {
  width: 80px;
  height: 60px;
}

.connector-label {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: rgba(0,212,170,0.35);
  text-transform: uppercase;
  white-space: nowrap;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero__split {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .hero__copy { align-items: center; }
  .hero__copy .download-row { justify-content: center; }
  .hero h1 { text-align: center; }
  .hero__sub { margin: 0 auto 40px; }
  .hero__mockup-wrap { order: -1; }
}

@media (max-width: 768px) {
  .steps { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .site-nav { gap: 16px; }
  .about__card { padding: 36px 24px; }
  .reset-card { padding: 32px 24px; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .trust-band__inner { flex-direction: column; }
  .hero { padding: 80px 0 64px; }
  .section { padding: 64px 0; }
  .site-nav a:not(.nav-cta) { display: none; }
}
