/* ============================================================
   Tracercoin (TFX) — landing page styles
   Vanilla CSS. Dark, modern crypto/tech aesthetic.
   ============================================================ */

:root {
  /* palette */
  --bg:        #0a0e14;
  --bg-alt:    #0d131c;
  --surface:   #121a25;
  --surface-2: #17212f;
  --border:    #223041;
  --border-2:  #2c3d52;

  --text:      #e7eef6;
  --text-soft: #a9bacb;
  --text-dim:  #7387a0;

  --accent:    #38bdf8; /* sky */
  --accent-2:  #5eead4; /* teal */
  --accent-ink:#04141c;

  --danger:    #f87171;
  --success:   #4ade80;

  --radius:    14px;
  --radius-sm: 9px;
  --maxw:      1120px;

  --shadow:    0 18px 50px -20px rgba(0,0,0,.7);
  --glow:      0 0 0 1px rgba(56,189,248,.25), 0 12px 40px -12px rgba(56,189,248,.35);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
          "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.container.narrow { max-width: 720px; }

.section { padding: clamp(56px, 9vw, 108px) 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- accessibility ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- typography ---------- */
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }

.eyebrow, .section-eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .74rem;
  font-weight: 700;
  color: var(--accent-2);
}
.section-eyebrow { margin-bottom: 14px; }

.section-title { font-size: clamp(1.7rem, 3.6vw, 2.6rem); margin-bottom: 16px; }
.section-lead { color: var(--text-soft); font-size: 1.08rem; max-width: 62ch; margin-bottom: 40px; }

.grad-text {
  background: linear-gradient(120deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 600; font-size: 1rem;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-sm { padding: 8px 16px; font-size: .92rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(120deg, var(--accent-2), var(--accent));
  color: var(--accent-ink);
  box-shadow: var(--glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(56,189,248,.4), 0 18px 44px -12px rgba(56,189,248,.5); }
.btn-primary:disabled { opacity: .6; cursor: progress; transform: none; }

.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--border-2);
}
.btn-ghost:hover { border-color: var(--accent); color: #fff; transform: translateY(-2px); }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,14,20,.82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; }
.brand-mark { display: inline-flex; }
.brand-name { font-size: 1.06rem; }
.ticker {
  font-family: var(--mono); font-size: .68rem; color: var(--accent-2);
  border: 1px solid var(--border-2); padding: 2px 6px; border-radius: 6px;
  vertical-align: middle; margin-left: 2px;
}

.nav-links { list-style: none; display: flex; align-items: center; gap: 26px; padding: 0; }
.nav-links a { color: var(--text-soft); font-size: .96rem; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-links .btn { color: var(--text); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  padding: 8px; cursor: pointer;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(70px, 12vw, 140px) 0 clamp(56px, 9vw, 96px); }
.hero-grid {
  position: absolute; inset: -2px; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(60% 55% at 50% -10%, rgba(56,189,248,.16), transparent 60%),
    radial-gradient(45% 40% at 85% 10%, rgba(94,234,212,.12), transparent 60%),
    linear-gradient(to right, rgba(56,189,248,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56,189,248,.05) 1px, transparent 1px);
  background-size: auto, auto, 46px 46px, 46px 46px;
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
}
.hero-inner { position: relative; z-index: 1; max-width: 780px; }
.hero .eyebrow { margin-bottom: 20px; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); margin-bottom: 22px; }
.hero-sub { font-size: clamp(1.06rem, 2vw, 1.28rem); color: var(--text-soft); max-width: 60ch; margin-bottom: 32px; }
.hero-sub strong { color: var(--text); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.hero-note { font-size: .9rem; color: var(--text-dim); }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-alt));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: var(--shadow); }
.card-icon {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 12px; color: var(--accent-2);
  background: rgba(56,189,248,.1); border: 1px solid var(--border-2);
  margin-bottom: 18px;
}
.card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.card p { color: var(--text-soft); font-size: .98rem; }

/* ---------- steps ---------- */
.steps {
  list-style: none; padding: 0; margin: 0 0 32px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.step-num {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; font-weight: 700; font-size: 1.1rem;
  background: linear-gradient(120deg, var(--accent-2), var(--accent));
  color: var(--accent-ink); margin-bottom: 16px;
}
.step h3 { font-size: 1.15rem; margin-bottom: 8px; }
.step p { color: var(--text-soft); font-size: .97rem; }

.callout {
  background: rgba(56,189,248,.06);
  border: 1px solid var(--border-2);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 18px 20px; color: var(--text-soft); font-size: .98rem;
}
.callout strong { color: var(--text); }

/* ---------- specs / stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 0 44px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
}
.stat dt {
  text-transform: uppercase; letter-spacing: .12em; font-size: .72rem;
  color: var(--text-dim); font-weight: 700; margin-bottom: 10px;
}
.stat dd { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.stat-num { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.stat-unit { font-size: .92rem; color: var(--text-soft); }
.stat-quote { font-size: 1.02rem; color: var(--accent-2); font-style: italic; }

/* fair launch */
.fairlaunch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: center;
  background: linear-gradient(120deg, var(--surface), var(--bg-alt));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; margin-bottom: 24px;
}
.fairlaunch h3 { font-size: 1.35rem; margin-bottom: 10px; }
.fairlaunch p { color: var(--text-soft); }
.fairlaunch-bar { width: 100%; }
.bar {
  display: flex; width: 100%; height: 58px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border-2);
}
.bar-mined, .bar-dev {
  display: grid; place-items: center; padding: 0 8px; text-align: center;
}
.bar-mined { background: linear-gradient(120deg, var(--accent-2), var(--accent)); color: var(--accent-ink); }
.bar-dev { background: var(--surface-2); color: var(--text-soft); }
.bar-label { font-size: .78rem; font-weight: 700; line-height: 1.2; }

.mining-note { color: var(--text-dim); font-size: .95rem; text-align: center; }

/* ---------- waitlist form ---------- */
.waitlist-form {
  position: relative;
  /* gradient border via padding-box/border-box layering */
  background:
    linear-gradient(var(--surface), var(--surface-2)) padding-box,
    linear-gradient(135deg, rgba(94,234,212,.55), rgba(56,189,248,.55)) border-box;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 34px 30px 30px;
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}
/* soft accent glow bleeding down from the top edge */
.waitlist-form::before {
  content: "";
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(130% 90% at 50% -20%, rgba(56,189,248,.16), transparent 62%);
}
/* thin luminous accent strip along the top of the card */
.waitlist-form::after {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 1;
  background: linear-gradient(120deg, var(--accent-2), var(--accent));
  opacity: .9;
}

.field { margin-bottom: 6px; }
.field label {
  display: block; font-weight: 700; font-size: .8rem; margin-bottom: 9px;
  text-transform: uppercase; letter-spacing: .06em; color: var(--text-soft);
}
.field input[type="email"],
.field input[type="tel"] {
  width: 100%; font-family: inherit; font-size: 1.02rem; color: var(--text);
  background: rgba(6,10,16,.72); border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  padding: 15px 16px; transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input::placeholder { color: var(--text-dim); }
.field input:hover { border-color: #38506c; }
.field input:focus-visible {
  outline: none; border-color: var(--accent); background: rgba(6,10,16,.9);
  box-shadow: 0 0 0 3px rgba(56,189,248,.22), 0 0 22px -6px rgba(56,189,248,.45);
}
.field input[aria-invalid="true"] { border-color: var(--danger); }

.field-hint { margin: 8px 0 0; font-size: .82rem; color: var(--text-dim); }
.field-error { color: var(--danger); font-size: .88rem; margin-top: 8px; }

/* "and / or" divider between the email and phone fields — centered pill */
.or-divider {
  display: flex; align-items: center; gap: 14px; margin: 22px 0;
  color: var(--text-dim); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em;
}
.or-divider::before, .or-divider::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(to right, transparent, var(--border-2), transparent);
}
.or-divider span {
  padding: 5px 14px; border: 1px solid var(--border-2); border-radius: 999px;
  background: var(--surface); font-weight: 700; color: var(--text-soft);
}

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

#waitlist-submit { margin-top: 18px; }

.form-status { margin-top: 16px; font-size: .96rem; text-align: center; min-height: 1.2em; }
.form-status.is-success { color: var(--success); font-weight: 600; }
.form-status.is-error { color: var(--danger); font-weight: 600; }
.form-fineprint { margin-top: 14px; font-size: .82rem; color: var(--text-dim); text-align: center; }

/* success state */
.waitlist-form.is-done .field,
.waitlist-form.is-done .or-divider,
.waitlist-form.is-done #waitlist-submit,
.waitlist-form.is-done .hp-field,
.waitlist-form.is-done .form-fineprint { display: none; }
/* the verification step is appended after is-done — keep ITS field visible */
.waitlist-form.is-done .verify-panel .field { display: block; }

/* SMS verification step */
.verify-panel { padding: 4px 0; }
.verify-panel h3 { font-size: 1.3rem; margin-bottom: 8px; }
.verify-panel > p { color: var(--text-soft); margin-bottom: 18px; }
.verify-panel .field { margin-bottom: 8px; }
.linklike {
  display: inline-block; margin-top: 14px; padding: 0;
  background: none; border: none; cursor: pointer;
  font: inherit; color: var(--accent); text-decoration: underline;
}
.linklike:disabled { color: var(--text-dim); cursor: default; text-decoration: none; }

.success-panel { text-align: center; padding: 8px 0; }
.success-panel .check {
  width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 18px;
  display: grid; place-items: center;
  background: rgba(74,222,128,.12); border: 1px solid rgba(74,222,128,.4); color: var(--success);
}
.success-panel h3 { font-size: 1.35rem; margin-bottom: 8px; }
.success-panel p { color: var(--text-soft); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: 18px 22px;
  font-weight: 600; font-size: 1.05rem; display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.5rem; color: var(--accent-2); line-height: 1; transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-body { padding: 0 22px 20px; color: var(--text-soft); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 52px 0 34px; }
.footer-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; flex-wrap: wrap;
  padding-bottom: 30px; border-bottom: 1px solid var(--border); margin-bottom: 26px;
}
.footer-tag { color: var(--text-dim); font-size: .92rem; margin-top: 6px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-nav a { color: var(--text-soft); font-size: .95rem; }
.footer-nav a:hover { color: var(--text); }

.disclaimer {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 18px 20px; margin-bottom: 22px;
}
.disclaimer p { color: var(--text-dim); font-size: .84rem; line-height: 1.65; }
.disclaimer strong { color: var(--text-soft); }
.copyright { color: var(--text-dim); font-size: .84rem; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .cards, .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .fairlaunch { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-alt); border-bottom: 1px solid var(--border);
    padding: 8px 22px 18px;
    max-height: 0; overflow: hidden; visibility: hidden;
    transition: max-height .25s ease, padding .25s ease;
  }
  .nav-links.open { max-height: 340px; visibility: visible; }
  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links li:last-child { border-bottom: 0; padding-top: 12px; }
  .nav-links a { display: block; padding: 14px 4px; }
  .nav-links .btn { justify-content: center; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1 1 auto; }
  .waitlist-form { padding: 22px; }
}
