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

:root {
  /* COLOR PALETTE (Eastern gold mood, Crickex branding) */
  --color-vermilion: #6B0000;
  --color-primary: #FFD700;
  --color-ivory: #FFFFF0;

  --color-bg: #0a0a0a;
  --color-bg-alt: #141414;
  --color-bg-card: #1e1410;
  --color-text: #f9f2e0;
  --color-text-muted: #d6c6a7;
  --color-text-on-primary: #1b0000;
  --color-border: #3f2a00;
  --color-shadow: rgba(0, 0, 0, 0.6);
  --color-glow: rgba(255, 215, 0, 0.4);

  /* BORDER / RADIUS */
  --radius: 12px;

  /* 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;
  --shadow-amber: 0 4px 18px rgba(255, 215, 0, 0.4);
}

/* RESET / BASE */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Lato', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: linear-gradient(135deg, #1a0000 0%, #230a00 40%, #6b0000 100%);
  background-attachment: fixed;
}

/* TYPOGRAPHY (Headings use Playfair Display) */
h1, h2, h3, h4 {
  font-family: "Playfair Display", serif;
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}
h1 { font-size: var(--font-size-3xl); line-height: var(--line-height-tight); margin-bottom: 0.25rem; }
h2 { font-size: var(--font-size-2xl); margin: 0 0 0.5rem; }
h3 { font-size: var(--font-size-xl); margin: 0 0 0.5rem; }
h4 { font-size: var(--font-size-lg); margin: 0 0 0.5rem; }

p { margin: 0 0 1rem; font-size: var(--font-size-base); color: var(--color-text); }
a { color: var(--color-primary); text-decoration: none; position: relative; }
a:hover { text-decoration: none; color: #f6c400; }
a:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 0;
  background: var(--color-primary);
  transition: width 0.2s ease;
}
a:hover:after { width: 100%; }

/* LISTS */
ul, ol { padding-left: 1.25rem; margin: 0 0 1rem; }

/* LAYOUT UTILITIES & STRUCTURE */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}
.section { padding: 2rem 0; }

/* HERO */
.hero {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, rgba(107,0,0,0.9) 0%, rgba(255,215,0,0.9) 100%);
}
.hero h1 { font-size: var(--font-size-hero); margin: 0; color: #fff; }

/* CARDS & GRID */
.card {
  display: flex;
  flex-direction: column; /* mandatory */
  border: 2px solid var(--color-primary);
  border-radius: var(--radius);
  background: transparent; /* outlined accent with hover fill */
  overflow: hidden;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 240, 0.06);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  border-color: #ffd84a;
}
.card img {
  width: 100%;               /* mandatory */
  aspect-ratio: 16 / 9;      /* mandatory */
  object-fit: cover;           /* mandatory */
  display: block;              /* mandatory */
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.card-content { padding: 1rem; }

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

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
  font-family: 'Lato', sans-serif;
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }

/* PRIMARY BUTTON (brand) */
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  border: 2px solid rgba(0,0,0,0.2);
}
.btn-primary:hover { filter: brightness(0.92); transform: translateY(-1px); }

/* SECONDARY BUTTON */
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover { background: rgba(255,255,255,0.05); }

/* HEADER / NAV (HAMBURGER-BASED MOBILE) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 64px;           /* per requirement (not fixed height) */
  overflow: visible;
  width: 100%;
  background: rgba(0,0,0,0.35);
  backdrop-filter: saturate(1.2) blur(4px);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;         /* mobile padding (logo + nav centered) */
}
.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
  max-height: 52px;
  text-decoration: none;
}
.site-logo img {
  height: 44px;          /* mandatory height */
  width: auto;
  max-width: 160px;        /* mandatory max width */
  object-fit: contain;     /* mandatory contain, prevents overflow */
  display: block;            /* mandatory block */
}
.nav-toggle-input {
  position: absolute;
  opacity: 0;          /* hidden but not removed from layout for accessibility */
  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); /* required visibility on any header color */
}
.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 */
.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;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}
.nav-link {
  display: block;
  padding: 0.75rem 1rem;
  font-size: var(--font-size-xs); /* mobile */
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.nav-item { list-style: none; }

/* MOBILE DROPDOWN NAV (within mobile) */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; color: var(--color-text); text-decoration: none; display: block; 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,
.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); }

/* DROPDOWN (desktop/tablet) */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  z-index: 9999;
  list-style: none;
  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);
}
.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown:focus-within > .nav-dropdown-menu {
  display: block;
  animation: dropdownIn 0.2s ease;
}
@keyframes dropdownIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.nav-dropdown-menu .nav-link { display: block; padding: 0.5rem 1rem; width: 100%; }

/* DROPDOWN (mobile) adjustments inside tablet/desktop viewport */
@media (min-width: 768px) {
  .nav-dropdown-menu { position: absolute; left: 0; top: 100%; min-width: 200px; padding: 0; }
  .nav-dropdown:hover > .nav-dropdown-menu, .nav-dropdown:focus-within > .nav-dropdown-menu { display: block; }
  .nav-list { flex-wrap: nowrap; }
  .nav-link { font-size: var(--font-size-sm); padding: 0.4rem 0.75rem; border-bottom: none; }
  .site-nav {
    position: static;
    display: block;
    width: auto;
    background: transparent;
    border-top: none;
    box-shadow: none;
  }
  /* Tablet layout specifics */
  .container {
    padding: 0 1.5rem;
  }
  .nav-toggle-label { display: none; } /* hide hamburger on tablet+ */
  .site-header { overflow: visible; } /* keep header flexible */
  .hero { min-height: 60vh; }
  .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; align-items: center; text-align: left; }
  .nav-list { gap: 1.5rem; }
  /* Ensure mobile nav remains accessible if the input is checked on larger viewports */
  .nav-toggle-input:checked ~ .site-nav { display: block; }
  .nav-list { flex-wrap: nowrap; }
  .nav-link { color: var(--color-text); }
  /* Logo sizing on tablet */
  .site-logo img { height: 40px; max-height: 52px; width: auto; }
}

@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; }
  .footer-inner { gap: 2rem; }
  .nav-link { font-size: var(--font-size-sm); }
  /* Desktop: keep hamburger hidden, nav always visible */
  .site-nav { display: block !important; position: static; width: auto; background: transparent; border-top: none; box-shadow: none; }
  .nav-toggle-label { display: none; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .hero { background: linear-gradient(135deg, rgba(107,0,0,0.95) 0%, rgba(255,215,0,0.95) 100%); }
}

/* FOOTER */
.site-footer {
  background: #0a0a0a;
  color: var(--color-text);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.footer-inner .credit { font-size: var(--font-size-xs); opacity: 0.8; }

/* FORMS (inputs, selects, etc.) */
input, textarea, select {
  font-family: 'Lato', sans-serif;
  font-size: var(--font-size-base);
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  outline: none;
}
label { display: block; margin-bottom: 0.25rem; font-size: var(--font-size-xs); color: var(--color-text-muted); }

/* TABLES */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.5rem; 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: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.hidden { display: none !important; }

/* ANIMATION / TRANSITIONS (at least 2) */
@media (prefers-reduced-motion: no-preference) {
  .nav-link:hover { color: #fff; text-decoration: none; }
}