/* Temporal Hollow design system
   Fonts (Lora 400/600, Inter) are loaded by a <link> in each page's <head>. */

:root {
  /* Color */
  --bg: #0e0c09;
  --surface: #1a1713;
  --accent: #c8902a;
  --accent-hover: #dba43c;
  --accent-dark: #a97623;
  --text: #e8e0d4;
  --text-muted: #9a9188;
  --danger: #a65a45;
  --on-accent: #14100a;

  /* Lines and shadow */
  --border-subtle: 1px solid rgba(255, 255, 255, 0.07);
  --shadow-warm: 0 1px 2px rgba(20, 10, 0, 0.5), 0 4px 14px rgba(40, 22, 4, 0.28);

  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;

  /* Shape */
  --radius: 3px;

  /* Type */
  --font-heading: "Lora", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container-width: 860px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

main { flex: 1; padding-block: var(--space-xl); }

img { max-width: 100%; height: auto; }

::selection { background: rgba(200, 144, 42, 0.35); }

/* Typography */
h1, h2, h3, h4 {
  margin: 0 0 var(--space-md);
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

h1 { font-size: 2.5rem; letter-spacing: 0.01em; }
h2 { font-size: 1.75rem; margin-top: var(--space-xl); }
h3 { font-size: 1.3rem; margin-top: var(--space-lg); }
h4 { font-size: 1.05rem; margin-top: var(--space-lg); }

h1:first-child, h2:first-child, h3:first-child, h4:first-child { margin-top: 0; }

p { margin: 0 0 var(--space-md); }

.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(200, 144, 42, 0.4);
  text-underline-offset: 0.15em;
  transition: color 0.12s ease;
}

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

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

hr {
  border: 0;
  border-top: var(--border-subtle);
  margin: var(--space-xl) 0;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

/* Nav */
.nav {
  background: var(--bg);
  border-bottom: var(--border-subtle);
}

.nav .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-lg);
  padding-block: var(--space-md);
}

.nav-brand {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.nav-brand:hover { color: var(--accent-hover); }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-lg);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-decoration: none;
}

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

.nav-links a[aria-current="page"],
.nav-links a.active { color: var(--accent); }

/* Footer */
.footer {
  background: var(--bg);
  border-top: var(--border-subtle);
  padding-block: var(--space-xl);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  margin: 0 0 var(--space-xs);
}

.footer p { margin: 0 0 var(--space-xs); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--on-accent);
}

.btn-secondary {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--accent-hover);
  color: var(--accent-hover);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

/* Hero: contained, left-aligned, no image */
.hero {
  min-height: 40vh;
  display: flex;
  align-items: center;
  padding-block: var(--space-xl);
  border-bottom: var(--border-subtle);
}

.hero h1 { font-size: 3rem; margin-bottom: var(--space-md); }

.hero p {
  max-width: 34rem;
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* Two-column block, stacks on mobile */
.split {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--space-xl);
  align-items: start;
}

/* Rules: section title left, prose right, thin divider between sections */
.rules-section {
  display: grid;
  grid-template-columns: 1fr 2.2fr;
  gap: var(--space-xl);
  padding-block: var(--space-xl);
  border-top: var(--border-subtle);
}

.rules-section h2 { margin: 0; font-size: 1.4rem; }
.rules-section p { margin-bottom: var(--space-lg); }
.rules-section p:last-child { margin-bottom: 0; }

.lead { font-size: 1.1rem; color: var(--text-muted); max-width: 36rem; }

/* Mod list: name left, description right, divider between rows */
.mod-list {
  list-style: none;
  margin: var(--space-lg) 0;
  padding: 0;
  border-top: var(--border-subtle);
}

.mod-list li {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: var(--border-subtle);
}

.mod-name { font-weight: 500; }
.mod-desc { color: var(--text-muted); }

/* Numbered steps: a simple flow, not a card grid */
.steps {
  list-style: none;
  counter-reset: step;
  margin: var(--space-lg) 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 var(--space-lg) 3rem;
}

.steps li:last-child { padding-bottom: 0; }

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.9rem;
  text-align: center;
}

.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(1rem - 0.5px);
  top: 2.25rem;
  bottom: 0.25rem;
  border-left: var(--border-subtle);
}

.steps p { margin: 0; }
.steps strong { font-weight: 600; }

.card-accent { border-left: 3px solid var(--accent); margin-top: var(--space-xl); }

code {
  padding: 0.1em 0.35em;
  background: var(--surface);
  border: var(--border-subtle);
  border-radius: var(--radius);
  font-size: 0.9em;
}

/* Q&A blocks */
.qa {
  padding-block: var(--space-lg);
  border-top: var(--border-subtle);
}

.qa:last-child { padding-bottom: 0; }
.qa h3 { margin-top: 0; font-size: 1.1rem; }
.qa p:last-child { margin-bottom: 0; }

/* Callout: a note set apart from the page flow */
.callout {
  background: var(--surface);
  border: var(--border-subtle);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--space-md) var(--space-lg);
  margin-top: var(--space-xl);
}

.callout > :last-child { margin-bottom: 0; }

/* Spec sheet: label / value rows with thin dividers */
.spec { margin: 0; }

.spec > div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: var(--border-subtle);
  font-size: 0.95rem;
}

.spec > div:first-child { padding-top: 0; }
.spec > div:last-child { border-bottom: 0; padding-bottom: 0; }

.spec dt { color: var(--text-muted); }
.spec dd { margin: 0; text-align: right; }

/* Row of linked cards */
.card-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.card-row .card { margin-bottom: 0; }

.card-link {
  display: block;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.12s ease;
}

.card-link:hover { border-color: rgba(200, 144, 42, 0.5); color: var(--text); }
.card-link:hover h3 { color: var(--accent-hover); }
.card-link h3 { margin-bottom: var(--space-sm); font-size: 1.15rem; transition: color 0.12s ease; }
.card-link p { color: var(--text-muted); font-size: 0.95rem; }

/* Card */
.card {
  background: var(--surface);
  border: var(--border-subtle);
  border-radius: var(--radius);
  box-shadow: var(--shadow-warm);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.card > :last-child { margin-bottom: 0; }

@media (max-width: 720px) {
  .split, .card-row, .rules-section { grid-template-columns: 1fr; }
  .split { gap: var(--space-lg); }
  .mod-list li { grid-template-columns: 1fr; gap: 0; }
  .rules-section { gap: var(--space-md); padding-block: var(--space-lg); }
  .card-row { gap: var(--space-md); }
}

@media (max-width: 640px) {
  .nav .container { flex-direction: column; align-items: flex-start; }
  .nav-links { gap: var(--space-xs) var(--space-md); }
}

.back-to-top { margin: var(--space-xl) 0 0; font-size: 0.9rem; }

@media (max-width: 560px) {
  .hero h1 { font-size: 2.2rem; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  main { padding-block: var(--space-lg); }
}
