:root {
  --ink: #0c0c0b;
  --paper: #f0eddf;
  --white: #fffdf5;
  --acid: #d9ff43;
  --yellow: #f4d84a;
  --blue: #42a5ff;
  --red: #ff5b45;
  --line: 2px solid var(--ink);
  --mono: "Courier New", Courier, monospace;
  --sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 12px;
  top: -80px;
  background: var(--white);
  border: var(--line);
  padding: 12px 16px;
  font-weight: 800;
}
.skip-link:focus { top: 12px; }

.site-header {
  min-height: 72px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  border-bottom: var(--line);
  background: var(--paper);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  padding: 0 24px;
  border-right: var(--line);
  font: 900 20px/1 var(--sans);
  letter-spacing: -.055em;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav { display: flex; align-items: stretch; }
.site-nav a, .site-nav button {
  display: flex;
  align-items: center;
  padding: 0 22px;
  border: 0;
  border-left: var(--line);
  background: transparent;
  color: var(--ink);
  font: 700 12px/1 var(--mono);
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}
.site-nav a:hover { background: var(--white); }
.site-nav .next-nav { background: var(--ink); color: var(--white); gap: 6px; }
.site-nav .next-nav span { color: var(--acid); }
.site-nav .next-nav:hover { background: var(--red); color: var(--ink); }
.site-nav .next-nav:hover span { color: var(--ink); }
.site-nav .nav-ai-button { background: var(--acid); }
.site-nav .nav-ai-button:hover { background: var(--white); }

.hero { padding: 28px 24px 38px; border-bottom: var(--line); }
.hero-kicker {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ink);
  font: 700 11px/1 var(--mono);
  text-transform: uppercase;
}
.hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(76px, 15.8vw, 230px);
  line-height: .72;
  letter-spacing: -.085em;
  text-transform: uppercase;
}
.hero h1 span { display: block; animation: title-in .72s cubic-bezier(.2,.8,.2,1) both; }
.hero h1 span:nth-child(2) { animation-delay: .08s; }
.hero h1 span:nth-child(3) { animation-delay: .16s; }
.hero h1 span:nth-child(2) { text-align: right; padding-right: .04em; }
.hero h1 .outline-word {
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
  text-align: center;
  letter-spacing: -.06em;
}
.hero-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  border-top: 1px solid var(--ink);
  padding-top: 18px;
}
.hero-bottom p { margin: 0; font-size: clamp(18px, 2vw, 30px); font-weight: 800; max-width: 500px; }
.arrow-link { font: 700 12px/1 var(--mono); text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.arrow-link span { display: inline-block; margin-left: 12px; font-size: 22px; }

.games-section { padding: 72px 24px 24px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 8px; font: 700 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.section-heading h2, .next-banner h2, .coming-title { margin: 0; font-size: clamp(36px, 6vw, 86px); line-height: .92; letter-spacing: -.055em; }
.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.game-card { border: var(--line); background: var(--yellow); overflow: hidden; animation: card-in .7s cubic-bezier(.2,.8,.2,1) both; }
.game-card:nth-child(2) { animation-delay: .12s; }
.card-topline { display: flex; justify-content: space-between; padding: 12px 14px; border-bottom: var(--line); font: 700 10px/1 var(--mono); text-transform: uppercase; }
.duck-card { background: var(--blue); }
.game-shot {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: var(--line);
  background: var(--ink);
  isolation: isolate;
}
.game-shot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 48%, rgba(0,0,0,.68));
  opacity: .72;
  transition: opacity .35s ease;
}
.game-shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.75,.2,1), filter .5s ease; }
.game-shot:hover img { transform: scale(1.045); filter: saturate(1.12) contrast(1.03); }
.game-shot:hover::after { opacity: .45; }
.shot-label, .shot-action {
  position: absolute;
  z-index: 2;
  bottom: 16px;
  border: 2px solid var(--ink);
  padding: 9px 11px;
  font: 900 11px/1 var(--mono);
  text-transform: uppercase;
  text-decoration: none;
}
.shot-label { left: 16px; background: var(--white); color: var(--ink); }
.shot-action { right: 16px; display: flex; gap: 16px; background: var(--acid); color: var(--ink); }
.shot-action b { transition: transform .25s ease; }
.game-shot:hover .shot-action b { transform: translate(3px,-3px); }
.card-copy { display: flex; justify-content: space-between; gap: 18px; align-items: end; padding: 18px; }
.card-copy h3 { margin: 0; font-size: clamp(38px, 5vw, 72px); line-height: .9; letter-spacing: -.06em; }
.card-copy p { margin: 12px 0 0; max-width: 390px; font: 700 13px/1.35 var(--mono); }
.play-button, .boxed-link {
  flex: 0 0 auto;
  display: inline-flex;
  justify-content: space-between;
  gap: 18px;
  min-width: 180px;
  padding: 14px;
  border: var(--line);
  background: var(--ink);
  color: var(--white);
  font: 700 11px/1 var(--mono);
  text-transform: uppercase;
  text-decoration: none;
}
.play-button:hover, .boxed-link:hover { background: var(--red); color: var(--ink); }
.dark-button { background: var(--acid); color: var(--ink); }
.feature-strip { display: flex; gap: 0; margin: 0; padding: 0; border-top: var(--line); list-style: none; }
.feature-strip li { flex: 1; padding: 11px; border-right: 1px solid var(--ink); text-align: center; font: 700 9px/1.2 var(--mono); text-transform: uppercase; }
.feature-strip li:last-child { border-right: 0; }

.next-banner {
  position: relative;
  margin: 90px 24px 24px;
  padding: 30px;
  border: var(--line);
  background: var(--acid);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, .9fr);
  align-items: end;
  gap: 40px;
  overflow: hidden;
}
.next-banner::after {
  content: "NEXT  NEXT  NEXT  NEXT";
  position: absolute;
  right: -18px;
  top: 4px;
  color: transparent;
  -webkit-text-stroke: 1px rgba(12,12,11,.18);
  font: 900 clamp(50px,8vw,126px)/.8 var(--sans);
  letter-spacing: -.06em;
  white-space: nowrap;
  pointer-events: none;
  animation: next-drift 11s linear infinite;
}
.next-copy { position: relative; z-index: 1; }
.next-banner h2 { max-width: 900px; font-size: clamp(66px,10vw,156px); line-height: .72; text-transform: uppercase; }
.next-intro { max-width: 620px; margin: 20px 0 22px; font: 700 14px/1.45 var(--mono); }
.next-flag { display: flex; gap: 0; flex-wrap: wrap; margin: 0 0 34px; border: var(--line); width: fit-content; background: var(--white); }
.next-flag span { padding: 9px 11px; border-right: 1px solid var(--ink); font: 900 10px/1 var(--mono); text-transform: uppercase; }
.next-flag span:last-child { border-right: 0; background: var(--red); }
.countdown { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border: var(--line); background: var(--ink); color: var(--white); }
.count-unit { min-height: 168px; display: flex; flex-direction: column; justify-content: space-between; padding: 16px; border-right: 1px solid rgba(255,255,255,.35); border-bottom: 1px solid rgba(255,255,255,.35); }
.count-unit:nth-child(2n) { border-right: 0; }
.count-unit:nth-last-child(-n+2) { border-bottom: 0; }
.count-unit strong { display: block; font: 900 clamp(64px,7vw,112px)/.75 var(--sans); letter-spacing: -.07em; font-variant-numeric: tabular-nums; }
.count-unit span { color: var(--acid); font: 900 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.count-unit strong.count-tick { animation: number-tick .28s ease-out; }
.countdown-finished .count-unit strong { color: var(--acid); }
.boxed-link { background: var(--paper); color: var(--ink); }
.site-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 64px; padding: 18px 24px; border-top: var(--line); font: 700 10px/1 var(--mono); text-transform: uppercase; }

/* Pendar AI: a compact utility panel, not a fake chatbot character. */
.pendar-ai-launcher {
  position: fixed;
  z-index: 700;
  right: 18px;
  bottom: 18px;
  border: var(--line);
  background: var(--acid);
  color: var(--ink);
  padding: 13px 16px;
  font: 900 12px/1 var(--mono);
  text-transform: uppercase;
  box-shadow: 5px 5px 0 var(--ink);
  cursor: pointer;
}
.pendar-ai-launcher:hover { transform: translate(2px,2px); box-shadow: 3px 3px 0 var(--ink); }
.pendar-ai-panel {
  position: fixed;
  z-index: 710;
  right: 18px;
  bottom: 18px;
  width: min(420px, calc(100vw - 36px));
  max-height: min(680px, calc(100vh - 36px));
  display: none;
  flex-direction: column;
  border: var(--line);
  background: var(--white);
  color: var(--ink);
  box-shadow: 9px 9px 0 var(--ink);
}
.pendar-ai-panel.is-open { display: flex; animation: panel-in .22s ease-out both; }
.ai-panel-head { display: flex; align-items: center; justify-content: space-between; border-bottom: var(--line); background: var(--acid); padding: 12px 14px; }
.ai-panel-head strong { font: 900 15px/1 var(--mono); text-transform: uppercase; }
.ai-panel-head button { width: 32px; height: 32px; border: 2px solid var(--ink); background: var(--white); cursor: pointer; font-weight: 900; }
.ai-panel-copy { margin: 0; padding: 14px; border-bottom: 1px solid var(--ink); font: 700 11px/1.4 var(--mono); }
.ai-quick-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; }
.ai-quick-list button { border: 1px solid var(--ink); background: transparent; padding: 7px 8px; font: 700 10px/1 var(--mono); cursor: pointer; }
.ai-quick-list button:hover { background: var(--yellow); }
.ai-answer { min-height: 96px; max-height: 230px; overflow: auto; margin: 12px 14px; padding: 12px; border: 1px solid var(--ink); background: var(--paper); white-space: pre-wrap; font: 700 12px/1.45 var(--mono); }
.ai-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 0 14px 14px; }
.ai-form textarea { min-height: 72px; resize: vertical; border: 2px solid var(--ink); border-radius: 0; padding: 10px; background: var(--white); font: 700 12px/1.3 var(--mono); }
.ai-form button { border: 2px solid var(--ink); background: var(--ink); color: var(--white); padding: 0 15px; font: 900 11px/1 var(--mono); text-transform: uppercase; cursor: pointer; }
.ai-form button:disabled { opacity: .55; cursor: wait; }
.ai-footnote { margin: 0; padding: 0 14px 13px; font: 700 9px/1.2 var(--mono); text-transform: uppercase; }

/* DuckGame keeps the user's supplied game file untouched inside this shell. */
.game-shell { height: 100dvh; overflow: hidden; background: #08090d; }
.game-toolbar { height: 48px; display: flex; align-items: stretch; justify-content: space-between; background: var(--paper); border-bottom: 2px solid var(--ink); color: var(--ink); }
.game-toolbar a, .game-toolbar button, .game-toolbar strong { display: flex; align-items: center; padding: 0 15px; border: 0; border-right: 1px solid var(--ink); background: transparent; font: 800 10px/1 var(--mono); text-transform: uppercase; text-decoration: none; }
.game-toolbar button { border-left: 1px solid var(--ink); border-right: 0; cursor: pointer; }
.game-toolbar button:hover, .game-toolbar a:hover { background: var(--acid); }
.game-frame { display: block; width: 100%; height: calc(100dvh - 48px); border: 0; background: #08090d; }

/* Pendar Run announcement and build board. */
.coming-page { min-height: 100vh; background: var(--ink); color: var(--paper); }
.coming-page .site-header { background: var(--ink); color: var(--paper); border-color: var(--paper); }
.coming-page .wordmark, .coming-page .site-nav a, .coming-page .site-nav button { border-color: var(--paper); color: var(--paper); }
.coming-page .site-nav .nav-ai-button { background: var(--acid); color: var(--ink); }
.coming-main { position: relative; padding: 30px 24px 80px; overflow: hidden; }
.coming-main::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 165px;
  width: min(74vw,980px);
  height: 920px;
  transform: translateX(-50%) perspective(420px) rotateX(58deg);
  transform-origin: top center;
  background-image: linear-gradient(rgba(217,255,67,.11) 1px,transparent 1px),linear-gradient(90deg,rgba(217,255,67,.11) 1px,transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(180deg,#000,transparent 85%);
  animation: runway 7s linear infinite;
  pointer-events: none;
}
.coming-main > * { position: relative; z-index: 1; }
.build-stamp { display: inline-block; margin: 0 0 38px; padding: 8px 10px; border: 2px solid var(--paper); color: var(--acid); font: 900 12px/1 var(--mono); text-transform: uppercase; transform: rotate(-2deg); }
.coming-kicker { display: flex; justify-content: space-between; gap: 18px; max-width: 1100px; padding: 12px 0; border-top: 1px solid var(--paper); border-bottom: 1px solid var(--paper); font: 900 10px/1 var(--mono); text-transform: uppercase; }
.coming-kicker span:last-child { color: var(--acid); }
.coming-title { max-width: 1280px; margin-top: 30px; font-size: clamp(90px, 17vw, 250px); line-height: .70; color: var(--paper); text-transform: uppercase; animation: title-in .72s cubic-bezier(.2,.8,.2,1) both; }
.coming-title span { display: block; color: transparent; -webkit-text-stroke: 2px var(--acid); text-align: right; animation: outline-pulse 2.8s ease-in-out infinite; }
.coming-countdown-wrap { max-width: 1280px; margin: 62px auto 0; border: 2px solid var(--paper); background: rgba(12,12,11,.82); }
.coming-countdown-wrap > p { margin: 0; padding: 13px 16px; border-bottom: 2px solid var(--paper); color: var(--acid); font: 900 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.countdown-dark { grid-template-columns: repeat(4,minmax(0,1fr)); border: 0; background: transparent; }
.countdown-dark .count-unit { min-height: 190px; border-bottom: 0; border-right: 1px solid rgba(240,237,223,.55); }
.countdown-dark .count-unit:last-child { border-right: 0; }
.countdown-dark .count-unit strong { font-size: clamp(64px,9vw,142px); }
.coming-deck { display: grid; grid-template-columns: 1.25fr .75fr; border: 2px solid var(--paper); margin-top: 50px; }
.build-card { min-height: 290px; padding: 24px; border-right: 2px solid var(--paper); }
.build-card:last-child { border-right: 0; }
.build-card h2 { margin: 50px 0 12px; font-size: clamp(36px, 6vw, 80px); line-height: .9; letter-spacing: -.05em; }
.build-card p { max-width: 620px; font: 700 13px/1.5 var(--mono); }
.status-row { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--paper); font: 700 10px/1 var(--mono); text-transform: uppercase; }
.status-dot { color: var(--acid); animation: status-pulse 1.4s steps(2,end) infinite; }
.build-rules { margin: 0; padding: 0; list-style: none; }
.build-rules li { padding: 17px 0; border-bottom: 1px solid var(--paper); font: 700 12px/1.2 var(--mono); text-transform: uppercase; }
.build-rules li::before { content: "→"; margin-right: 12px; color: var(--acid); }
.honest-note { display: flex; justify-content: space-between; gap: 24px; margin-top: 24px; font: 700 11px/1.4 var(--mono); text-transform: uppercase; }
.honest-note strong { color: var(--acid); }

@keyframes title-in {
  from { opacity: 0; transform: translateY(44px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes next-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-180px); }
}
@keyframes number-tick {
  0% { transform: translateY(-8px); opacity: .25; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes outline-pulse {
  0%,100% { opacity: 1; filter: drop-shadow(0 0 0 rgba(217,255,67,0)); }
  50% { opacity: .78; filter: drop-shadow(0 0 12px rgba(217,255,67,.24)); }
}
@keyframes runway {
  from { background-position: 0 0,0 0; }
  to { background-position: 0 92px,0 92px; }
}
@keyframes status-pulse {
  50% { opacity: .42; }
}

@media (max-width: 850px) {
  .site-header { min-height: 58px; }
  .wordmark { padding: 0 12px; font-size: 14px; letter-spacing: -.05em; }
  .site-nav a { display: none; }
  .site-nav .next-nav { display: flex; padding: 0 10px; font-size: 9px; }
  .site-nav .next-nav span { display: none; }
  .site-nav button { padding: 0 12px; }
  .hero { padding: 20px 14px 28px; }
  .hero-kicker span:nth-child(2) { display: none; }
  .hero h1 { font-size: clamp(64px, 22vw, 140px); line-height: .78; }
  .hero-bottom { align-items: start; flex-direction: column; }
  .games-section { padding: 54px 14px 14px; }
  .game-grid { grid-template-columns: 1fr; }
  .game-shot { aspect-ratio: 16 / 10; }
  .shot-label { bottom: 10px; left: 10px; }
  .shot-action { bottom: 10px; right: 10px; }
  .card-copy { align-items: stretch; flex-direction: column; }
  .play-button { width: 100%; }
  .next-banner { margin: 70px 14px 14px; padding: 20px; grid-template-columns: 1fr; gap: 28px; }
  .next-banner h2 { font-size: clamp(68px,20vw,120px); }
  .count-unit { min-height: 126px; padding: 12px; }
  .count-unit strong { font-size: clamp(52px,15vw,86px); }
  .boxed-link { width: 100%; }
  .site-footer { flex-direction: column; padding: 18px 14px 82px; }
  .coming-main { padding: 24px 14px 90px; }
  .coming-title { font-size: clamp(72px, 24vw, 138px); }
  .coming-countdown-wrap { margin-top: 42px; }
  .countdown-dark { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .countdown-dark .count-unit { min-height: 126px; border-bottom: 1px solid rgba(240,237,223,.55); }
  .countdown-dark .count-unit:nth-child(2) { border-right: 0; }
  .countdown-dark .count-unit:nth-last-child(-n+2) { border-bottom: 0; }
  .countdown-dark .count-unit strong { font-size: clamp(52px,18vw,92px); }
  .coming-deck { grid-template-columns: 1fr; }
  .build-card { border-right: 0; border-bottom: 2px solid var(--paper); }
  .build-card:last-child { border-bottom: 0; }
  .honest-note { flex-direction: column; }
  .pendar-ai-panel { right: 10px; bottom: 10px; width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .pendar-ai-launcher { right: 10px; bottom: 10px; }
  .ai-form { grid-template-columns: 1fr; }
  .ai-form button { min-height: 42px; }
  .game-toolbar strong { display: none; }
  .game-toolbar a, .game-toolbar button { padding: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
