@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700;800&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 (EA77 Emerald VIP) */
  --color-bg: #050F08;                 /* dark emerald background (DARK) */
  --color-bg-alt: #07140F;
  --color-bg-card: #0A1A12;             /* card background */
  --color-primary: #00C853;             /* emerald primary */
  --color-secondary: #FFD700;           /* bright gold accent */
  --color-accent: #00E5FF;              /* additional accent (teal-cyan variant) */

  --color-text: #E8FFE8;                /* near-white text on dark bg */
  --color-text-muted: #A0AFA0;           /* muted on dark bg (readable) */
  --color-text-on-primary: #1A1A1A;      /* text on primary (white) */

  --color-border: rgba(255,255,255,0.15);
  --color-shadow: rgba(0,0,0,0.5);

  --radius: 12px;
}

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

html, body { margin: 0; padding: 0; height: 100%; }

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

body {
  font-family: 'Barlow Condensed', system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  font-weight: var(--font-weight-normal);
  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;
}

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

h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; margin: 0 0 0.5em; }

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-md); }

p { margin: 0 0 1rem; }

a { color: var(--color-text); text-decoration: none; }
a:hover { text-decoration: underline; }

strong { font-weight: var(--font-weight-bold); }
em { font-style: italic; }

/* Layout utilities & base container */
.container {
  width: 100%;
  margin: 0 auto; /* important: centered at every breakpoint */
  padding: 0 1rem;
  box-sizing: border-box;
}
.section { padding: 2rem 0; }
.section-title { font-size: var(--font-size-2xl); margin: 0 0 0.75rem; }

.btn, .btn-primary, .btn-secondary {
  font-family: inherit;
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  line-height: 1;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  padding: 0.5rem 1rem;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.btn { background: rgba(255,255,255,0.08); color: var(--color-text); }
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
}
.btn-primary:hover { filter: brightness(0.95); transform: translateY(-1px); }

/* 3. RESET / BASE already covered above with global box-sizing etc */

/* 4. Typography hooks (already defined above) */

/* 5. Layout utilities (already covered) */

/* 6. Component classes (MUST style) */

/* site header / logo / navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 64px;
  background: rgba(2, 8, 6, 0.96);
  overflow: visible;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  margin: 0 auto; /* required at all breakpoints */
  width: 100%;
}

.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;
}

.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; /* required: always white bars */
  border-radius: 2px;
  transition: 0.2s ease;
}

.site-nav {
  display: none; /* mobile hidden by default */
  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;
}

.nav-item { }

/* nav links (mobile vs tablet/desktop handled in media queries) */
.nav-link {
  color: var(--color-text);
  font-size: var(--font-size-xs); /* mobile: smaller than body by default */
  padding: 0.75rem 1rem;
  display: inline-block;
  position: relative;
  transition: color 0.2s ease;
}
.nav-link:hover { color: #fff; }

/* animated underline on hover for nav links */
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-link:hover::after { transform: scaleX(1); }

/* dropdown nav */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; white-space: nowrap; padding: 0.75rem 1rem; }
.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 { 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); }

/* on mobile, indent dropdown panel under the toggle */
@media (max-width: 767px) {
  .nav-dropdown-menu { position: static; box-shadow: none; border: none; padding-left: 1rem; display: none; }
  .nav-list { flex-direction: column; }
  .nav-dropdown { /* focus open in mobile if using keyboard */ }
  .nav-dropdown:focus-within > .nav-dropdown-menu { display: block; }
}
  
/* 7. Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--font-size-base);
}
textarea { resize: vertical; min-height: 120px; }

label { display: block; font-size: var(--font-size-sm); margin-bottom: 0.25rem; color: var(--color-text); }

/* focus states for accessibility */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 200, 120, 0.25);
  border-color: rgba(0, 200, 120, 0.8);
}

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

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

/* 6. Card components */
.card {
  display: flex;
  flex-direction: column;              /* mandatory: vertical card layout */
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.25), 0 10px 15px rgba(0,0,0,0.15); /* elevated feel */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.35), 0 16px 26px rgba(0,0,0,0.25);
}
.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  /* mandatory: border-radius applied to top corners only */
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.card-content { padding: 1rem; }

/* 6. Card grid (variant) */
.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* required: auto-fill + minmax(280px, 1fr) */
}

/* 6. HERO — base hero */
.hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--color-text);
  text-align: left;
  background: linear-gradient(135deg, #04140f 0%, #02140d 60%, #050f08 100%);
  position: relative;
  overflow: hidden;
}
.hero-inner { display: flex; align-items: center; gap: 2rem; width: 100%; max-width: 1200px; }

/* Section inside hero for text/media alignment (used by .hero--diagonal) */
.hero--diagonal { background: var(--color-primary); color: #fff; position: relative; overflow: hidden; }
.hero--diagonal::after {
  content:'';
  position:absolute;
  right:0; top:0; bottom:0;
  width:52%;
  background: var(--color-bg);
  clip-path: polygon(8% 0,100% 0,100% 100%,0 100%);
  z-index: 0;
}
.hero--diagonal .hero-inner { position: relative; z-index: 1; display:flex; align-items:center; gap:2rem; min-height: 420px; }
.hero-text { flex: 1 1 45%; color: #fff; }
.hero-media { flex: 1 1 48%; }
.hero-img { width:100%; border-radius: var(--radius); object-fit: cover; max-height: 440px; display:block; }

/* EXTRA for diagonal (mobile) */
@media (max-width: 767px) {
  .hero--diagonal::after { display: none; }
  .hero--diagonal { background: var(--color-primary); }
  .hero--diagonal .hero-inner { flex-direction: column; }
  .hero-media { width: 100%; }
}

/* 10. RESPONSIVE REQUIREMENTS (mobile-first, base rules above apply) */
@media (min-width: 768px) {
  /* NAV LAYOUT (tablet+) - all-centered rules (exactly as required) */
  .site-header .container { justify-content: center; gap: 2rem; }

  .site-nav { flex: 0 0 auto; justify-content: center; display: flex; align-items: center; }
  .nav-list { justify-content: center; }

  /* Tablet: hide hamburger, show full nav horizontally */
  .nav-toggle-label { display: none !important; }

  /* Desktop/tablet nav layout adjustments */
  .site-nav { position: static; background: transparent; border-top: none; box-shadow: none; display: flex; }
  .nav-list { 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; }
  /* ensure logo and header alignment remain centered within container */
  .container { margin: 0 auto; max-width: 960px; padding: 0 1.5rem; }
  
  /* Hero adjustments on tablet/Desktop */
  .hero { min-height: 60vh; }
  .hero h1 { font-size: var(--font-size-3xl); }

  /* Card grid on larger viewports */
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

  .section { padding: 4rem 0; }

  .footer-inner { flex-direction: row; text-align: left; }
}

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

.site-footer {
  background: #0b0f0c;
  padding: 2rem 0;
  color: var(--color-text);
  border-top: 1px solid var(--color-border);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
@media (max-width: 767px) {
  .footer-inner { flex-direction: column; text-align: center; }
}