/* ============================================================
   Ironspire — landing page styles
   Dark theme inspired by operonsolutions.com
   bg #000 · fg #fff · accent #d8fe91 (lime)
   Headlines: Instrument Serif · Body: Inter
   ============================================================ */

:root {
  --bg: #000000;
  --fg: #ffffff;
  --accent: #d8fe91;
  --fg-90: rgba(255, 255, 255, 0.9);
  --fg-70: rgba(255, 255, 255, 0.7);
  --fg-55: rgba(255, 255, 255, 0.55);
  --fg-40: rgba(255, 255, 255, 0.4);
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.06);
  --surface: rgba(255, 255, 255, 0.03);
  --radius: 12px;
  --radius-sm: 8px;
  --container: 1200px;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

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

.container-narrow { max-width: 820px; }

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.12; }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.1; }
h3 { font-size: 1.15rem; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }
h4 { font-weight: 500; }

sup { font-size: 0.62em; color: var(--fg-40); }

::selection { background: var(--accent); color: #000; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  font-family: inherit;
}

.btn-primary {
  color: #000;
  background: linear-gradient(#e4ff9f 0%, #c8ee75 100%);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.4),
    inset 0 -2px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.2);
}
.btn-primary:hover {
  background: linear-gradient(#eeffb8 0%, #d8fe91 100%);
}

.btn-ghost {
  background: var(--surface);
  color: var(--fg-90);
  border-color: rgba(255, 255, 255, 0.15);
  font-weight: 500;
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.4); color: var(--fg); }

.btn-sm { padding: 9px 20px; font-size: 13px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.8rem;
  letter-spacing: 0.005em;
  color: var(--fg);
  text-decoration: none;
  line-height: 1;
  transition: color 0.2s ease;
}
.logo:hover { color: var(--accent); }

.main-nav {
  display: flex;
  gap: 32px;
}

.main-nav a {
  color: var(--fg-55);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}
.main-nav a:hover { color: var(--fg); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10%;
  height: 60%;
  background: var(--bg);
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.9) 100%
  );
}

.hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8rem;
  pointer-events: none;
  background: linear-gradient(to top, var(--bg), transparent);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 960px;
  padding: 0 24px;
  transform: translateY(-8vh);
}

.hero-glow {
  position: absolute;
  inset: -40px -64px;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(
    ellipse 62% 58% at 50% 48%,
    var(--bg) 0%,
    rgba(0, 0, 0, 0.65) 55%,
    transparent 78%
  );
}

.hero h1 {
  margin-bottom: 40px;
  animation: rise 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 28px;
  animation: rise 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

.badge-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--accent);
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  animation: rise 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Placeholder images ---------- */
.placeholder-img {
  width: 100%;
  background: #0c0c0c;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  object-fit: cover;
}

.placeholder-img-dark {
  background: #0c0c0c;
  border-color: rgba(255, 255, 255, 0.18);
}

/* ---------- Stats bar ---------- */
.stats-bar {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 56px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.stat-value {
  display: block;
  font-family: var(--serif);
  font-size: 2.4rem;
  letter-spacing: -0.02em;
  color: var(--fg);
  line-height: 1.1;
}

.stat-label {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--fg-40);
  line-height: 1.5;
}

/* ---------- Sections ---------- */
.section {
  padding: 128px 0;
  border-top: 1px solid var(--line-soft);
}

.section-alt { background: transparent; }

.section-head {
  max-width: 680px;
  margin-bottom: 72px;
}

/* Page-level h1 inside a section head renders at h2 scale */
.section-head h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.1; }

.section-head p {
  margin-top: 20px;
  color: var(--fg-55);
  font-size: 17px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-40);
  margin-bottom: 20px;
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent);
  flex-shrink: 0;
}

.eyebrow-light { color: var(--fg-40); }

/* ---------- How it works cards ---------- */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

.card-media { margin-bottom: 22px; }
.card-media img { aspect-ratio: 16 / 10; border-radius: var(--radius-sm); }

.card-step {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.card h3 { margin: 10px 0 10px; }
.card p { color: var(--fg-55); font-size: 14px; line-height: 1.65; }

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: border-color 0.3s ease;
}

.feature:hover { border-color: rgba(255, 255, 255, 0.18); }

.feature-num {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.feature h3 { margin-bottom: 10px; font-size: 1.02rem; }
.feature p { color: var(--fg-55); font-size: 14px; line-height: 1.65; }

/* ---------- Split sections ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.split-copy p { margin-top: 18px; color: var(--fg-55); font-size: 15px; }
.split-copy p strong { color: var(--fg-90); font-weight: 600; }
.split-copy .btn { margin-top: 32px; }
.split-media img { aspect-ratio: 4 / 3; border-radius: var(--radius); }

/* ---------- Dark section (now same dark canvas) ---------- */
.section-dark { color: var(--fg); }
.section-dark h2 { color: var(--fg); }

.check-list {
  list-style: none;
  margin-top: 30px;
  display: grid;
  gap: 20px;
}

.check-list li {
  position: relative;
  padding-left: 36px;
  color: var(--fg-55);
  font-size: 15px;
}

.check-list li strong { color: var(--fg); font-weight: 600; }

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: rgba(216, 254, 145, 0.12);
  border: 1px solid var(--accent);
}

.check-list li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 9px;
  width: 8px;
  height: 5px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 12px; }

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.faq-item[open],
.faq-item:hover { border-color: rgba(255, 255, 255, 0.18); }

.faq-item summary {
  cursor: pointer;
  padding: 20px 24px;
  font-weight: 500;
  font-size: 15px;
  list-style: none;
  position: relative;
  padding-right: 52px;
  color: var(--fg-90);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--fg-40);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.faq-item p {
  padding: 0 24px 20px;
  color: var(--fg-55);
  font-size: 14px;
  line-height: 1.65;
}

/* ---------- Waitlist CTA ---------- */
.section-cta {
  background: radial-gradient(
    800px 400px at 50% 130%,
    rgba(216, 254, 145, 0.07),
    transparent 65%
  );
}

.cta-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 64px 52px;
  text-align: center;
}

.cta-box .eyebrow { justify-content: center; }

.cta-box p {
  margin-top: 16px;
  color: var(--fg-55);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  font-size: 15px;
}

.waitlist-form { margin-top: 36px; }

.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.waitlist-form input,
.waitlist-form select {
  flex: 1;
  padding: 13px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
  transition: border-color 0.2s ease;
  min-width: 0;
}

.waitlist-form input::placeholder { color: var(--fg-40); }

.waitlist-form input:focus,
.waitlist-form select:focus { border-color: var(--accent); }

.waitlist-form select { appearance: auto; color: var(--fg-55); }
.waitlist-form select option { background: #111; color: var(--fg); }

.waitlist-substep[hidden] { display: none; }

.waitlist-substep .substep-lead {
  color: var(--accent);
  font-size: 15px;
  margin-bottom: 16px;
}

.waitlist-substep .substep-lead strong {
  color: var(--fg);
  font-weight: 500;
}

.substep-alt {
  margin-top: 6px;
  font-size: 13px;
  color: var(--fg-40);
}

.btn-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-link:disabled { opacity: 0.5; cursor: default; }

.waitlist-form input.code-input {
  flex: 0 1 180px;
  letter-spacing: 7px;
  font-size: 16px;
  text-align: center;
}

#waitlistVerify .form-row { justify-content: center; }

/* --- Country picker --- */

.country-select {
  position: relative;
  flex: 0 0 auto;
}

.country-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.country-trigger:hover,
.country-trigger[aria-expanded="true"] { border-color: var(--accent); }

.country-caret { color: var(--fg-40); flex: none; }

.country-flag { font-size: 16px; line-height: 1; }

.country-panel {
  position: absolute;
  z-index: 20;
  bottom: calc(100% + 6px);
  left: 0;
  width: 290px;
  max-width: 78vw;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: #111;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.country-panel.drop-below {
  bottom: auto;
  top: calc(100% + 6px);
}

.country-panel[hidden] { display: none; }

.waitlist-form .country-panel .country-search {
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
  margin-bottom: 6px;
}

.country-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
  text-align: left;
}

.country-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--fg-55);
  cursor: pointer;
}

.country-option.is-active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg);
}

.country-option .country-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-option .country-dial { color: var(--fg-40); font-variant-numeric: tabular-nums; }

.btn-skip {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--fg-40);
  cursor: pointer;
  padding: 13px 10px;
  transition: color 0.2s ease;
}

.btn-skip:hover { color: var(--fg); }

.form-status {
  min-height: 1.4em;
  font-size: 13px;
  margin-top: 10px;
  color: var(--fg-55);
}

.form-status.ok { color: var(--accent); }
.form-status.err { color: #ff6568; }

.cta-box p.form-consent {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--fg-40);
}

.form-consent a {
  color: var(--fg-55);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.form-consent a:hover { color: var(--fg); }

/* ---------- Legal pages (privacy / terms) ---------- */
.legal-meta {
  margin-top: 16px;
  font-size: 13px;
  color: var(--fg-40);
}

.legal-body { margin-top: 24px; }

.legal-body h2 {
  font-size: 1.7rem;
  margin: 48px 0 14px;
}

.legal-body p,
.legal-body li {
  color: var(--fg-55);
  font-size: 15px;
  line-height: 1.75;
}

.legal-body p { margin-bottom: 14px; }

.legal-body ul {
  padding-left: 22px;
  margin-bottom: 14px;
}

.legal-body li { margin-bottom: 8px; }

.legal-body a {
  color: var(--accent);
  text-decoration: none;
}

.legal-body a:hover { text-decoration: underline; }

.legal-body strong { color: var(--fg-90); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line-soft);
  color: var(--fg-40);
  padding: 72px 0 40px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line-soft);
}

.logo-light { color: var(--fg); }

.footer-brand p { margin-top: 14px; max-width: 260px; }

.footer-col h4 {
  color: var(--fg);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}

.footer-col a {
  display: block;
  color: var(--fg-40);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.2s ease;
}

.footer-col a:hover { color: var(--fg); }

.footer-bottom { padding-top: 32px; }

.footer-sources,
.footer-disclaimer {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 12px;
  line-height: 1.6;
}

.footer-copy { font-size: 12.5px; margin-top: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-3 { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split-reverse .split-media { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .section { padding: 80px 0; }
  .br-desktop { display: none; }

  .container { padding: 0 16px; }
  .header-inner { gap: 10px; }
  .header-actions { gap: 6px; }
  .logo { font-size: 1.35rem; }
  .btn-sm { padding: 8px 14px; font-size: 12px; }

  .main-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 12px 24px 20px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; font-size: 1rem; }

  .nav-toggle { display: flex; }

  .hero { min-height: 92svh; }
  /* The hero image is very wide (3:1), so object-fit:cover crops it
     to a sliver on a tall phone. Use contain to show the whole image;
     it blends into the black background. */
  .hero-bg { top: 62%; bottom: 0; height: auto; }
  .hero-bg img { object-fit: contain; object-position: center top; opacity: 1; filter: brightness(1.5); }

  .feature-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  /* Stacked rows: the country pill and code box span the row like the inputs. */
  .country-trigger { width: 100%; }
  .waitlist-form input.code-input { flex-basis: auto; }
  .cta-box { padding: 40px 24px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  .stat-value { font-size: 1.8rem; }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger children of a group (cards, features, stats) */
.reveal[data-reveal-delay="1"] { transition-delay: 0.08s; }
.reveal[data-reveal-delay="2"] { transition-delay: 0.16s; }
.reveal[data-reveal-delay="3"] { transition-delay: 0.24s; }
.reveal[data-reveal-delay="4"] { transition-delay: 0.32s; }
.reveal[data-reveal-delay="5"] { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
