/* Gilded Caper website. No external resources; system font stacks only. */

:root {
  --bg: #141B2D;
  --surface: #1E2740;
  --surface-high: #2A3555;
  --text: #F3EBDD;
  --muted: #A9B1C6;
  --gold: #D4AF5F;
  --hairline: #3A4668;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", Times, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 40px);
  --radius: 12px;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

img, svg { display: block; max-width: 100%; }

a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 0.6em;
  letter-spacing: 0.005em;
}
h1 { font-size: clamp(2.25rem, 7vw, 3.75rem); }
h2 { font-size: clamp(1.6rem, 4.2vw, 2.25rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  background: var(--gold);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  z-index: 10;
}
.skip-link:focus-visible { top: 16px; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--hairline);
}
.site-header .inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.wordmark .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  flex: none;
}
.lang-switch {
  font-size: 0.95rem;
  color: var(--muted);
  white-space: nowrap;
}
.lang-switch a {
  display: inline-block;
  padding: 8px 4px;
  min-height: 44px;
  line-height: 28px;
}

/* Layout */
main { display: block; }
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section {
  padding: clamp(56px, 10vw, 112px) 0;
  border-top: 1px solid var(--hairline);
}
.eyebrow {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold);
  margin: 0 0 16px;
}
.lede {
  font-size: clamp(1.125rem, 2.4vw, 1.3rem);
  color: var(--muted);
  max-width: 36em;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 12vw, 140px) 0 clamp(72px, 12vw, 140px);
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
}
.hero h1 { margin-bottom: 0.4em; }
.hero h1 .gold { color: var(--gold); display: block; }
.moon {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 1;
  justify-self: center;
}
.moon svg { width: 100%; height: auto; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  min-width: 160px;
  padding: 0 28px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
  transition: transform 80ms cubic-bezier(0.2, 0, 0, 1), background-color 80ms;
}
.button.primary { background: var(--gold); color: var(--bg); }
.button.primary:hover { background: #E0BE73; text-decoration: none; }
.button.secondary {
  color: var(--gold);
  border: 1.5px solid var(--gold);
  background: transparent;
}
.button.secondary:hover { background: var(--surface); text-decoration: none; }
.button:active { transform: scale(0.97); }
.note {
  margin-top: 16px;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Cards */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 36px);
}
.card svg { width: 72px; height: 72px; margin-bottom: 20px; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--muted); }

.story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 6vw, 72px);
  align-items: start;
}
.story p { color: var(--muted); }

.features {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--hairline);
}
.features li {
  padding: 22px 20px 22px 0;
  border-bottom: 1px solid var(--hairline);
}
.features strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 4px;
}
.features span { color: var(--muted); font-size: 0.98rem; }

.fair {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 48px);
  max-width: 760px;
}
.fair p { color: var(--muted); }
.fair p:last-child { margin-bottom: 0; }

/* Legal pages */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 80px) var(--gutter) clamp(56px, 10vw, 96px);
}
.legal h1 { font-size: clamp(2rem, 6vw, 2.75rem); }
.legal h2 {
  font-size: 1.5rem;
  margin-top: 2.2em;
  padding-top: 1.2em;
  border-top: 1px solid var(--hairline);
}
.legal h3 { margin-top: 1.8em; }
.legal ul { padding-left: 1.25em; margin: 0 0 1em; }
.legal li { margin-bottom: 0.4em; }
.legal strong { color: var(--text); }
.legal .meta { color: var(--muted); }
.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.4em;
  border: 1px solid var(--hairline);
  border-radius: 8px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  line-height: 1.5;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
  min-width: 140px;
}
th { background: var(--surface); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
.address { white-space: pre-line; }

/* 404 */
.notfound {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(72px, 14vw, 160px) var(--gutter);
  text-align: center;
}
.notfound .lede { margin: 0 auto 1em; }
.notfound .actions { justify-content: center; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.95rem;
}
.site-footer .inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px var(--gutter) 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
}
.site-footer nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}
.site-footer nav a {
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
}
.site-footer p { margin: 0; line-height: 44px; }

/* Responsive */
@media (max-width: 860px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .moon { width: min(70%, 260px); order: -1; }
  .grid-2, .story { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .features { grid-template-columns: 1fr; }
  .features li { padding-right: 0; }
  .actions .button { flex: 1 1 100%; }
  .site-footer p { line-height: 1.6; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

@media print {
  body { background: #FFFFFF; color: #000000; }
  .site-header, .site-footer, .skip-link { display: none; }
  a { color: #000000; }
  th { background: #EEEEEE; }
}
