/* ============================================================
   Surplus — styles.css
   Dark mode only. SF Pro system font. Apple-style minimalism.
   ============================================================ */

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

:root {
  --bg: #000;
  --bg-card: #000;
  --bg-elevated: #111;
  --border: #1e1e1e;
  --text: #fff;
  --text-secondary: #888;
  --text-tertiary: #444;
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-h: 64px;
  --footer-h: 0px;
}

html, body {
  height: 100vh;
  overflow: hidden;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
}

/* Grain texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.35;
}

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

p {
  color: var(--text-secondary);
}

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

/* ── Layout helpers ─────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Reveal animations ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s var(--transition), transform 0.65s var(--transition);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: #fff;
  color: #000;
}
.btn-primary:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: #444;
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

/* ── Nav ─────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
}
nav.scrolled {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 0 32px;
}

.nav-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #fff;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-cta {
  padding: 10px 18px;
  font-size: 14px;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Hero section — full viewport ────────────────────────── */
#hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--nav-h);
  padding-bottom: var(--footer-h);
  position: relative;
  overflow: hidden;
}

/* Decorative background numbers */
.hero-bg-numbers {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  padding-right: 6%;
  padding-top: var(--nav-h);
  padding-bottom: calc(var(--footer-h) + 120px);
  pointer-events: none;
  user-select: none;
  overflow: hidden;
}
.hero-bg-numbers span {
  font-size: clamp(64px, 11vw, 180px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.88;
  color: transparent;
  -webkit-text-stroke: 1px var(--text-tertiary);
  opacity: 0.6;
  white-space: nowrap;
}

/* Hero main content area — takes remaining height */
.hero-main {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 620px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 5px 13px;
  border-radius: 100px;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hero-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  flex-shrink: 0;
}

.hero-headline {
  font-size: clamp(36px, 5vw, 68px);
  margin-bottom: 14px;
  max-width: 14ch;
}

.hero-sub {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--text-secondary);
  max-width: 48ch;
  margin-bottom: 26px;
  line-height: 1.65;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── How It Works strip — seamless, no visual separation ─── */
.hiw-strip {
  flex-shrink: 0;
  padding-bottom: 36px;
  position: relative;
  z-index: 2;
}

.hiw-steps {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.hiw-step {
  padding: 0 0 0 0;
}

.step-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  color: var(--text-secondary);
}

.step-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.5;
  max-width: 28ch;
}

/* Footer removed */

/* ── Contact Widget ──────────────────────────────────────── */
.contact-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.contact-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: var(--transition);
}
.contact-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}
.contact-widget.active .contact-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

.contact-panel {
  width: 320px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 0.25s var(--transition), transform 0.25s var(--transition);
}
.contact-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.contact-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.contact-panel-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
.contact-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}
.contact-close:hover {
  border-color: #555;
  color: #fff;
}

.contact-panel-note {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}
.contact-panel-note a {
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color var(--transition), border-color var(--transition);
}
.contact-panel-note a:hover {
  color: #fff;
  border-color: #fff;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-group label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
  resize: none;
  width: 100%;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-tertiary);
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: #555;
}
.form-group textarea {
  min-height: 72px;
}

.form-submit {
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 14px;
  margin-top: 4px;
}

/* ── Download Page ───────────────────────────────────────── */
.download-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.download-logo {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: #fff;
  margin-bottom: 56px;
}

.download-headline {
  font-size: clamp(40px, 8vw, 80px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 16px;
}

.download-sub {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 52px;
}

.download-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 320px;
}

.store-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 32px;
  border-radius: 100px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.store-btn-apple {
  background: #fff;
  color: #000;
}
.store-btn-apple:hover {
  background: #e8e8e8;
  transform: translateY(-2px);
}

.store-btn-google {
  background: transparent;
  color: #fff;
  border: 1px solid var(--border);
}
.store-btn-google:hover {
  border-color: #444;
  background: var(--bg-elevated);
  transform: translateY(-2px);
}

.download-note {
  margin-top: 32px;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --nav-h: 56px;
    --footer-h: 0px;
  }

  /* Nav: hamburger on mobile */
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(0, 0, 0, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 0;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links .nav-cta {
    margin: 8px 20px 4px;
    text-align: center;
    display: flex;
    justify-content: center;
    border-radius: var(--radius);
    padding: 13px;
  }
  .nav-hamburger { display: flex; }
  .nav-inner { padding: 0 20px; }

  /* Hero */
  .hero-bg-numbers { display: none; }
  .hero-main {
    align-items: flex-start;
    padding-top: 28px;
  }
  .container { padding: 0 20px; }
  .hero-eyebrow { margin-bottom: 14px; font-size: 11px; }
  .hero-headline {
    font-size: clamp(30px, 9vw, 46px);
    margin-bottom: 12px;
  }
  .hero-sub {
    font-size: 14px;
    margin-bottom: 20px;
    max-width: 100%;
  }
  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }
  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
    padding: 14px;
  }

  /* Steps: vertical stack */
  .hiw-steps { grid-template-columns: 1fr; }
  .hiw-step { padding: 8px 0; }
  .step-title { font-size: 13px; }
  .step-desc { max-width: none; font-size: 12px; }
  .hiw-strip { padding-bottom: 28px; }

  /* Contact widget */
  .contact-widget { right: 16px; bottom: 20px; }
  .contact-panel { width: calc(100vw - 32px); max-width: 320px; }
}

@media (max-width: 480px) {
  .hero-headline { font-size: clamp(26px, 8vw, 38px); }
  .hero-sub { font-size: 13px; }
}
