/* ==========================================================================
   GTADISTRICT.COM — neutral glass theme, one sunset accent
   ----------------------------------------------------------------------
    1. Tokens          6. Article & prose      11. Sidebar
    2. Base            7. Callouts & related   12. Homepage
    3. Backdrop        8. Tables               13. Footer & social
    4. Header          9. Calculators & forms  14. Fallbacks & motion
    5. Layout         10. Buttons & FAQ        15. Responsive
   ========================================================================== */

/* 1. Tokens ----------------------------------------------------------- */
:root {
  --bg: #0b0d11;

  --ink: #eef0f3;
  --ink-body: #c8ccd3;
  --ink-muted: #9aa0aa;
  --ink-subtle: #6e7480;

  /* One accent, used for interaction only (links, primary button, focus, active) */
  --accent: #ff7a59;
  --accent-hover: #ff9c82;
  --accent-ink: #1c0c06;
  --accent-soft: rgba(255, 122, 89, 0.12);

  --glass: rgba(18, 20, 26, 0.52);
  --glass-lite: rgba(255, 255, 255, 0.035);
  --glass-hover: rgba(255, 255, 255, 0.065);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-border-hi: rgba(255, 255, 255, 0.16);
  --glass-blur: blur(22px) saturate(140%);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 20px 50px rgba(0, 0, 0, 0.35);
  --inset: rgba(0, 0, 0, 0.24);
  --field: rgba(0, 0, 0, 0.35);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Oswald", var(--font-sans);
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;

  --page-w: 1220px;
  --header-h: 68px;
}

/* 2. Base ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--bg);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--font-display); font-weight: 600; line-height: 1.2; letter-spacing: 0.005em; }
p { margin: 0; }
img, svg { max-width: 100%; }
[hidden] { display: none; }

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { width: 100%; max-width: var(--page-w); margin-inline: auto; padding-inline: 28px; }

/* 3. Backdrop: drifting haze + grid ---------------------------------- */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

body::before {
  inset: -20%;
  background:
    radial-gradient(36% 32% at 80% 16%, rgba(255, 122, 89, 0.11), transparent 70%),
    radial-gradient(38% 34% at 16% 24%, rgba(90, 110, 140, 0.16), transparent 70%),
    radial-gradient(40% 36% at 72% 84%, rgba(60, 76, 104, 0.16), transparent 70%),
    radial-gradient(28% 26% at 24% 88%, rgba(255, 122, 89, 0.05), transparent 70%);
  filter: blur(60px);
  animation: drift 32s ease-in-out infinite alternate;
}

body::after {
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px) 0 0 / 56px 56px,
    radial-gradient(ellipse at center, transparent 40%, rgba(5, 6, 9, 0.75) 100%);
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to { transform: translate3d(3%, -2%, 0) rotate(6deg); }
}

/* Shared glass surface: only top-level panels */
.site-header,
.article,
.side-box,
.tile,
.card,
.site-footer {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

/* 4. Header ----------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 13, 17, 0.62);
  border-width: 0 0 1px;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand__mark { width: 32px; height: 32px; flex-shrink: 0; }
.brand__word { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; letter-spacing: 0.05em; }
.brand__accent { margin-left: 0.12em; color: var(--accent); }

.nav { display: flex; flex-wrap: wrap; gap: 4px; }

.nav__link {
  padding: 7px 13px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-muted);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.nav__link:hover { color: var(--ink); background: var(--glass-hover); text-decoration: none; }
.nav__link.is-active { color: var(--ink); background: var(--glass-hover); border-color: var(--glass-border-hi); }

/* 5. Layout ----------------------------------------------------------- */
.page-main { flex: 1; padding-block: 24px 64px; }

.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; font-size: 0.84rem; color: var(--ink-subtle); }
.breadcrumbs a { color: var(--ink-muted); }
.breadcrumbs span[aria-current] { color: var(--ink-body); }
.breadcrumbs__sep { font-family: var(--font-mono); }

.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }

/* 6. Article & prose -------------------------------------------------- */
.article { padding: 40px 48px 48px; border-radius: var(--radius-lg); box-shadow: var(--glass-shadow); }

.article__header { margin-bottom: 30px; padding-bottom: 22px; border-bottom: 1px solid var(--glass-border); }
.article__eyebrow {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}
.article__title { font-size: clamp(2rem, 3.4vw, 2.75rem); font-weight: 700; line-height: 1.12; }

.article__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 16px 0 0; padding: 0; font-size: 0.86rem; color: var(--ink-muted); list-style: none; }
.article__meta li + li::before { content: "\00b7"; margin-right: 18px; color: var(--ink-subtle); }

.prose > * + * { margin-top: 18px; }
.prose h2 { margin-top: 44px; font-size: 1.7rem; }
.prose h3 { margin-top: 30px; font-size: 1.25rem; }
.prose h2 + *,
.prose h3 + * { margin-top: 12px; }
.prose p,
.prose li { font-size: 1.02rem; }
.prose ul,
.prose ol { padding-left: 24px; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--ink-subtle); }
.prose strong { color: var(--ink); }
.prose em { color: var(--ink); }

.prose code {
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: var(--ink);
  background: var(--inset);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
}

/* 7. Callouts & related links (flat inset, no accent bars) ------------- */
.callout,
.related-box {
  padding: 18px 22px;
  background: var(--inset);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}
.callout strong:first-child { display: block; margin-bottom: 6px; font-size: 1.02rem; }

.prose .related-box { margin-top: 44px; }
.prose .related-box h3 {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}
.related-box ul { margin: 0; padding-left: 20px; }
.prose .related-box li { font-size: 0.96rem; }

/* 8. Tables ----------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  background: var(--inset);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table-wrap th {
  padding: 13px 16px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--glass-border-hi);
}
.table-wrap td { padding: 12px 16px; vertical-align: top; border-bottom: 1px solid var(--glass-border); }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap tbody tr { transition: background 0.15s; }
.table-wrap tbody tr:hover { background: var(--glass-hover); }

/* 9. Calculators & forms ---------------------------------------------- */
.calc {
  padding: 26px;
  background: var(--inset);
  border: 1px solid var(--glass-border-hi);
  border-radius: var(--radius-lg);
}
.prose .calc { margin-block: 28px 36px; }
.calc > * + * { margin-top: 20px; }

.calc__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.calc__field { display: flex; flex-direction: column; gap: 6px; }
.calc__field[hidden] { display: none; }
.calc__field label { font-size: 0.82rem; font-weight: 600; color: var(--ink-muted); }

.calc__field input,
.calc__field select,
.calc__field textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--glass-border-hi);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.calc__field textarea { font-family: var(--font-sans); resize: vertical; }
.calc__field input:focus,
.calc__field select:focus,
.calc__field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.calc__results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}
.calc__label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-subtle); }
.calc__value { margin-top: 4px; font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }

/* 10. Buttons & FAQ --------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn--primary { color: var(--accent-ink); background: var(--accent); border: 0; }
.btn--primary:hover { color: var(--accent-ink); background: var(--accent-hover); }
.btn--secondary { color: var(--ink); background: var(--glass-lite); border: 1px solid var(--glass-border-hi); }
.btn--secondary:hover { color: var(--ink); background: var(--glass-hover); border-color: var(--ink-subtle); }
.btn--lg { padding: 13px 24px; font-size: 0.98rem; }

.prose .faq-item + .faq-item { margin-top: 10px; }
.faq-item { background: var(--inset); border: 1px solid var(--glass-border); border-radius: var(--radius); }
.faq-item summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-mono); color: var(--ink-subtle); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item__body { padding: 0 18px 16px; }
.faq-item__body > * + * { margin-top: 12px; }

/* 11. Sidebar --------------------------------------------------------- */
.sidebar { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 18px; }

.side-box { padding: 20px; border-radius: var(--radius-lg); box-shadow: var(--glass-shadow); }
.side-box__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
}
.side-box__count {
  padding: 1px 9px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-muted);
  background: var(--glass-hover);
  border-radius: var(--radius-pill);
}

.side-nav { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.side-nav a {
  display: block;
  padding: 8px 12px;
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--ink-muted);
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}
.side-nav a:hover { color: var(--ink); background: var(--glass-hover); text-decoration: none; }
.side-nav a.is-current { font-weight: 700; color: var(--ink); background: var(--glass-hover); }

/* 12. Homepage -------------------------------------------------------- */
.hero { max-width: 900px; margin: 44px auto 72px; text-align: center; }
.hero__kicker {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}
.hero__title { font-size: clamp(2.5rem, 5.4vw, 4.2rem); font-weight: 700; line-height: 1.04; text-transform: uppercase; }
.hero__sub { max-width: 700px; margin: 22px auto 30px; font-size: 1.12rem; color: var(--ink-muted); }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.home-section + .home-section { margin-top: 64px; }
.home-section__title { font-size: 1.9rem; }
.home-section__lead { max-width: 760px; margin-top: 8px; color: var(--ink-muted); }
.home-section__title + .tile-grid,
.home-section__title + .card-grid,
.home-section__lead + .tile-grid { margin-top: 22px; }

.tile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

.tile,
.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink-body);
  border-radius: var(--radius-lg);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.tile { padding: 26px; }
.card { padding: 22px; border-radius: var(--radius); }
.tile:hover,
.card:hover {
  color: var(--ink-body);
  text-decoration: none;
  background: var(--glass-hover);
  border-color: var(--glass-border-hi);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  transform: translateY(-3px);
}

.tile__num { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; line-height: 1; color: var(--ink-subtle); }
.tile__title { margin-top: 6px; font-size: 1.3rem; }
.tile__text,
.card__text { flex: 1; font-size: 0.9rem; color: var(--ink-muted); }
.tile__cta { margin-top: 6px; font-size: 0.86rem; font-weight: 600; color: var(--ink-muted); }
.tile:hover .tile__cta { color: var(--accent); }

.card__meta { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-subtle); }
.card__title { font-size: 1.15rem; }

.home-note { max-width: 760px; margin-inline: auto; text-align: center; }
.home-note__title { margin-bottom: 8px; font-size: 1.3rem; }
.home-note p { color: var(--ink-muted); }

/* 13. Footer & social ------------------------------------------------- */
.site-footer {
  padding: 52px 0 28px;
  font-size: 0.88rem;
  color: var(--ink-subtle);
  background: rgba(7, 8, 11, 0.6);
  border-width: 1px 0 0;
}

.footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; margin-bottom: 32px; }
.footer__about { max-width: 380px; margin-top: 14px; }
.footer__email { font-family: var(--font-mono); font-size: 0.8rem; }

.footer__heading { margin-bottom: 14px; font-family: var(--font-display); font-size: 1rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.footer__col ul { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.footer__col a { color: var(--ink-subtle); }
.footer__col a:hover { color: var(--ink); text-decoration: none; }

.social-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.social-link {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--ink-subtle);
  background: var(--inset);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
}
.social-link svg { width: 17px; height: 17px; fill: currentColor; }
.social-link:hover { color: var(--ink); background: var(--glass-hover); border-color: var(--glass-border-hi); transform: translateY(-2px); }

.footer__disclaimer {
  margin-bottom: 20px;
  padding: 14px 18px;
  font-size: 0.78rem;
  line-height: 1.55;
  background: var(--inset);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}
.footer__disclaimer strong { color: var(--ink-muted); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding-top: 18px;
  font-size: 0.78rem;
  border-top: 1px solid var(--glass-border);
}

/* 14. Fallbacks & motion ---------------------------------------------- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header, .article, .side-box, .tile, .card, .site-footer { background: rgba(17, 19, 25, 0.95); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before { animation: none; }
  *, *::before, *::after { transition: none; }
}

/* 15. Responsive ------------------------------------------------------ */
@media (max-width: 1100px) {
  .page-grid { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; }
  .tile-grid,
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .site-header { position: static; }
  .site-header__inner { flex-direction: column; align-items: flex-start; padding-block: 12px; }
}

@media (max-width: 640px) {
  .container { padding-inline: 16px; }
  .article { padding: 24px 20px 28px; }
  .calc { padding: 18px; }
  .calc__results { grid-template-columns: 1fr; }
  .tile-grid,
  .footer__grid { grid-template-columns: 1fr; }
  .hero { margin-block: 16px 48px; }
}
