/* ============================================================
   VIGIL — shared stylesheet for index.html, demo.html, thank-you.html
   Palette matches the iOS app exactly. No external fonts, no imports.
   ============================================================ */

:root {
  --bg: #000000;
  --surface: #16161A;
  --surface2: #232329;
  --border: #2E2E34;
  --text: #F5F5F7;
  --text2: #9B9BA3;
  --text3: #5A5A62;
  --green: #32D74B;
  --red: #FF453A;
  --blue: #0A84FF;
  --nav-h: 60px;
}

/* ============ Base ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; }
p { color: var(--text2); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(50, 215, 75, 0.28); }
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section { padding: 104px 0; }
.center { text-align: center; }

.eyebrow {
  display: block;
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  margin-bottom: 16px;
}

.section-lede { font-size: 18px; line-height: 1.7; max-width: 640px; }
.center .section-lede { margin-left: auto; margin-right: auto; }

/* ============ Buttons ============ */
.btn {
  display: inline-block;
  background: var(--green);
  color: #000;
  font-weight: 700;
  font-size: 17px;
  padding: 16px 32px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  box-shadow: 0 0 24px rgba(50, 215, 75, 0.25);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.btn:hover { opacity: 0.88; transform: scale(1.02); text-decoration: none; }
.btn:active { opacity: 1; transform: scale(1); }
.btn-small { font-size: 15px; padding: 10px 18px; box-shadow: 0 0 16px rgba(50, 215, 75, 0.2); }
.btn-block { display: block; width: 100%; text-align: center; }

/* ============ Nav (identical on all pages) ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.wordmark {
  color: var(--green);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-decoration: none;
}
.wordmark:hover { text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 26px; }
.nav-links { display: flex; gap: 26px; list-style: none; }
.nav-links a {
  color: var(--text2);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}
.nav-toggle svg { display: block; width: 24px; height: 24px; }

.nav-menu {
  display: none;
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 8px 24px 16px;
  list-style: none;
}
.nav-menu.open { display: block; }
.nav-menu a {
  display: block;
  padding: 13px 4px;
  color: var(--text2);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.nav-menu li:last-child a { border-bottom: none; }
.nav-menu a:hover { color: var(--text); text-decoration: none; }

/* ============ Icons ============ */
.icn { width: 24px; height: 24px; color: var(--green); }
.icn-red { color: var(--red); }

/* ============ Hero ============ */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 72px 24px 88px;
}
.hero-wordmark {
  color: var(--green);
  font-size: clamp(48px, 8vw, 72px);
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.1;
}
.hero-tagline {
  margin-top: 22px;
  font-size: clamp(19px, 2.6vw, 24px);
  line-height: 1.45;
  color: var(--text2);
  max-width: 660px;
}
.hero .btn { margin-top: 38px; }
.hero-note { margin-top: 16px; font-size: 14px; color: var(--text3); }

.hero-media-placeholder {
  margin-top: 64px;
  width: 100%;
  max-width: 1000px;
  min-height: 400px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  font-size: 14px;
  padding: 24px;
  text-align: center;
}

/* ============ Why section ============ */
.narrow { max-width: 720px; margin: 0 auto; }
.bridge {
  margin-top: 28px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

/* ============ How it works ============ */
.steps {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  text-align: left;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 22px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.step:hover { border-color: #3E3E46; transform: translateY(-2px); }
.step-num {
  font-size: 64px;
  font-weight: 200;
  line-height: 1;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.step-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 8px;
}
.step h3 { font-size: 18px; }
.step p { font-size: 15px; line-height: 1.55; }

/* ============ Features ============ */
.features-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  text-align: left;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.feature:hover { border-color: #3E3E46; transform: translateY(-2px); }
.feature .icn { margin-bottom: 16px; }
.feature h3 { font-size: 17.5px; margin-bottom: 8px; }
.feature p { font-size: 15px; line-height: 1.55; }

/* ============ Privacy strip ============ */
.privacy { background: var(--surface); }
.trust-points {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  text-align: left;
}
.trust-point { padding: 0 4px; }
.trust-point .icn { margin-bottom: 14px; }
.trust-point h3 { font-size: 16.5px; margin-bottom: 6px; }
.trust-point p { font-size: 14.5px; line-height: 1.55; }
.privacy-body {
  margin: 44px auto 0;
  max-width: 760px;
  font-size: 16px;
  line-height: 1.7;
}
.privacy-links { margin-top: 28px; font-size: 15px; color: var(--text3); }
.privacy-links a { color: var(--blue); margin: 0 10px; }
.privacy-links a:hover { text-decoration: underline; }

/* ============ Contact ============ */
.contact-sub { max-width: 560px; margin: 0 auto; font-size: 17px; line-height: 1.7; }
.contact .btn { margin-top: 34px; }
.contact-alt { margin-top: 20px; font-size: 15px; color: var(--text3); }

/* ============ Footer ============ */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 26px 0;
  font-size: 13px;
  color: var(--text3);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 20px; list-style: none; }
.footer-links a { color: var(--text3); }
.footer-links a:hover { color: var(--text2); }

/* ============ Form pages (demo.html) ============ */
.page { padding: 72px 0 104px; }
.form-wrap { max-width: 560px; margin: 0 auto; padding: 0 24px; }
.back-link {
  display: inline-block;
  margin-bottom: 34px;
  font-size: 14px;
  color: var(--text3);
}
.back-link:hover { color: var(--text2); text-decoration: none; }
.form-heading { font-size: clamp(32px, 5vw, 40px); font-weight: 700; }
.form-sub { margin-top: 14px; font-size: 18px; line-height: 1.7; }

.demo-form { margin-top: 48px; }
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text2);
  margin-bottom: 6px;
  font-weight: 600;
}
.req { color: var(--green); font-size: 12px; vertical-align: super; }

.field input,
.field select,
.field textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text3); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(50, 215, 75, 0.15);
}
.field textarea { resize: vertical; min-height: 88px; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239B9BA3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}

.form-privacy-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text3);
  text-align: center;
  line-height: 1.6;
}
.form-privacy-note a { color: var(--blue); }

/* ============ Thank-you page ============ */
.ty {
  max-width: 480px;
  margin: 0 auto;
  padding: 120px 24px 140px;
  text-align: center;
}
.ty-check {
  width: 80px;
  height: 80px;
  color: var(--green);
  margin: 0 auto 32px;
  display: block;
}
.ty h1 { font-size: 40px; font-weight: 700; }
.ty-body { margin-top: 16px; font-size: 18px; line-height: 1.7; }
.ty-secondary { margin-top: 12px; font-size: 16px; color: var(--text3); }
.ty-back {
  display: inline-block;
  margin-top: 40px;
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}
.ty-back:hover { text-decoration: underline; }

/* ============ Reveal on scroll (JS adds .js to <html>; content always
   visible without JS, and prefers-reduced-motion disables it) ============ */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.65s ease, transform 0.65s ease;
  }
  .js .reveal.visible { opacity: 1; transform: none; }
}

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-points { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 767px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 72px 0; }
  .steps { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 20px 72px; }
  .hero-media-placeholder { min-height: 300px; margin-top: 52px; }
  .page { padding: 48px 0 80px; }
  .ty { padding: 88px 20px 110px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 375px) {
  .container, .form-wrap { padding: 0 18px; }
  .btn { padding: 15px 24px; font-size: 16px; }
  .nav-inner { padding: 0 16px; }
}
