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

:root {
  /* Radius & spacing */
  --radius: 12px;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 0.75rem;
  --spacing-lg: 1rem;
  --container-max-width: 1260px;

  /* 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 (rgb values to avoid hex literals) */
  --color-bg: rgb(255, 248, 231);        /* vintage ivory background (LIGHT) */
  --color-bg-alt: rgb(252, 235, 203);    /* slightly darker / warm accent */
  --color-bg-card: rgb(254, 238, 210);   /* card background (dense content) */
  --color-border: rgb(184, 148, 72);     /* warm amber border */
  --color-shadow: rgb(0 0 0 / 18%);

  --color-primary: rgb(123, 58, 10);      /* cognac */
  --color-accent: rgb(184, 136, 10);      /* gold accent */

  /* Text colors (on light BG) */
  --color-text: rgb(26, 26, 26);          /* body text on light bg (AA+ contrast) */
  --color-text-muted: rgb(90, 90, 90);    /* muted text on light bg */

  /* Text on primary (hero/CTAs) – dark primary implies white text */
  --color-text-on-primary: rgb(255, 255, 255);
  /* Hero text emphasis override will be applied where appropriate */

  /* Misc */
  --color-bg-hero-overlay: rgb(0 0 0 / 45%);
  --color-disabled: rgb(180, 180, 180);
}

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

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  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;
  overflow-x: hidden;
}

/* 3. CSS reset / base */
a { color: inherit; text-decoration: none; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }

/* 5. Layout utilities */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto; /* always centered at every breakpoint */
  padding: 0 1rem;
  box-sizing: border-box;
}
.section {
  padding: 2rem 0;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}
.section-title {
  font-size: var(--font-size-2xl);
  margin: 0 0 0.75rem;
  color: var(--color-text);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  align-items: stretch;
}
.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden; /* mandatory for proper card corners on images */
  background: var(--color-bg-card);
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-2px); }
.card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.card-body { padding: 1rem 1.25rem; }
.card > :not(img):not(.card-body) { padding: 1rem 1.25rem; } /* if no wrapper, pad non-img content */
.card h3, .card h4 { margin-top: 0; margin-bottom: 0.5rem; }
.card p { margin: 0; line-height: var(--line-height-base); color: var(--color-text-muted); }

/* 6. Class names you MUST style */
/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 64px;
  overflow: visible;
  background: var(--color-bg);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  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;
}
.site-nav {
  display: none; /* mobile hidden by default; toggled by checkbox */
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 4px 16px var(--color-shadow);
  z-index: 500;
}
.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;
}
.site-nav .nav-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.5rem 0;
  margin: 0;
  list-style: none;
}
.nav-item { }

.nav-link {
  color: var(--color-text);
  font-size: var(--font-size-sm);
  padding: 0.75rem 1rem;
  display: block;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}
.nav-link:hover { text-decoration: underline; color: var(--color-text); transform: translateX(1px); }

/* Dropdowns */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; white-space: nowrap; }
.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 (min-width: 768px) {
  /* Tablet + Desktop layout overrides (nav visible) */
  .nav-toggle-label { display: none !important; }
  .site-nav {
    display: flex;
    position: static;
    align-items: center;
    background: transparent;
    border-top: none;
    box-shadow: none;
  }
  .nav-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
  }
  .nav-link {
    font-size: var(--font-size-sm) !important;
  }
  /* Tablet navigation centering rules */
  .site-header .container { justify-content: flex-start; }
  .site-nav { flex: 1; justify-content: center; }
  .nav-list { justify-content: center; }
}

/* Mobile-specific dropdown adjustments */
@media (max-width: 767px) {
  .nav-list { flex-direction: column; }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    display: none;
  }
  .nav-dropdown:focus-within > .nav-dropdown-menu {
    display: block;
  }
  /* Ensure dropdown stays usable on mobile inside the stacked nav */
  .site-nav { display: block; width: 100%; }
  .site-nav .nav-list { width: 100%; }
}
a.arrow { text-decoration: none; }

/* 7. Forms */
label { display: block; margin-bottom: 0.25rem; color: var(--color-text); font-size: var(--font-size-sm); }
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fff;
  color: var(--color-text);
  font: inherit;
  line-height: 1.4;
}
textarea { resize: vertical; min-height: 120px; }

/* 7. Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-align: center;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  border-color: rgba(0,0,0,0.1);
}
.btn-primary:hover {
  filter: brightness(0.92);
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
}
.btn-secondary:hover {
  background: var(--color-bg-alt);
}

/* 8. Hero — variant with dense, high-contrast layout */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 2rem 1rem;
  color: #fff; /* ensure readability on dark hero bg */
  text-align: center;
  background: linear-gradient(135deg, rgba(0,0,0,0.6), rgba(0,0,0,0.25)),
              linear-gradient(to bottom right, rgba(0,0,0,0.25), rgba(0,0,0,0.4)),
              var(--color-primary);
}
.hero h1, .hero p, .hero .btn { color: #fff; }
.hero-big-title {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 1.5rem;
  text-transform: uppercase;
}
.hero-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.hero-subtitle { flex: 1 1 300px; font-size: 1.1rem; }
.hero-cta { display: flex; gap: 1rem; flex-shrink: 0; flex-wrap: wrap; }

@media (max-width: 767px) {
  .hero-sub-row { flex-direction: column; align-items: flex-start; }
  .hero-big-title { font-size: clamp(2.5rem, 10vw, 4rem); }
}

/* Hero typography defaults (fallback) */
.hero h1 { font-size: var(--font-size-hero); margin: 0 0 0.5rem; }
.hero p { margin: 0 0 1rem; }

/* 9. Tables */
table { width: 100%; border-collapse: collapse; border-spacing: 0; background: transparent; }
th, td { padding: 0.75rem; border-bottom: 1px solid var(--color-border); text-align: left; }
th { font-weight: var(--font-weight-bold); }

/* 9. Utility classes */
.text-center { text-align: center; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: 2rem; }

.hidden { display: none !important; }

/* 10. RESPONSIVE REQUIREMENTS */
/* Base mobile-first styles included above (≤767px) */

/* Tablet (≥768px) and desktop (≥1024px) adjustments are included in the media queries above. */
/* Additional tablet/desktop fine-tuning for dense content: */
@media (min-width: 768px) {
  /* Tablet layout: header/nav/centered nav behavior */
  .container { margin: 0 auto; padding: 0 1.5rem; }
  /* Nav text sizing is already set by base; ensure nav-link sizing on tablet/desktop stays smaller than body */
  .nav-link { font-size: var(--font-size-sm); }
  /* Hero text scales better on larger screens */
  .hero { min-height: 60vh; }
}
@media (min-width: 1024px) {
  /* Desktop adjustments (1280+ feel) */
  .container { max-width: 1260px; padding: 0 2rem; }
  .hero { min-height: 70vh; }
  .hero h1 { font-size: var(--font-size-hero); }
  .section { padding: 4rem 0; }
  .section-title { font-size: var(--font-size-2xl); }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .site-header .container { justify-content: flex-start; }
  .site-nav { display: flex; align-items: center; position: static; }
}