@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 */
  --color-bg: #FFFBF0;            /* daylight cream */
  --color-bg-alt: #FFF6E0;
  --color-bg-card: #FFFFFF;        /* card background (white) */
  --color-primary: #0A7A70;          /* tropical teal */
  --color-secondary: #B8860B;        /* sandy gold accent */
  --color-accent: #D2A600;           /* additional accent */
  --color-text: #2D1F0A;             /* body text on cream bg (must meet contrast) */
  --color-text-muted: #5C4A2A;       /* muted text */
  --color-text-on-primary: #FFFFFF;  /* text on primary */
  --color-border: #E3D1A8;
  --color-shadow: rgba(0, 0, 0, 0.18);

  /* RADIUS & SPACING TOKENS */
  --radius: 12px;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
}

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

html, body { height: 100%; }
html, body { overflow-x: hidden; max-width: 100%; }
body {
  margin: 0;
  font-family: 'DM Sans', 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: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

.container {
  width: 100%;
  padding: 0 1rem;
  margin: 0 auto;
  box-sizing: border-box;
}

/* HEADER & NAV */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 64px;
  overflow: visible;
  background: rgba(255, 255, 255, 0.98);
  /* default header backdrop helps readability over cream bg */
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  width: 100%;
  margin: 0 auto;
  /* ensure content is centered consistently across breakpoints */
  justify-content: flex-start;
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.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;
  border-radius: 2px;
  transition: 0.2s ease;
}

/* Mobile navigation panel */
.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  padding: 0.25rem 0;
  z-index: 500;
}
.nav-toggle-input:checked ~ .site-nav { display: block; }

/* Nav list on all sizes */
.nav-list {
  display: flex;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.nav-link {
  font-size: var(--font-size-sm);
  color: var(--color-text);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  display: inline-block;
  transition: color 0.2s ease, background 0.2s ease;
  position: relative;
}
.nav-link:hover {
  color: var(--color-primary);
}
.nav-link:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 0;
  background: currentColor;
  transition: width 0.2s ease;
}
.nav-link:hover:after { width: 100%; }

.nav-item { }

/* Dropdown nav */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  color: var(--color-text);
}
.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); }

/* Mobile dropdown indentation under toggle */
@media (max-width: 767px) {
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    display: none;
  }
  .nav-dropdown:hover > .nav-dropdown-menu,
  .nav-dropdown:focus-within > .nav-dropdown-menu { display: block; }
}

/* Hamburger visibility: mobile shows, tablet+ hides (via media query below) */
@media (min-width: 768px) {
  /* Tablet and up: centered layout rules below */
  .site-header .container {
    justify-content: center;
    gap: 2rem;
  }
  .nav-toggle-label { display: none; }
  .site-nav {
    display: flex;
    position: static;
    background: transparent;
    border-top: none;
    box-shadow: none;
  }
  .nav-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
  }
  .nav-link {
    font-size: var(--font-size-sm);
    padding: 0.4rem 0.75rem;
    border-bottom: none;
  }
}

/* Tablet-specific nav centering and container width */
@media (min-width: 768px) {
  .container { max-width: 960px; padding: 0 1.5rem; margin: 0 auto; }
  .site-nav { align-items: center; }
  .nav-list { justify-content: center; }
  /* Ensure container is centered at this breakpoint as required */
}
@media (min-width: 1024px) {
  .container { max-width: 1200px; padding: 0 2rem; margin: 0 auto; }
  /* Desktop hero sizing */
  .hero { min-height: 70vh; }
}
@media (min-width: 768px) {
  /* NAV LAYOUT (tablet+): center nav container and items as per spec */
  .site-header .container { justify-content: center; gap: 2rem; }
  .site-nav { flex: 0 0 auto; justify-content: center; }
  .nav-list { justify-content: center; }
  /* Ensure .nav-list is horizontal on tablet/desktop */
  .nav-list { flex-direction: row !important; }
}

/* HERO */
.hero {
  min-height: 50vh;
  padding: var(--space-lg) 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, rgba(0,0,0,0.65), rgba(0,0,0,0.65)), linear-gradient(135deg, rgba(10, 140, 120, 0.8), rgba(60, 0, 100, 0.8)), var(--color-bg);
}
.hero h1 { color: #fff; margin: 0 0 0.5rem; font-size: var(--font-size-2xl); }
.hero p { color: #f3f0e8; margin: 0 0 1rem; font-size: var(--font-size-base); }

.hero-headline { text-align: center; margin-bottom: 0.75rem; color: #fff; }
.hero-cta { display: flex; justify-content: center; margin-top: 0.75rem; }

/* Hero extras (as requested) */
.hero-poster {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 500px;
  margin: 1.5rem auto;
}
.hero-poster-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  cursor: pointer;
}
.hero-play svg { width: 72px; height: 72px; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4)); }

/* HERO TEXT & CTAs styling (guaranteed contrast on hero background) */
.hero h1, .hero p, .hero .btn { color: #fff; }

/* CARDS & GRID */
.card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--color-bg-card);
  box-shadow: 0 4px 6px rgba(0,0,0,0.15), 0 10px 15px rgba(0,0,0,0.08);
  overflow: hidden;
}
.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 .content { padding: 1rem; }

/* Card grid: responsive with auto-fill min 280px */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  align-items: stretch;
}
@media (min-width: 768px) {
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 0.75rem 1rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid transparent;
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-align: center;
  text-decoration: none;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(0.98); }
.btn-primary { background: var(--color-primary); color: var(--color-text-on-primary); }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.btn + .btn { margin-left: var(--space-sm); }

/* FOOTER */
.site-footer {
  background: var(--color-bg-card);
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}
@media (min-width: 768px) {
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* SECTIONS & TITLES */
.section {
  padding: 2rem 0;
}
.section-title {
  font-size: var(--font-size-2xl);
  margin: 0 0 1rem;
  font-weight: var(--font-weight-bold);
}
.hint { font-size: var(--font-size-xs); color: var(--color-text-muted); }

/* TYPOGRAPHY DEFAULTS */
h1 { font-size: var(--font-size-3xl); line-height: var(--line-height-tight); margin: 0 0 0.5rem; }
h2 { font-size: var(--font-size-2xl); margin: 0 0 0.5rem; }
h3 { font-size: var(--font-size-xl); margin: 0 0 0.5rem; }
p { margin: 0 0 0.75rem; }
strong { font-weight: var(--font-weight-bold); }

/* FORMS */
label { display: block; font-size: var(--font-size-xs); margin-bottom: 0.25rem; color: var(--color-text); }
input, textarea, select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--font-size-base);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: color-m-mix(var(--color-primary), white, 20%); box-shadow: 0 0 0 3px rgba(10, 122, 112, 0.15); }

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

/* 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; }

/* RESPONSIVE RULES — BASE MOBILE FIRST (≤767px) */
@media (max-width: 767px) {
  html, body { overflow-x: hidden; max-width: 100%; }
  /* Container already full-width with padding; ensure margins constraint on mobile */
  .container { width: 100%; padding: 0 1rem; margin: 0 auto; }
  .site-header .container { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 1rem; }
  /* Hamburger nav visible by default on mobile; apply all mobile nav rules */
  .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; border-radius: 2px; transition: 0.2s ease; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: var(--color-bg); border-top: 1px solid var(--color-border); box-shadow: 0 4px 16px rgba(0,0,0,0.18); }
  .site-nav .nav-list { flex-direction: column; padding: 0.5rem 0; }
  .nav-link { font-size: var(--font-size-xs); padding: 0.75rem 1rem; border-bottom: 1px solid var(--color-border); }
  .nav-dropdown-menu { position: static; display: none; padding-left: 1rem; border: none; box-shadow: none; }
  .nav-dropdown:focus-within > .nav-dropdown-menu { display: block; }

  .hero { min-height: 50vh; padding: 1.5rem 0; }
  .hero h1 { font-size: var(--font-size-2xl); }
  .card-grid { grid-template-columns: 1fr; }
  .section { padding: 2rem 0; }
  .section-title { font-size: var(--font-size-xl); }
  .btn { width: auto; white-space: normal; }

  .footer-inner { flex-direction: column; align-items: center; padding: 0 1rem; }
  table { display: block; overflow-x: auto; }
  .container { margin: 0 auto; }
}

/* RESPONSIVE RULES — TABLET (min-width: 768px) */
@media (min-width: 768px) {
  .container { max-width: 960px; padding: 0 1.5rem; margin: 0 auto; }
  /* Hamburger hidden; tablet nav visible and centered */
  .nav-toggle-label { display: none; }
  .site-nav { display: flex; position: static; background: transparent; border-top: none; box-shadow: none; }
  .site-header .container { justify-content: center; gap: 2rem; }

  .nav-list { display: flex !important; flex-direction: row !important; flex-wrap: nowrap; align-items: center; justify-content: center; }

  .hero { min-height: 60vh; }
  .hero-headline { text-align: center; }

  .hero h1 { font-size: var(--font-size-3xl); }

  .section { padding: 3rem 0; }
  .section-title { font-size: var(--font-size-2xl); }

  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
  /* Ensure container remains centered at this breakpoint as required */
}

/* RESPONSIVE RULES — DESKTOP (min-width: 1024px) */
@media (min-width: 1024px) {
  .container { max-width: 1200px; padding: 0 2rem; margin: 0 auto; }
  .hero { min-height: 70vh; }
  .hero h1 { font-size: var(--font-size-hero); }
  .section { padding: 4rem 0; }
}