/* ===================================================================
   NumGen Sub-pages — Clean hero aesthetic
   =================================================================== */

:root {
  --bg:           #faf6f1;
  --bg-2:         #f3eee5;
  --surface:      #ffffff;
  --surface-2:    #faf6ed;
  --border:       #e8dfcc;
  --border-soft:  #f0e9da;
  --text:         #1f1a14;
  --text-2:       #5c5547;
  --text-3:       #8a8275;
  --text-faint:   #b5ac9b;
  --accent:       #e85f4d;
  --accent-2:     #d44a39;
  --accent-soft:  rgba(232, 95, 77, 0.10);
  --accent-glow:  rgba(232, 95, 77, 0.30);
  --r-sm: 8px;
  --r-md: 12px;
  --r-xl: 20px;
  --font-ui: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI",
             "PingFang TC", "PingFang SC", "Hiragino Sans", "Noto Sans CJK",
             sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: var(--font-ui);
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 235, 220, 0.55) 0%, transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
ul, ol { list-style: none; }

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(16px, 4vw, 28px) clamp(16px, 4vw, 28px) 80px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  gap: 12px;
}
.brand {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-2);
}
.brand:hover { color: var(--accent); }
.topbar-nav { display: flex; gap: 16px; align-items: center; }
.nav-link {
  font-size: 13px;
  color: var(--text-3);
}
.nav-link:hover { color: var(--accent); }

/* Hero card — LCD device aesthetic */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 22px 22px 30px;
  margin-bottom: 36px;
  background: linear-gradient(160deg, #2a221d 0%, #1a1612 100%);
  border: 1px solid #100c08;
  border-radius: 22px;
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 1px 0 rgba(255, 255, 255, 0.4),
    0 10px 24px rgba(40, 28, 20, 0.22),
    0 28px 56px rgba(40, 28, 20, 0.14);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 30%);
  pointer-events: none;
  border-radius: 22px;
}
.hero-eyebrow {
  position: relative;
  font-size: 10px;
  letter-spacing: 0.22em;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
  margin-bottom: 14px;
}
.hero-title {
  position: relative;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-size: clamp(40px, 9vw, 72px);
  margin: 0 auto 22px;
  padding: 24px 18px;
  border-radius: 14px;
  background:
    radial-gradient(ellipse 90% 70% at 50% 35%, #fff4ec 0%, #f6e6d6 100%);
  color: var(--accent-2);
  text-shadow:
    0 0 14px rgba(232, 95, 77, 0.30),
    0 1px 0 rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 2px 6px rgba(40, 28, 20, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.5),
    inset 0 0 0 1px rgba(40, 28, 20, 0.12);
  overflow: hidden;
  isolation: isolate;
}
.hero-title::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg,
      rgba(40, 28, 20, 0.025) 0px,
      rgba(40, 28, 20, 0.025) 1px,
      transparent 1px,
      transparent 3px);
  pointer-events: none;
  border-radius: 14px;
  z-index: -1;
}
.hero-title::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, transparent 22%);
  pointer-events: none;
  border-radius: 14px;
  z-index: -1;
}
.hero-numbers {
  font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-variant-numeric: tabular-nums slashed-zero;
  color: var(--accent-2);
}
.hero-sub {
  position: relative;
  font-size: clamp(14px, 3vw, 16px);
  color: rgba(255, 255, 255, 0.72);
  margin: 0 auto 24px;
  max-width: 520px;
  line-height: 1.55;
}
.hero-cta {
  position: relative;
  display: inline-block;
  padding: 14px 30px;
  background: linear-gradient(180deg, #ff7361 0%, var(--accent) 50%, var(--accent-2) 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 4px 12px rgba(232, 95, 77, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
}
.hero-cta:hover {
  transform: translateY(-2px);
  color: #ffffff;
  filter: brightness(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 8px 22px rgba(232, 95, 77, 0.42);
}
.hero-cta:active { transform: translateY(0); }

.info { margin-bottom: 36px; }
.info section { margin-bottom: 28px; }
.info h2 {
  font-size: clamp(20px, 4vw, 24px);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 10px;
}
.info p, .info li {
  font-size: 15px;
  color: var(--text-2);
}
.info p { margin-bottom: 10px; }
.info ol {
  margin: 12px 0 14px;
  padding-left: 0;
  counter-reset: step;
}
.info ol li {
  position: relative;
  padding: 6px 0 6px 32px;
  margin-bottom: 4px;
}
.info ol li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 8px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 22px;
}
.info ul.bullet {
  margin: 12px 0 14px;
  padding-left: 16px;
}
.info ul.bullet li {
  list-style: disc;
  list-style-position: outside;
  padding-left: 4px;
  margin-bottom: 6px;
}
.info strong { color: var(--text); font-weight: 600; }

.related h2 {
  font-size: clamp(18px, 4vw, 22px);
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  list-style: none;
  padding: 0;
  margin-bottom: 24px;
}
.related-grid a {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.related-grid a:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  color: var(--text);
  box-shadow: 0 4px 16px rgba(232, 95, 77, 0.10);
}
.related-grid a small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  margin-top: 2px;
}

.site-footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
}
.site-footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-3);
}
.site-footer a { color: var(--text-2); }
.site-footer a:hover { color: var(--accent); }
.site-footer .sub {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-3);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
