@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600&display=swap");

:root {
  --bg: #f7f3ea;
  --paper: #fffdf8;
  --paper-soft: #faf6ee;
  --border: #e2d8c8;
  --border-soft: #ebe3d6;
  --text: #2a241c;
  --muted: #5f564a;
  --muted-2: #84786a;
  --accent: #8a5c14;
  --accent-hot: #a56d18;
  --ink: #fffaf1;
  --white: #ffffff;
  --radius: 10px;
  --font: "Source Serif 4", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --display: Fraunces, "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 1.05rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-optical-sizing: auto;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--accent-hot); }
.wrap { width: min(1080px, 92vw); margin: 0 auto; }
.wrap-narrow { width: min(680px, 92vw); margin: 0 auto; }
.wrap-prose { width: min(720px, 92vw); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid var(--border-soft);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 7px; }
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.25rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  justify-content: flex-end;
}
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--ink); }
.btn-primary:hover { background: var(--accent-hot); color: var(--ink); text-decoration: none; }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Hero */
.hero {
  padding: 3.5rem 0 2.75rem;
  border-bottom: 1px solid var(--border-soft);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}
.hero-copy { max-width: 34rem; }
.badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(138, 92, 20, 0.35);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  margin-bottom: 1rem;
  background: rgba(255, 250, 241, 0.7);
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.15rem, 4.8vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin-bottom: 0.85rem;
}
.hero .lead {
  color: var(--muted);
  font-size: 1.15rem;
  margin-bottom: 1.4rem;
  line-height: 1.65;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1.1rem; }
.hero-meta {
  font-family: var(--sans);
  color: var(--muted-2);
  font-size: 0.86rem;
  line-height: 1.5;
}
.hero-art { display: flex; justify-content: center; }
.hero-frame {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}
.hero-logo { width: min(400px, 100%); }

/* Sections */
main { flex: 1; }
section { padding: 3rem 0; }
.section-head { max-width: 36rem; margin: 0 0 1.75rem; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(1.55rem, 3.2vw, 2rem);
  letter-spacing: -0.015em;
  font-weight: 600;
  margin-bottom: 0.45rem;
}
.section-head p { color: var(--muted); }
.eyebrow {
  display: block;
  font-family: var(--sans);
  color: var(--accent);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
  font-weight: 600;
}

/* How it plays - editorial strips, not emoji cards */
.how-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.how-item {
  padding: 1.5rem 1.35rem;
  border-right: 1px solid var(--border);
}
.how-item:last-child { border-right: none; }
.how-item h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.how-item p { color: var(--muted); font-size: 0.98rem; }

/* Orders gallery */
.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.15rem;
}
.order-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}
.order-card:hover {
  border-color: rgba(138, 92, 20, 0.45);
  text-decoration: none;
  color: inherit;
}
.order-banner {
  background: var(--white);
  padding: 0.7rem;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-soft);
}
.order-banner img {
  width: 100%;
  height: auto;
  max-height: 100px;
  object-fit: contain;
}
.order-unit {
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 190px;
  padding: 0.6rem 0.7rem 0.4rem;
  border-bottom: 1px solid var(--border-soft);
}
.order-unit img {
  width: 100%;
  max-width: 220px;
  height: 200px;
  object-fit: contain;
}
.order-body { padding: 0.9rem 1rem 1.1rem; }
.virtue {
  font-family: var(--sans);
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  font-weight: 600;
}
.order-body h3 {
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.anointed {
  color: var(--muted-2);
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
}
.anointed strong { color: var(--text); font-weight: 600; }
.order-body p { color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
.orders-cta {
  margin-top: 1.5rem;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.92rem;
}

/* Platforms strip */
.platform-strip {
  background: var(--paper-soft);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.platform-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.platform-inner h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.platform-inner p { color: var(--muted); margin-bottom: 0.75rem; }
.pill-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.pill {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  background: var(--white);
}
.pill strong { color: var(--text); font-weight: 600; }

/* Lore page */
.lore-hero {
  padding: 2.75rem 0 1.5rem;
  border-bottom: 1px solid var(--border-soft);
}
.lore-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.lore-hero .deck { color: var(--muted); font-size: 1.1rem; max-width: 36rem; }
.chronicle {
  padding: 2.5rem 0 3.5rem;
}
.chronicle p {
  margin-bottom: 1.25rem;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.8;
}
.chronicle p:last-child { margin-bottom: 0; }
.lore-foot {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-soft);
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--muted);
}

/* Order detail pages */
.order-page-hero {
  padding: 2.5rem 0 0;
}
.order-page-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: start;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-soft);
}
.order-page-copy .virtue { margin-bottom: 0.5rem; }
.order-page-copy h1 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 4vw, 2.55rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}
.order-subtitle {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}
.origin p {
  margin-bottom: 1.15rem;
  line-height: 1.8;
  font-size: 1.05rem;
}
.origin p:last-child { margin-bottom: 0; }
.order-aside {
  position: sticky;
  top: 5rem;
}
.order-aside .order-banner,
.order-aside .order-unit {
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.order-aside .order-banner {
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
}
.order-aside .order-unit {
  border-radius: 0 0 var(--radius) var(--radius);
  min-height: 220px;
}
.order-aside .order-unit img {
  max-width: 240px;
  height: 220px;
}
.in-field {
  margin: 2rem 0;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--paper);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.in-field h2 {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.in-field p { color: var(--muted); font-size: 0.98rem; margin: 0; }
.order-nav-links {
  margin: 2rem 0 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-soft);
}
.order-nav-links h2 {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.order-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.order-chip {
  font-family: var(--sans);
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  background: var(--white);
}
.order-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}
.order-chip[aria-current="page"] {
  border-color: var(--accent);
  color: var(--text);
  background: var(--paper-soft);
}

/* Legal / support pages */
.page-main { padding: 2.5rem 0 3.5rem; }
.page-main h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  font-weight: 600;
  margin-bottom: 0.35rem;
  letter-spacing: -0.015em;
}
.updated { color: var(--muted-2); font-size: 0.9rem; margin-bottom: 1.4rem; font-family: var(--sans); }
.content {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
}
.content h2 {
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 600;
  margin: 1.35rem 0 0.4rem;
}
.content h2:first-child { margin-top: 0; }
.content p, .content li { color: var(--muted); margin-bottom: 0.65rem; }
.content ul { padding-left: 1.2rem; margin-bottom: 0.65rem; }

/* Footer - quiet */
.site-footer {
  border-top: 1px solid var(--border-soft);
  background: #eee6d8;
  padding: 1.5rem 0 1.75rem;
  color: var(--muted-2);
  font-size: 0.86rem;
  margin-top: auto;
  font-family: var(--sans);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.5rem;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.65rem 1.1rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-legal { line-height: 1.5; }
.footer-company {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  opacity: 0.7;
  margin-top: 0.15rem;
}

.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;
}
.muted { color: var(--muted); }

@media (max-width: 900px) {
  .hero-inner, .platform-inner, .order-page-layout { grid-template-columns: 1fr; }
  .how-list { grid-template-columns: 1fr; }
  .how-item { border-right: none; border-bottom: 1px solid var(--border); }
  .how-item:last-child { border-bottom: none; }
  .hero { padding-top: 2.25rem; }
  .hero-art { order: -1; }
  .hero-logo { width: min(280px, 65vw); margin: 0 auto; }
  .order-aside { position: static; max-width: 280px; }
}
@media (max-width: 600px) {
  .site-header .wrap { flex-direction: column; align-items: flex-start; }
  .nav { justify-content: flex-start; }
}
