:root {
  --ink: #070a08;
  --ink-2: #0c120e;
  --pitch: #14301c;
  --pitch-mid: #1a4a28;
  --pitch-deep: #0a1a10;
  --foam: #f3f6f2;
  --mute: #a7b5aa;
  --line: rgba(243, 246, 242, 0.1);
  --accent: #b8f54a;
  --accent-ink: #0a1408;
  --glow: rgba(184, 245, 74, 0.14);
  --radius: 14px;
  --font-display: "Oswald", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;
  --max: 1100px;
  /*
    Pitch density: flat tiles across ≈ 5 on desktop → ~7–9 optically after rotateX
    (the ~70% zoom sweet spot). Phone aims ~3.5 — board-like, not micro-noise.
  */
  --tiles-across: 4.9;
  --check: clamp(240px, calc(100vw / var(--tiles-across)), 400px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--foam);
  background: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Grass chess pitch — screen-space atmosphere; mid-tone bleed on the field only */
.pitch {
  position: fixed;
  inset: 0;
  width: 100vw;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: #0d2214;
}

.pitch-field {
  position: absolute;
  left: -180%;
  width: 460%;
  /* Pivot sits at 55% of the viewport; the plane runs far past every edge after X/Z tilt */
  top: -300%;
  height: 470%;
  background-color: #0d2214;
  /* Mid-green stops soften the 90° edges so the two tones bleed instead of posting */
  background-image: repeating-conic-gradient(
    from 0deg at 50% 50%,
    #0b1e12 0deg 86deg,
    #12351f 90deg,
    #184a28 94deg 176deg,
    #12351f 180deg
  );
  background-size: var(--check) var(--check);
  background-position: center bottom;
  transform-origin: 50% 75.53%;
  transform: perspective(clamp(1000px, 90vw, 1600px)) rotateX(38deg) rotateZ(8deg);
  opacity: 0.9;
  filter: contrast(1.06);
}

/* Depth and light live in screen space so the field stays one homogeneous material */
.pitch::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 75% 50% at 50% 22%, rgba(40, 92, 56, 0.36), transparent 60%),
    linear-gradient(
      180deg,
      rgba(7, 10, 8, 0.62) 0%,
      rgba(7, 10, 8, 0.48) 14%,
      rgba(7, 10, 8, 0.68) 40%,
      rgba(7, 10, 8, 0.88) 70%,
      rgba(7, 10, 8, 0.95) 100%
    ),
    linear-gradient(90deg, rgba(7, 10, 8, 0.28) 0%, transparent 28%, transparent 72%, rgba(7, 10, 8, 0.3) 100%);
}

.pitch::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.35;
  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.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1.25rem, 4vw, 2.5rem);
  backdrop-filter: blur(14px);
  background: rgba(7, 10, 8, 0.55);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  color: var(--mute);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--foam);
}

.header-actions {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--foam);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: #c9ff63;
}

.btn-ghost {
  border-color: rgba(243, 246, 242, 0.28);
  color: var(--foam);
  background: rgba(0, 0, 0, 0.25);
}

.btn-ghost:hover {
  border-color: rgba(243, 246, 242, 0.28);
}

.btn-lg {
  padding: 0.9rem 1.45rem;
  font-size: 1rem;
}

main {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
}

.hero {
  text-align: center;
  /* Keep hero stack near φ⁻² of the viewport (~38%), not locked to width alone */
  padding: clamp(3.5rem, 11vh, 7.5rem) 0 clamp(3rem, 8vh, 6rem);
  animation: rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero h1,
.hero .lede,
.hero .cta-row,
.hero .trust-strip,
.hero .eyebrow {
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.55);
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  /* Cap by both axes: ~70% zoom feel at 100% — optical mass tracks viewport, not only width */
  font-size: clamp(2.4rem, min(6.8vw, 7.6vh), 4.5rem);
  line-height: 0.98;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero h1 span {
  color: var(--accent);
}

.lede {
  margin: 1.35rem auto 0;
  max-width: 34rem;
  color: var(--mute);
  font-size: 1.08rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2rem;
}

.trust-strip {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
  margin: 2.25rem 0 0;
  padding: 0;
  color: var(--mute);
  font-size: 0.9rem;
}

.trust-strip li {
  position: relative;
  padding-left: 1rem;
}

.trust-strip li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.section {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
  border-top: 1px solid var(--line);
}

.section-kicker {
  margin: 0 0 0.65rem;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}

.section h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  max-width: 28ch;
}

.section h2 .h2-keep {
  white-space: nowrap;
}

.section h2 span:not(.h2-keep) {
  color: var(--accent);
}

@media (max-width: 380px) {
  .section h2 .h2-keep {
    white-space: normal;
  }
}

.section-lede {
  margin: 0.9rem 0 0;
  max-width: 36rem;
  color: var(--mute);
}

.steps {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.steps li {
  padding: 1.5rem 1.25rem;
  border-top: 2px solid var(--accent);
  background: rgba(12, 18, 14, 0.55);
}

.step-num {
  display: block;
  font-family: var(--font-display);
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.steps h3,
.diff-grid h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.steps p,
.diff-grid p,
.faq p,
.final-cta p,
.formula-note {
  margin: 0;
  color: var(--mute);
  font-size: 0.98rem;
}

.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 2rem 0 1.25rem;
}

.preset {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(12, 18, 14, 0.65);
  color: var(--mute);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.preset:hover {
  color: var(--foam);
  border-color: rgba(243, 246, 242, 0.28);
}

.preset.is-active {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.configurator {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.25rem;
  align-items: stretch;
}

.config-controls,
.config-result {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 18, 14, 0.65);
  padding: 1.5rem 1.35rem;
}

.config-controls {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  justify-content: center;
}

.slider-block {
  display: grid;
  gap: 0.65rem;
}

.slider-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  color: var(--mute);
  font-size: 0.92rem;
}

.slider-name {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  color: var(--foam);
}

.slider-idx {
  font-family: var(--font-display);
  color: var(--accent);
  letter-spacing: 0.06em;
  font-size: 0.85rem;
}

.slider-top strong {
  color: var(--foam);
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.slider-block + .slider-block {
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.slider-ends {
  display: flex;
  justify-content: space-between;
  color: var(--mute);
  font-size: 0.78rem;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(243, 246, 242, 0.12);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--accent-ink);
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(184, 245, 74, 0.15);
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--accent-ink);
  cursor: pointer;
}

.config-result {
  border-color: rgba(184, 245, 74, 0.35);
  background:
    linear-gradient(180deg, rgba(184, 245, 74, 0.08), transparent 45%),
    rgba(18, 32, 22, 0.85);
  display: flex;
  flex-direction: column;
}

.fee-label {
  margin: 0;
  color: var(--mute);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.fee-value {
  margin: 0.35rem 0 0.25rem;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 8vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.fee-currency {
  font-size: 0.45em;
  margin-left: 0.12em;
  vertical-align: super;
}

.fee-pct {
  margin: 0 0 1.1rem;
  color: var(--mute);
  font-size: 0.95rem;
  font-weight: 600;
}

.fee-meta {
  list-style: none;
  margin: 0 0 1.35rem;
  padding: 0;
}

.fee-meta li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--mute);
}

.fee-meta strong {
  color: var(--foam);
  font-weight: 600;
  text-align: right;
}

.config-result .btn {
  width: 100%;
  margin-top: auto;
}

.formula-note {
  margin-top: 0.9rem !important;
  font-size: 0.78rem !important;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.heat-wrap {
  margin-top: 2.25rem;
}

.heat-label {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--foam);
}

.heat-label span {
  color: var(--mute);
  font-weight: 500;
}

.heat {
  display: grid;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.heat-row {
  display: grid;
  grid-template-columns: 4.5rem repeat(4, minmax(4.2rem, 1fr));
  gap: 0.4rem;
  align-items: stretch;
}

.heat-head span {
  text-align: center;
  font-size: 0.75rem;
  color: var(--mute);
  letter-spacing: 0.04em;
}

.heat-ylab {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--mute);
}

.heat-cell {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(12, 18, 14, 0.65);
  color: var(--foam);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 0.65rem 0.35rem;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.heat-cell:hover {
  border-color: rgba(184, 245, 74, 0.4);
}

.heat-cell.is-active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.section-above {
  text-align: left;
}

.above-list {
  margin: 1.75rem 0 1.75rem;
  padding: 0;
  list-style: none;
  max-width: 36rem;
}

.above-list li {
  position: relative;
  padding: 0.7rem 0 0.7rem 1.15rem;
  border-top: 1px solid var(--line);
  color: var(--mute);
}

.above-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.diff-grid article {
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.faq {
  margin-top: 2rem;
  display: grid;
  gap: 0.65rem;
  max-width: 42rem;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  background: rgba(12, 18, 14, 0.5);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details[open] summary {
  margin-bottom: 0.55rem;
  color: var(--accent);
}

.final-cta {
  margin-top: 3rem;
  padding: 2.25rem 1.5rem;
  text-align: center;
  border: 1px solid rgba(184, 245, 74, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(184, 245, 74, 0.08), transparent 60%),
    rgba(12, 18, 14, 0.7);
}

.final-cta h2 {
  margin: 0 auto 0.65rem;
  max-width: none;
  text-align: center;
}

.final-cta p {
  margin: 0 auto 1.4rem !important;
  max-width: 28rem;
}

.site-footer {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  color: var(--mute);
  font-size: 0.88rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  :root {
    --tiles-across: 4.3;
    --check: clamp(180px, calc(100vw / var(--tiles-across)), 320px);
  }

  .steps,
  .diff-grid,
  .configurator {
    grid-template-columns: 1fr;
  }

  .nav,
  .header-actions {
    display: none;
  }

  .nav.is-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 1rem 1.25rem 1.25rem;
    background: rgba(7, 10, 8, 0.96);
    border-bottom: 1px solid var(--line);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .section h2 {
    max-width: none;
  }
}

@media (max-width: 600px) {
  :root {
    /* Phone: ~3.5 flat tiles → readable board without wallpaper noise */
    --tiles-across: 3.5;
    --check: clamp(100px, calc(100vw / var(--tiles-across)), 150px);
  }

  .hero h1 {
    font-size: clamp(2.35rem, min(11vw, 6.4vh), 3.2rem);
  }

  .hero {
    padding: clamp(3rem, 8vh, 4.5rem) 0 clamp(2.5rem, 6vh, 4rem);
  }
}
