/* ============================================================
   DORFFEST ARBOLDSWIL 2028 — Global Design System
   index.css
   ============================================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

/* ============================================================
   CSS RESET (Modern Minimal)
   ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

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

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

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

ul,
ol {
  list-style: none;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* ---- Color Palette ---- */
  --clr-primary-black: #0f172a;
  --clr-deep-navy: #0a1628;
  --clr-royal-blue: #003988;
  --clr-sky-blue: #0284C7;
  --clr-sun-yellow: #F59E0B;
  --clr-warm-gold: #FBBF24;
  --clr-accent-green: #16A34A;
  --clr-white: #FFFFFF;
  --clr-light-gray: #f1f5f9;
  --clr-bg-light: #f8fafc;

  /* ---- Derived / Utility Colors ---- */
  --clr-navy-85: rgba(10, 22, 40, 0.85);
  --clr-navy-80: rgba(10, 22, 40, 0.80);
  --clr-navy-70: rgba(10, 22, 40, 0.70);
  --clr-navy-60: rgba(10, 22, 40, 0.60);
  --clr-navy-40: rgba(10, 22, 40, 0.40);
  --clr-yellow-30: rgba(255, 215, 0, 0.30);
  --clr-yellow-10: rgba(255, 215, 0, 0.10);
  --clr-yellow-05: rgba(255, 215, 0, 0.05);
  --clr-white-10: rgba(255, 255, 255, 0.10);
  --clr-white-05: rgba(255, 255, 255, 0.05);
  --clr-white-60: rgba(255, 255, 255, 0.60);
  --clr-white-80: rgba(255, 255, 255, 0.80);

  /* ---- Typography ---- */
  --ff-heading: 'Outfit', sans-serif;
  --ff-body: 'Inter', sans-serif;

  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  /* Fluid type scale */
  --fs-display: clamp(3rem, 6vw + 1rem, 6rem);
  --fs-h1: clamp(2.25rem, 4vw + 0.5rem, 4rem);
  --fs-h2: clamp(1.75rem, 3vw + 0.5rem, 3rem);
  --fs-h3: clamp(1.375rem, 2vw + 0.5rem, 2rem);
  --fs-h4: clamp(1.125rem, 1.5vw + 0.25rem, 1.5rem);
  --fs-h5: clamp(1rem, 1vw + 0.25rem, 1.25rem);
  --fs-h6: clamp(0.875rem, 0.5vw + 0.25rem, 1rem);
  --fs-body: clamp(0.9375rem, 0.5vw + 0.5rem, 1.0625rem);
  --fs-small: clamp(0.8125rem, 0.25vw + 0.5rem, 0.875rem);
  --fs-xs: 0.75rem;

  /* ---- Spacing Scale ---- */
  --space-2xs: 0.25rem;    /* 4px */
  --space-xs: 0.5rem;      /* 8px */
  --space-sm: 0.75rem;     /* 12px */
  --space-md: 1rem;        /* 16px */
  --space-lg: 1.5rem;      /* 24px */
  --space-xl: 2rem;        /* 32px */
  --space-2xl: 3rem;       /* 48px */
  --space-3xl: 4rem;       /* 64px */
  --space-4xl: 6rem;       /* 96px */
  --space-5xl: 8rem;       /* 128px */

  /* ---- Layout ---- */
  --max-width: 1200px;
  --max-width-narrow: 800px;
  --max-width-wide: 1440px;

  /* ---- Borders ---- */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 50px;
  --radius-circle: 50%;

  /* ---- Shadows ---- */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glow-yellow: 0 0 20px rgba(255, 215, 0, 0.15),
                         0 0 60px rgba(255, 215, 0, 0.05);
  --shadow-glow-yellow-strong: 0 0 30px rgba(255, 215, 0, 0.25),
                                0 0 80px rgba(255, 215, 0, 0.1);
  --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.35),
                       0 0 24px rgba(255, 215, 0, 0.08);

  /* ---- Transitions ---- */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 0.2s var(--ease-out-expo);
  --transition-base: 0.35s var(--ease-out-expo);
  --transition-slow: 0.5s var(--ease-out-expo);
  --transition-spring: 0.4s var(--ease-spring);

  /* ---- Glassmorphism ---- */
  --glass-bg: rgba(10, 22, 40, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 16px;

  /* ---- Z-Layers ---- */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 500;
  --z-navbar: 1000;
  --z-overlay: 5000;
  --z-modal: 8000;
}

/* ============================================================
   BODY DEFAULTS
   ============================================================ */
body {
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  color: var(--clr-primary-black);
  background-color: var(--clr-bg-light);
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

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

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #003988;
  border-radius: var(--radius-pill);
  border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
  background: #002b66;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #003988 #f1f5f9;
}

/* ============================================================
   SELECTION
   ============================================================ */
::selection {
  background-color: var(--clr-sun-yellow);
  color: var(--clr-primary-black);
}

::-moz-selection {
  background-color: var(--clr-sun-yellow);
  color: var(--clr-primary-black);
}

/* ============================================================
   TYPOGRAPHY SCALE
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--clr-primary-black);
}

.page-hero h1,
.page-hero h2,
.page-hero h3,
.page-hero p,
.page-hero__title,
.page-hero__subtitle {
  color: #FFFFFF !important;
}

h1 {
  font-size: var(--fs-h1);
  font-weight: var(--fw-extrabold);
}

h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
}

h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
}

h4 {
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
}

h5 {
  font-size: var(--fs-h5);
  font-weight: var(--fw-medium);
}

h6 {
  font-size: var(--fs-h6);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p {
  color: #475569;
  line-height: 1.75;
}

p + p {
  margin-top: var(--space-md);
}

strong, b {
  font-weight: var(--fw-bold);
  color: var(--clr-primary-black);
}

a:not([class]) {
  color: var(--clr-royal-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

a:not([class]):hover {
  color: #002b66;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 24px);
  box-sizing: border-box;
}

.container--narrow {
  max-width: var(--max-width-narrow);
  width: 100%;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 24px);
  box-sizing: border-box;
}

.container--wide {
  max-width: var(--max-width-wide);
  width: 100%;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 24px);
  box-sizing: border-box;
}

.section-padding {
  padding-block: var(--space-4xl);
}

.section-padding--sm {
  padding-block: var(--space-2xl);
}

.section-padding--lg {
  padding-block: var(--space-5xl);
}

/* ---- Text Utilities ---- */
.text-gradient {
  background: linear-gradient(135deg, var(--clr-sun-yellow) 0%, var(--clr-warm-gold) 50%, var(--clr-sun-yellow) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer-gradient 4s ease-in-out infinite;
}

.text-gradient--blue {
  background: linear-gradient(135deg, var(--clr-sky-blue), var(--clr-royal-blue), var(--clr-sun-yellow));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer-gradient 5s ease-in-out infinite;
}

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-yellow { color: var(--clr-sun-yellow); }
.text-gold   { color: var(--clr-warm-gold); }
.text-muted  { color: #64748b; }
.text-dark   { color: #0f172a; }
.text-blue   { color: #003988; }

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---- Flex/Grid Helpers ---- */
.flex          { display: flex; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.flex-col      { display: flex; flex-direction: column; }
.flex-wrap     { flex-wrap: wrap; }
.gap-xs        { gap: var(--space-xs); }
.gap-sm        { gap: var(--space-sm); }
.gap-md        { gap: var(--space-md); }
.gap-lg        { gap: var(--space-lg); }
.gap-xl        { gap: var(--space-xl); }
.gap-2xl       { gap: var(--space-2xl); }

/* ---- Spacing Helpers ---- */
.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

/* ============================================================
   GLASSMORPHISM UTILITY
   ============================================================ */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

.glass--light {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
}

.glass--strong {
  background: rgba(10, 22, 40, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
}

/* ============================================================
   KEYFRAMES — Animated Backgrounds & Effects
   ============================================================ */
@keyframes shimmer-gradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes gradient-shift {
  0%   { background-position: 0% 0%; }
  25%  { background-position: 100% 0%; }
  50%  { background-position: 100% 100%; }
  75%  { background-position: 0% 100%; }
  100% { background-position: 0% 0%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.1); }
  50%      { box-shadow: 0 0 30px rgba(255, 215, 0, 0.2); }
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes shimmer-line {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

.animated-bg {
  background: linear-gradient(
    -45deg,
    var(--clr-deep-navy),
    #0d1f3c,
    var(--clr-royal-blue),
    #0d1f3c
  );
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
}

/* ============================================================
   ANIMATION CLASSES — Intersection Observer Driven
   ============================================================ */
.fade-in,
.slide-up,
.slide-left,
.slide-right {
  opacity: 0;
  transition: opacity 0.8s var(--ease-out-expo),
              transform 0.8s var(--ease-out-expo);
  will-change: opacity, transform;
}

.fade-in {
  transform: translateY(0);
}

.slide-up {
  transform: translateY(40px);
}

.slide-left {
  transform: translateX(60px);
}

.slide-right {
  transform: translateX(-60px);
}

/* Triggered state */
.fade-in.is-visible,
.slide-up.is-visible,
.slide-left.is-visible,
.slide-right.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out-expo),
              transform 0.6s var(--ease-out-expo);
}

.stagger-children.is-visible > *:nth-child(1)  { transition-delay: 0.05s; }
.stagger-children.is-visible > *:nth-child(2)  { transition-delay: 0.1s; }
.stagger-children.is-visible > *:nth-child(3)  { transition-delay: 0.15s; }
.stagger-children.is-visible > *:nth-child(4)  { transition-delay: 0.2s; }
.stagger-children.is-visible > *:nth-child(5)  { transition-delay: 0.25s; }
.stagger-children.is-visible > *:nth-child(6)  { transition-delay: 0.3s; }
.stagger-children.is-visible > *:nth-child(7)  { transition-delay: 0.35s; }
.stagger-children.is-visible > *:nth-child(8)  { transition-delay: 0.4s; }
.stagger-children.is-visible > *:nth-child(9)  { transition-delay: 0.45s; }
.stagger-children.is-visible > *:nth-child(10) { transition-delay: 0.5s; }

.stagger-children.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Reduce motion for accessibility */
@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;
  }

  .fade-in,
  .slide-up,
  .slide-left,
  .slide-right {
    opacity: 1;
    transform: none;
  }

  .stagger-children > * {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   FOCUS & ACCESSIBILITY
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--clr-sun-yellow);
  outline-offset: 3px;
  border-radius: 4px;
}

:focus:not(:focus-visible) {
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100%;
  left: var(--space-md);
  z-index: calc(var(--z-cursor) + 1);
  padding: var(--space-sm) var(--space-lg);
  background: var(--clr-sun-yellow);
  color: var(--clr-primary-black);
  font-weight: var(--fw-bold);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

/* ============================================================
   RESPONSIVE HELPERS
   ============================================================ */
@media (max-width: 768px) {
  .container {
    padding-inline: var(--space-md);
  }

  .section-padding {
    padding-block: var(--space-2xl);
  }

  .section-padding--lg {
    padding-block: var(--space-3xl);
  }

  .hide-mobile {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding-inline: var(--space-sm);
  }

  .section-padding {
    padding-block: var(--space-xl);
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}

/* ============================================================
   FOOTER & LIGHT THEME STYLES
   ============================================================ */
.section {
  background-color: var(--clr-bg-light);
  color: var(--clr-primary-black);
}

.footer {
  background: var(--clr-white);
  color: var(--clr-primary-black);
  border-top: 1px solid #e2e8f0;
}

.footer__logo {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.08));
}

.footer__text {
  color: #64748b;
}

.footer__col-title {
  color: var(--clr-primary-black);
  font-weight: 700;
}

.footer__link {
  color: #64748b;
}

.footer__link:hover {
  color: var(--clr-royal-blue);
}

.footer__bottom {
  color: #94a3b8;
  border-top-color: #e2e8f0;
}
