/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  background-color: var(--clr-primary-bg);
  color: var(--clr-primary-text);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

input, button, textarea, select {
  font: inherit;
}

ul, ol {
  list-style: none;
}

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

/* ===== CSS VARIABLES ===== */
:root {
  --clr-primary-bg: #F5F0E8;
  --clr-primary-text: #1A1A1A;
  --clr-secondary-text: #4A4A4A;
  --clr-accent-red: #CC2936;
  --clr-accent-blue: #1E3A5F;
  --clr-gold: #C9A94E;
  --clr-dark-bg: #121212;
  --clr-card-bg: #FFFFFF;
  --clr-hover-tint: rgba(204, 41, 54, 0.1);
  --clr-divider: #D4CFC4;

  --ff-heading: 'Inter', 'Noto Sans SC', system-ui, sans-serif;
  --ff-body: 'Inter', 'Noto Sans SC', system-ui, sans-serif;
  --ff-mono: 'JetBrains Mono', 'Courier New', monospace;

  --fs-h1: 4.5rem;
  --fs-h2: 3rem;
  --fs-h3: 2rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;

  --lh-headings: 1.1;
  --lh-body: 1.6;

  --container-max-width: 1280px;
  --header-height: 72px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
  line-height: var(--lh-headings);
  font-weight: 800;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

.body-text { font-size: var(--fs-body); line-height: var(--lh-body); }
.text-small { font-size: var(--fs-small); }
.text-mono { font-family: var(--ff-mono); }
.text-gold { color: var(--clr-gold); }
.text-red { color: var(--clr-accent-red); }
.text-blue { color: var(--clr-accent-blue); }
.text-dark-bg { color: var(--clr-dark-bg); }

/* ===== LAYOUT ===== */
.container {
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--clr-accent-red);
  color: #fff;
  font-weight: 600;
  z-index: 9999;
  border-radius: 0.25rem;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* ===== SITE HEADER ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
  background-color: transparent;
}

.site-header.scrolled {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--clr-primary-text);
  letter-spacing: -0.03em;
  line-height: 1;
}

/* ===== MAIN NAVIGATION ===== */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--clr-secondary-text);
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--clr-accent-red);
  border-bottom-color: var(--clr-accent-red);
}

.nav-link[aria-current="page"] {
  color: var(--clr-accent-red);
  border-bottom-color: var(--clr-accent-red);
}

/* ===== NAV TOGGLE (MOBILE) ===== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  gap: 5px;
  padding: 0;
  z-index: 1001;
}

.nav-toggle__line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--clr-primary-text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

[data-nav-toggle][aria-expanded="true"] .nav-toggle__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

[data-nav-toggle][aria-expanded="true"] .nav-toggle__line:nth-child(2) {
  opacity: 0;
}

[data-nav-toggle][aria-expanded="true"] .nav-toggle__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== FOOTER ===== */
.site-footer {
  background-color: var(--clr-dark-bg);
  color: #B0B0B0;
  padding: 4rem 0 2rem 0;
  margin-top: 6rem;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer__logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.footer__desc {
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 400px;
}

.footer__title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.25rem;
}

.footer__links li {
  margin-bottom: 0.75rem;
}

.footer__links a,
.footer__contact a {
  color: #B0B0B0;
  transition: color 0.3s ease;
}

.footer__links a:hover,
.footer__contact a:hover {
  color: var(--clr-gold);
}

.footer__contact p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.footer__bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

/* ===== GENERIC COMPONENTS ===== */
/* Cards */
.card {
  background: var(--clr-card-bg);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  line-height: 1;
}

.btn-primary {
  background-color: var(--clr-accent-red);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: #a8212b;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(204, 41, 54, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--clr-primary-text);
  border: 2px solid var(--clr-divider);
}

.btn-ghost:hover {
  border-color: var(--clr-accent-red);
  color: var(--clr-accent-red);
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 0;
}

.filter-bar [data-filter] {
  padding: 0.5rem 1.5rem;
  border-radius: 100px;
  border: 1px solid var(--clr-divider);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-bar [data-filter].active,
.filter-bar [data-filter]:hover {
  background: var(--clr-accent-red);
  color: #fff;
  border-color: var(--clr-accent-red);
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 6rem 0 4rem 0;
  position: relative;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 40%;
  height: 80%;
  background: var(--clr-accent-red);
  opacity: 0.05;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
}

/* Divider */
.divider {
  width: 100%;
  height: 1px;
  background: var(--clr-divider);
  margin: 2rem 0;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--clr-primary-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--clr-accent-red);
  border-radius: 100px;
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
  outline: 2px solid var(--clr-accent-red);
  outline-offset: 2px;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .site-header {
    transition: none !important;
  }

  .card:hover {
    transform: none !important;
  }

  .btn:hover {
    transform: none !important;
  }
}

/* ===== RESPONSIVE ===== */
/* Tablet */
@media (max-width: 1024px) {
  :root {
    --fs-h1: 3.5rem;
    --fs-h2: 2.5rem;
    --fs-h3: 1.75rem;
  }

  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --fs-h1: 2.5rem;
    --fs-h2: 2rem;
    --fs-h3: 1.5rem;
    --header-height: 64px;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease;
    opacity: 0;
    background: var(--clr-card-bg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  }

  .main-nav[data-open] {
    max-height: 100vh;
    opacity: 1;
  }

  .nav-list {
    flex-direction: column;
    padding: 1.5rem;
    gap: 0;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid var(--clr-divider);
    font-size: 1.1rem;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  :root {
    --fs-h1: 2rem;
    --fs-h2: 1.75rem;
    --fs-h3: 1.25rem;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
