/* I/O Fit website — shared styles (light + dark, matches the app). */

:root {
  --bg: #f4f5fa;
  --surface: #ffffff;
  --surface-2: #eef0f7;
  --border: #e3e5ef;
  --text: #0d0d14;
  --muted: #5b5d72;
  --faint: #8a8ca0;
  --brand-1: #3b82f6;
  --brand-2: #8b5cf6;
  --brand: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  --accent: #6366f1;
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 20px;
  --shadow: 0 10px 40px -12px rgba(20, 20, 60, 0.18);
  --max: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090f;
    --surface: #13131c;
    --surface-2: #1b1b27;
    --border: #262636;
    --text: #f4f4f8;
    --muted: #a3a4b8;
    --faint: #717288;
    --accent: #818cf8;
    --shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ── Header ─────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }

.nav { display: flex; gap: 22px; font-size: 15px; font-weight: 600; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); text-decoration: none; }

@media (max-width: 560px) {
  .nav { gap: 16px; font-size: 14px; }
  .nav .hide-sm { display: none; }
}

/* ── Buttons ────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  border: 0;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(139, 92, 246, 0.6);
}
.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn[aria-disabled="true"] { opacity: 0.6; cursor: default; }
.btn svg { width: 20px; height: 20px; }

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero { padding: 72px 0 40px; overflow: hidden; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 48px;
}
.eyebrow {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-2) 14%, transparent);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 18px 0 18px;
}
.gradient-text {
  background: var(--brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { font-size: 19px; color: var(--muted); max-width: 520px; margin: 0 0 28px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.fine { font-size: 13px; color: var(--faint); margin-top: 14px; }

.phones { position: relative; height: 560px; }
.phone {
  position: absolute;
  width: 250px;
  aspect-ratio: 590 / 1278;
  border-radius: 38px;
  padding: 9px;
  background: #0b0b12;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 30px; }
.phones .phone:nth-child(1) { left: 6%; top: 10px; transform: rotate(-4deg); }
.phones .phone:nth-child(2) { right: 4%; top: 60px; transform: rotate(4deg); }

@media (max-width: 900px) {
  .hero { padding-top: 48px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .phones { height: 460px; }
  .phone { width: 200px; }
  .phones .phone:nth-child(1) { left: calc(50% - 215px); }
  .phones .phone:nth-child(2) { right: calc(50% - 215px); }
}
@media (max-width: 460px) {
  .phones { height: 400px; }
  .phone { width: 170px; }
  .phones .phone:nth-child(1) { left: 2%; }
  .phones .phone:nth-child(2) { right: 2%; }
}

/* ── Sections ───────────────────────────────────────────────────────── */

section { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.12; letter-spacing: -0.03em; margin: 0 0 12px; }
h3 { font-size: 18px; letter-spacing: -0.01em; margin: 0 0 6px; }
.muted { color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  background: color-mix(in srgb, var(--c, var(--accent)) 16%, transparent);
  color: var(--c, var(--accent));
}
.icon-badge svg { width: 22px; height: 22px; }

.screens {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.screens figure { margin: 0; }
.screens .phone { position: static; width: 100%; transform: none; }
.screens figcaption { text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); margin-top: 12px; }
@media (max-width: 900px) {
  .screens {
    grid-template-columns: repeat(4, 220px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }
  .screens figure { scroll-snap-align: start; }
}

/* ── Pro ────────────────────────────────────────────────────────────── */

.pro {
  position: relative;
  border-radius: 28px;
  padding: 40px;
  background: var(--surface);
  border: 1px solid transparent;
  background-image: linear-gradient(var(--surface), var(--surface)), var(--brand);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 36px;
  align-items: center;
}
@media (max-width: 820px) { .pro { grid-template-columns: 1fr; padding: 28px; } }
.pro-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.pro-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.pro-list li { display: flex; gap: 14px; align-items: flex-start; }
.pro-list .icon-badge { margin: 0; flex: none; }
.pro-list strong { display: block; }
.pro-list span { color: var(--muted); font-size: 15px; }
.free-note { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 15px; margin-top: 18px; }
.free-note svg { color: var(--success); width: 18px; height: 18px; flex: none; }

/* ── FAQ ────────────────────────────────────────────────────────────── */

.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
}
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-weight: 400; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* ── Footer ─────────────────────────────────────────────────────────── */

.site-footer { border-top: 1px solid var(--border); padding: 32px 0 48px; margin-top: 32px; font-size: 14px; color: var(--faint); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--muted); }

/* ── Documents (privacy, terms, support) ────────────────────────────── */

.doc { max-width: 760px; margin: 0 auto; padding: 48px 20px 24px; }
.doc h1 { font-size: clamp(34px, 5vw, 46px); margin-bottom: 8px; }
.doc .updated { color: var(--faint); font-size: 14px; margin: 0 0 32px; }
.doc h2 { font-size: 24px; margin: 40px 0 10px; }
.doc h3 { font-size: 17px; margin: 24px 0 6px; }
.doc p, .doc li { color: var(--muted); }
.doc strong { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 20px 0;
}
.doc .callout p { margin: 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc th { color: var(--text); }
.doc td { color: var(--muted); }
.table-scroll { overflow-x: auto; }

/* ── Centered card (auth links, shared links, 404) ──────────────────── */

.center-page { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 32px 20px 64px; }
.panel {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px 32px;
  text-align: center;
  box-shadow: var(--shadow);
}
.panel .big-icon {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
}
.panel .big-icon svg { width: 36px; height: 36px; }
.panel h1 { font-size: 26px; margin: 0 0 10px; letter-spacing: -0.02em; }
.panel p { color: var(--muted); margin: 0 0 22px; }
.panel .btn { width: 100%; }
.panel .steps { text-align: left; display: grid; gap: 10px; margin-top: 20px; }
.panel .step { display: flex; gap: 12px; align-items: center; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.panel .step b {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
}
.field {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  margin-bottom: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
}
.field:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.status-msg { min-height: 22px; font-size: 14px; margin: 12px 0 0 !important; }
.status-msg.error { color: var(--danger); }
.status-msg.success { color: var(--success); }

[hidden] { display: none !important; }
