/* ============================================================
   Space for Two — landing page
   Design system borrowed from the app (../space-for-two):
   Peachi display font · indigo #2F3566/#3D4287 · card periwinkle
   #4E549E · accents lavender #A982C5, pink #FF6B9D, mint #4FC391,
   yellow #FFD93D, sky #64B5F6.
   ============================================================ */

@font-face {
  font-family: 'Peachi';
  src: url('assets/fonts/Peachi-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Peachi';
  src: url('assets/fonts/Peachi-Medium.otf') format('opentype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Peachi';
  src: url('assets/fonts/Peachi-Bold.otf') format('opentype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg-0: #141232;
  --indigo: #2f3566;
  --indigo-2: #3d4287;
  --periwinkle: #4e549e;
  --lavender: #a982c5;
  --lavender-hi: #c79be6;
  --pink: #ff6b9d;
  --pink-soft: #ffb8d4;
  --mint: #4fc391;
  --mint-soft: #a8f0c2;
  --yellow: #ffd93d;
  --sky: #64b5f6;

  --ink: #f4f2fb;
  --ink-dim: #cfceec;
  --ink-mute: #9d9dc8;

  --card: rgba(78, 84, 158, 0.4);
  --card-muted: rgba(78, 84, 158, 0.25);
  --card-emphasis: rgba(78, 84, 158, 0.6);
  --card-border: rgba(169, 130, 197, 0.28);

  --font: 'Peachi', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --maxw: 1160px;
  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Real app starfield, held behind everything, darkened for contrast */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  background: url('assets/img/background.png') center top / cover no-repeat, var(--bg-0);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(
    180deg,
    rgba(18, 16, 46, 0.62) 0%,
    rgba(26, 22, 58, 0.5) 42%,
    rgba(15, 13, 38, 0.82) 100%
  );
}

/* A couple of CSS star layers for a little extra twinkle */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.sky .stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1.5px 1.5px at 68% 12%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 84% 28%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1px 1px at 40% 8%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 92% 55%, rgba(255, 255, 255, 0.55), transparent);
  animation: twinkle 5.5s ease-in-out infinite alternate;
}
.sky .stars--2 {
  background-image:
    radial-gradient(1px 1px at 24% 40%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 56% 30%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1px 1px at 8% 60%, rgba(255, 255, 255, 0.5), transparent);
  animation: twinkle 7s ease-in-out infinite alternate-reverse;
}
@keyframes twinkle { from { opacity: 0.45; } to { opacity: 1; } }

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

/* Headings */
h1, h2, h3 { font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: 0.2px; overflow-wrap: break-word; }

a { color: inherit; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--lavender);
  color: #1a1330;
  padding: 0.6rem 1rem;
  border-radius: 0 0 12px 0;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------------- Header ---------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.4rem 1.5rem 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-icon { border-radius: 11px; box-shadow: 0 4px 16px rgba(169, 130, 197, 0.4); }
.brand-name { font-size: 1.3rem; font-weight: 700; }
.brand-name em { color: var(--lavender); font-style: normal; font-weight: 400; margin: 0 0.28em; }

.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a { text-decoration: none; color: var(--ink-dim); font-size: 1.02rem; transition: color 0.2s; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--lavender-hi); }
.nav-cta {
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  color: var(--ink) !important;
  background: var(--card-muted);
}
.nav-cta:hover { border-color: var(--lavender); }

/* ---------------- Hero ---------------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5.5rem) 1.5rem 2rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--lavender-hi);
  margin: 0 0 1rem;
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.1rem);
  margin-bottom: 1.3rem;
}
.hero-sub {
  color: var(--ink-dim);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  max-width: 34ch;
  margin: 0 0 2rem;
}
.hero-note { margin-top: 1.1rem; color: var(--ink-mute); font-size: 0.92rem; }

.hero-copy, .hero-visual { min-width: 0; }
.hero-visual { display: flex; justify-content: center; }
.phone-stage { position: relative; width: min(330px, 78vw); }
.hero-astronaut {
  position: absolute;
  top: -9%;
  left: -16%;
  width: clamp(88px, 26%, 150px);
  height: auto;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.45));
  animation: float 6s ease-in-out infinite;
  z-index: 3;
}
.phone {
  margin: 0;
  width: 100%;
  border-radius: 40px;
  overflow: hidden;
  border: 1px solid rgba(169, 130, 197, 0.25);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5), 0 0 60px rgba(169, 130, 197, 0.15);
  animation: float 7s ease-in-out infinite;
}
.phone img { display: block; width: 100%; height: auto; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ---------------- Store buttons ---------------- */
.store-buttons { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.store-buttons--center { justify-content: center; }
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.62rem 1.2rem;
  border-radius: 14px;
  background: #12102b;
  border: 1px solid rgba(169, 130, 197, 0.35);
  color: #fff;
  font: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.store-btn:not(:disabled):hover {
  transform: translateY(-2px);
  border-color: var(--lavender);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
}
/* Coming-soon placeholders: inert, visibly pending, no deceptive navigation */
.store-btn.is-soon {
  opacity: 0.62;
  cursor: default;
}
.store-btn span { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store-btn small { font-size: 0.68rem; color: var(--ink-mute); font-weight: 400; }
.store-btn strong { font-size: 1.08rem; font-weight: 700; }

/* ---------------- Section heads ---------------- */
.section-head { text-align: center; max-width: 40ch; margin: 0 auto clamp(2rem, 5vw, 3rem); }
.section-head h2 { font-size: clamp(1.8rem, 4.5vw, 2.7rem); margin-bottom: 0.7rem; }
.section-head p { color: var(--ink-dim); font-size: 1.1rem; margin: 0; }

/* ---------------- Feature grid ---------------- */
.features { max-width: var(--maxw); margin: 0 auto; padding: clamp(3rem, 8vw, 5rem) 1.5rem; }
.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
}
.feature-card {
  background: rgba(78, 84, 158, 0.55);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(169, 130, 197, 0.6);
  background: var(--card-emphasis);
}
.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  font-size: 1.6rem;
  border-radius: 15px;
  background: rgba(169, 130, 197, 0.18);
  margin-bottom: 1rem;
}
.feature-card h3 { font-size: 1.28rem; color: var(--lavender-hi); margin-bottom: 0.4rem; }
.feature-card p { margin: 0; color: var(--ink-dim); font-size: 0.99rem; }

/* ---------------- Screenshot showcase ---------------- */
.showcase { padding: clamp(3rem, 8vw, 5rem) 0; }
.showcase .section-head { padding: 0 1.5rem; }
.gallery-wrap { position: relative; max-width: 1320px; margin: 0 auto; }
.gallery {
  list-style: none;
  margin: 0;
  padding: 1rem clamp(1.5rem, 8vw, 6rem);
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery li { flex: 0 0 auto; scroll-snap-align: center; }
.gallery img {
  display: block;
  width: clamp(230px, 62vw, 300px);
  height: auto;
  border-radius: 30px;
  border: 1px solid rgba(169, 130, 197, 0.22);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.45);
}
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: rgba(20, 18, 50, 0.75);
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  z-index: 4;
  backdrop-filter: blur(6px);
  transition: background 0.2s, border-color 0.2s;
}
.gallery-nav:hover { background: var(--periwinkle); border-color: var(--lavender); }
.gallery-nav.prev { left: 8px; }
.gallery-nav.next { right: 8px; }

/* ---------------- Story ---------------- */
.story { padding: clamp(3rem, 8vw, 5rem) 1.5rem; }
.story-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  background: var(--card-muted);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: clamp(2rem, 5vw, 3.2rem);
}
.story-heart { font-size: 2.2rem; display: block; margin-bottom: 0.8rem; }
.story-inner h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 1rem; }
.story-inner p { color: var(--ink-dim); font-size: clamp(1.05rem, 2.4vw, 1.25rem); margin: 0; }

/* ---------------- CTA ---------------- */
.cta {
  max-width: 860px;
  margin: clamp(2rem, 6vw, 4rem) auto;
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(61, 66, 135, 0.7), rgba(169, 130, 197, 0.18));
  border: 1px solid var(--card-border);
  border-radius: 32px;
}
.cta-icon { border-radius: 22px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4); margin-bottom: 1.2rem; }
.cta h2 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); margin-bottom: 0.6rem; }
.cta-sub { color: var(--ink-dim); margin: 0 auto 1.6rem; font-size: 1.1rem; max-width: 42ch; }
.notify-btn {
  display: inline-block;
  padding: 0.9rem 2.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--lavender), var(--pink));
  color: #221036;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(255, 107, 157, 0.3);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.notify-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(255, 107, 157, 0.42); }
.cta-soon-label { color: var(--ink-mute); font-size: 0.88rem; margin: 1.6rem 0 1rem; }

/* ---------------- Legal pages ---------------- */
.legal {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) 1.5rem 3rem;
}
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 0.4rem; }
.legal .updated { color: var(--ink-mute); margin: 0 0 2rem; font-size: 0.95rem; }
.legal h2 {
  font-size: 1.4rem;
  color: var(--lavender-hi);
  margin: 2.4rem 0 0.7rem;
  scroll-margin-top: 1.5rem;
}
.legal h3 { font-size: 1.12rem; color: var(--ink); margin: 1.5rem 0 0.5rem; scroll-margin-top: 1.5rem; }
.legal p, .legal li { color: var(--ink-dim); }
.legal p { margin: 0.7rem 0; }
.legal strong, .legal b { color: var(--ink); font-weight: 700; }
.legal ul, .legal ol { padding-left: 1.3rem; margin: 0.7rem 0; }
.legal li { margin-bottom: 0.4rem; }
.legal a { color: var(--lavender-hi); }
.legal a:hover { text-decoration: underline; }
.legal hr { border: none; border-top: 1px solid var(--card-border); margin: 1.6rem 0; }
/* Table of contents */
.legal .toc { list-style: none; padding-left: 0; }
.legal .toc li { margin-bottom: 0.3rem; }
/* Tables (e.g. data categories) */
.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.93rem;
}
.legal th, .legal td {
  border: 1px solid var(--card-border);
  padding: 0.6rem 0.7rem;
  text-align: left;
  vertical-align: top;
  color: var(--ink-dim);
}
.legal th { color: var(--ink); background: var(--card-muted); font-weight: 700; }
.legal .note {
  background: var(--card-muted);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
/* Prominent "how to" callout for the deletion steps */
.legal .callout {
  background: linear-gradient(135deg, rgba(169, 130, 197, 0.16), rgba(255, 107, 157, 0.08));
  border: 1px solid rgba(169, 130, 197, 0.4);
  border-radius: 18px;
  padding: 1.4rem 1.6rem;
  margin: 1.4rem 0 2rem;
}
.legal .callout h2 { margin-top: 0.2rem; }
.legal .callout ol { margin: 0.6rem 0 0; padding-left: 1.4rem; }
.legal .callout ol li { margin-bottom: 0.7rem; color: var(--ink); }
.legal .callout .followup { margin: 1.1rem 0 0; color: var(--ink-dim); font-size: 0.97rem; }
.legal .back { display: inline-block; margin-top: 2.5rem; color: var(--lavender-hi); text-decoration: none; }
.legal .back:hover { text-decoration: underline; }

/* ---------------- Footer ---------------- */
.site-footer {
  border-top: 1px solid var(--card-border);
  padding: 2.6rem 1.5rem;
  text-align: center;
  color: var(--ink-mute);
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  color: var(--ink);
  font-size: 1.15rem;
  margin-bottom: 0.9rem;
}
.footer-brand img { border-radius: 9px; }
.footer-nav { display: flex; gap: 1.3rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.footer-nav a { color: var(--ink-dim); text-decoration: none; }
.footer-nav a:hover { color: var(--lavender-hi); }
.footer-copy { font-size: 0.9rem; margin: 0; }

/* ---------------- Focus & motion ---------------- */
:where(a, button):focus-visible {
  outline: 3px solid var(--lavender-hi);
  outline-offset: 3px;
  border-radius: 6px;
}
#main:focus { outline: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sky .stars, .hero-astronaut, .phone { animation: none; }
  * { scroll-behavior: auto; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 2rem; }
  .hero-copy { order: 2; }
  .hero-visual { order: 1; margin-top: 2.5rem; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .store-buttons { justify-content: center; }
}
@media (max-width: 560px) {
  .site-nav { gap: 0.9rem; }
  .site-nav a:not(.nav-cta) { display: none; }
  .brand-name { font-size: 1.15rem; }
}
@media (max-width: 380px) {
  .site-header { padding: 1.4rem 1rem 0; }
  .brand-icon { width: 32px; height: 32px; }
  .brand { gap: 0.5rem; }
  .brand-name { font-size: 1rem; }
  .nav-cta { padding: 0.4rem 0.8rem; white-space: nowrap; }
}
