/* ============ Reset & Base ============ */

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

html {
  -webkit-text-size-adjust: 100%;
  overflow-wrap: break-word;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul[class],
ol[class] {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============ Tokens ============ */

:root {
  --navy-900: #0A0E1A;
  --navy-700: #0D1326;
  --white: #F8F9FC;
  --white-dim: rgba(255, 255, 255, 0.64);
  --gold: #D4AF37;
  --gold-light: #F0D68F;
  --passion: #A32C5A;
  --violet: #7B2E8E;
  --rule-blue: #2A3A5F;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-pill: 999px;

  --font-display: 'Impact', 'Arial Black', 'Noto Sans SC', sans-serif;
  --font-body: 'Source Serif Pro', 'Noto Serif SC', serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  --content-width: 1280px;
  --gutter: clamp(1rem, 3vw, 2.5rem);
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --duration: 150ms;
  --ease: ease-out;
}

@media (min-width: 1600px) {
  :root {
    --content-width: 1440px;
  }
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--white);
  background-color: var(--navy-900);
  background-image:
    radial-gradient(110% 70% at 85% -10%, rgba(123, 46, 142, 0.16), transparent 55%),
    radial-gradient(80% 50% at -10% 20%, rgba(10, 14, 26, 0.5), transparent 60%),
    linear-gradient(180deg, #0A0E1A 0%, #0D1326 55%, #0A0E1A 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(212, 175, 55, 0.85);
  color: #0A0E1A;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.18);
}

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

/* ============ Layout Containers ============ */

.container {
  width: min(var(--content-width), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.container-narrow {
  width: min(880px, 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.container-wide {
  width: min(1440px, 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.section {
  width: min(var(--content-width), 100% - var(--gutter) * 2);
  margin-inline: auto;
  padding-block: var(--space-5);
}

.section--tight {
  padding-block: var(--space-3);
}

/* ============ Buttons ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.375rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
  white-space: nowrap;
  transition:
    transform 120ms ease-out,
    box-shadow 120ms ease-out,
    background 120ms ease-out,
    border-color 120ms ease-out,
    color 120ms ease-out;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #0A0E1A;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4);
}

.btn-ghost {
  border-color: var(--rule-blue);
  background: rgba(255, 255, 255, 0.03);
  color: var(--white);
}

.btn-ghost:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.06);
  color: var(--gold-light);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

/* ============ Skip Link ============ */

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 3000;
  padding: 0.75rem 1.375rem;
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: #0A0E1A;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 150ms ease-out;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

/* ============ Header ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 14, 26, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule-blue);
}

.scroll-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 60%, var(--passion) 100%);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 2;
  pointer-events: none;
}

.header-inner {
  width: min(var(--content-width), 100% - var(--gutter) * 2);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: 0.875rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 65%, var(--white) 130%);
  color: var(--navy-900);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  transform: rotate(-4deg);
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.3);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--white);
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.625rem;
  border: 1px solid var(--rule-blue);
  border-radius: 0.875rem;
  background: rgba(255, 255, 255, 0.03);
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--white);
  transition: transform 150ms ease-out, opacity 150ms ease-out;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-panel {
  width: min(var(--content-width), 100% - var(--gutter) * 2);
  margin-inline: auto;
  max-height: none;
  visibility: visible;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding-block: 0.5rem 0.875rem;
}

.nav-strip-label {
  flex: 0 0 auto;
  padding-right: 0.875rem;
  border-right: 1px solid var(--rule-blue);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.375rem;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.4375rem 0.875rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--white-dim);
  transition: color 120ms ease-out, background 120ms ease-out;
}

.nav-idx {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--gold);
  opacity: 0.7;
  transition: opacity 120ms ease-out;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.25rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 150ms ease-out;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--white);
  background: rgba(212, 175, 55, 0.08);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.08);
}

.nav-link[aria-current="page"] .nav-idx {
  opacity: 1;
}

.nav-actions {
  display: none;
  flex-wrap: wrap;
  gap: 0.625rem;
  padding-top: 0.875rem;
}

/* ============ Footer ============ */

.site-footer {
  position: relative;
  margin-top: var(--space-6);
  background: linear-gradient(180deg, #0A0E1A 0%, #060910 100%);
  border-top: 1px solid var(--rule-blue);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--passion) 50%, var(--violet) 100%);
}

.back-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 900;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy-900);
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(0.75rem);
  pointer-events: none;
  transition: opacity 150ms ease-out, transform 150ms ease-out, box-shadow 150ms ease-out;
}

.back-top[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-top:hover {
  box-shadow: 0 10px 32px rgba(212, 175, 55, 0.4);
}

.footer-grid {
  width: min(var(--content-width), 100% - var(--gutter) * 2);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
  padding-block: var(--space-5) var(--space-4);
}

.footer-brand {
  grid-column: 1 / span 4;
}

.footer-nav {
  grid-column: 5 / span 2;
}

.footer-contact {
  grid-column: 7 / span 3;
}

.footer-legal {
  grid-column: 10 / span 3;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--white);
}

.footer-tagline {
  margin-top: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-trust {
  margin-top: 1.25rem;
  max-width: 36rem;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--white-dim);
}

.footer-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-heading::before {
  content: "";
  width: 0.5rem;
  height: 2px;
  background: var(--gold);
}

.footer-list {
  display: grid;
  gap: 0.375rem;
}

.footer-list a {
  color: var(--white-dim);
  font-size: 0.9375rem;
  transition: color 120ms ease-out, padding-left 120ms ease-out;
}

.footer-list a:hover {
  color: var(--gold-light);
  padding-left: 0.375rem;
}

.footer-line {
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--white-dim);
}

.footer-note {
  margin-top: 0.75rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--rule-blue);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.45);
}

.footer-bottom {
  border-top: 1px solid var(--rule-blue);
}

.footer-bottom-inner {
  width: min(var(--content-width), 100% - var(--gutter) * 2);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ============ Breadcrumb ============ */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  padding-block: 0.875rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--white-dim);
}

.breadcrumb a {
  color: var(--white-dim);
  transition: color 120ms ease-out;
}

.breadcrumb a:hover {
  color: var(--gold-light);
}

.breadcrumb [aria-current="page"] {
  color: var(--gold);
}

.breadcrumb-sep {
  color: rgba(255, 255, 255, 0.3);
}

/* ============ Editorial Components ============ */

.index-label {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.index-label::before {
  content: "";
  width: 1.5rem;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.section-title {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--white);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--white);
}

.hero-title em {
  font-style: normal;
  background: linear-gradient(92deg, var(--gold) 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 40em;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--white-dim);
}

/* ============ Grid ============ */

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
}

.grid > .span-4 {
  grid-column: span 4;
}

.grid > .span-5 {
  grid-column: span 5;
}

.grid > .span-6 {
  grid-column: span 6;
}

.grid > .span-7 {
  grid-column: span 7;
}

.grid > .span-8 {
  grid-column: span 8;
}

.grid > .span-12 {
  grid-column: span 12;
}

.grid > .img-frame {
  align-self: start;
  width: 100%;
}

/* ============ Cards & Tags ============ */

.card {
  padding: var(--space-3);
  background: var(--navy-700);
  border: 1px solid var(--rule-blue);
  border-radius: var(--radius-lg);
  transition: transform 150ms ease-out, border-color 150ms ease-out, box-shadow 150ms ease-out;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3125rem 0.875rem;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-pill);
  background: rgba(212, 175, 55, 0.08);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--gold-light);
}

/* ============ Prose ============ */

.prose {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--white);
}

.prose p {
  margin-bottom: 1.25em;
}

.prose h2,
.prose h3,
.prose h4 {
  margin-top: 2.25em;
  margin-bottom: 0.75em;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--white);
}

.prose h2 {
  font-size: 1.75rem;
}

.prose h3 {
  font-size: 1.375rem;
}

.prose h4 {
  font-size: 1.125rem;
}

.prose a {
  color: var(--gold-light);
  border-bottom: 1px solid rgba(212, 175, 55, 0.35);
  transition: border-color 120ms ease-out;
}

.prose a:hover {
  border-color: var(--gold);
}

.prose blockquote {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--gold);
  color: var(--white-dim);
  font-style: italic;
}

.prose ul,
.prose ol {
  margin: 0 0 1.5rem 1.25rem;
  padding: 0;
}

.prose li {
  margin-bottom: 0.5em;
}

/* ============ Image Frames ============ */

.img-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule-blue);
  border-radius: var(--radius-lg);
  background: var(--navy-700);
}

.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-frame--wide {
  aspect-ratio: 16 / 9;
}

.img-frame--tall {
  aspect-ratio: 3 / 4;
}

.img-frame--hero {
  aspect-ratio: 21 / 9;
}

/* ============ Reveal Interaction ============ */

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ============ Responsive ============ */

@media (max-width: 1200px) {
  .footer-brand {
    grid-column: span 12;
  }

  .footer-nav,
  .footer-contact,
  .footer-legal {
    grid-column: span 4;
  }

  .grid > .span-4,
  .grid > .span-5,
  .grid > .span-6,
  .grid > .span-7,
  .grid > .span-8 {
    grid-column: span 6;
  }
}

@media (max-width: 720px) {
  .header-inner {
    padding-block: 0.75rem;
  }

  .brand-mark {
    width: 2.375rem;
    height: 2.375rem;
    border-radius: 0.75rem;
    font-size: 1.25rem;
  }

  .brand-name {
    font-size: 1rem;
  }

  .brand-tagline {
    font-size: 0.625rem;
  }

  .header-actions .btn {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-strip-label {
    display: none;
  }

  .nav-panel {
    max-height: 0;
    visibility: hidden;
    overflow: hidden;
    transition: max-height 220ms ease-out, visibility 0s linear 220ms;
  }

  .nav-panel[data-open] {
    max-height: 26rem;
    visibility: visible;
    transition: max-height 220ms ease-out, visibility 0s;
  }

  .site-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-link {
    border-radius: var(--radius-md);
    padding-block: 0.75rem;
  }

  .nav-actions {
    display: flex;
    padding-bottom: 0.75rem;
  }

  .nav-actions .btn {
    flex: 1;
  }

  .footer-grid {
    gap: var(--space-3);
    padding-block: var(--space-4);
  }

  .footer-brand,
  .footer-nav,
  .footer-contact,
  .footer-legal {
    grid-column: span 12;
  }

  .grid {
    gap: var(--space-3);
  }

  .grid > [class*="span-"] {
    grid-column: span 12;
  }

  .img-frame--hero {
    aspect-ratio: 4 / 3;
  }

  .back-top {
    right: 1rem;
    bottom: 1rem;
    width: 2.75rem;
    height: 2.75rem;
  }

  .hero-title {
    line-height: 1;
  }
}

/* ============ Reduced Motion ============ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
