@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap');

:root {
  /* TYPOGRAPHY SCALE */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-md: 1.125rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.75rem;
  --font-size-hero: 3.5rem;
  --line-height-tight: 1.2;
  --line-height-base: 1.6;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;

  /* COLOR PALETTE (BK33 variant) */
  --color-bg: #0C0C10;        /* very dark steel */
  --color-bg-alt: #14161E;
  --color-bg-card: #151824;
  --color-primary: #C9942B;    /* Viking battle gold */
  --color-secondary: #8A9BB0;  /* steel grey */
  --color-accent: #1E90FF;      /* electric blue accent (used sparingly) */

  --color-text: #F0E8D0;        /* parchment body text (on dark) */
  --color-text-muted: #B8A870;  /* muted text */
  --color-text-on-primary: #111111; /* depends on brightness of primary (see below) */

  --color-border: #2a2a2a;
  --color-shadow: rgba(0,0,0,0.5);

  /* ACCESSIBILITY: determine text on dark background */
  /* hero text should be light on dark hero backgrounds; applied via rules below */

  /* RADIUS & SPACING TOKENS */
  --radius: 4px;
  --gap: 1.25rem;
  --space-2x: 2rem;
}

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

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100%;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: 'DM Sans', system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
}

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

img, video, iframe { max-width: 100%; height: auto; display: block; }

*, *:focus, *:hover { outline: none; }

:root { /* ensure text colors on dark backgrounds remain high-contrast */ }

/* LAYOUT BASE */
.container {
  width: 100%;
  padding: 0 1rem;
  margin: 0 auto; /* CENTERS CONTENT AT ALL BREAKPOINTS */
  box-sizing: border-box;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 64px;
  background: var(--color-bg);
  overflow: visible;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  justify-content: flex-start; /* logo-left by default; overridden at tablet breakpoint per spec */
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
  max-height: 52px;
}
.site-logo a { text-decoration: none; }

.site-logo img {
  height: 44px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}

/* NAV TOGGLE (MOBILE) */
.nav-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.nav-toggle-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  margin-left: auto;
  padding: 0.4rem 0.6rem;
  z-index: 200;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
}
.nav-toggle-label span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #ffffff; /* mandatory: white bars */
  border-radius: 2px;
  transition: 0.2s ease;
}

/* MOBILE SITE NAV (hidden by default) */
.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 500;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.nav-list {
  display: flex;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  flex-direction: column; /* mobile default: vertical */
}
.site-nav .nav-item { width: 100%; }

.nav-link {
  font-size: var(--font-size-xs); /* mobile default: extra small */
  padding: 0.75rem 1rem;
  color: var(--color-text);
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.04);
  text-decoration: underline;
}
.nav-item { }

.nav-dropdown {
  position: relative;
}
.nav-dropdown-toggle {
  cursor: pointer;
  user-select: none;
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  z-index: 9999;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius, 6px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  white-space: nowrap;
}
.nav-dropdown:hover > .nav-dropdown-menu {
  display: block;
}
.nav-dropdown:focus-within > .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu .nav-link {
  display: block;
  padding: 0.5rem 1.25rem;
  width: 100%;
  border-bottom: none;
}
.nav-dropdown-menu .nav-link:hover {
  background: var(--color-bg-alt);
}

/* HERO */
.hero {
  width: 100%;
  background: linear-gradient(135deg, rgba(201,148,43,0.25) 0%, rgba(12,12,16,0.9) 100%), var(--color-bg);
  color: var(--color-text);
  padding: 2rem 0;
}
.hero-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
}
.hero-text { flex: 1 1 55%; }
.hero-media { flex: 1 1 40%; display: flex; justify-content: center; align-items: center; }
.hero-img { width: 100%; border-radius: var(--radius); object-fit: cover; max-height: 460px; display: block; }

/* ANCHOR HERO LAYOUT (EXACT) */
.hero h1 {
  font-size: var(--font-size-2xl);
  margin: 0 0 1rem;
  line-height: 1.04;
  color: #fff;
}
.hero p { color: #f6f6f6; margin: 0 0 1rem; font-size: var(--font-size-base); }

/* CARDS & GRID */
.card {
  display: flex;
  flex-direction: column; /* MANDATORY: vertical stacking */
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
  background: var(--color-bg-card);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.card .card-content { padding: 1rem; color: var(--color-text); }
.card-title { font-size: var(--font-size-lg); margin: 0 0 0.5rem; color: #fff; }
.card p { margin: 0; color: var(--color-text-muted); }

/* GRID */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 4px; /* 2–4px range allowed; using 4px here for emphasis */
  border: 1px solid rgba(0,0,0,0.15);
  background: #000;
  color: white;
  text-align: center;
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  transition: transform 0.2s ease, filter 0.2s ease;
}
.btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.95);
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  border: 1px solid rgba(0,0,0,0.15);
}
.btn-primary:hover {
  filter: brightness(0.9);
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn:focus { outline: 2px solid #fff; outline-offset: 2px; }

/* FOOTER */
.site-footer {
  background: var(--color-bg-alt);
  padding: 2rem 0;
  color: var(--color-text);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-inner a { color: var(--color-text); }

/* SECTIONS & HEADINGS */
.section {
  padding: 2rem 0;
}
.section-title {
  font-size: var(--font-size-2xl);
  margin: 0 0 1rem;
  color: #fff;
}
.section p { color: var(--color-text-muted); }

/* FAQ (CSS ONLY) */
.faq-section {
  padding: 2rem 0;
}
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--color-bg-card);
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.faq-item[open] {
  border-color: var(--color-primary);
  box-shadow: 0 2px 12px var(--color-shadow);
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-md);
  list-style: none;
  user-select: none;
  color: var(--color-text);
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-primary);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] > .faq-question::after { content: "−"; }
.faq-answer {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--color-border);
}
.faq-answer p { margin: 0.75rem 0 0; color: var(--color-text-muted); line-height: var(--line-height-base); }

/* FORM ELEMENTS */
label { display: block; font-size: var(--font-size-sm); margin-bottom: 0.25rem; color: var(--color-text); }
input,
textarea,
select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #12151D;
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--font-size-base);
  line-height: 1.4;
}
input::placeholder, textarea::placeholder { color: #c9b689; opacity: 0.8; }

/* TABLES */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem; border-bottom: 1px solid var(--color-border); }

/* UTILITIES */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.hidden { display: none; }

/* RESPONSIVE REQUIREMENTS */

@media (min-width: 768px) {
  /* NAV LAYOUT: tablet (hamburger hidden, nav centered) */
  .container { max-width: 960px; padding: 0 1.5rem; }
  /* hamburger hidden */
  .nav-toggle-label { display: none !important; }
  .site-nav { display: flex; position: static; background: transparent; border: none; box-shadow: none; }
  .nav-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
  }
  .nav-link {
    font-size: var(--font-size-sm); /* tablet/desktop: SMALLER than body, per spec */
  }
  .hero {
    min-height: 60vh;
  }
  .hero-inner { gap: 2.5rem; }
  .hero h1 { font-size: var(--font-size-3xl); }
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  .footer-inner { flex-direction: row; justify-content: space-between; }
  /* NAV DROPDOWN adjustments on desktop */
  .nav-dropdown-menu { position: absolute; }
  .nav-dropdown-menu .nav-link { padding: 0.5rem 1.25rem; }
}

@media (min-width: 1024px) {
  .container { max-width: 1200px; padding: 0 2rem; }
  .hero { min-height: 70vh; }
  .hero h1 { font-size: var(--font-size-hero); }
  .section { padding: 4rem 0; }
}