/* ============================================================================
   Ballsy — Landing
   Aesthetic: Superhuman editorial luxury · emerald palette
   Typography: Bricolage Grotesque (variable) at non-standard weights 460/540
   Two radii: 8px and 16px. Single accent: Mint Glow. Warm-cream CTAs.
   ============================================================================ */

/* ─── Reset ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ─── Tokens ───────────────────────────────────────────────────────────── */
:root {
  /* Surfaces */
  --canvas:        #ffffff;            /* Pure White - body */
  --hero-deep:     #042b1d;            /* Forest Deep - hero base */
  --hero-mid:      #064e3b;            /* mid emerald */
  --hero-edge:     #0a3d2c;            /* gradient edge */

  /* Ink */
  --ink:           #1f2421;            /* Charcoal Ink - warm near-black */
  --ink-soft:      #4a524d;            /* secondary text */
  --ink-mute:      #7e857f;            /* muted */

  /* Cream / borders */
  --cream:         #ede8db;            /* Warm Cream - primary CTA */
  --cream-edge:    #d8d2c3;            /* slightly darker cream for press */
  --parchment:     #e3ddd1;            /* Parchment Border */

  /* Brand emerald */
  --emerald:       #10b981;            /* primary brand */
  --emerald-deep:  #047857;            /* link / hover */
  --mint-glow:     #a7f3d0;            /* singular accent (Lavender's role) */
  --mint-soft:     #d1fae5;

  /* Hero text on emerald */
  --on-dark-95:    rgba(255, 255, 255, 0.95);
  --on-dark-80:    rgba(255, 255, 255, 0.80);
  --on-dark-60:    rgba(255, 255, 255, 0.60);
  --on-dark-line:  rgba(255, 255, 255, 0.18);

  /* Radius - only two */
  --r-sm:          8px;
  --r-lg:          16px;

  /* Layout */
  --container:     1180px;
  --gutter:        clamp(1.25rem, 4vw, 2rem);

  /* Typography */
  --font-display:  'Bricolage Grotesque', 'Söhne', 'Inter Tight', system-ui, sans-serif;
  --font-body:     'Bricolage Grotesque', 'Söhne', 'Inter Tight', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --ease:          cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Base ─────────────────────────────────────────────────────────────── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  background: var(--canvas);
}

body {
  font-family: var(--font-body);
  font-variation-settings: "wght" 460;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection { background: var(--mint-glow); color: var(--ink); }

/* ─── Layout ───────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.section--tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }

main { position: relative; }

/* ─── Nav ──────────────────────────────────────────────────────────────── */
.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 50;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--on-dark-95);
}
.brand__mark {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  background: var(--cream);
  display: grid; place-items: center;
  color: var(--hero-deep);
  font-variation-settings: "wght" 700;
  font-size: 14px;
}
.brand__text {
  font-family: var(--font-display);
  font-variation-settings: "wght" 540;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav__link {
  color: var(--on-dark-80);
  font-size: 0.95rem;
  font-variation-settings: "wght" 460;
  padding: 0.5rem 0.875rem;
  border-radius: var(--r-sm);
  transition: color 0.15s, background 0.15s;
}
.nav__link:hover { color: var(--on-dark-95); background: rgba(255,255,255,0.06); }

.nav__cta {
  background: var(--cream);
  color: var(--ink);
  padding: 0.55rem 1.1rem;
  border-radius: var(--r-sm);
  font-size: 0.95rem;
  font-variation-settings: "wght" 540;
  margin-left: 0.5rem;
  transition: background 0.15s, transform 0.15s;
}
.nav__cta:hover { background: #f6f1e3; transform: translateY(-1px); }

@media (max-width: 760px) {
  .nav__link--hide-mobile { display: none; }
}

/* ─── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(167, 243, 208, 0.10), transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(16, 185, 129, 0.18), transparent 60%),
    linear-gradient(180deg, var(--hero-deep) 0%, var(--hero-edge) 60%, #0d4a36 100%);
  color: var(--on-dark-95);
  padding-top: clamp(7rem, 14vw, 10rem);
  padding-bottom: clamp(5rem, 8vw, 7rem);
  overflow: hidden;
}

.hero::before {
  /* film grain */
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  opacity: 0.04;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero__inner { position: relative; z-index: 1; text-align: center; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.875rem;
  background: rgba(167, 243, 208, 0.08);
  border: 1px solid rgba(167, 243, 208, 0.22);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mint-glow);
  margin-bottom: 2rem;
}
.hero__eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mint-glow);
  box-shadow: 0 0 8px var(--mint-glow);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.45; transform: scale(0.85);} }

.hero__title {
  font-family: var(--font-display);
  font-variation-settings: "wght" 540;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  margin: 0 auto 1.75rem;
  max-width: 18ch;
  color: var(--on-dark-95);
}
.hero__title em {
  font-style: italic;
  font-variation-settings: "wght" 460;
  color: var(--mint-glow);
}

.hero__subtitle {
  font-family: var(--font-body);
  font-variation-settings: "wght" 460;
  font-size: clamp(1.05rem, 1.75vw, 1.25rem);
  line-height: 1.5;
  color: var(--on-dark-80);
  max-width: 38rem;
  margin: 0 auto 2.5rem;
}

.hero__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--r-sm);
  font-size: 1rem;
  font-variation-settings: "wght" 540;
  transition: background 0.15s, color 0.15s, transform 0.15s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--cream {
  background: var(--cream);
  color: var(--ink);
}
.btn--cream:hover { background: #f6f1e3; }

.btn--ghost-dark {
  background: transparent;
  color: var(--on-dark-95);
  border: 1px solid var(--on-dark-line);
}
.btn--ghost-dark:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.32); }

.btn--ink {
  background: var(--ink);
  color: var(--canvas);
}
.btn--ink:hover { background: #2d3330; }

.btn--lg { padding: 1rem 1.75rem; font-size: 1rem; }

/* Status pill */
.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.875rem;
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--on-dark-line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--on-dark-60);
}
.hero__status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--on-dark-60);
}
.hero__status-dot.is-ok   { background: var(--mint-glow); box-shadow: 0 0 6px var(--mint-glow); }
.hero__status-dot.is-slow { background: #fcd34d; box-shadow: 0 0 6px #fcd34d; }
.hero__status-dot.is-down { background: #fca5a5; }

/* ─── Hero preview (chat) ─────────────────────────────────────────────── */
.preview {
  margin: 4rem auto 0;
  max-width: 720px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--on-dark-line);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  position: relative;
}
.preview__bar {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  opacity: 0.5;
}
.preview__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--on-dark-line); }

.preview__chat { display: flex; flex-direction: column; gap: 1rem; }
.preview__msg {
  padding: 0.85rem 1.125rem;
  border-radius: var(--r-lg);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 78%;
  font-variation-settings: "wght" 460;
  animation: msgIn 0.7s var(--ease) backwards;
}
.preview__msg--user {
  align-self: flex-end;
  background: var(--cream);
  color: var(--ink);
  border-bottom-right-radius: var(--r-sm);
  animation-delay: 0.25s;
}
.preview__msg--bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  color: var(--on-dark-95);
  border: 1px solid var(--on-dark-line);
  border-bottom-left-radius: var(--r-sm);
  animation-delay: 0.85s;
}
.preview__msg--bot strong { color: var(--mint-glow); font-variation-settings: "wght" 540; }
@keyframes msgIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Section header ──────────────────────────────────────────────────── */
.section__head {
  max-width: 38rem;
  margin: 0 auto 3.5rem;
  text-align: center;
}
.section__eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--emerald-deep);
  margin-bottom: 1rem;
}
.section__title {
  font-family: var(--font-display);
  font-variation-settings: "wght" 460;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 1rem;
}
.section__sub {
  font-variation-settings: "wght" 460;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0;
}

/* ─── Features ─────────────────────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.feature {
  background: var(--canvas);
  border: 1px solid var(--parchment);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  transition: border-color 0.2s;
}
.feature:hover { border-color: var(--ink); }
.feature__icon {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  background: var(--mint-soft);
  color: var(--emerald-deep);
  display: grid; place-items: center;
  margin-bottom: 1.25rem;
}
.feature__title {
  font-family: var(--font-display);
  font-variation-settings: "wght" 540;
  font-size: 1.15rem;
  line-height: 1.14;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 0.5rem;
}
.feature__desc {
  font-variation-settings: "wght" 460;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

/* ─── Steps (numbered, editorial) ─────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  border-top: 1px solid var(--parchment);
  border-left: 1px solid var(--parchment);
}
.step {
  background: var(--canvas);
  padding: 1.75rem;
  border-right: 1px solid var(--parchment);
  border-bottom: 1px solid var(--parchment);
}
.step__num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--emerald-deep);
  margin-bottom: 1rem;
  display: block;
}
.step h3 {
  font-family: var(--font-display);
  font-variation-settings: "wght" 540;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.5rem;
}
.step p {
  font-variation-settings: "wght" 460;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}

/* ─── Examples ─────────────────────────────────────────────────────────── */
.examples-band {
  background: #faf8f3;
}
.examples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.example {
  background: var(--canvas);
  border: 1px solid var(--parchment);
  border-radius: var(--r-lg);
  padding: 1.5rem;
}
.example__head {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--parchment);
}
.example__icon {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  background: var(--mint-soft);
  color: var(--emerald-deep);
  display: grid; place-items: center;
}
.example__title {
  font-family: var(--font-display);
  font-variation-settings: "wght" 540;
  font-size: 0.98rem;
  margin: 0;
  color: var(--ink);
}
.example__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.example__item {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.5;
  padding-left: 1rem;
  position: relative;
}
.example__item::before {
  content: '"';
  position: absolute;
  left: 0;
  color: var(--emerald);
  font-family: var(--font-display);
  font-variation-settings: "wght" 700;
}

/* ─── Tech ─────────────────────────────────────────────────────────────── */
.tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.tech__badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.45rem 0.875rem;
  background: var(--canvas);
  border: 1px solid var(--parchment);
  border-radius: var(--r-sm);
  color: var(--ink-soft);
}

/* ─── FAQ ──────────────────────────────────────────────────────────────── */
.faq { max-width: 740px; margin: 0 auto; }
.faq__item {
  border-bottom: 1px solid var(--parchment);
}
.faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.5rem 0;
  font-family: var(--font-display);
  font-variation-settings: "wght" 540;
  font-size: 1.1rem;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: color 0.15s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--emerald-deep); }
.faq__item summary::after {
  content: '+';
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-variation-settings: "wght" 460;
  color: var(--ink-mute);
  transition: transform 0.25s var(--ease);
  flex-shrink: 0;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__body {
  padding: 0 0 1.5rem;
  color: var(--ink-soft);
  font-variation-settings: "wght" 460;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 60ch;
}
.faq__body code {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  background: var(--mint-soft);
  color: var(--emerald-deep);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

/* ─── Closing CTA (echo of the hero) ───────────────────────────────────── */
.cta-band {
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(167, 243, 208, 0.12), transparent 70%),
    linear-gradient(180deg, var(--hero-deep) 0%, var(--hero-edge) 100%);
  color: var(--on-dark-95);
  text-align: center;
  border-radius: var(--r-lg);
  padding: clamp(3.5rem, 6vw, 5rem) 1.5rem;
  position: relative;
  overflow: hidden;
}
.cta-band__title {
  font-family: var(--font-display);
  font-variation-settings: "wght" 540;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0 0 0.875rem;
}
.cta-band__sub {
  color: var(--on-dark-80);
  font-variation-settings: "wght" 460;
  font-size: 1.05rem;
  margin: 0 0 2rem;
}

/* ─── Footer ───────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--parchment);
  padding: 2.25rem 0;
  margin-top: 1.5rem;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--ink-mute);
  font-variation-settings: "wght" 460;
}
.footer__links { display: flex; gap: 1.25rem; }
.footer__links a { color: var(--ink-mute); transition: color 0.15s; }
.footer__links a:hover { color: var(--emerald-deep); }

/* ─── Reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── Mobile polish ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding-top: 6.5rem; padding-bottom: 4rem; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .preview { padding: 1.25rem; }
  .preview__msg { font-size: 0.88rem; max-width: 90%; }
  .footer__inner { flex-direction: column; text-align: center; }
}
