/* Vibecom site — shared styles. No external fonts, no JS required. */

:root {
  color-scheme: dark;
  /* Matches the app's call-screen gradient (CallScreen.swift background) */
  --bg: #0b0e13;
  --bg-deep: #040508;
  --surface: #121419;
  --surface-2: #181c23;
  --line: #262b35;
  --text: #e8ebf0;
  --text-dim: #9aa3b2;
  --accent: #30d158;          /* iOS system green, used sparingly */
  --accent-dim: rgba(48, 209, 88, 0.14);
  --glow: rgba(84, 69, 235, 0.22); /* icon indigo */
  --warn: #ffb340;
  --warn-dim: rgba(255, 179, 64, 0.12);
  --radius: 14px;
  --measure: 70ch;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
@media (max-width: 28rem) { html { scroll-padding-top: 8rem; } } /* nav wraps to two rows */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 400 clamp(1rem, 0.95rem + 0.25vw, 1.0625rem)/1.6 var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(60rem 30rem at 50% -8rem, var(--glow), transparent 70%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-deep) 55%, #090b10 100%);
  background-attachment: fixed;
}

main { flex: 1; }

a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

img { max-width: 100%; height: auto; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.35rem, 1.15rem + 1vw, 1.75rem); font-weight: 650; margin-top: 2.5rem; }
h3 { font-size: 1.125rem; font-weight: 600; margin-top: 1.75rem; }
p, ul, ol, dl { margin: 0 0 1rem; }
li + li { margin-top: 0.35rem; }

code, kbd {
  font: 0.9em var(--mono);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1em 0.35em;
}

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

.wrap { width: min(100% - 2rem, 68rem); margin-inline: auto; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--accent); color: #000; padding: 0.5rem 1rem; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* Header / nav */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(11, 14, 19, 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-nav {
  width: min(100% - 2rem, 68rem); margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.25rem 1rem; padding-block: 0.6rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--text); text-decoration: none; font-weight: 650; font-size: 1.0625rem;
}
.brand img {
  width: 32px; height: 32px; border-radius: 8px;
}
.nav-links { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav-links li + li { margin-top: 0; }
.nav-links a {
  display: block; padding: 0.55rem 0.8rem; min-height: 44px; line-height: 1.6;
  color: var(--text-dim); text-decoration: none; border-radius: 999px; font-size: 0.95rem;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 28rem) {
  .nav-links { width: 100%; justify-content: space-between; }
  .nav-links a { padding-inline: 0.6rem; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; padding-block: 2rem; color: var(--text-dim); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 0; }
.site-footer a { color: var(--text-dim); display: inline-block; padding-block: 0.6rem; }
.site-footer a:hover { color: var(--text); }
.site-footer p { margin: 0; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.7rem 1.4rem; border-radius: 999px;
  font-weight: 600; text-decoration: none;
  background: var(--accent); color: #04120a;
}
.button:hover { filter: brightness(1.08); }
.button.secondary { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }

/* Landing */
.hero { text-align: center; padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 5vw, 3.5rem); }
.hero-icon {
  width: clamp(104px, 22vw, 144px); height: auto; border-radius: 22.5%;
  box-shadow: 0 20px 60px -10px var(--glow);
  display: block; margin: 0 auto 1.5rem;
}
.hero .lede { margin-inline: auto; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1.75rem; }

.lede { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); color: var(--text-dim); max-width: 40rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 0.75rem;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

.section { padding-block: 2rem; }
.section > h2:first-child { margin-top: 0; }

.grid + p { margin-top: 1rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

/* Document pages (privacy / support / terms) */
.doc { width: min(100% - 2rem, var(--measure)); margin-inline: auto; padding-block: clamp(2rem, 6vw, 4rem) 0; }
.doc-header { border-bottom: 1px solid var(--line); padding-bottom: 1.5rem; margin-bottom: 1.5rem; }
.doc-header h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.6rem); }
.meta { color: var(--text-dim); font-size: 0.9rem; margin: 0; }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 2rem; }
.toc h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin: 0 0 0.5rem; }
.toc ol { margin: 0; padding-left: 1.25rem; }
.toc a { color: var(--text); text-decoration: none; display: inline-block; padding-block: 0.15rem; }
.toc a:hover { color: var(--accent); }


.callout {
  background: var(--accent-dim); border: 1px solid rgba(48, 209, 88, 0.3); border-left: 4px solid var(--accent);
  border-radius: 10px; padding: 1rem 1.25rem; margin: 1.25rem 0;
}
.callout.warn { background: var(--warn-dim); border-color: rgba(255, 179, 64, 0.3); border-left-color: var(--warn); }
.callout > :last-child { margin-bottom: 0; }

ol.steps { list-style: none; counter-reset: step; padding: 0; display: grid; gap: 0.75rem; }
ol.steps > li {
  counter-increment: step; position: relative; margin: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.25rem 1rem 3.75rem;
}
ol.steps > li::before {
  content: counter(step); position: absolute; left: 1.1rem; top: 1rem;
  width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 0.9rem; color: var(--accent); background: var(--accent-dim);
}
ol.steps > li > :first-child { margin-top: 0; }
ol.steps > li > :last-child { margin-bottom: 0; }

dl.facts { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: 0.5rem 1.25rem; }
dl.facts dt { color: var(--text-dim); }
dl.facts dd { margin: 0; }
@media (max-width: 30rem) { dl.facts { grid-template-columns: 1fr; } dl.facts dd { margin-bottom: 0.5rem; } }

/* FAQ: native details/summary */
details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 0.75rem; }
summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 0.9rem 3rem 0.9rem 1.25rem; min-height: 48px; font-weight: 600;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 1.25rem; top: 50%; width: 0.5rem; height: 0.5rem;
  border-right: 2px solid var(--text-dim); border-bottom: 2px solid var(--text-dim);
  transform: translateY(-70%) rotate(45deg);
}
details[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
summary:hover { color: var(--accent); }
details > :not(summary) { margin-inline: 1.25rem; }
details > :last-child:not(summary) { margin-bottom: 1rem; }

/* Placeholder banner for content still under review */
.draft-notice {
  background: var(--warn-dim); color: var(--text); border: 1px dashed rgba(255, 179, 64, 0.45);
  border-radius: 10px; padding: 0.75rem 1rem; margin: 0 0 1.5rem; font-size: 0.95rem;
}
.draft-notice::before { content: "Draft · "; color: var(--warn); font-weight: 700; }
.draft-notice > :last-child { margin-bottom: 0; }

@media print {
  :root { --text: #000; --text-dim: #444; --line: #bbb; --surface: #fff; --surface-2: #f3f3f3; --accent: #0a6b2a; --warn: #8a5a00; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header { position: static; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-links, .skip-link, .toc, .hero-actions { display: none; }
  .callout, .callout.warn, .draft-notice, ol.steps > li::before { background: none; }
  .card, details, ol.steps > li, .callout, details { break-inside: avoid; }
  details::details-content { content-visibility: visible; display: block; } /* prints closed FAQ answers (Chrome 131+) */
  a { color: inherit; }
  .hero-icon, .brand img { box-shadow: none; }
  .doc a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}
