/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  background-color: #FDF5E6;
  color: #3E2723;
  font-family: 'Inter', 'Noto Sans SC', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video {
  max-width: 100%;
  display: block;
}
a {
  color: #D32F2F;
  text-decoration: none;
  transition: color 0.25s ease;
}
a:hover {
  color: #B71C1C;
}
a:focus-visible {
  outline: 2px solid #1976D2;
  outline-offset: 2px;
  border-radius: 2px;
}
ul, ol {
  list-style: none;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Exo 2', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: #3E2723;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.375rem); }

/* ===== CSS VARIABLES ===== */
:root {
  --color-bg: #FDF5E6;
  --color-text: #3E2723;
  --color-accent: #D32F2F;
  --color-accent-dark: #B71C1C;
  --color-blue: #1976D2;
  --color-purple: #9C27B0;
  --color-green: #00E676;
  --color-dark: #1A1A1A;
  --color-gold: #FFD54F;
  --color-white: #FFFFFF;
  --font-heading: 'Montserrat', 'Exo 2', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  --header-height: 64px;
  --content-max: 1200px;
  --content-padding: clamp(1rem, 4vw, 2.5rem);
  --transition-default: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 10000;
  padding: 0.5rem 1.25rem;
  background: #3E2723;
  color: #FDF5E6;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0 0 4px 4px;
  transition: top 0.3s ease;
}
.skip-link:focus {
  top: 0;
  outline: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.skip-link:focus-visible {
  outline: 2px solid #FFD54F;
  outline-offset: 2px;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(253, 245, 230, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(62, 39, 35, 0.08);
  transition: background var(--transition-default), box-shadow var(--transition-default);
}
.header.is-scrolled {
  background: rgba(253, 245, 230, 0.96);
  box-shadow: 0 2px 20px rgba(62, 39, 35, 0.08);
}
.header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  position: relative;
}

/* ===== SITE LOGO ===== */
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #3E2723;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 2;
}
.site-logo:hover {
  color: #3E2723;
}
.logo-star {
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  background: linear-gradient(135deg, #FFD54F 30%, #D32F2F 100%);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: star-pulse 3s ease-in-out infinite;
}
@keyframes star-pulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.1) rotate(8deg); opacity: 0.85; }
}
.logo-trail {
  display: inline-block;
  width: 2rem;
  height: 2px;
  background: linear-gradient(90deg, #D32F2F, transparent);
  position: relative;
}
.logo-trail::after {
  content: '';
  position: absolute;
  right: 0;
  top: -2px;
  width: 6px;
  height: 6px;
  background: #D32F2F;
  border-radius: 50%;
  opacity: 0.6;
}

/* ===== NAVIGATION ===== */
.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  display: block;
  padding: 0.5rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #3E2723;
  border-radius: 4px;
  transition: background var(--transition-default), color var(--transition-default), box-shadow var(--transition-default);
  position: relative;
  letter-spacing: 0.01em;
}
.nav-link:hover {
  background: rgba(211, 47, 47, 0.06);
  color: #D32F2F;
}
.nav-link:focus-visible {
  outline: 2px solid #1976D2;
  outline-offset: 2px;
  background: rgba(25, 118, 210, 0.06);
}
.nav-link[aria-current="page"] {
  color: #D32F2F;
  font-weight: 600;
}
.nav-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 1.2rem;
  height: 3px;
  background: #D32F2F;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(211, 47, 47, 0.5);
  animation: current-glow 2s ease-in-out infinite;
}
@keyframes current-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(211, 47, 47, 0.5); }
  50% { box-shadow: 0 0 16px rgba(211, 47, 47, 0.8); }
}

/* ===== NAV TOGGLE (MOBILE) ===== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid rgba(62, 39, 35, 0.15);
  border-radius: 6px;
  cursor: pointer;
  gap: 4px;
  padding: 8px;
  transition: background var(--transition-default), border-color var(--transition-default);
  z-index: 3;
}
.nav-toggle:hover {
  background: rgba(211, 47, 47, 0.06);
  border-color: #D32F2F;
}
.nav-toggle:focus-visible {
  outline: 2px solid #1976D2;
  outline-offset: 2px;
}
.toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: #3E2723;
  border-radius: 2px;
  transition: transform var(--transition-default), opacity var(--transition-default);
}
.nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
  position: absolute;
  bottom: -3px;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #D32F2F, #1976D2, #9C27B0);
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
  z-index: 1;
}

/* ===== FOOTER ===== */
.footer {
  background: #1A1A1A;
  color: rgba(253, 245, 230, 0.85);
  padding: 3rem var(--content-padding) 0;
  position: relative;
  overflow: hidden;
}
.footer-data-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #D32F2F, #9C27B0 40%, #1976D2 70%, #00E676);
  opacity: 0.6;
}
.footer-data-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: data-sweep 4s ease-in-out infinite;
}
@keyframes data-sweep {
  0% { left: -100%; }
  100% { left: 200%; }
}
.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(253, 245, 230, 0.08);
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #FDF5E6;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  margin-bottom: 0.75rem;
}
.footer-logo:hover {
  color: #FFD54F;
}
.footer-logo .logo-star {
  background: linear-gradient(135deg, #FFD54F 30%, #D32F2F 100%);
}
.footer-tagline {
  font-size: 0.95rem;
  color: rgba(253, 245, 230, 0.6);
  margin-bottom: 0.75rem;
}
.footer-trust {
  font-size: 0.8rem;
  color: rgba(253, 245, 230, 0.45);
  line-height: 1.5;
  max-width: 30ch;
}
.footer-col-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  color: #FFD54F;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}
.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 1.5rem;
  height: 2px;
  background: #D32F2F;
  border-radius: 1px;
}
.footer-links li {
  margin-bottom: 0.4rem;
}
.footer-links a {
  color: rgba(253, 245, 230, 0.7);
  font-size: 0.875rem;
  transition: color var(--transition-default), padding-left var(--transition-default);
  display: inline-block;
}
.footer-links a:hover {
  color: #FFD54F;
  padding-left: 4px;
}
.footer-links a:focus-visible {
  outline: 2px solid #FFD54F;
  outline-offset: 2px;
  border-radius: 2px;
}
.footer-contact p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(253, 245, 230, 0.7);
}
.footer-contact a {
  color: rgba(253, 245, 230, 0.7);
  border-bottom: 1px solid rgba(253, 245, 230, 0.15);
  transition: color var(--transition-default), border-color var(--transition-default);
}
.footer-contact a:hover {
  color: #FFD54F;
  border-color: #FFD54F;
}
.footer-bottom {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  font-size: 0.8rem;
  color: rgba(253, 245, 230, 0.4);
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-icp {
  letter-spacing: 0.02em;
}
.footer-copyright {
  letter-spacing: 0.02em;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: transform var(--transition-default), box-shadow var(--transition-default), background var(--transition-default), color var(--transition-default);
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}
.btn:focus-visible {
  outline: 2px solid #1976D2;
  outline-offset: 2px;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.25);
}
.btn:active {
  transform: translateY(0);
}
.btn-primary {
  background: #D32F2F;
  color: #FFFFFF;
}
.btn-primary:hover {
  background: #B71C1C;
  color: #FFFFFF;
}
.btn-outline {
  background: transparent;
  color: #3E2723;
  border: 2px solid #3E2723;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}
.btn-outline:hover {
  background: #3E2723;
  color: #FDF5E6;
  box-shadow: 0 4px 12px rgba(62, 39, 35, 0.15);
}
.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
}
.btn-lg {
  padding: 0.8rem 2rem;
  font-size: 1.05rem;
}

/* ===== TAGS ===== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 3px;
  background: rgba(62, 39, 35, 0.06);
  color: #3E2723;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%);
}
.tag-live {
  background: rgba(0, 230, 118, 0.12);
  color: #00E676;
  text-shadow: 0 0 8px rgba(0, 230, 118, 0.3);
}
.tag-live::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00E676;
  animation: live-pulse 1.5s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}
.tag-upcoming {
  background: rgba(25, 118, 210, 0.1);
  color: #1976D2;
}
.tag-accent {
  background: rgba(211, 47, 47, 0.1);
  color: #D32F2F;
}

/* ===== CARDS ===== */
.card {
  background: #FDF5E6;
  border: 1px solid rgba(62, 39, 35, 0.08);
  border-radius: 4px;
  padding: 1.5rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  box-shadow: 0 2px 12px rgba(62, 39, 35, 0.04);
  transition: transform var(--transition-default), box-shadow var(--transition-default);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(62, 39, 35, 0.08);
}
.card-dark {
  background: #1A1A1A;
  border-color: rgba(253, 245, 230, 0.08);
  color: rgba(253, 245, 230, 0.85);
}
.card-dark h1, .card-dark h2, .card-dark h3, .card-dark h4 {
  color: #FDF5E6;
}

/* ===== SECTION NUMBER ===== */
.section-number {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 5rem);
  color: rgba(211, 47, 47, 0.12);
  line-height: 1;
  display: block;
  user-select: none;
  pointer-events: none;
}

/* ===== DATA VALUE ===== */
.data-value {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #9C27B0;
  font-size: 1.1em;
  letter-spacing: -0.02em;
}
.data-value-glow {
  text-shadow: 0 0 12px rgba(156, 39, 176, 0.3);
}

/* ===== STARDUST CONTAINER ===== */
.stardust {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.stardust-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255, 213, 79, 0.3);
  border-radius: 50%;
  animation: dust-drift linear infinite;
}
@keyframes dust-drift {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.3; }
  100% { transform: translateY(-100vh) translateX(40px); opacity: 0; }
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #3E2723;
  color: #FDF5E6;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 16px rgba(62, 39, 35, 0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-default), transform var(--transition-default), background var(--transition-default);
  pointer-events: none;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  background: #D32F2F;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(211, 47, 47, 0.3);
}
.back-to-top:focus-visible {
  outline: 2px solid #1976D2;
  outline-offset: 2px;
}
.back-to-top::before {
  content: '↑';
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1;
}

/* ===== STAR ICON ===== */
.star-icon {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  background: currentColor;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  vertical-align: middle;
  margin-right: 0.3em;
}

/* ===== MAIN CONTENT WRAPPER ===== */
.main-content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: calc(var(--header-height) + 1.5rem) var(--content-padding) 3rem;
  min-height: 60vh;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: rgba(62, 39, 35, 0.5);
  margin-bottom: 1.5rem;
  padding: 0.5rem 0;
}
.breadcrumb a {
  color: rgba(62, 39, 35, 0.6);
  transition: color var(--transition-default);
}
.breadcrumb a:hover {
  color: #D32F2F;
}
.breadcrumb-sep {
  color: rgba(62, 39, 35, 0.25);
  user-select: none;
}
.breadcrumb-current {
  color: #3E2723;
  font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }
  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(253, 245, 230, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(62, 39, 35, 0.08);
    padding: 0.5rem var(--content-padding) 1.25rem;
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    box-shadow: 0 8px 24px rgba(62, 39, 35, 0.08);
    overflow-y: auto;
    max-height: 70vh;
  }
  .nav[data-open] {
    transform: translateY(0);
    opacity: 1;
  }
  .nav-list {
    flex-direction: column;
    gap: 0.125rem;
  }
  .nav-link {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    width: 100%;
    border-radius: 6px;
  }
  .nav-link[aria-current="page"]::after {
    bottom: 4px;
    width: 2rem;
    height: 3px;
  }
  .nav-toggle {
    display: flex;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.4rem;
  }
  .back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
  }
}
@media (max-width: 480px) {
  .site-logo {
    font-size: 1.1rem;
  }
  .logo-trail {
    width: 1.2rem;
  }
  .footer {
    padding: 2rem var(--content-padding) 0;
  }
  .footer-trust {
    max-width: 100%;
  }
}

/* ===== PREFERS REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
  .stardust-particle {
    display: none;
  }
  .logo-star {
    animation: none;
  }
  .nav-link[aria-current="page"]::after {
    animation: none;
    box-shadow: 0 0 4px rgba(211, 47, 47, 0.4);
  }
  .footer-data-line::after {
    animation: none;
    display: none;
  }
  .card:hover {
    transform: none;
  }
  .btn:hover {
    transform: none;
  }
  .back-to-top:hover {
    transform: none;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .header {
    position: static;
    background: #FDF5E6;
    border-bottom: 1px solid #ddd;
  }
  .nav, .nav-toggle, .scroll-progress, .back-to-top, .stardust, .footer-data-line {
    display: none !important;
  }
  .main-content {
    padding-top: 1.5rem;
  }
  .footer {
    background: #FDF5E6;
    color: #3E2723;
    border-top: 1px solid #ddd;
  }
  .footer-logo, .footer-col-title {
    color: #3E2723;
  }
  .footer-links a, .footer-contact p, .footer-contact a, .footer-tagline, .footer-trust {
    color: #3E2723;
  }
  .footer-bottom {
    color: rgba(62, 39, 35, 0.6);
  }
}
