/*
 * Arena look for debatator.app. Every colour, font, spacing step and radius comes from
 * tokens.css, which site/build.ts generates from src/constants/theme.ts; the build fails
 * if this file uses a custom property that neither file defines.
 */

:root {
  --stroke-w: 2px;
  --lift: 4px;
  --dur-fast: 180ms;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --page-w: 1080px;
  --prose-w: 720px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--you-ink);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.skip {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  padding: var(--s-2) var(--s-4);
  background: var(--surface);
  border: var(--stroke-w) solid var(--stroke);
  border-radius: var(--r-pill);
  z-index: 10;
}
.skip:focus {
  top: var(--s-4);
}

.wrap {
  width: min(100% - 2 * var(--s-5), var(--page-w));
  margin-inline: auto;
}

/* ---------- Header and footer ------------------------------------------- */

.site-header {
  border-bottom: var(--stroke-w) solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--text);
  text-decoration: none;
  font: 800 20px/1 var(--font-display);
  letter-spacing: -0.01em;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
}
.nav {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a {
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-pill);
  color: var(--text-2);
  text-decoration: none;
  font: 600 15px/1.2 var(--font-body);
}
.nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}
.nav a[aria-current='page'] {
  color: var(--you-ink);
  background: var(--you-soft);
}
.nav .lang {
  border: var(--stroke-w) solid var(--line);
}

.site-footer {
  margin-top: var(--s-8);
  padding-block: var(--s-7);
  border-top: var(--stroke-w) solid var(--line);
  color: var(--text-3);
  font-size: 14px;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4) var(--s-6);
  justify-content: space-between;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
}
.site-footer a {
  color: var(--text-2);
}

/* ---------- Type -------------------------------------------------------- */

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-weight: 800;
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.04;
}
h2 {
  font-weight: 800;
  font-size: clamp(26px, 3.6vw, 36px);
  line-height: 1.12;
}
h3 {
  font-weight: 700;
  font-size: 20px;
  line-height: 1.22;
}
p {
  margin: 0;
}
.eyebrow {
  font: 700 12px/1.2 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--you-ink);
}
.lede {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.5;
  color: var(--text-2);
}
.muted {
  color: var(--text-2);
}

/* ---------- Buttons, pills and stickers --------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 54px;
  padding: 0 var(--s-6);
  border-radius: var(--r-pill);
  border: var(--stroke-w) solid var(--stroke);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 var(--lift) 0 var(--shadow-hard);
  font: 700 17px/1.1 var(--font-display);
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-spring);
}
.btn:active {
  transform: translateY(var(--lift));
  box-shadow: none;
}
.btn--primary {
  background: var(--you-fill);
  color: var(--on-you-fill);
}
.btn[aria-disabled='true'] {
  cursor: default;
}
.btn[aria-disabled='true']:active {
  transform: none;
  box-shadow: 0 var(--lift) 0 var(--shadow-hard);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: var(--s-1) var(--s-3);
  border-radius: var(--r-pill);
  font: 700 13px/1.4 var(--font-body);
  background: var(--surface-2);
  color: var(--text-2);
}
.pill--you {
  background: var(--you-soft);
  color: var(--you-ink);
}
.pill--opp {
  background: var(--opp-soft);
  color: var(--opp-ink);
}
.pill--lights {
  background: var(--lights);
  color: var(--on-lights);
}
.pill--success {
  background: var(--success-soft);
  color: var(--success);
}

.sticker {
  background: var(--surface);
  border: var(--stroke-w) solid var(--stroke);
  border-radius: var(--r-xl);
  box-shadow: 0 var(--lift) 0 var(--shadow-hard);
  padding: var(--s-5);
}
.card {
  background: var(--surface);
  border: var(--stroke-w) solid var(--card-stroke);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}

/* ---------- Landing ----------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--s-8);
  align-items: center;
  padding-block: var(--s-8) var(--s-7);
}
.hero-copy {
  display: grid;
  gap: var(--s-5);
  justify-items: start;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-2);
}
.hero-note {
  font-size: 14px;
  color: var(--text-3);
}

.demo {
  display: grid;
  gap: var(--s-3);
}
.bubble {
  padding: var(--s-4);
  border-radius: var(--r-lg);
  border: var(--stroke-w) solid var(--card-stroke);
  background: var(--surface);
  max-width: 92%;
}
.bubble--you {
  justify-self: end;
  background: var(--you-soft);
  border-color: transparent;
}
.bubble-head {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-1);
  font: 700 13px/1.3 var(--font-body);
  color: var(--text-2);
}
.bubble-head img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.bubble--you .bubble-head {
  color: var(--you-ink);
}
.feedback {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  justify-content: flex-end;
}
.pulse {
  display: grid;
  gap: var(--s-2);
  padding: var(--s-4);
}
.pulse-label {
  display: flex;
  justify-content: space-between;
  font: 600 12px/1.3 var(--font-body);
  color: var(--text-3);
}
.pulse-track {
  display: flex;
  height: 12px;
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--surface-3);
}
.pulse-you {
  width: 58%;
  background: var(--you);
}
.pulse-opp {
  flex: 1;
  background: var(--opp);
}

.section {
  padding-block: var(--s-8);
  display: grid;
  gap: var(--s-6);
}
.section-head {
  display: grid;
  gap: var(--s-3);
  max-width: var(--prose-w);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-4);
}
.feature {
  display: grid;
  gap: var(--s-2);
  align-content: start;
}
.feature .num {
  font: 800 28px/1 var(--font-display);
  color: var(--you-ink);
}

.rubric {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.rubric .pill {
  font-size: 15px;
  padding: var(--s-2) var(--s-4);
}

.opponent {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--s-4);
  align-items: start;
}
.opponent img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: var(--stroke-w) solid var(--stroke);
}
.opponent .tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
  margin-top: var(--s-2);
}

.cta {
  text-align: center;
  justify-items: center;
}
.cta .sticker {
  display: grid;
  gap: var(--s-4);
  justify-items: center;
  padding: var(--s-8) var(--s-6);
  width: 100%;
}
.cta img {
  width: 88px;
  height: 88px;
  border-radius: var(--r-lg);
}

/* ---------- Prose pages ------------------------------------------------- */

.prose {
  width: min(100% - 2 * var(--s-5), var(--prose-w));
  margin-inline: auto;
  padding-block: var(--s-8) 0;
}
.prose > header {
  display: grid;
  gap: var(--s-3);
  margin-bottom: var(--s-7);
}
.prose h2 {
  font-size: 24px;
  margin: var(--s-7) 0 var(--s-3);
}
.prose h3 {
  font-size: 18px;
  margin: var(--s-5) 0 var(--s-2);
}
.prose p,
.prose ul,
.prose ol,
.prose table {
  margin: 0 0 var(--s-3);
}
.prose ul,
.prose ol {
  padding-left: var(--s-5);
}
.prose li + li {
  margin-top: var(--s-1);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: var(--s-2) var(--s-3) var(--s-2) 0;
  border-bottom: 1px solid var(--line);
}
.prose th {
  font-weight: 650;
  color: var(--text-2);
}
.table-scroll {
  overflow-x: auto;
}
.prose .card {
  margin: var(--s-4) 0;
}
.prose details {
  border-bottom: 1px solid var(--line);
  padding-block: var(--s-3);
}
.prose summary {
  cursor: pointer;
  font: 650 17px/1.4 var(--font-body);
}
.prose details p {
  margin-top: var(--s-2);
}

/* ---------- Responsive and motion --------------------------------------- */

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: var(--s-7);
    padding-top: var(--s-7);
  }
}
@media (max-width: 560px) {
  .site-header .wrap {
    flex-direction: column;
    align-items: flex-start;
    padding-block: var(--s-3);
  }
  .nav {
    justify-content: flex-start;
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}
