/* ============================================================
   DesignedUniverse — Global Stylesheet
   Modern, centered, responsive layout for a static site.
   System-font based (offline-safe), light theme with deep-navy
   and amber accents derived from the original design.
   ============================================================ */

:root {
  /* Palette */
  --navy-900: #0b1f38;
  --navy-800: #112b4f;
  --navy-700: #16365f;
  --navy-600: #1d4683;
  --amber-600: #d97706;
  --amber-500: #e07b00;
  --ink: #202a37;
  --ink-soft: #4a5666;
  --muted: #6b7686;
  --line: #dde3ec;
  --line-soft: #ebeff5;
  --bg: #f4f6fa;
  --card: #ffffff;
  --ok: #1a7f4b;

  /* Type */
  --sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;

  /* Layout */
  --wrap: 1120px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 8px 28px rgba(12, 32, 63, 0.08);
  --shadow-sm: 0 2px 10px rgba(12, 32, 63, 0.06);
  --space: 1.5rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1200px 420px at 50% -140px, rgba(22, 54, 95, 0.10), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.container--narrow { max-width: 860px; }

img { max-width: 100%; height: auto; }
a { color: var(--navy-600); text-decoration: none; }
a:hover { color: var(--amber-600); text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(224, 123, 0, 0.45);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy-900); line-height: 1.22; font-weight: 700; }
h1 { font-size: clamp(1.85rem, 4vw, 2.7rem); margin: 0 0 0.6rem; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin: 2.2rem 0 0.9rem; }
h3 { font-size: 1.25rem; margin: 1.6rem 0 0.6rem; }
h4 { font-size: 1.05rem; margin: 1.2rem 0 0.4rem; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.12rem; color: var(--ink-soft); }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  background: linear-gradient(180deg, var(--navy-900), var(--navy-800));
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  position: relative;
  z-index: 20;
}
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding: 0.85rem 1.25rem;
}
.brand { display: flex; align-items: center; gap: 0.65rem; color: #fff; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img.brand-mark { height: 40px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; letter-spacing: 0.02em; }
.brand-tag { font-size: 0.72rem; color: #ffd9a0; letter-spacing: 0.06em; text-transform: uppercase; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.site-nav a { color: #eaeef5; padding: 0.42rem 0.75rem; border-radius: 8px; font-size: 0.95rem; }
.site-nav a:hover { background: rgba(255,255,255,0.10); color: #fff; text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,0.4); color: #fff;
  font-size: 1.3rem; line-height: 1; padding: 0.3rem 0.6rem; border-radius: 8px; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; background: var(--navy-700); color: #fff; padding: 0.65rem 1.15rem;
  border-radius: 999px; font-weight: 600; border: 0; cursor: pointer; transition: transform .12s ease, background .2s ease; }
.btn:hover { background: var(--navy-600); color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn--accent { background: var(--amber-600); }
.btn--accent:hover { background: var(--amber-500); }
.btn--ghost { background: transparent; border: 1px solid currentColor; }

/* ---------- Hero ---------- */
.hero { padding: 3rem 0 2.6rem; text-align: center; }
.hero h1 { margin-bottom: .5rem; }
.hero .lead { max-width: 760px; margin: 0 auto 1.4rem; }
.hero-actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Sections / Cards ---------- */
.section { padding: 2.4rem 0; }
.section__head { margin-bottom: 1.4rem; }
.section__head h2 { margin-top: 0; }
.grid { display: grid; gap: 1.25rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 1.5rem; transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card--accent { border-top: 4px solid var(--amber-600); }
.card-link { display: inline-block; margin-top: 0.6rem; font-weight: 600; }

/* ---------- Quotes ---------- */
.blockquote { background: #fff; border-left: 4px solid var(--amber-600); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem; margin: 1.4rem 0; box-shadow: var(--shadow-sm); }
.blockquote p { margin-bottom: .35rem; }
.blockquote cite { font-style: normal; color: var(--muted); font-size: 0.9rem; }

/* ---------- Callout ---------- */
.callout { background: #eef4ff; border: 1px solid #cbd8f2; border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin: 1.3rem 0; }
.callout--warn { background: #fffbeb; border-color: #f0d9a8; }

/* ---------- TOC / Article ---------- */
.toc { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 1.1rem 1.3rem 1.1rem 2rem; box-shadow: var(--shadow-sm); }
.toc ul { margin: .3rem 0 0; padding-left: 1rem; }
.toc a { color: var(--ink-soft); }
article.content p, article.content li, article.content blockquote { color: #2a3442; }
article.content img { border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }

/* ---------- Features list ---------- */
.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li { padding: 0.55rem 0 0.55rem 1.9rem; position: relative; }
.feature-list li::before { content: "✦"; position: absolute; left: 0.3rem; top: 0.55rem; color: var(--amber-600); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 0.86rem; color: var(--muted); padding: 0.9rem 0 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "›"; margin-right: 0.35rem; color: var(--line); }
.breadcrumbs a { color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #c8d3e4; margin-top: 3rem; }
.site-footer a { color: #dfe8f5; }
.site-footer a:hover { color: #ffd9a0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.6rem; padding: 2.4rem 0; }
.footer-grid h4 { color: #fff; margin-top: 0; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.4rem; font-size: 0.93rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 1.1rem 0; text-align: center; font-size: 0.85rem; }

/* ---------- Forum archive polish ---------- */
.forum-wrap { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 1.4rem; overflow-x: auto; }
.forum-wrap table { max-width: 100%; }
.forum-head { background: var(--navy-800); color: #fff; padding: 0.6rem 1rem; border-radius: var(--radius-sm) var(--radius-sm) 0 0; font-weight: 700; }
.arch-notice { background: #fff7e6; border: 1px solid #f0d9a8; border-radius: var(--radius-sm); padding: 0.8rem 1rem; margin: 1rem 0; font-size: 0.92rem; color: #6b5200; }

/* ---------- Forms ---------- */
input, select, textarea { font: inherit; color: inherit; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.field input, .field textarea { width: 100%; padding: 0.6rem 0.8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .site-nav { width: 100%; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav { display: none; }
  .site-nav.open { display: block; }
  .site-nav a { display: block; }
  body { font-size: 16px; }
  .hero { padding: 2.2rem 0 1.9rem; }
  .section { padding: 1.8rem 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .card, .btn { transition: none; }
}

/* ---------- Accessibility / visibility ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
