/* Abseits — Landing (Retro × Comic) */

:root {
  --ink: #0a0f14;
  --panel: #121c28;
  --panel2: #1a2636;
  --line: #000;
  --pop: #ff6b35;
  --pop2: #ffd23f;
  --mint: #4ade80;
  --sky: #38bdf8;
  --lilac: #c084fc;
  --paper: #f8f4e8;
  --crt-glow: rgba(74, 222, 128, 0.15);
  --shadow-hard: 4px 4px 0 #000;
  --shadow-soft: 8px 8px 0 rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --font-comic: "Bangers", system-ui, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;
  --font-mono: "VT323", "Consolas", monospace;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--paper);
  background: var(--ink);
  overflow-x: hidden;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

/* CRT / Scanline Overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.03) 0px,
    rgba(0, 0, 0, 0.03) 1px,
    transparent 2px,
    transparent 4px
  );
  opacity: 0.35;
}

a {
  color: var(--sky);
}

a:hover {
  color: var(--pop2);
}

:focus-visible {
  outline: 3px solid var(--pop2);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--pop);
  color: #000;
  padding: 0.5rem 1rem;
  font-weight: 800;
  z-index: 100000;
}
.skip-link:focus {
  left: 0.5rem;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #0d1520 0%, rgba(13, 21, 32, 0.95) 100%);
  border-bottom: 4px solid #000;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.4);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.75rem max(1.25rem, env(safe-area-inset-right, 0px)) 0.75rem max(1.25rem, env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo-mark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.logo-badge {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--pop) 0%, var(--pop2) 100%);
  border: 3px solid #000;
  border-radius: 10px;
  box-shadow: var(--shadow-hard);
  display: grid;
  place-items: center;
  font-family: var(--font-comic);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: #000;
  transform: rotate(-3deg);
}

.logo-text {
  font-family: var(--font-comic);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  letter-spacing: 0.06em;
  line-height: 1;
  text-shadow: 3px 3px 0 #000;
}

.logo-text span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mint);
  text-shadow: none;
  margin-top: 0.2rem;
}

.nav-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.nav-main a {
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--paper);
  opacity: 0.9;
}
.nav-main a:hover {
  color: var(--pop2);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.35rem;
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 1rem;
  text-decoration: none;
  border: 3px solid #000;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: var(--shadow-hard);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #000;
}

.btn-play {
  background: linear-gradient(180deg, var(--mint) 0%, #22c55e 100%);
  color: #052e16;
}

.btn-play:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  background: var(--panel2);
  color: var(--paper);
}

.btn-ghost:hover {
  background: #243044;
}

/* ── Hero ── */
.hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 5rem) 1.25rem 3rem;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--crt-glow), transparent 55%),
    linear-gradient(165deg, #0f1824 0%, var(--ink) 45%, #0a1218 100%);
  border-bottom: 4px solid #000;
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--mint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-comic);
  font-size: clamp(2.75rem, 8vw, 4.25rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
  text-shadow: 4px 4px 0 #000, -1px -1px 0 #000;
  color: #fff;
}

.hero-lead {
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  max-width: 38ch;
  margin: 0 0 1.5rem;
  color: rgba(248, 244, 232, 0.92);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: rgba(248, 244, 232, 0.75);
}

.hero-meta strong {
  color: var(--pop2);
}

.hero-panel {
  background: var(--panel);
  border: 4px solid #000;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1rem;
  transform: rotate(1deg);
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 599px) {
  .hero-panel {
    transform: none;
  }
}

.hero-panel img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 3px solid #000;
}

.hero-caption {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  text-align: center;
  color: rgba(248, 244, 232, 0.7);
}

/* ── Sections ── */
section {
  padding: clamp(2.5rem, 5vw, 4rem) max(0.75rem, min(1.25rem, 4vw));
}

.section-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.section-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-comic);
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: 0.04em;
  text-shadow: 3px 3px 0 #000;
}

.section-sub {
  margin: 0 0 2rem;
  max-width: 65ch;
  color: rgba(248, 244, 232, 0.82);
  font-size: 1.05rem;
}

.striped {
  background: repeating-linear-gradient(
    -8deg,
    #0f1720 0px,
    #0f1720 24px,
    #121a24 24px,
    #121a24 48px
  );
  border-block: 3px solid #000;
}

.paper {
  background: linear-gradient(180deg, #1a2432 0%, #141c28 100%);
}

/* ── Comic panels ── */
.panel {
  background: var(--panel);
  border: 3px solid #000;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 1.25rem 1.35rem;
}

.panel h3 {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--pop2);
}

.panel p {
  margin: 0;
  color: rgba(248, 244, 232, 0.88);
  font-size: 0.98rem;
}

.feature-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-grid .panel:nth-child(3n + 1) {
  transform: rotate(-0.5deg);
}
.feature-grid .panel:nth-child(3n + 2) {
  transform: rotate(0.4deg);
}
.feature-grid .panel:nth-child(3n + 3) {
  transform: rotate(-0.3deg);
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.15rem 0.5rem;
  background: #000;
  color: var(--mint);
  border-radius: 4px;
  margin-bottom: 0.35rem;
}

/* ── Timeline / Flow ── */
.flow {
  display: grid;
  gap: 1rem;
}

@media (min-width: 800px) {
  .flow {
    grid-template-columns: repeat(4, 1fr);
  }
}

.flow-step {
  background: var(--panel2);
  border: 3px solid #000;
  border-radius: var(--radius);
  padding: 1rem;
  position: relative;
}

.flow-step::before {
  content: attr(data-step);
  font-family: var(--font-comic);
  font-size: 1.75rem;
  color: var(--pop);
  display: block;
  margin-bottom: 0.35rem;
}

.flow-step strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #fff;
}

/* ── Screenshot-Slideshow (Mobile-first) ── */
.gallery-intro {
  margin-bottom: 1rem;
  max-width: 70ch;
}

.screens-mobile-hint {
  display: block;
  margin-top: 0.5rem;
  color: var(--pop2);
  font-weight: 700;
  font-size: 0.95rem;
}

.screens-section .section-inner {
  max-width: min(1120px, 100vw);
}

.screens-carousel {
  margin-top: 0.5rem;
}

.screens-viewport {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  border: 3px solid #000;
  border-radius: var(--radius);
  background: #000;
  box-shadow: var(--shadow-hard);
  min-height: min(78vh, 640px);
}

.screens-viewport:focus-visible {
  outline: 3px solid var(--pop2);
  outline-offset: 4px;
}

.screens-slide {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0.35rem 0.25rem 0.5rem;
  box-sizing: border-box;
}

.screens-slide img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(76vh, 720px);
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.screens-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.screens-btn {
  min-width: 48px;
  min-height: 48px;
  padding: 0 1rem;
  font-family: var(--font-comic);
  font-size: 1.75rem;
  line-height: 1;
  color: #000;
  background: linear-gradient(180deg, var(--pop2) 0%, #e6b422 100%);
  border: 3px solid #000;
  border-radius: 12px;
  box-shadow: var(--shadow-hard);
  cursor: pointer;
  touch-action: manipulation;
}

.screens-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #000;
}

.screens-counter {
  margin: 0;
  min-width: 4.5rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--mint);
}

.screens-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
  padding: 0 0.25rem 0.25rem;
}

.screens-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 2px solid #000;
  border-radius: 50%;
  background: var(--panel2);
  cursor: pointer;
  touch-action: manipulation;
}

.screens-dot[aria-selected="true"] {
  background: var(--pop);
  transform: scale(1.15);
}

@media (min-width: 700px) {
  .screens-slide {
    padding: 0.75rem 1rem 1rem;
  }
  .screens-slide img {
    max-height: min(82vh, 800px);
  }
}

/* ── Download / CSV ── */
.download-box {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 850px) {
  .download-box {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.code-block {
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.4;
  background: #05080c;
  color: var(--mint);
  border: 3px solid #000;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  box-shadow: inset 0 0 0 2px rgba(74, 222, 128, 0.12);
}

.steps {
  margin: 0;
  padding-left: 1.2rem;
}

.steps li {
  margin-bottom: 0.5rem;
}

.alert {
  border: 3px dashed var(--sky);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  background: rgba(56, 189, 248, 0.08);
}

.alert strong {
  color: var(--pop2);
}

/* ── Footer ── */
.site-footer {
  padding: 2rem 1.25rem;
  background: #05080c;
  border-top: 4px solid #000;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(248, 244, 232, 0.55);
}

.site-footer a {
  color: var(--mint);
}

/* ── Play strip ── */
.play-strip {
  text-align: center;
  padding: 2rem 1.25rem;
  background: linear-gradient(90deg, var(--pop) 0%, var(--pop2) 50%, var(--pop) 100%);
  border-block: 4px solid #000;
}

.play-strip .btn-play {
  font-size: 1.15rem;
  padding: 1rem 2rem;
}

.play-strip p {
  margin: 1rem 0 0;
  font-weight: 800;
  color: #1a0a00;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}
