/* SACD ISO Patcher - landing page. Dark theme, no external resources. */

:root {
  --bg: #0f1115;
  --bg-2: #12151b;
  --surface: #171a21;
  --surface-2: #1c2029;
  --border: #262a33;
  --text: #e6e8eb;
  --muted: #9aa0aa;
  --accent: #e6b14c;
  --accent-hover: #f0c067;
  --accent-ink: #1a1205;
  --radius: 12px;
  --maxw: 1040px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.4em;
}

.nowrap { white-space: nowrap; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 80px 0 64px;
  background:
    radial-gradient(900px 360px at 50% -120px, rgba(230, 177, 76, 0.12), transparent 70%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  border-bottom: 1px solid var(--border);
}

.badge {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.tagline {
  max-width: 640px;
  margin: 0 auto 28px;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--muted);
}

.cta { display: flex; flex-direction: column; align-items: center; gap: 16px; }

.meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  color: var(--muted);
  font-size: 0.9rem;
}
.meta span { position: relative; }
.meta span + span::before {
  content: "";
  position: absolute;
  left: -11px; top: 50%;
  width: 3px; height: 3px;
  margin-top: -1px;
  border-radius: 50%;
  background: var(--border);
}

.checksum {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  word-break: break-all;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: var(--radius);
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--accent-hover); color: var(--accent-ink); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* --- Sections --- */
main { padding: 24px 0 8px; }

section { padding: 48px 0; border-bottom: 1px solid var(--border); }
section:last-child { border-bottom: 0; }

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  letter-spacing: -0.01em;
  margin: 0 0 28px;
}

h3 { margin: 0 0 8px; font-size: 1.15rem; }

/* --- Feature grid --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card p { margin: 0; color: var(--muted); }

.icon {
  width: 28px; height: 28px;
  margin-bottom: 14px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- Screenshots --- */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}
.shots-intro { color: var(--muted); margin: -12px 0 26px; max-width: 720px; }
.shot { margin: 0; }
.shot a { display: block; }
.shot img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease;
}
.shot a:hover img { border-color: var(--accent); }

/* --- Lightbox viewer (CSS-only, via :target - no JS) --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 9, 12, 0.93);
  padding: 24px;
}
.lightbox:target { display: flex; }
.lb-backdrop { position: absolute; inset: 0; cursor: zoom-out; }
.lb-figure {
  position: relative;
  z-index: 2;
  margin: 0;
  max-width: 1100px;
  text-align: center;
  pointer-events: none;
}
.lb-figure img {
  max-width: 100%;
  max-height: 80vh;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.lb-figure figcaption { margin-top: 14px; color: var(--text); font-size: 0.95rem; }
.lb-prev, .lb-next, .lb-x {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: rgba(20, 22, 28, 0.7);
  border: 1px solid var(--border);
  text-decoration: none;
  border-radius: 50%;
}
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 56px; height: 56px; font-size: 2rem; line-height: 1; }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-x { top: 20px; right: 20px; width: 44px; height: 44px; font-size: 1.2rem; }
.lb-prev:hover, .lb-next:hover, .lb-x:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (max-width: 600px) {
  .lb-prev, .lb-next { width: 44px; height: 44px; font-size: 1.5rem; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}
.shot figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}
.placeholder .ph {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

/* --- Steps --- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; max-width: 760px; }
.steps li {
  position: relative;
  padding: 0 0 18px 52px;
  margin: 0;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  font-weight: 600;
  border-radius: 50%;
}

/* --- Story spoiler (details/summary, no JS) --- */
.story {
  max-width: 760px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.story summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.story summary::-webkit-details-marker { display: none; }
.story summary::before {
  content: "";
  width: 8px; height: 8px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}
.story[open] summary::before { transform: rotate(45deg); }
.story-body {
  padding: 0 22px 8px 22px;
  color: var(--muted);
}
.story-body p { margin: 0 0 14px; }
.story-body em { color: var(--text); font-style: italic; }

/* --- What's new list --- */
.whatsnew { list-style: none; padding: 0; margin: 0; max-width: 760px; }
.whatsnew li { position: relative; padding: 7px 0 7px 26px; color: var(--muted); }
.whatsnew li::before {
  content: "";
  position: absolute; left: 2px; top: 15px;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--accent);
}

/* --- Download box --- */
.download-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}
.reqs {
  list-style: none;
  padding: 0;
  margin: 22px auto 0;
  max-width: 540px;
  color: var(--muted);
  text-align: left;
}
.reqs li { padding: 6px 0 6px 26px; position: relative; }
.reqs li::before {
  content: "";
  position: absolute; left: 4px; top: 14px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.download-box .checksum { text-align: center; }

/* --- Footer --- */
footer {
  padding: 32px 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 600px) {
  .hero { padding: 56px 0 44px; }
  section { padding: 36px 0; }
}
