/*
 * Light theme is the default; dark is opt-in via [data-theme="dark"].
 *
 * The palette matches the SomeBuddy app (see circles/constants/theme.ts): warm
 * cream/sand surfaces over warm-charcoal text, with tangerine #FF7043 as the
 * single accent — buttons, numbers, highlights. Warm charcoal (not white) sits
 * on the accent fill, which is what clears contrast on tangerine.
 */
:root {
  --bg: #fff9f2;
  --bg-soft: #f4ede4;
  --card: #ffffff;
  --card-border: rgba(41, 37, 34, 0.1);
  --text: #292522;
  --muted: #8a7e70;
  --accent: #ff7043;
  --accent-ink: #292522; /* readable text sitting on an accent fill */
  --accent-text: #ff7043; /* accent used as text on a light surface */
  --shadow: 0 16px 44px rgba(41, 37, 34, 0.1);
  --radius: 18px;
}

:root[data-theme='dark'] {
  --bg: #1a1613;
  --bg-soft: #201a16;
  --card: #251f1a;
  --card-border: rgba(242, 237, 230, 0.1);
  --text: #f2ede6;
  --muted: #b5a99a;
  --accent: #ff7043;
  --accent-ink: #292522;
  --accent-text: #ff7043;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

.page {
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(20px, 5vw, 64px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--card-border);
}

.brand {
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-mark {
  display: inline-flex;
  color: var(--accent);
  flex-shrink: 0;
}

.footer-brand .brand-mark {
  vertical-align: -4px;
  margin-right: 7px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 26px);
  font-weight: 500;
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--text);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}

.nav-cta {
  color: var(--accent-ink);
  background: var(--accent);
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 700;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(44px, 8vw, 96px) clamp(20px, 5vw, 64px) clamp(36px, 6vw, 72px);
  max-width: 1160px;
  margin: 0 auto;
  position: relative;
}

/* One quiet cyan wash behind the hero — the only decorative color on the page. */
.hero::before {
  content: '';
  position: absolute;
  inset: -30% -20% auto;
  height: 120%;
  background: radial-gradient(
    560px 380px at 78% 30%,
    color-mix(in srgb, var(--accent) 14%, transparent),
    transparent 70%
  );
  pointer-events: none;
  z-index: -1;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
  font-weight: 800;
}

.grad {
  color: var(--accent-text);
}

.sub {
  margin-top: 18px;
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 34rem;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 40%, transparent);
}

.fine {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- waitlist ---------- */

.waitlist {
  margin-top: 26px;
  max-width: 30rem;
}

.waitlist.big {
  margin: 26px auto 0;
}

.waitlist-row {
  display: flex;
  gap: 10px;
}

.waitlist input:disabled,
.waitlist button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.waitlist-error {
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #dc2626;
}

.cta-band .waitlist-error {
  text-align: center;
}

.waitlist input {
  flex: 1;
  min-width: 0;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.waitlist input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.waitlist-done {
  margin-top: 26px;
  font-weight: 600;
  color: var(--accent-text);
}

.cta-band .waitlist-done {
  text-align: center;
}

/* ---------- phone ---------- */

.hero-phone {
  display: flex;
  justify-content: center;
}

.phone {
  /* Straight, not tilted. Titanium band around a near-black chassis. */
  position: relative;
  padding: 4px;
  border-radius: 52px;
  background: linear-gradient(160deg, #6f7076, #3a3b40 30%, #55565c 65%, #2c2d31);
  box-shadow: var(--shadow);
}

/* Side buttons sit on the titanium band. */
.phone-btn {
  position: absolute;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #5b5c62, #35363b);
}

.phone-btn.power {
  right: -3px;
  top: 27%;
  height: 64px;
}

.phone-btn.action {
  left: -3px;
  top: 18%;
  height: 24px;
}

.phone-btn.vol-up {
  left: -3px;
  top: 27%;
  height: 40px;
}

.phone-btn.vol-down {
  left: -3px;
  top: calc(27% + 48px);
  height: 40px;
}

.phone-body {
  position: relative;
  width: min(272px, 66vw);
  border-radius: 48px;
  overflow: hidden;
  /* The screenshots start flush at the top with no status bar of their own, so
     the body reserves a strip in the app's own background colour for the
     Dynamic Island to float in — otherwise the island lands on the header text.
     `--bg` is exactly the screenshot background in each theme, so the strip is
     seamless. */
  background: var(--bg);
  padding-top: 38px;
  /* Black bezel between the titanium band and the screen. */
  border: 9px solid #000;
}

.phone-shot {
  display: block;
  width: 100%;
  /* Natural height — the whole screenshot shows, top header to bottom tab bar,
     with nothing cropped (its aspect ratio already matches the body). */
  height: auto;
}

/* Dynamic Island with the camera lens on its right side — floats in the strip. */
.phone-island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 33%;
  height: 26px;
  background: #000;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 7px;
}

.phone-camera {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #2b3a55 18%, #10131c 55%, #000 80%);
  box-shadow: inset 0 0 2px rgba(120, 160, 255, 0.5);
}

/* ---------- sections ---------- */

.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 88px) clamp(20px, 5vw, 64px);
  text-align: center;
}

.section h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 800;
}

.section.alt {
  max-width: none;
  background: var(--bg-soft);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

/* features */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 40px;
  text-align: left;
}

.feature {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.feature-icon {
  font-size: 1.7rem;
}

.feature h3 {
  margin: 14px 0 10px;
  font-size: 1.1rem;
}

.feature p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* steps */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 40px auto 0;
  max-width: 1000px;
  text-align: left;
}

.step {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 26px;
}

.step-n {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-weight: 800;
  background: var(--accent);
  color: var(--accent-ink);
}

.step h3 {
  margin: 16px 0 10px;
  font-size: 1.1rem;
}

.step p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* faq */

.faq {
  margin: 36px auto 0;
  max-width: 720px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Native <details>/<summary> disclosure — the exclusive `name` attribute keeps
   just one open at a time, no JS needed. */
.faq-item {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
}

.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none; /* drop the default disclosure triangle */
}

.faq-q::-webkit-details-marker {
  display: none; /* Safari's triangle */
}

.faq-chevron {
  color: var(--muted);
  transition: transform 0.25s ease;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-a {
  margin: 0;
  color: var(--muted);
  padding: 0 20px 18px;
  font-size: 0.95rem;
}

.faq-item[open] .faq-a {
  animation: faq-reveal 0.25s ease;
}

@keyframes faq-reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* cta band */

.cta-band {
  text-align: center;
  margin: 0 clamp(20px, 5vw, 64px) clamp(48px, 8vw, 88px);
  padding: clamp(44px, 7vw, 72px) 24px;
  border-radius: 28px;
  background:
    radial-gradient(
      480px 280px at 50% 0%,
      color-mix(in srgb, var(--accent) 12%, transparent),
      transparent 75%
    ),
    var(--bg-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}

.cta-band h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
}

.cta-band p {
  color: var(--muted);
  margin: 12px 0 0;
  font-size: 1.05rem;
}

/* footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 32px clamp(20px, 5vw, 64px) 40px;
  border-top: 1px solid var(--card-border);
  color: var(--muted);
}

.footer-brand {
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.footer-brand p {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.85rem;
  width: 100%;
}

.footer-links {
  display: flex;
  gap: 22px;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-fine {
  width: 100%;
  font-size: 0.8rem;
  margin-top: 8px;
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .sub,
  .waitlist {
    margin-inline: auto;
  }

  .hero-phone {
    margin-top: 28px;
    order: -1;
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }
}

@media (max-width: 480px) {
  .waitlist-row {
    flex-direction: column;
  }
}
