/* Couple Sync — an extension of yashiel.dev's editorial brand.
   Palette, type (Sora / Instrument Serif / JetBrains Mono) and details mirror the portfolio so this
   reads as the same hand. Fonts are self-hosted (fonts.css) to satisfy the default-src 'self' CSP. */
:root {
  --bg: #fafbfc;
  --surface: #ffffff;
  --raised: #f4f6f8;
  --border: #e2e6eb;
  --border-hover: #c4cad2;
  --heading: #0f1419;
  --body: #536471;
  --muted: #8899a6;
  --accent: #1d6ce0;
  --accent-deep: #1558b8;
  --accent-dim: rgba(29, 108, 224, 0.06);
  --accent-light: rgba(29, 108, 224, 0.12);
  --live: #1b9c68;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--body);
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Fixed grain — the same atmosphere as the portfolio. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.02;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

.wrap {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 2.5rem);
}

/* ---------- shared type ---------- */
.kicker {
  margin: 0 0 0.9rem;
  color: var(--accent);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 1.1rem;
  color: var(--heading);
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.038em;
}

h2 {
  margin: 0 0 0.9rem;
  color: var(--heading);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

h1 em,
h2 em,
.serif {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.lede {
  max-width: 30rem;
  margin: 0 0 1.6rem;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.7;
}

p {
  margin: 0 0 1rem;
}

.muted {
  color: var(--muted);
}

a {
  color: var(--accent);
  text-decoration: none;
}

.ink {
  position: relative;
  color: var(--accent);
}
.ink::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.ink:hover::after {
  width: 100%;
}

/* ---------- header ---------- */
.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--heading);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}
.wordmark img {
  width: 1.85rem;
  height: 1.85rem;
  display: block;
}
.wordmark span {
  color: var(--accent);
}

.site-head nav {
  display: flex;
  gap: 1.4rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.site-head nav a {
  color: var(--muted);
}
.site-head nav a:hover {
  color: var(--accent);
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(3rem, 8vw, 5.5rem);
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 2.2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.85rem 1.4rem;
  border-radius: 0.7rem;
  box-shadow: 0 0.6rem 1.4rem rgba(29, 108, 224, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.button:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 0.85rem 1.8rem rgba(29, 108, 224, 0.28);
}
.button.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border-hover);
  box-shadow: none;
}
.button.ghost:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.cta-note {
  color: var(--muted);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* fact rows — mono, borrowed from the portfolio case studies */
.facts {
  margin: 0;
  border-top: 1px solid var(--border);
  max-width: 27rem;
}
.facts div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}
.facts dt,
.facts dd {
  margin: 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.6rem;
  line-height: 1.5;
}
.facts dt {
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.facts dd {
  color: #35414a;
}

/* ---------- phone mockup (the signature visual) ---------- */
.stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 26rem;
  border: 1px solid #dce1e6;
  border-radius: 1.4rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(29, 108, 224, 0.16), transparent 30%),
    linear-gradient(150deg, #f6f9fc, #e9f0f7);
  box-shadow: 0 1.6rem 4rem rgba(15, 20, 25, 0.09);
}

.phone {
  width: min(78%, 17.5rem);
  padding: 0.8rem 1.05rem 1.35rem;
  border: 6px solid #16212b;
  border-radius: 2.3rem;
  background: #fff;
  box-shadow: 0 1.8rem 3rem rgba(31, 67, 93, 0.22);
  transform: rotate(1.5deg);
}
.phone-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0 0.25rem;
  color: #26333e;
  font: 0.48rem 'JetBrains Mono', monospace;
}
.phone-top b {
  width: 3.2rem;
  height: 0.9rem;
  border-radius: 999px;
  background: #16212b;
}
.app-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.app-heading img {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.6rem;
  background: var(--accent-dim);
}
.app-heading div {
  display: grid;
}
.app-heading small,
.clock-row small,
.window-label {
  color: #8a99a6;
  font: 0.46rem 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
}
.app-heading strong {
  color: #14202a;
  font-size: 1rem;
}
.clock-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.clock-row div {
  display: grid;
  gap: 0.2rem;
  padding: 0.65rem;
  border: 1px solid #e4eaf0;
  border-radius: 0.65rem;
}
.clock-row strong {
  color: #14202a;
  font-size: 0.85rem;
}
.window-label {
  display: block;
  margin: 0 0 0.45rem 0.1rem;
  text-transform: uppercase;
}
.window-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.45rem;
  padding: 0.75rem;
  border: 1px solid #e4eaf0;
  border-radius: 0.75rem;
}
.window-card.best {
  border-color: rgba(29, 108, 224, 0.35);
  background: rgba(29, 108, 224, 0.055);
}
.window-card div {
  display: grid;
  gap: 0.18rem;
}
.window-card strong {
  color: #182631;
  font-size: 0.68rem;
}
.window-card span {
  color: #7c8b97;
  font: 0.46rem 'JetBrains Mono', monospace;
}
.window-card b {
  color: var(--accent);
  font: 0.56rem 'JetBrains Mono', monospace;
}
.privacy-line {
  margin-top: 0.9rem;
  color: #71818e;
  font: 0.44rem 'JetBrains Mono', monospace;
  text-align: center;
}
.privacy-line span {
  color: var(--live);
}

/* ---------- how it works ---------- */
.section-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, #e2e6eb 20%, #c4cad2 50%, #e2e6eb 80%, transparent);
}

.band {
  padding: clamp(2.75rem, 7vw, 4.5rem) 0;
}

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 1.5rem 1.4rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.steps li:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.steps li::before {
  content: '0' counter(step);
  display: block;
  margin-bottom: 0.7rem;
  color: var(--accent);
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 2.1rem;
  line-height: 1;
}
.steps strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--heading);
  font-size: 0.98rem;
  font-weight: 600;
}
.steps p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.6;
}

/* ---------- privacy note ---------- */
.privacy-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
}
.assure {
  padding: 1.4rem 1.5rem;
  border: 1px solid rgba(29, 108, 224, 0.22);
  border-radius: 1rem;
  background: var(--accent-dim);
}
.assure .row {
  display: flex;
  gap: 0.7rem;
  padding: 0.55rem 0;
  font-size: 0.85rem;
  color: #35414a;
}
.assure .row + .row {
  border-top: 1px solid rgba(29, 108, 224, 0.12);
}
.assure .row b {
  color: var(--live);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ---------- prose (privacy / support) ---------- */
.prose {
  max-width: 44rem;
  padding: clamp(2rem, 5vw, 3.25rem) 0 1rem;
}
.prose h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
}
.prose h2 {
  margin-top: 2.4rem;
  font-size: 1.15rem;
}
.prose h3 {
  margin: 1.8rem 0 0.4rem;
  color: var(--heading);
  font-size: 0.95rem;
  font-weight: 600;
}
.prose p,
.prose li {
  font-size: 0.94rem;
  line-height: 1.75;
}
.prose ul,
.prose ol {
  margin: 0.6rem 0 1.2rem;
  padding-left: 1.2rem;
}
.prose li::marker {
  color: var(--accent);
}
.prose li {
  margin-bottom: 0.5rem;
}
.prose .updated {
  color: var(--muted);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- invite ---------- */
.invite {
  max-width: 34rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 4.5rem) 0 2rem;
  text-align: center;
}
.code-card {
  margin: 1.75rem 0 1rem;
  padding: 1.75rem 1rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  background: var(--surface);
  box-shadow: 0 1rem 2.5rem rgba(15, 20, 25, 0.06);
}
.code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(2.1rem, 8vw, 2.9rem);
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--heading);
  padding-left: 0.24em; /* optical recentre against tracking */
  user-select: all;
}
.code-card small {
  display: block;
  margin-top: 0.5rem;
  color: var(--muted);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.invite .cta-row {
  justify-content: center;
}

/* ---------- footer ---------- */
footer {
  margin-top: 1rem;
  padding: 2.25rem 0 3rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
footer .note {
  max-width: 26rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}
footer .note em {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  color: var(--body);
}
footer nav {
  display: flex;
  gap: 1.2rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
footer nav a {
  color: var(--muted);
}
footer nav a:hover {
  color: var(--accent);
}

/* ---------- entrance motion (load-staggered, CSS-only) ---------- */
.rise {
  opacity: 0;
  transform: translateY(22px);
  animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.rise.d1 { animation-delay: 0.06s; }
.rise.d2 { animation-delay: 0.14s; }
.rise.d3 { animation-delay: 0.22s; }
.rise.d4 { animation-delay: 0.3s; }
@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .hero,
  .privacy-band {
    grid-template-columns: 1fr;
  }
  .hero {
    gap: 2.5rem;
  }
  .stage {
    min-height: 22rem;
  }
  .phone {
    transform: none;
  }
  .facts {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .rise {
    opacity: 1;
    transform: none;
    animation: none;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}
