/* Crisp Cut website — colours taken from the game's own palette (docs/ART_STYLE.md). */

@font-face {
  font-family: "Fredoka";
  src: url("fonts/Fredoka-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #150a0d;
  --bg-raised: #1f0f14;
  --panel: #2a1219;
  --panel-line: #43202a;
  --crimson: #8e2028;
  --crimson-dark: #6b161d;
  --gold: #f2b233;
  --gold-deep: #c8871a;
  --green: #4fb233;
  --green-light: #7ed957;
  --text: #ffffff;
  --muted: #dcc8cb;
  --radius: 20px;
  --max: 1120px;
  --font-display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #ffd16b; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--gold); color: #1b0c10; padding: 8px 14px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { left: 8px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(21, 10, 13, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--panel-line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand span { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.brand:hover { color: var(--text); }
.site-nav { display: none; gap: 24px; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.site-nav a:hover { color: var(--text); }
@media (min-width: 760px) { .site-nav { display: flex; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 40px 0 56px;
  background:
    radial-gradient(900px 520px at 75% 30%, rgba(142, 32, 40, 0.55), transparent 70%),
    radial-gradient(700px 420px at 10% 90%, rgba(107, 22, 29, 0.45), transparent 70%);
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding: 72px 0 88px; }
  .hero .wrap { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px; }
}
.hero-title { margin: 0 0 12px; }
.hero-title img { width: min(420px, 88%); height: auto; }
.tagline {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.5rem, 4.2vw, 2.1rem); line-height: 1.2; margin: 0 0 14px;
}
.hero-text { color: var(--muted); font-size: 1.125rem; max-width: 34em; }

.badge-soon {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 8px; padding: 10px 18px;
  border: 2px solid var(--gold); border-radius: 999px;
  background: rgba(242, 178, 51, 0.1);
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--text);
}
.badge-soon .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green-light); box-shadow: 0 0 0 4px rgba(126, 217, 87, 0.22); flex: none; }
.hero-note { margin-top: 14px; font-size: 0.95rem; color: var(--muted); }

/* Phone frame used for the video and the screenshots */
.phone {
  position: relative;
  border-radius: 30px;
  padding: 8px;
  background: linear-gradient(160deg, var(--gold), var(--gold-deep));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
.phone > img, .phone > video {
  width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover;
  border-radius: 23px; background: #000;
}
.hero-media { justify-self: center; width: min(320px, 78vw); }
.hero-media figcaption { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 14px; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
@media (min-width: 900px) { section { padding: 88px 0; } }
.section-alt { background: var(--bg-raised); border-top: 1px solid var(--panel-line); border-bottom: 1px solid var(--panel-line); }
.section-intro { color: var(--muted); max-width: 40em; margin-bottom: 32px; }
.eyebrow {
  display: inline-block; margin-bottom: 10px;
  color: var(--gold); font-family: var(--font-display); font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.85rem;
}

/* How it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step {
  background: var(--panel); border: 1px solid var(--panel-line); border-radius: var(--radius);
  padding: 22px 20px 20px;
}
.step-num {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px;
  border-radius: 50%; background: var(--crimson); border: 3px solid var(--gold);
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
}
.step p { color: var(--muted); margin: 0; }

/* Features */
.features { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 800px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .features li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.features li {
  position: relative; padding: 16px 18px 16px 52px;
  background: rgba(142, 32, 40, 0.18); border: 1px solid var(--panel-line); border-radius: 16px;
  color: var(--muted);
}
.features li strong { color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; }
.features li::before {
  content: ""; position: absolute; left: 18px; top: 21px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--green); box-shadow: inset 0 3px 0 var(--green-light);
}

/* Screenshots gallery: swipeable row on phones, grid on wide screens */
.gallery {
  list-style: none; margin: 0; padding: 4px 16px 20px;
  display: grid; grid-auto-flow: column; grid-auto-columns: min(62vw, 250px); gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin-inline: -16px;
  scrollbar-color: var(--crimson) transparent;
}
.gallery li { scroll-snap-align: center; }
.gallery figure { margin: 0; }
.gallery .phone { padding: 6px; border-radius: 24px; }
.gallery .phone > img { border-radius: 19px; }
.gallery figcaption { margin-top: 12px; font-size: 0.95rem; color: var(--muted); text-align: center; }
@media (min-width: 700px) { .gallery { margin-inline: -32px; padding-inline: 32px; } }
@media (min-width: 1000px) {
  .gallery { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; overflow: visible; margin-inline: 0; padding-inline: 0; gap: 36px 40px; }
  .gallery li { max-width: 280px; justify-self: center; width: 100%; }
}
.gallery-note { color: var(--muted); font-size: 0.95rem; margin-top: 8px; }

/* About + contact cards */
.two-col { display: grid; gap: 20px; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1fr; gap: 28px; } }
.card {
  background: var(--panel); border: 1px solid var(--panel-line); border-radius: var(--radius);
  padding: 28px 24px;
}
@media (min-width: 700px) { .card { padding: 36px 34px; } }
.card p { color: var(--muted); }
.card p:last-child { margin-bottom: 0; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 14px;
  background: var(--green); color: #fff; text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  box-shadow: inset 0 3px 0 var(--green-light), 0 4px 0 #2f7a1c;
  overflow-wrap: anywhere; text-align: center;
}
.button:hover { color: #fff; filter: brightness(1.06); }
.button:active { transform: translateY(2px); box-shadow: inset 0 3px 0 var(--green-light), 0 2px 0 #2f7a1c; }

/* ---------- Footer ---------- */
.site-footer { padding: 36px 0 44px; border-top: 1px solid var(--panel-line); color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
.site-footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

/* ---------- Privacy / text pages ---------- */
.doc { padding: 48px 0 72px; }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.doc h2 { font-size: 1.5rem; margin-top: 2em; }
.doc h3 { font-size: 1.15rem; margin-top: 1.4em; }
.doc p, .doc li { color: var(--muted); }
.doc strong { color: var(--text); }
.doc ul { padding-left: 1.3em; }
.doc li { margin-bottom: 0.5em; }
.doc .updated { color: var(--gold); font-weight: 600; }
.summary-box {
  background: var(--panel); border: 1px solid var(--panel-line); border-left: 4px solid var(--gold);
  border-radius: 14px; padding: 18px 20px; margin: 24px 0 8px;
}
.summary-box p:last-child { margin-bottom: 0; }
.table-wrap { margin: 12px 0 8px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; border: 1px solid var(--panel-line); color: var(--muted); }
.doc th { background: var(--panel); color: var(--text); font-family: var(--font-display); font-weight: 700; }
.doc td:first-child { color: var(--text); font-weight: 600; }
/* On narrow screens each row becomes its own card, labelled from data-label. */
@media (max-width: 640px) {
  .doc table, .doc tbody, .doc tr, .doc td { display: block; width: 100%; }
  .doc thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .doc tr { background: var(--panel); border: 1px solid var(--panel-line); border-radius: 14px; padding: 6px 16px; margin-bottom: 14px; }
  .doc td { border: 0; padding: 8px 0; }
  .doc td + td { border-top: 1px solid var(--panel-line); }
  .doc td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 2px;
    color: var(--gold); font-family: var(--font-display); font-weight: 700; font-size: 0.85rem;
    letter-spacing: 0.04em; text-transform: uppercase;
  }
}

.center-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }
