/* Altworld Astrea — shared brand styles for the astrea.altworld.io pages.
   Dark-native, matching altworld.io: deep-space ink ground, candlelight gold,
   serif display. Layout: fixed left sidebar (real Altworld logo + page nav)
   and a content column. On narrow screens the sidebar becomes a slide-in
   drawer behind a top bar. Variable names kept from the light era: --ink is
   the foreground, --cream the ground. */

:root {
  --ink: #f0ead9;
  --ink-66: rgba(240, 234, 217, 0.72);
  --ink-40: rgba(240, 234, 217, 0.45);
  --ink-14: rgba(240, 234, 217, 0.15);
  --ink-08: rgba(240, 234, 217, 0.08);
  --cream: #090b0f;        /* altworld.io's ground */
  --cream-deep: #10141c;   /* raised surface */
  --night: #0b0d11;        /* logo card */
  --glass: rgba(15, 19, 26, 0.62);
  --gold-1: #f2d3aa; --gold-2: #d8ab69; --gold-3: #e5bd80;
  --gold-deep: #8e6030;
  --planet-1: #82adc2; --planet-2: #50798b;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, "Times New Roman", serif;
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 32px;
  font-size: 18px;
  display: flex;
  min-height: 100vh;
}
::selection { background: var(--gold-2); color: var(--night); }

/* layered atmosphere: planet-slate glow high right, candle gold low left */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(52vw 42vh at 86% -6%, rgba(80, 121, 139, 0.22), transparent 68%),
    radial-gradient(46vw 40vh at -8% 96%, rgba(216, 171, 105, 0.10), transparent 70%),
    radial-gradient(70vw 46vh at 50% 118%, rgba(28, 36, 48, 0.55), transparent 74%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0.05; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- sidebar ---------- */

.sidebar {
  width: 268px; flex: none;
  position: sticky; top: 0; align-self: flex-start;
  height: 100vh; height: 100dvh;
  overflow-y: auto;
  display: flex; flex-direction: column;
  padding: 22px 18px 18px;
  border-right: 1px solid var(--ink-08);
  background: rgba(11, 13, 17, 0.66);
  backdrop-filter: blur(18px);
}
.side-top { display: flex; gap: 8px; align-items: stretch; }
.side-top .side-logo { flex: 1; min-width: 0; }
.side-logo {
  display: block; background: var(--night);
  border: 1px solid rgba(215, 180, 133, 0.28); border-radius: 16px;
  padding: 16px 14px 12px;
}
.side-logo img { width: 100%; height: auto; display: block; }
.side-collapse-btn {
  display: none; align-items: center; justify-content: center;
  width: 26px; flex: none; cursor: pointer;
  border: 1px solid var(--ink-14); border-radius: 12px;
  background: rgba(255, 255, 255, 0.05); color: var(--ink-40);
}
.side-collapse-btn:hover { color: var(--ink); border-color: var(--gold-2); }
.side-open-btn { display: none; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-sec {
  font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-40); font-weight: 600; padding: 20px 10px 6px;
}
.side-link {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  text-decoration: none; color: var(--ink-66);
  font-size: 15px; font-weight: 500; line-height: 1.45;
  padding: 8px 10px; border-radius: 10px;
}
.side-link:hover { background: var(--ink-08); color: var(--ink); }
.side-link.active { color: var(--gold-3); background: rgba(216, 171, 105, 0.12); font-weight: 600; }
.side-link .ext { color: var(--ink-40); font-size: 13px; }
.side-cta { margin-top: auto; text-align: center; }

/* mobile top bar + drawer */
.topbar { display: none; }
.scrim { display: none; }
.burger { display: none; }

/* desktop: collapsible sidebar (slides out; floating button restores it) */
@media (min-width: 901px) {
  .side-collapse-btn { display: flex; }
  .sidebar { transition: margin-left 0.22s ease; }
  body.side-collapsed .sidebar {
    margin-left: -269px; visibility: hidden;
    transition: margin-left 0.22s ease, visibility 0s 0.22s;
  }
  body.side-collapsed .side-open-btn {
    display: grid; place-items: center;
    position: fixed; top: 14px; left: 14px; z-index: 30;
    width: 38px; height: 38px; cursor: pointer;
    border: 1px solid var(--ink-14); border-radius: 10px;
    background: rgba(11, 14, 19, 0.72); backdrop-filter: blur(12px);
    color: var(--ink);
  }
  body.side-collapsed .side-open-btn:hover { border-color: var(--gold-2); }
}

/* ---------- content column ---------- */

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 28px; width: 100%; }
main.wrap { flex: 1; }

h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(38px, 6vw, 60px); line-height: 1.04;
  letter-spacing: 0.02em; padding: 48px 0 26px;
}
article p { color: var(--ink-66); margin-bottom: 26px; }
article p b, article p strong { color: var(--ink); font-weight: 600; }
article a { color: var(--gold-3); text-decoration: underline; text-underline-offset: 3px; }
article a:hover { color: #fff; }
h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(28px, 4vw, 38px); line-height: 1.1; letter-spacing: 0.02em;
  padding: 34px 0 18px;
}
h3 {
  font-family: var(--serif); font-weight: 600; font-size: 23px;
  padding: 10px 0 8px; letter-spacing: 0.01em;
}
article ul { margin: 0 0 26px 22px; color: var(--ink-66); }
article li { margin-bottom: 12px; }
article li::marker { color: var(--gold-2); }

pre {
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--ink-14);
  border-radius: 14px;
  padding: 20px 22px; overflow-x: auto; margin-bottom: 26px;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 14.5px; line-height: 1.8; color: var(--ink);
}
code {
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.86em; background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--ink-08); border-radius: 6px; padding: 1px 7px;
}
pre code { background: none; border: none; padding: 0; font-size: inherit; }
hr { border: none; border-top: 1px solid var(--ink-08); margin: 44px 0; }

.pill {
  display: inline-block; text-decoration: none; border-radius: 999px;
  font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 600; padding: 12px 26px; white-space: nowrap;
}
.pill-ghost { color: var(--ink); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--ink-14); }
.pill-ghost:hover { background: rgba(255, 255, 255, 0.11); border-color: var(--ink-40); }
.pill-gold {
  color: #fff;
  background: linear-gradient(135deg, var(--gold-1) 0%, var(--gold-2) 45%, var(--gold-deep) 100%);
  box-shadow: rgba(255,230,196,0.2) 0 0 0 1px, rgba(201,145,73,0.26) 0 0 32px 0, rgba(0,0,0,0.5) 0 22px 60px 0;
}
.pill-gold:hover { filter: brightness(1.07); }

/* tables */
.tblwrap { overflow-x: auto; margin-bottom: 26px; }
table.tbl {
  width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.6;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--ink-14);
  border-radius: 14px;
  overflow: hidden; border-spacing: 0;
}
.tbl th {
  text-align: left; font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-40); font-weight: 600; padding: 12px 18px;
  background: rgba(255, 255, 255, 0.045); border-bottom: 1px solid var(--ink-14);
}
.tbl td { padding: 12px 18px; border-bottom: 1px solid var(--ink-08); color: var(--ink-66); vertical-align: top; }
.tbl tr:last-child td { border-bottom: none; }
.tbl td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }

/* price cards */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 26px; }
@media (max-width: 700px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--glass); border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  padding: 26px 28px;
  backdrop-filter: blur(10px);
}
.card.deep {
  background: rgba(216, 171, 105, 0.07);
  border-color: rgba(216, 171, 105, 0.26);
}
.card .kicker {
  font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-3); font-weight: 600; margin-bottom: 6px;
}
.card .big {
  font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1.15;
}
.card .big small { font-size: 16px; font-family: var(--sans); font-weight: 500; color: var(--ink-40); letter-spacing: 0; }
.card p { font-size: 15.5px; line-height: 1.65; margin: 10px 0 0; }
.card ul { font-size: 15.5px; line-height: 1.65; margin: 12px 0 0 20px; }
.card li { margin-bottom: 8px; }

footer { border-top: 1px solid var(--ink-08); margin-top: 70px; background: rgba(255, 255, 255, 0.025); }
.foot {
  max-width: 880px; margin: 0 auto; padding: 30px 28px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  font-size: 14px; letter-spacing: 0.06em; color: var(--ink-40); font-weight: 600;
  width: 100%;
}
.foot a { color: var(--ink-40); text-decoration: none; margin-left: 18px; }
.foot a:hover { color: var(--ink); }

/* ---------- narrow screens: drawer ---------- */

@media (max-width: 900px) {
  body { font-size: 17px; line-height: 29px; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 60;
    transform: translateX(-102%); transition: transform 0.22s ease;
    background: #0b0e13;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
  }
  .sidebar.open { transform: none; }
  .topbar {
    display: flex; align-items: center; gap: 12px;
    position: sticky; top: 0; z-index: 40;
    padding: 10px 16px;
    background: rgba(9, 11, 15, 0.82); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ink-08);
  }
  .burger {
    display: grid; place-items: center;
    border: 1px solid var(--ink-14); background: rgba(255, 255, 255, 0.05);
    border-radius: 10px; width: 38px; height: 38px; cursor: pointer; color: var(--ink);
  }
  .top-logo {
    display: block; background: var(--night); border-radius: 10px;
    padding: 6px 10px 4px; border: 1px solid rgba(215, 180, 133, 0.28);
  }
  .top-logo img { height: 22px; width: auto; display: block; }
  .scrim {
    display: block; position: fixed; inset: 0; z-index: 50;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0; pointer-events: none; transition: opacity 0.2s;
  }
  .scrim.show { opacity: 1; pointer-events: auto; }
  h1 { padding-top: 28px; }
}
