@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;

  /* Radius / spacing */
  --radius: 12px;

  /* Color palette (Variant inspired by 666P) */
  --color-bg: #010101;               /* DARK: pure black background */
  --color-bg-alt: #040404;
  --color-bg-card: #0b0b0b;           

  --color-primary: #00FF41;           /* Matrix green */
  --color-secondary: #E8FFE8;          /* Code white / light secondary */
  --color-accent: #D4AF37;             /* Gold accent (luxury hint) */

  --color-text: #E8FFE8;                /* Light text on dark bg (readability rule) */
  --color-text-muted: #A0A0A0;            /* Muted text on dark bg (readability) */
  --color-text-on-primary: #1A1A1A;       /* Light text on primary (primary is dark) */

  --color-bg-shadow: rgba(0, 255, 65, 0.25);
  --color-border: #1a1a1a;
  --color-shadow: rgba(0, 255, 65, 0.45);
}

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

html, body {
  height: 100%;
}
html, body {
  margin: 0;
  padding: 0;
}
img, video, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}
a { color: inherit; text-decoration: none; }

body {
  font-family: 'DM Sans', system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* 3. CSS reset / base (already covered by * & box-sizing above) */

/* 4. Typography */
h1, h2, h3, h4 {
  margin: 0 0 0.5rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}
h1 { font-size: var(--font-size-3xl); line-height: var(--line-height-tight); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
p { margin: 0 0 0.75rem; font-size: var(--font-size-base); color: var(--color-text); }
a { color: var(--color-text); }
strong { font-weight: var(--font-weight-bold); }
em { font-style: italic; }

ul, ol { padding-left: 1.25rem; margin: 0 0 0.75rem; }

/* 5. Layout utilities / section helpers */
.section { padding: 2rem 0; }
.section-title { font-size: var(--font-size-2xl); margin: 0 0 0.75rem; }

/* 6. Component styles (exactly as requested) */

/* Site header & branding */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  min-height: 64px;
  overflow: visible;
  background: #000;
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem; /* mobile padding per spec */
}
.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
  max-height: 52px;
  text-decoration: none;
}
.site-logo img {
  height: 44px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}

/* Hamburger nav (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; /* ALWAYS white per spec */
  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: 1rem;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}
.nav-item { position: relative; }

/* Nav links */
.nav-link {
  font-size: var(--font-size-sm); /* tablet/desktop override later */
  color: var(--color-text);
  padding: 0.5rem 1rem;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}
.nav-item:hover > .nav-link {
  color: var(--color-primary);
  transform: translateY(-1px);
}
.nav-link:hover { text-decoration: underline; }

/* Dropdown nav (desktop/tablet) */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; white-space: nowrap; padding: 0.5rem 1rem; color: var(--color-text); text-decoration: 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);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  white-space: nowrap;
}
.nav-dropdown:hover > .nav-dropdown-menu,
.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);
}
@media (max-width: 767px) {
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
  }
  .nav-dropdown:focus-within > .nav-dropdown-menu {
    display: block;
  }
  /* Make mobile dropdowns open on focus as CSS-only behavior */
}

@media (min-width: 768px) {
  /* Tablet/Desktop nav layout rules (horizontal) */
  .container { margin: 0 auto; }
  .nav-toggle-label { display: none; } /* hide hamburger on tablet/desktop */
  .site-nav {
    display: flex;
    position: static;
    width: auto;
    background: transparent;
    border-top: none;
    box-shadow: none;
    align-items: center;
  }
  .nav-list { display: flex !important; flex-direction: row !important; flex-wrap: nowrap; align-items: center; gap: 1.5rem; padding: 0; margin: 0; list-style: none; }
  .nav-link { font-size: var(--font-size-sm); padding: 0.4rem 0.75rem; border-bottom: none; white-space: nowrap; }
  .site-header .container { padding: 0.5rem 1rem; gap: 0.75rem; }
  .hero { min-height: 60vh; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .nav-list { flex-direction: row !important; }
}

/* @media (min-width: 1024px) — desktop enhancements */
@media (min-width: 1024px) {
  .container { max-width: 1200px; padding: 0 2rem; }
  .site-header { background: #000; }
  .hero { min-height: 70vh; }
  .hero h1 { font-size: var(--font-size-hero); }
  .section { padding: 4rem 0; }
  .footer-inner { flex-direction: row; justify-content: space-between; }
  .card-grid { gap: 1.25rem; }
}

/* 7. Forms */
label { display: block; font-size: var(--font-size-xs); margin-bottom: .25rem; color: var(--color-text); }
input, textarea, select {
  font-family: inherit;
  background: #111;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  outline: none;
}
input::placeholder, textarea::placeholder { color: #888; }

/* Buttons */
.btn, .btn-primary, .btn-secondary {
  display: inline-block;
  font-family: inherit;
  border-radius: 6px;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.btn {
  padding: 0.6rem 1rem;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  background: var(--color-primary);
  color: var(--color-text-on-primary);
}
.btn:hover { transform: translateY(-2px); filter: brightness(0.95); }
.btn-primary { background: var(--color-primary); color: var(--color-text-on-primary); font-weight: var(--font-weight-bold); padding: 0.65rem 1rem; }
.btn-primary:hover { filter: brightness(0.9); transform: translateY(-2px); }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 0.5rem 0.9rem;
}
.btn-secondary:hover { background: rgba(255,255,255,0.04); }

/* 8. Tables */
table { width: 100%; border-collapse: collapse; border: 1px solid var(--color-border); }
th, td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: middle; }
th { font-weight: var(--font-weight-bold); }

/* 9. Utility classes */
.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 !important; }

/* 10. Cards & FAQ & layout specifics */

.card {
  display: flex;
  flex-direction: column; /* MANDATORY */
  background: #141414;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 6px var(--color-shadow), 0 10px 15px rgba(0,0,0,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px var(--color-shadow), 0 16px 24px rgba(0,0,0,0.42);
}
.card img {
  width: 100%;
  aspect-ratio: 16 / 9; /* mandatory: rectangle */
  object-fit: cover; /* mandatory: crop squares appropriately */
  display: block;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.card-content { padding: 1rem; color: var(--color-text); }
.card h3 { font-size: var(--font-size-lg); margin: 0 0 0.25rem; }
.card p { margin: 0; color: var(--color-text-muted); }

/* Card grid (desktop/tablet) */
.card-grid {
  display: grid;
  grid-template-columns: 1fr; /* mobile: single column; overridden on larger screens */
  gap: 1rem;
}
@media (min-width: 768px) {
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* Hero section */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 50vh;
  padding: 4rem 1rem;
  gap: 1rem;
  background: linear-gradient(135deg, #010101 0%, #000 60%, #020202 100%);
  color: #fff;
}
.hero h1 {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--font-size-hero);
  line-height: var(--line-height-tight);
  margin: 0;
  color: #fff;
}
.hero p {
  font-size: var(--font-size-base);
  color: #EFFFFF;
}

/* FAQ section (accordion) */
.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: 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;
}
.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); }

/* Dropdown base (mobile) open behavior via CSS only */
@media (max-width: 767px) {
  .nav-list { flex-direction: column; gap: 0; padding: 0; margin: 0; }
  .site-nav { display: none; }
  .nav-dropdown-menu { position: static; box-shadow: none; border: none; padding-left: 1rem; }
  .nav-dropdown:focus-within > .nav-dropdown-menu { display: block; }
}
@media (min-width: 768px) {
  /* Tablet/desktop: nav list horizontal, always visible; hamburger hidden */
  .nav-list { flex-direction: row !important; }
  .site-nav { display: flex; }
  .site-nav { position: static; width: auto; background: transparent; border-top: none; box-shadow: none; padding: 0; }
  .nav-dropdown-menu { display: block; position: absolute; top: 100%; left: 0; min-width: 200px; }
  .nav-dropdown:hover > .nav-dropdown-menu { display: block; }
  .nav-dropdown:focus-within > .nav-dropdown-menu { display: block; }
}
@media (min-width: 1024px) {
  /* Desktop-only refinements can go here if needed in the future */
  .site-header { background: #000; }
  .hero h1 { font-size: var(--font-size-3xl); }
}

/* 11. Interactive extras to meet "animation/transition" requirement */
@media (hover: hover) {
  .site-nav .nav-link:hover { color: var(--color-primary); transform: translateY(-1px); }
  .card:hover { transform: translateY(-4px); }
}

/* 12. Accessibility helpers (focus outlines) */
:focus { outline: 2px solid var(--color-primary); outline-offset: 2px; }