/* =====================================================================
   Solaria site styles
   Dark, warm stone; gold and ember; Cinzel for display, Alegreya Sans
   for reading. Fonts are served from /fonts (no third-party requests).
   ===================================================================== */

@font-face { font-family: 'Cinzel'; font-weight: 600; font-display: swap; src: url('../fonts/cinzel-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cinzel'; font-weight: 700; font-display: swap; src: url('../fonts/cinzel-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cinzel'; font-weight: 800; font-display: swap; src: url('../fonts/cinzel-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Alegreya Sans'; font-weight: 400; font-display: swap; src: url('../fonts/alegreya-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Alegreya Sans'; font-weight: 400; font-style: italic; font-display: swap; src: url('../fonts/alegreya-sans-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Alegreya Sans'; font-weight: 500; font-display: swap; src: url('../fonts/alegreya-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Alegreya Sans'; font-weight: 700; font-display: swap; src: url('../fonts/alegreya-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'IM Fell English'; font-style: italic; font-display: swap; src: url('../fonts/im-fell-english-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url('../fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }

:root {
  color-scheme: dark;
  --bg-0: #0c0a08;
  --bg-1: #12100d;
  --bg-2: #19150f;
  --bg-3: #221c15;
  --bg-4: #2b241b;
  --line: rgb(224 196 140 / 0.12);
  --line-2: rgb(224 196 140 / 0.24);
  --text: #ede4d0;
  --text-2: #cbbfa5;
  --muted: #998c73;
  --gold: #d4a93a;
  --gold-hi: #f3d47c;
  --gold-lo: #8f6c1d;
  --red: #b4392c;
  --red-hi: #e0634b;
  --green: #74b398;
  --frost: #9cc4d8;
  --ember: #e8833c;
  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --body: 'Alegreya Sans', 'Segoe UI', system-ui, sans-serif;
  --accent: 'IM Fell English', Georgia, serif;
  --mono: 'JetBrains Mono', Consolas, monospace;
  --wrap: 1180px;
  --nav-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* A fine grain over everything, so flat colour never looks like plastic. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: rgb(212 169 58 / 0.35); color: #fff; }

a { color: var(--gold-hi); text-decoration: none; transition: color 0.2s; }
a:hover { color: #fff3cf; }

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

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--text);
  text-wrap: balance;
}

p { margin: 0 0 1em; }

code, .cmd {
  font-family: var(--mono);
  font-size: 0.84em;
  padding: 0.12em 0.42em;
  border-radius: 3px;
  background: rgb(212 169 58 / 0.1);
  border: 1px solid rgb(212 169 58 / 0.22);
  color: var(--gold-hi);
  white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 300;
  padding: 10px 16px; background: var(--gold); color: #1a140c; font-weight: 700;
}
.skip:focus { top: 12px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ navigation */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: linear-gradient(180deg, rgb(12 10 8 / 0.96), rgb(12 10 8 / 0.9));
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s, background 0.3s;
}

.nav.scrolled { box-shadow: 0 8px 30px rgb(0 0 0 / 0.45); background: rgb(12 10 8 / 0.98); }

.nav::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgb(212 169 58 / 0.55) 20%, rgb(212 169 58 / 0.55) 80%, transparent);
  opacity: 0.5;
}

.nav .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: #fff; }
.brand svg { width: 36px; height: 36px; flex: none; }
.brand span { font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: 0.2em; padding-top: 2px; }

.nav-links { display: flex; align-items: center; gap: 4px; margin: 0 0 0 auto; padding: 0; list-style: none; }

.nav-links a {
  position: relative;
  display: block;
  padding: 8px 14px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
}

.nav-links a::after {
  content: '';
  position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s var(--ease);
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after, .nav-links a[aria-current='page']::after { transform: scaleX(1); }
.nav-links a[aria-current='page'] { color: var(--gold-hi); }

.nav .btn { padding: 10px 18px; font-size: 0.78rem; }

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: var(--bg-2);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block; width: 18px; height: 2px; margin: auto; background: currentColor; position: relative; transition: transform 0.25s;
}
.menu-toggle span::before, .menu-toggle span::after { content: ''; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
.menu-open .menu-toggle span { background: transparent; }
.menu-open .menu-toggle span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .nav .nav-cta { display: none; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 20px 20px;
    background: rgb(12 10 8 / 0.98);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
  }
  .menu-open .nav-links { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
  .nav-links a::after { display: none; }
  .nav-links .mobile-cta { display: block; margin-top: 14px; }
}

.nav-links .mobile-cta { display: none; }

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid #f5dc93;
  border-radius: 3px;
  background: linear-gradient(180deg, #f1d27f 0%, #d4a93a 48%, #a9811f 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.45), inset 0 -2px 0 rgb(0 0 0 / 0.2), 0 6px 18px rgb(0 0 0 / 0.35);
  color: #1d150a;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, filter 0.2s;
}

.btn:hover { color: #1d150a; transform: translateY(-2px); filter: brightness(1.06); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.5), 0 10px 28px rgb(212 169 58 / 0.28); }
.btn:active { transform: translateY(0); }

.btn-ghost {
  background: rgb(12 10 8 / 0.4);
  border: 1px solid rgb(212 169 58 / 0.55);
  box-shadow: none;
  color: var(--gold-hi);
}

.btn-ghost:hover { color: #fff3cf; background: rgb(212 169 58 / 0.1); box-shadow: 0 0 0 1px rgb(212 169 58 / 0.3); filter: none; }

.btn svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------------ sections */

.section { position: relative; padding: 110px 0; }
.section.tight { padding: 80px 0; }
.section.alt { background: var(--bg-1); }

.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head h2 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); margin-bottom: 18px; }
.section-head p { color: var(--text-2); font-size: 1.15rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before, .eyebrow::after {
  content: '';
  width: 34px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.eyebrow::after { transform: scaleX(-1); }
.section-head.left .eyebrow::before { display: none; }

/* A gold rule with a diamond, between sections. */
.divider { display: flex; align-items: center; gap: 14px; width: min(100% - 40px, 520px); margin: 0 auto; color: var(--gold); }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgb(212 169 58 / 0.6)); }
.divider::after { transform: scaleX(-1); }
.divider svg { width: 22px; height: 22px; flex: none; }

/* Panels with gilt corners. */
.panel {
  position: relative;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgb(255 240 200 / 0.04), 0 20px 50px rgb(0 0 0 / 0.35);
}

.gilt::before, .gilt::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid var(--gold);
  opacity: 0.75;
  pointer-events: none;
}
.gilt::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.gilt::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.tag {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}

.tag.gold { color: var(--gold-hi); border-color: rgb(212 169 58 / 0.45); background: rgb(212 169 58 / 0.08); }
.tag.red { color: #f0a090; border-color: rgb(180 57 44 / 0.5); background: rgb(180 57 44 / 0.1); }

/* A text link with an arrow. */
.more { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-weight: 700; letter-spacing: 0.02em; }
.more svg { width: 18px; height: 18px; flex: none; transition: transform 0.2s var(--ease); }
.more:hover svg { transform: translateX(4px); }

/* Reveal as you scroll; nothing hides if scripts are off. The reveal moves with `translate`, so
   hover lifts and card tilts keep `transform` to themselves. --d staggers neighbours. */
.js .reveal {
  opacity: 0;
  translate: 0 28px;
  transition: opacity 0.9s var(--ease) var(--d, 0s), translate 0.9s var(--ease) var(--d, 0s), transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.js .reveal.in { opacity: 1; translate: none; }

/* ------------------------------------------------------------------ toast */

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200;
  transform: translate(-50%, 20px);
  padding: 12px 20px;
  background: var(--bg-4);
  border: 1px solid rgb(212 169 58 / 0.5);
  border-radius: 4px;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.5);
  color: var(--text);
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ footer */

.footer { position: relative; padding: 70px 0 34px; background: #090807; border-top: 1px solid var(--line); }

.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }

.footer .brand { margin-bottom: 14px; }
.footer p { color: var(--muted); max-width: 340px; }
.footer h4 { margin-bottom: 14px; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.footer ul { margin: 0; padding: 0; list-style: none; }
.footer li { margin-bottom: 8px; }
.footer li a { color: var(--text-2); }
.footer li a:hover { color: var(--gold-hi); }

.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 50px; padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

.footer .quote { font-family: var(--accent); font-style: italic; font-size: 1.05rem; color: var(--text-2); }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .section { padding: 80px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; translate: none; }
}
