:root {
  color-scheme: dark;
  --page: #07110f;
  --ink: #fff8e8;
  --muted: #b8c8bf;
  --dim: #7e9189;
  --line: rgba(235, 255, 240, 0.16);
  --line-strong: rgba(255, 248, 232, 0.28);
  --panel: rgba(8, 24, 20, 0.82);
  --panel-solid: #0d201b;
  --field: #21d48c;
  --field-dark: #0f8d62;
  --gold: #f7b941;
  --coral: #ff6f4a;
  --blue: #57b8ff;
  --cream: #fff0bd;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(10, 30, 23, 0.88), rgba(7, 17, 15, 1) 680px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 96px),
    #07110f;
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: var(--cream);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 14, 12, 0.9);
  backdrop-filter: blur(16px);
}

.brand,
.top-nav,
.header-actions,
.language-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-actions {
  min-width: 0;
}

.brand {
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 28px;
  height: 28px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #ffffff 0 16%, #f3f6ef 17% 63%, #182522 64%);
  box-shadow: 0 0 22px rgba(33, 212, 140, 0.34);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-top: 2px solid #15201d;
  border-bottom: 2px solid #15201d;
  border-radius: 50%;
}

.brand-mark::after {
  transform: rotate(62deg);
}

.top-nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.top-nav a:hover,
.language-nav a:hover {
  color: var(--ink);
}

.language-nav {
  gap: 5px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.language-nav a {
  min-width: 34px;
  min-height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
}

.language-nav a[aria-current="page"] {
  border-color: rgba(247, 185, 65, 0.6);
  background: var(--gold);
  color: #241603;
}

.hero-band,
.score-band,
.results-band,
.country-band,
.content-band,
.faq-band {
  width: min(1220px, calc(100% - 40px));
  margin-inline: auto;
}

.hero-band {
  position: relative;
  overflow: hidden;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(440px, 0.82fr);
  gap: 28px;
  align-items: stretch;
  min-height: 760px;
  margin-top: 26px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(100deg, rgba(4, 16, 15, 0.98) 0%, rgba(4, 16, 15, 0.86) 42%, rgba(4, 16, 15, 0.6) 72%, rgba(4, 16, 15, 0.42) 100%),
    linear-gradient(180deg, rgba(4, 16, 15, 0.28), rgba(4, 16, 15, 0.78)),
    url("/assets/world-cup-sleep-debt-hero.png") center / cover no-repeat,
    #091714;
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 704px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow.mini {
  margin-bottom: 8px;
  color: var(--field);
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 640px;
  font-size: 72px;
  line-height: 0.92;
  overflow-wrap: anywhere;
}

h2 {
  font-size: 21px;
  line-height: 1.16;
}

.intro {
  max-width: 650px;
  margin: 24px 0 18px;
  color: #d5e3dc;
  font-size: 18px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.trust-row span,
.step-pill {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--cream);
  font-size: 13px;
  font-weight: 900;
  padding: 8px 12px;
}

.trust-row span:first-child {
  border-color: rgba(33, 212, 140, 0.52);
  color: #c8ffe9;
}

.hero-asset {
  overflow: hidden;
  flex: 1;
  min-height: 300px;
  margin-top: auto;
  border: 1px solid rgba(255, 248, 232, 0.24);
  border-radius: var(--radius);
  background: #0b1714;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.hero-asset img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
}

.calculator,
.score-card,
.panel,
.metric,
.country-grid a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.calculator {
  position: relative;
  z-index: 1;
  min-width: 0;
  align-self: stretch;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
    rgba(7, 21, 18, 0.86);
  backdrop-filter: blur(18px);
}

.stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.step-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
}

.step-pill:first-child {
  border-color: rgba(247, 185, 65, 0.74);
  background: linear-gradient(135deg, #ffe08a, #f7b941);
  color: #241603;
}

.form-section {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.form-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.form-section h2 {
  margin-bottom: 14px;
  color: #fffaf0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

label span {
  color: #c3d7cf;
  font-size: 13px;
  font-weight: 850;
}

select,
input[type="time"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(235, 255, 240, 0.22);
  border-radius: 7px;
  background: rgba(4, 13, 12, 0.88);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  padding: 0 12px;
}

select:focus,
input:focus,
button:focus-visible,
.country-grid a:focus-visible {
  outline: 3px solid rgba(87, 184, 255, 0.38);
  outline-offset: 2px;
}

.checkbox-row {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid rgba(235, 255, 240, 0.22);
  border-radius: 7px;
  background: rgba(4, 13, 12, 0.88);
}

.checkbox-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--field);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2px;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
  font-weight: 950;
}

.primary-button {
  flex: 1 1 210px;
  background: linear-gradient(135deg, var(--field), #a6ffcc);
  color: #052018;
  box-shadow: 0 18px 36px rgba(33, 212, 140, 0.2);
}

.primary-button:hover {
  background: linear-gradient(135deg, #35e59d, #c0ffd9);
}

.secondary-button {
  flex: 1 1 210px;
  border: 1px solid rgba(247, 185, 65, 0.36);
  background: rgba(247, 185, 65, 0.1);
  color: var(--cream);
}

.link-button {
  min-height: auto;
  padding: 0;
  background: transparent;
  color: var(--cream);
  font-size: 14px;
}

.score-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  gap: 16px;
  margin-top: 18px;
}

.score-card {
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(33, 212, 140, 0.2), rgba(247, 185, 65, 0.12)),
    var(--panel-solid);
}

.score-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
}

.score-card strong {
  display: block;
  margin: 8px 0;
  color: #fff8e8;
  font-size: 50px;
  line-height: 0.98;
}

.score-card p {
  color: #c9d9d2;
  margin: 0 0 16px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  min-height: 122px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    var(--panel-solid);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.metric strong {
  display: block;
  margin-top: 10px;
  color: #fffaf0;
  font-size: 27px;
  line-height: 1;
}

.results-band,
.country-band,
.content-band,
.faq-band {
  margin-top: 24px;
}

.results-grid,
.content-grid,
.country-grid {
  display: grid;
  gap: 16px;
}

.results-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

.panel {
  min-height: 340px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    var(--panel-solid);
}

.panel-large {
  grid-row: span 2;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.result-text {
  margin: 16px 0;
  color: var(--muted);
}

.night-chart {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(92px, 120px) minmax(0, 1fr) 64px;
  gap: 10px;
  align-items: center;
  min-height: 30px;
  font-size: 13px;
}

.bar-track {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--field), var(--gold), var(--coral));
}

.match-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding-left: 20px;
}

.match-list li {
  padding-left: 4px;
}

.match-title {
  display: block;
  font-weight: 950;
}

.match-meta {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.section-heading {
  margin-bottom: 14px;
}

.country-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.country-grid a {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 18px;
  color: var(--ink);
  font-weight: 950;
  text-decoration: none;
  background:
    linear-gradient(135deg, rgba(247, 185, 65, 0.12), rgba(33, 212, 140, 0.06)),
    var(--panel-solid);
}

.country-grid a:hover {
  border-color: rgba(247, 185, 65, 0.48);
  transform: translateY(-1px);
}

.country-grid a span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.content-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-grid article,
.faq-band details {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.content-grid p,
.faq-band p {
  color: var(--muted);
}

.faq-band {
  padding-bottom: 48px;
}

.faq-band h2 {
  margin-bottom: 18px;
}

details {
  padding-bottom: 18px;
}

summary {
  cursor: pointer;
  font-weight: 950;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 1080px) {
  .hero-band {
    grid-template-columns: 1fr;
    min-height: 0;
    background-size: 92% auto;
  }

  .hero-copy {
    min-height: 0;
  }

  .hero-asset {
    height: 360px;
  }

  .score-band,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .panel-large {
    grid-row: auto;
  }

  .metric-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .site-header {
    padding: 0 18px;
  }

  .brand span:last-child {
    display: none;
  }

  .top-nav {
    display: none;
  }

  .language-nav {
    padding-left: 0;
    border-left: 0;
  }

  .hero-band {
    width: min(100% - 24px, 1220px);
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
    background-size: 115% auto;
  }

  h1 {
    font-size: 46px;
  }

  .intro {
    font-size: 16px;
  }

  .form-grid,
  .country-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero-band,
  .score-band,
  .results-band,
  .country-band,
  .content-band,
  .faq-band {
    width: min(100% - 24px, 1220px);
  }

  .hero-asset {
    height: 245px;
    min-height: 245px;
  }

  .hero-asset img {
    min-height: 245px;
  }

  .calculator,
  .score-card,
  .panel {
    padding: 18px;
  }

  h1 {
    max-width: 100%;
    font-size: 34px;
    line-height: 1;
  }

  h2 {
    font-size: 19px;
  }

  .site-header {
    min-height: 60px;
    padding: 0 12px;
  }

  .brand {
    gap: 9px;
  }

  .language-nav a {
    min-width: 30px;
    min-height: 29px;
    font-size: 11px;
  }

  .hero-band {
    width: min(100% - 16px, 1220px);
    margin-top: 14px;
    padding: 14px;
  }

  .intro {
    max-width: 100%;
    margin-top: 18px;
    font-size: 15px;
  }

  .trust-row {
    gap: 8px;
    margin-bottom: 18px;
  }

  .trust-row span,
  .step-pill {
    padding: 7px 10px;
    font-size: 12px;
  }

  .stepper {
    gap: 8px;
  }

  .metric-row {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 96px;
  }

  .chart-row {
    grid-template-columns: 86px minmax(0, 1fr) 54px;
  }
}
