/* Shamva College — Base Design System (Phase 2)
   Mobile-first, accessible, performance-minded.
*/

:root {
  /* Brand */
  --color-bg: #fbfcfb;
  --color-surface: #ffffff;
  --color-text: #0f1a12;
  --color-muted: #415246;
  --color-border: #e8f0ea;

  --color-primary: #146b3a;           /* Shamva Green */
  --color-primary-contrast: #ffffff;
  --color-accent: #bfe8d1;            /* Light green highlight */
  --color-focus: #2aa36b;

  --color-success: #0f7a3a;
  --color-warning: #a36b00;
  --color-danger: #b42318;

  /* Typography */
  --font-sans: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --font-serif: ui-serif, Georgia, "Times New Roman", Times, serif;

  /* Type scale (fluid, refined) */
  --step--1: clamp(0.875rem, 0.84rem + 0.18vw, 0.9375rem);
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.5rem, 1.35rem + 0.75vw, 1.875rem);
  --step-3: clamp(1.875rem, 1.65rem + 1.125vw, 2.5rem);
  --step-4: clamp(2.25rem, 1.9rem + 1.75vw, 3.5rem);

  /* Spacing (4px base, extended) */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-7: 2rem;     /* 32px */
  --space-8: 2.5rem;   /* 40px */
  --space-9: 3rem;     /* 48px */
  --space-10: 4rem;    /* 64px */

  /* Layout */
  --container-max: 1280px;
  --container-pad: clamp(1rem, 2vw, 1.25rem);

  /* Radius & shadow */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;

  /* Layered shadow system for depth */
  --shadow-xs: 0 1px 2px rgba(15, 26, 18, 0.05);
  --shadow-sm: 0 2px 4px rgba(15, 26, 18, 0.06), 0 1px 2px rgba(15, 26, 18, 0.04);
  --shadow-md: 0 4px 8px rgba(15, 26, 18, 0.08), 0 2px 4px rgba(15, 26, 18, 0.04);
  --shadow-lg: 0 8px 16px rgba(15, 26, 18, 0.1), 0 4px 8px rgba(15, 26, 18, 0.06);
  --shadow-xl: 0 16px 32px rgba(15, 26, 18, 0.12), 0 8px 16px rgba(15, 26, 18, 0.08);

  /* Header */
  --header-height: 64px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-1: 120ms;
  --dur-2: 220ms;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-1: 1ms;
    --dur-2: 1ms;
  }
}

/* Base reset */
*,
*::before,
*::after { box-sizing: border-box; }

html:focus-within { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

/* Agricultural themed background with illustrations */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -2;
  background: linear-gradient(180deg,
    rgba(251, 252, 251, 1) 0%,
    rgba(245, 250, 247, 1) 50%,
    rgba(240, 247, 243, 1) 100%
  );
}

/* Agricultural elements layer - tractors, plants, trees */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  opacity: 0.09;
  background-image:
    /* Tractor 1 */
    url("data:image/svg+xml,%3Csvg width='120' height='80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23146b3a'%3E%3Crect x='30' y='35' width='50' height='25' rx='3'/%3E%3Ccircle cx='45' cy='65' r='12'/%3E%3Ccircle cx='70' cy='65' r='12'/%3E%3Crect x='70' y='25' width='25' height='20' rx='2'/%3E%3Cpath d='M45,65 Q45,50 55,45' stroke='%23146b3a' fill='none' stroke-width='2'/%3E%3C/g%3E%3C/svg%3E"),
    /* Tree 1 - Large Oak */
    url("data:image/svg+xml,%3Csvg width='80' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23146b3a'%3E%3Crect x='35' y='60' width='10' height='40' fill='%23654321'/%3E%3Ccircle cx='40' cy='40' r='30' opacity='0.7'/%3E%3Ccircle cx='28' cy='48' r='22' opacity='0.6'/%3E%3Ccircle cx='52' cy='48' r='22' opacity='0.6'/%3E%3Ccircle cx='40' cy='25' r='18' opacity='0.65'/%3E%3C/g%3E%3C/svg%3E"),
    /* Plant/Crop 1 - Corn */
    url("data:image/svg+xml,%3Csvg width='40' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23146b3a'%3E%3Cpath d='M20,60 L20,30 Q25,25 25,15' stroke='%23146b3a' fill='none' stroke-width='2.5'/%3E%3Cellipse cx='25' cy='12' rx='8' ry='14' opacity='0.6'/%3E%3Cpath d='M20,45 Q15,40 10,35' stroke='%23146b3a' fill='none' stroke-width='2'/%3E%3Cellipse cx='10' cy='32' rx='7' ry='12' opacity='0.5'/%3E%3Cpath d='M20,45 Q25,40 30,35' stroke='%23146b3a' fill='none' stroke-width='2'/%3E%3Cellipse cx='30' cy='32' rx='7' ry='12' opacity='0.5'/%3E%3C/g%3E%3C/svg%3E"),
    /* Tractor 2 - with trailer */
    url("data:image/svg+xml,%3Csvg width='140' height='70' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23146b3a'%3E%3Crect x='20' y='30' width='45' height='22' rx='3'/%3E%3Ccircle cx='33' cy='57' r='11'/%3E%3Ccircle cx='55' cy='57' r='11'/%3E%3Crect x='55' y='22' width='20' height='18' rx='2'/%3E%3Crect x='80' y='35' width='50' height='15' rx='2' opacity='0.7'/%3E%3Ccircle cx='95' cy='55' r='8' opacity='0.7'/%3E%3Ccircle cx='115' cy='55' r='8' opacity='0.7'/%3E%3C/g%3E%3C/svg%3E"),
    /* Tree 2 - Pine */
    url("data:image/svg+xml,%3Csvg width='50' height='80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23146b3a'%3E%3Crect x='22' y='55' width='6' height='25' fill='%23654321'/%3E%3Cpolygon points='25,10 8,32 42,32' opacity='0.7'/%3E%3Cpolygon points='25,24 10,42 40,42' opacity='0.6'/%3E%3Cpolygon points='25,36 14,55 36,55' opacity='0.5'/%3E%3C/g%3E%3C/svg%3E"),
    /* Wheat Field */
    url("data:image/svg+xml,%3Csvg width='80' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23146b3a'%3E%3Cline x1='15' y1='60' x2='15' y2='20' stroke='%23146b3a' stroke-width='2'/%3E%3Cellipse cx='15' cy='18' rx='6' ry='10' opacity='0.6'/%3E%3Cline x1='30' y1='60' x2='30' y2='25' stroke='%23146b3a' stroke-width='2'/%3E%3Cellipse cx='30' cy='23' rx='6' ry='10' opacity='0.6'/%3E%3Cline x1='45' y1='60' x2='45' y2='22' stroke='%23146b3a' stroke-width='2'/%3E%3Cellipse cx='45' cy='20' rx='6' ry='10' opacity='0.6'/%3E%3Cline x1='60' y1='60' x2='60' y2='27' stroke='%23146b3a' stroke-width='2'/%3E%3Cellipse cx='60' cy='25' rx='6' ry='10' opacity='0.6'/%3E%3C/g%3E%3C/svg%3E"),
    /* Sunflower */
    url("data:image/svg+xml,%3Csvg width='50' height='70' xmlns='http://www.w3.org/2000/svg'%3E%3Cg%3E%3Cline x1='25' y1='70' x2='25' y2='30' stroke='%23146b3a' stroke-width='3'/%3E%3Ccircle cx='25' cy='20' r='12' fill='%23FDB813' opacity='0.7'/%3E%3Ccircle cx='25' cy='20' r='6' fill='%23654321' opacity='0.6'/%3E%3Cellipse cx='25' cy='45' rx='8' ry='5' fill='%23146b3a' opacity='0.5'/%3E%3C/g%3E%3C/svg%3E"),
    /* Farm Barn */
    url("data:image/svg+xml,%3Csvg width='100' height='80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23B22222' opacity='0.6'%3E%3Cpolygon points='50,20 20,45 80,45'/%3E%3Crect x='25' y='45' width='50' height='30'/%3E%3Crect x='40' y='55' width='20' height='20' fill='%23654321'/%3E%3C/g%3E%3C/svg%3E"),
    /* Vegetables - Tomato Plant */
    url("data:image/svg+xml,%3Csvg width='45' height='55' xmlns='http://www.w3.org/2000/svg'%3E%3Cg%3E%3Cpath d='M22,55 L22,35 Q20,30 18,25' stroke='%23146b3a' fill='none' stroke-width='2'/%3E%3Ccircle cx='18' cy='25' r='7' fill='%23FF6347' opacity='0.6'/%3E%3Ccircle cx='26' cy='32' r='6' fill='%23FF6347' opacity='0.6'/%3E%3Cellipse cx='15' cy='20' rx='5' ry='3' fill='%23146b3a' opacity='0.5'/%3E%3C/g%3E%3C/svg%3E"),
    /* Bush/Shrub */
    url("data:image/svg+xml,%3Csvg width='55' height='50' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23146b3a' opacity='0.6'%3E%3Ccircle cx='27' cy='35' r='15'/%3E%3Ccircle cx='15' cy='38' r='12'/%3E%3Ccircle cx='40' cy='38' r='12'/%3E%3Ccircle cx='27' cy='25' r='10'/%3E%3C/g%3E%3C/svg%3E"),
    /* Windmill */
    url("data:image/svg+xml,%3Csvg width='70' height='90' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23654321' opacity='0.5'%3E%3Cpolygon points='35,30 32,55 38,55'/%3E%3Crect x='28' y='55' width='14' height='35'/%3E%3Cpath d='M35,30 L20,15 M35,30 L50,15 M35,30 L20,45 M35,30 L50,45' stroke='%23654321' stroke-width='2' fill='none'/%3E%3C/g%3E%3C/svg%3E"),
    /* Carrot Tops */
    url("data:image/svg+xml,%3Csvg width='35' height='45' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23146b3a'%3E%3Cpath d='M17,45 Q17,35 12,25' stroke='%23146b3a' fill='none' stroke-width='1.5'/%3E%3Cellipse cx='12' cy='22' rx='3' ry='8' opacity='0.6'/%3E%3Cpath d='M17,45 Q17,35 17,25' stroke='%23146b3a' fill='none' stroke-width='1.5'/%3E%3Cellipse cx='17' cy='22' rx='3' ry='8' opacity='0.6'/%3E%3Cpath d='M17,45 Q17,35 22,25' stroke='%23146b3a' fill='none' stroke-width='1.5'/%3E%3Cellipse cx='22' cy='22' rx='3' ry='8' opacity='0.6'/%3E%3C/g%3E%3C/svg%3E"),
    /* Pumpkin */
    url("data:image/svg+xml,%3Csvg width='50' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg%3E%3Cellipse cx='25' cy='28' rx='20' ry='15' fill='%23FF8C00' opacity='0.6'/%3E%3Cpath d='M25,15 Q25,10 28,8' stroke='%23146b3a' fill='none' stroke-width='2'/%3E%3Cellipse cx='28' cy='7' rx='4' ry='3' fill='%23146b3a' opacity='0.5'/%3E%3C/g%3E%3C/svg%3E"),
    /* Soil patches */
    url("data:image/svg+xml,%3Csvg width='200' height='50' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23654321' opacity='0.3'%3E%3Cellipse cx='30' cy='25' rx='20' ry='10'/%3E%3Cellipse cx='90' cy='28' rx='18' ry='9'/%3E%3Cellipse cx='150' cy='22' rx='22' ry='11'/%3E%3C/g%3E%3C/svg%3E"),
    /* Grass tufts */
    url("data:image/svg+xml,%3Csvg width='30' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23146b3a' opacity='0.4'%3E%3Crect x='8' y='10' width='2' height='10'/%3E%3Crect x='12' y='8' width='2' height='12'/%3E%3Crect x='16' y='11' width='2' height='9'/%3E%3Crect x='20' y='9' width='2' height='11'/%3E%3C/g%3E%3C/svg%3E");
  background-size:
    120px auto,
    80px auto,
    40px auto,
    140px auto,
    50px auto,
    80px auto,
    50px auto,
    100px auto,
    45px auto,
    55px auto,
    70px auto,
    35px auto,
    50px auto,
    200px auto,
    30px auto;
  background-position:
    5% 72%,
    82% 12%,
    18% 45%,
    70% 80%,
    90% 48%,
    8% 28%,
    50% 15%,
    45% 88%,
    25% 58%,
    65% 35%,
    15% 8%,
    55% 68%,
    35% 92%,
    50% 96%,
    78% 62%;
  background-repeat: no-repeat;
  pointer-events: none;
  animation: gentleFloat 40s ease-in-out infinite;
}

/* Animated floating plants layer */
.site-header::after,
main::before {
  content: '';
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.06;
  pointer-events: none;
  animation: gentleFloat 40s ease-in-out infinite;
}

/* Animated floating plants layer */
.site-header::after,
main::before {
  content: '';
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.07;
  pointer-events: none;
}

.site-header::after {
  top: 0;
  left: 0;
  background-image:
    /* Small plants scattered */
    url("data:image/svg+xml,%3Csvg width='30' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23146b3a'%3E%3Cpath d='M15,40 L15,25 Q18,22 18,15' stroke='%23146b3a' fill='none' stroke-width='1.5'/%3E%3Cellipse cx='18' cy='13' rx='5' ry='8'/%3E%3Cpath d='M15,32 Q12,28 10,25' stroke='%23146b3a' fill='none' stroke-width='1'/%3E%3Cellipse cx='10' cy='23' rx='4' ry='6'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='30' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23146b3a'%3E%3Cpath d='M15,40 L15,25 Q18,22 18,15' stroke='%23146b3a' fill='none' stroke-width='1.5'/%3E%3Cellipse cx='18' cy='13' rx='5' ry='8'/%3E%3Cpath d='M15,32 Q12,28 10,25' stroke='%23146b3a' fill='none' stroke-width='1'/%3E%3Cellipse cx='10' cy='23' rx='4' ry='6'/%3E%3C/g%3E%3C/svg%3E"),
    /* Leaves falling */
    url("data:image/svg+xml,%3Csvg width='20' height='25' xmlns='http://www.w3.org/2000/svg'%3E%3Cellipse cx='10' cy='12' rx='8' ry='12' fill='%23146b3a' opacity='0.5'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='18' height='22' xmlns='http://www.w3.org/2000/svg'%3E%3Cellipse cx='9' cy='11' rx='7' ry='11' fill='%23228B22' opacity='0.5'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='22' height='28' xmlns='http://www.w3.org/2000/svg'%3E%3Cellipse cx='11' cy='14' rx='9' ry='13' fill='%23146b3a' opacity='0.5'/%3E%3C/svg%3E"),
    /* Butterflies */
    url("data:image/svg+xml,%3Csvg width='25' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23FFA500' opacity='0.6'%3E%3Cellipse cx='8' cy='10' rx='6' ry='8'/%3E%3Cellipse cx='17' cy='10' rx='6' ry='8'/%3E%3Cline x1='12' y1='5' x2='12' y2='15' stroke='%23654321' stroke-width='1'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 30px auto, 30px auto, 20px auto, 18px auto, 22px auto, 25px auto;
  background-position:
    10% 30%,
    88% 60%,
    30% 15%,
    70% 25%,
    50% 40%,
    62% 8%;
  background-repeat: no-repeat;
  animation: floatUp 25s ease-in-out infinite;
}

main::before {
  top: 0;
  left: 0;
  background-image:
    /* Tree silhouettes */
    url("data:image/svg+xml,%3Csvg width='45' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23146b3a' opacity='0.4'%3E%3Crect x='20' y='40' width='5' height='20' fill='%23654321'/%3E%3Ccircle cx='22' cy='25' r='18'/%3E%3Ccircle cx='15' cy='30' r='12'/%3E%3Ccircle cx='30' cy='30' r='12'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='45' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23146b3a' opacity='0.4'%3E%3Crect x='20' y='40' width='5' height='20' fill='%23654321'/%3E%3Ccircle cx='22' cy='25' r='18'/%3E%3Ccircle cx='15' cy='30' r='12'/%3E%3Ccircle cx='30' cy='30' r='12'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 45px auto;
  background-position:
    3% 80%,
    95% 20%;
  background-repeat: no-repeat;
  animation: sway 15s ease-in-out infinite;
}

@keyframes gentleFloat {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }
  25% {
    transform: translateY(-10px) translateX(5px);
  }
  50% {
    transform: translateY(0) translateX(10px);
  }
  75% {
    transform: translateY(-5px) translateX(5px);
  }
}

.site-header::after {
  top: 0;
  left: 0;
  background-image:
    /* Small plants scattered */
    url("data:image/svg+xml,%3Csvg width='30' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23146b3a'%3E%3Cpath d='M15,40 L15,25 Q18,22 18,15' stroke='%23146b3a' fill='none' stroke-width='1.5'/%3E%3Cellipse cx='18' cy='13' rx='5' ry='8'/%3E%3Cpath d='M15,32 Q12,28 10,25' stroke='%23146b3a' fill='none' stroke-width='1'/%3E%3Cellipse cx='10' cy='23' rx='4' ry='6'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='30' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23146b3a'%3E%3Cpath d='M15,40 L15,25 Q18,22 18,15' stroke='%23146b3a' fill='none' stroke-width='1.5'/%3E%3Cellipse cx='18' cy='13' rx='5' ry='8'/%3E%3Cpath d='M15,32 Q12,28 10,25' stroke='%23146b3a' fill='none' stroke-width='1'/%3E%3Cellipse cx='10' cy='23' rx='4' ry='6'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 30px auto;
  background-position:
    10% 30%,
    88% 60%,
    30% 15%,
    70% 25%,
    50% 40%,
    62% 8%;
  background-repeat: no-repeat;
  animation: floatUp 25s ease-in-out infinite;
}

main::before {
  top: 0;
  left: 0;
  background-image:
    /* Tree silhouettes */
    url("data:image/svg+xml,%3Csvg width='45' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23146b3a' opacity='0.4'%3E%3Crect x='20' y='40' width='5' height='20' fill='%23654321'/%3E%3Ccircle cx='22' cy='25' r='18'/%3E%3Ccircle cx='15' cy='30' r='12'/%3E%3Ccircle cx='30' cy='30' r='12'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='45' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23146b3a' opacity='0.4'%3E%3Crect x='20' y='40' width='5' height='20' fill='%23654321'/%3E%3Ccircle cx='22' cy='25' r='18'/%3E%3Ccircle cx='15' cy='30' r='12'/%3E%3Ccircle cx='30' cy='30' r='12'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 45px auto;
  background-position:
    3% 80%,
    95% 20%;
  background-repeat: no-repeat;
  animation: sway 15s ease-in-out infinite;
}

@keyframes gentleFloat {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }
  25% {
    transform: translateY(-10px) translateX(5px);
  }
  50% {
    transform: translateY(0) translateX(10px);
  }
  75% {
    transform: translateY(-5px) translateX(5px);
  }
}

@keyframes floatUp {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.06;
  }
  50% {
    transform: translateY(-20px);
    opacity: 0.08;
  }
}

@keyframes sway {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(1deg);
  }
  75% {
    transform: rotate(-1deg);
  }
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  body::after,
  .site-header::after,
  main::before {
    animation: none;
  }
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-primary);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

a:hover { text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

/* Utilities */
.container {
  width: min(var(--container-max), 100%);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.stack > * + * { margin-top: var(--space-5); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: var(--space-4);
  background: var(--color-surface);
  color: var(--color-text);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transform: translateY(-200%);
  transition: transform var(--dur-2) var(--ease);
  z-index: 9999;
}
.skip-link:focus { transform: translateY(0); }

/* Buttons - Modern refined design */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  min-height: 44px;
  border-radius: 0.625rem;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: background 0.2s ease, opacity 0.2s ease;
  }
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 3px solid rgba(20,107,58,0.4);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, #0f5a2f 100%);
  color: var(--color-primary-contrast);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, #0f5a2f 0%, var(--color-primary) 100%);
}

.btn-primary:active {
  box-shadow: var(--shadow-xs);
}

.btn-ghost {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text);
  box-shadow: var(--shadow-xs);
}

.btn-ghost:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(20, 107, 58, 0.2);
  background: rgba(191, 232, 209, 0.05);
}

/* Header / Nav - Enhanced design */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(251, 252, 251, 0.98);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(15, 26, 18, 0.05);
}

@supports ((-webkit-backdrop-filter: blur(12px)) or (backdrop-filter: blur(12px))) {
  .site-header {
    background: rgba(251, 252, 251, 0.8);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    backdrop-filter: blur(12px) saturate(180%);
  }
}

.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  flex: 0 0 auto;
}

.brand-title {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

.brand-title strong {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-title span {
  font-size: var(--step--1);
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid rgba(20, 107, 58, 0.15);
  background: linear-gradient(135deg, rgba(191, 232, 209, 0.15), rgba(255, 255, 255, 0.8));
  border-radius: 6.25rem;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0.25rem;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

.nav a:hover {
  background: rgba(20, 107, 58, 0.06);
  color: var(--color-primary);
}

.nav a:hover::after {
  transform: scaleX(1);
}

.nav a:focus-visible {
  outline: 2px solid rgba(20,107,58,0.4);
  outline-offset: 2px;
}

.nav a[aria-current="page"] {
  background: rgba(20, 107, 58, 0.08);
  color: var(--color-primary);
  font-weight: 700;
}

.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Mobile menu */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.mobile-panel.open { display: block; }

.mobile-nav {
  display: grid;
  gap: 0.25rem;
  padding: var(--space-4);
}

.mobile-nav a {
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-xs);
}

.mobile-nav a:hover {
  background: rgba(20, 107, 58, 0.05);
  border-color: rgba(20, 107, 58, 0.2);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.mobile-nav a:focus-visible {
  outline: 2px solid rgba(20,107,58,0.4);
  outline-offset: 2px;
}

.mobile-nav a[aria-current="page"] {
  border-color: rgba(20, 107, 58, 0.25);
  background: linear-gradient(135deg, rgba(191, 232, 209, 0.15), rgba(20, 107, 58, 0.05));
  color: var(--color-primary);
  font-weight: 700;
}

/* Responsive navigation breakpoint */
@media (min-width: 768px) {
  .nav {
    display: flex;
  }
}

@media (min-width: 960px) {
  .menu-toggle, .mobile-panel { display: none !important; }
}

@media (max-width: 959px) {
  .nav {
    display: none;
  }
  .badge {
    display: none;
  }
}

/* Main + Sections */
main { padding-block: var(--space-4); }

.page-header {
  padding-block: clamp(1.5rem, 4vw, 2.5rem);
}

.page-header h1 {
  font-size: var(--step-4);
  line-height: 1.15;
  margin: 0 0 var(--space-4);
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.page-header p {
  margin: 0;
  color: var(--color-muted);
  max-width: 65ch;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.7;
}

.section {
  padding-block: clamp(2rem, 4vw, 3rem);
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.section-title h2 {
  margin: 0;
  font-size: var(--step-3);
  line-height: 1.2;
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-title p {
  margin: var(--space-2) 0 0;
  color: var(--color-muted);
  max-width: 60ch;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  line-height: 1.65;
}

/* Cards & grids - Enhanced responsive */
.grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.25rem);
}

/* 2-column grid */
@media (min-width: 640px) {
  .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
}

/* 3-column grid */
@media (min-width: 640px) {
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* 4-column grid */
@media (min-width: 640px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .grid.cols-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
  .grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(191, 232, 209, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(20, 107, 58, 0.15);
}

.card:hover::before {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .card:hover {
    transform: translateY(-4px);
  }
}

.card h3 {
  margin: 0 0 var(--space-3);
  font-size: var(--step-1);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.card p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.7;
}

/* Collaboration banner - Enhanced */
.collab-banner {
  background:
    linear-gradient(135deg, rgba(191, 232, 209, 0.25) 0%, rgba(20, 107, 58, 0.08) 100%),
    var(--color-surface);
  border: 1px solid rgba(20, 107, 58, 0.18);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.collab-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(191, 232, 209, 0.3), transparent 70%);
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .collab-banner:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-3px);
  }
}

.collab-banner h2 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-serif);
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.collab-banner ul {
  margin: var(--space-4) 0 0;
  padding-left: 1.25rem;
  color: var(--color-muted);
  line-height: 1.75;
}

.collab-banner ul li {
  margin-block: var(--space-2);
}

/* Footer - Enhanced design */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding-block: clamp(2rem, 4vw, 3rem);
  background: linear-gradient(180deg, var(--color-bg) 0%, rgba(248, 251, 249, 1) 100%);
  margin-top: var(--space-6);
}

.footer-grid {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 960px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
}

.footer-title {
  font-weight: 800;
  margin: 0 0 var(--space-2);
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.footer-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li + li {
  margin-top: 0.625rem;
}

.footer-links a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.footer-links a:hover {
  color: var(--color-primary);
  transform: translateX(2px);
}

.smallprint {
  margin-top: var(--space-6);
  color: var(--color-muted);
  font-size: var(--step--1);
}

/* Forms baseline (more in Phase 6) */
.field {
  display: grid;
  gap: 0.4rem;
}

label {
  font-weight: 650;
  display: block;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(20,107,58,0.45);
  outline-offset: 2px;
}

input, textarea, select {
  font: inherit;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

textarea { min-height: 140px; resize: vertical; }

.hint { color: var(--color-muted); font-size: var(--step--1); }
.error { color: var(--color-danger); font-size: var(--step--1); }

/* Dark-mode-ready tokens (not enabled by default) */
[data-theme="dark"] {
  --color-bg: #0b120e;
  --color-surface: #0f1a12;
  --color-text: #f1f6f3;
  --color-muted: #b8c5bd;
  --color-border: #223327;
  --color-primary: #2aa36b;
  --color-primary-contrast: #04130a;
  --color-accent: #153a26;
  --color-focus: #7ce1b2;
}


/* ===== Phase 3 additions: components ===== */

/* Hero - Enhanced with more impact */
.hero {
  padding-block: clamp(2rem, 5vw, 3.5rem);
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top right, rgba(191, 232, 209, 0.15), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(20, 107, 58, 0.05), transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.hero-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
}

.hero h1 {
  font-size: var(--step-4);
  line-height: 1.1;
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--color-text);
}

.hero p {
  margin: 0;
  color: var(--color-muted);
  max-width: 65ch;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.7;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--step--1);
  color: var(--color-muted);
}

.hero-logo-spot {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  width: fit-content;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
}

.hero-logo-spot img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.hero-logo-spot span {
  font-weight: 700;
  font-size: var(--step--1);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--space-4);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: 6.25rem;
  border: 1px solid rgba(20, 107, 58, 0.15);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(191, 232, 209, 0.12));
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--color-text);
  box-shadow: var(--shadow-xs);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pill:hover {
  border-color: rgba(20, 107, 58, 0.25);
  box-shadow: var(--shadow-sm);
}

.hero-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-6px);
  }
}

.hero-media {
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(circle at 20% 30%, rgba(191,232,209,0.9), rgba(20,107,58,0.08)),
    linear-gradient(135deg, rgba(20,107,58,0.18), rgba(255,255,255,0.6));
  border-bottom: 1px solid var(--color-border);
}

.hero-media .media-label {
  padding: var(--space-4);
  color: var(--color-muted);
  font-size: var(--step--1);
}

.hero-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(20,107,58,0.06);
}

.hero-card-body {
  padding: var(--space-5);
}

/* Stats - Enhanced visual */
.stats {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
}

.stat {
  background: linear-gradient(135deg, var(--color-surface) 0%, rgba(251, 252, 251, 0.5) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat:hover::before {
  transform: scaleY(1);
}

.stat:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(20, 107, 58, 0.2);
  transform: translateY(-2px);
}

.stat strong {
  display: block;
  font-size: var(--step-2);
  line-height: 1.2;
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}

.stat span {
  color: var(--color-muted);
  font-size: var(--step-0);
  line-height: 1.6;
}

/* Two-column content */
.split {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}
@media (min-width: 960px) {
  .split { grid-template-columns: 1fr 1fr; }
}

/* Timeline */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-4);
}
.timeline li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: var(--space-3);
  align-items: start;
}
.dot {
  width: 14px;
  height: 14px;
  margin-top: 0.35rem;
  border-radius: 999px;
  background: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(20,107,58,0.12);
}

/* Accordion (Admissions FAQ) */
.accordion {
  display: grid;
  gap: var(--space-3);
}
.acc-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
}
.acc-btn {
  width: 100%;
  text-align: left;
  padding: var(--space-4) var(--space-5);
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.acc-btn span {
  color: var(--color-muted);
  font-weight: 700;
}
.acc-panel {
  padding: 0 var(--space-5) var(--space-5);
  color: var(--color-muted);
  display: none;
}
.acc-item.open .acc-panel { display: block; }

/* Compact link cards - Refined */
.link-card {
  display: grid;
  gap: var(--space-3);
}

.link-card a {
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  width: fit-content;
  color: var(--color-primary);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.link-card a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 1px;
}

.link-card a:hover::after {
  transform: scaleX(1);
}

.link-card a:hover {
  text-decoration: none;
  transform: translateX(2px);
}

@media (prefers-reduced-motion: reduce) {
  .link-card a {
    transition: color 0.2s ease;
  }
  .link-card a::after {
    transition: none;
  }
  .link-card a:hover {
    transform: none;
  }
  .link-card a:hover::after {
    transform: scaleX(1);
  }
}

/* Note box - Enhanced */
.note {
  border-left: 3px solid var(--color-primary);
  background: linear-gradient(135deg, rgba(191, 232, 209, 0.18), rgba(191, 232, 209, 0.08));
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  color: var(--color-muted);
  box-shadow: var(--shadow-xs);
  line-height: 1.7;
}

/* Optional: prevent scroll when mobile menu open */
.no-scroll { overflow: hidden; }


/* ===== Phase 4 additions: news/events UI ===== */

.controls {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
@media (min-width: 720px) {
  .controls { grid-template-columns: 1.3fr 1fr 0.7fr; align-items: end; }
}

.control label {
  display: block;
  margin-bottom: 0.35rem;
}

.status {
  margin-top: var(--space-4);
  font-size: var(--step--1);
  color: var(--color-muted);
}
.status[data-status-type="error"] { color: var(--color-danger); }

.count {
  font-size: var(--step--1);
  color: var(--color-muted);
  margin-top: var(--space-2);
}

.post-title { margin: var(--space-2) 0 0; }
.post-title a { color: var(--color-text); text-decoration: none; }
.post-title a:hover { text-decoration: underline; }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  color: var(--color-muted);
  font-size: var(--step--1);
}
.meta { display: inline-flex; align-items: center; }

.post-excerpt { margin: var(--space-3) 0 0; color: var(--color-muted); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: var(--space-3);
}
.chip {
  font-size: var(--step--1);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: rgba(191,232,209,0.18);
  color: var(--color-muted);
}

.breadcrumb {
  font-size: var(--step--1);
  color: var(--color-muted);
  margin-bottom: var(--space-4);
}
.breadcrumb a { color: var(--color-primary); }

.detail-header h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--step-4);
  line-height: 1.1;
}

.detail-media {
  margin-top: var(--space-5);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.detail-media img { width: 100%; height: auto; }

.media-placeholder {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  color: var(--color-muted);
  background:
    radial-gradient(circle at 25% 30%, rgba(191,232,209,0.8), rgba(20,107,58,0.06)),
    linear-gradient(135deg, rgba(20,107,58,0.12), rgba(255,255,255,0.6));
}

.detail-body { margin-top: var(--space-5); }
.detail-body p { margin: 0; color: var(--color-muted); }
.detail-body p + p { margin-top: var(--space-4); }

.empty h3 { margin-top: 0; }

/* ===== Phase 5 additions: gallery + lightbox ===== */

.album-grid {
  display: grid;
  gap: var(--space-4);
}

.album-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 20px rgba(20,107,58,0.06);
  cursor: pointer;
  transition: box-shadow var(--dur-2) var(--ease), transform var(--dur-1) var(--ease), border-color var(--dur-2) var(--ease);
}

.album-card:hover {
  box-shadow: 0 12px 32px rgba(20,107,58,0.10);
  border-color: rgba(20,107,58,0.35);
}

@media (prefers-reduced-motion: no-preference) {
  .album-card:hover {
    transform: translateY(-2px);
  }
}

.album-thumb {
  width: 96px;
  height: 72px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background:
    radial-gradient(circle at 25% 30%, rgba(191,232,209,0.8), rgba(20,107,58,0.06)),
    linear-gradient(135deg, rgba(20,107,58,0.12), rgba(255,255,255,0.6));
}
.album-thumb img { width: 100%; height: 100%; object-fit: cover; }

.album-card h3 {
  margin: 0 0 0.15rem;
  font-size: var(--step-1);
}
.album-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--step--1);
}

.album-card[aria-selected="true"] {
  border-color: rgba(20,107,58,0.35);
  background: rgba(20,107,58,0.06);
}

/* Masonry-like grid using CSS columns (fast + simple) */
.masonry {
  column-count: 2;
  column-gap: var(--space-4);
}
@media (min-width: 720px) {
  .masonry { column-count: 3; }
}
@media (min-width: 1100px) {
  .masonry { column-count: 4; }
}

.photo {
  break-inside: avoid;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: 0 8px 20px rgba(20,107,58,0.06);
  transition: box-shadow var(--dur-2) var(--ease), transform var(--dur-1) var(--ease);
}

.photo:hover {
  box-shadow: 0 12px 32px rgba(20,107,58,0.10);
}

@media (prefers-reduced-motion: no-preference) {
  .photo:hover {
    transform: scale(1.02);
  }
}

.photo button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.photo img {
  width: 100%;
  height: auto;
  display: block;
}

.photo .cap {
  padding: var(--space-3) var(--space-4);
  color: var(--color-muted);
  font-size: var(--step--1);
}

/* Lightbox */
.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

.lightbox-panel {
  position: relative;
  width: min(980px, 92vw);
  max-height: 88vh;
  background: var(--color-surface);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.lightbox-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
}

.lightbox-body {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
}

.lightbox-body img {
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: #000;
}

.lightbox-nav {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .album-card, .btn { transition: none !important; }
}


/* ===== Phase 6 additions: forms UX + toasts ===== */

.form-grid {
  display: grid;
  gap: var(--space-4);
}

.field .error {
  display: none;
  margin: 0;
}

.field[data-invalid="true"] .error {
  display: block;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: rgba(180, 35, 24, 0.5);
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.08);
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
  input[aria-invalid="true"],
  textarea[aria-invalid="true"] {
    animation: none;
  }
}

.form-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  transition: opacity var(--dur-2) var(--ease);
}

.btn[disabled]:hover {
  opacity: 0.6;
}

.btn[type="submit"]:loading {
  position: relative;
}

.btn > .spinner + *,
.btn > * + .spinner {
  margin-left: 0.5rem;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.5);
  border-top-color: rgba(255,255,255,1);
  display: inline-block;
  animation: spin var(--dur-2) linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
}

/* Toasts */
.toasts {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 3000;
  display: grid;
  gap: var(--space-3);
  width: min(420px, calc(100vw - 2rem));
}

.toast {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(20,107,58,0.12);
  padding: var(--space-4);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3);
  animation: slideIn var(--dur-2) var(--ease);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    animation: none;
  }
}

.toast strong {
  display: block;
  margin-bottom: 0.15rem;
}

.toast p {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--step--1);
}

.toast[data-variant="success"] {
  border-color: rgba(15, 122, 58, 0.35);
  background: rgba(191, 232, 209, 0.22);
}

.toast[data-variant="error"] {
  border-color: rgba(180, 35, 24, 0.35);
  background: rgba(255, 208, 200, 0.22);
}

.toast button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
}


/* ===== Phase 7 additions: QA polish ===== */

/* Make skip-link clearly visible when focused */
.skip-link:focus {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 5000;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  background: var(--color-surface);
  border: 2px solid rgba(20,107,58,0.35);
  box-shadow: var(--shadow-md);
}

/* Consistent focus ring for keyboard users */
:focus-visible {
  outline: 3px solid rgba(20,107,58,0.45);
  outline-offset: 3px;
}

/* Better tap targets for small screens */
.nav a, .mobile-nav a, .menu-toggle, .btn {
  min-height: 44px;
}

/* Performance optimizations */
.card:hover,
.btn:hover,
.stat:hover,
.hero-card:hover,
.collab-banner:hover {
  will-change: transform, box-shadow;
}

.nav a::after,
.link-card a::after {
  will-change: transform;
}

/* Reduce motion overrides */
@media (prefers-reduced-motion: reduce) {
  .card:hover,
  .btn:hover,
  .stat:hover,
  .hero-card:hover,
  .collab-banner:hover,
  .nav a::after,
  .link-card a::after {
    will-change: auto;
  }
}

/* Performance optimizations */
.card:hover,
.btn:hover,
.stat:hover,
.hero-card:hover,
.collab-banner:hover {
  will-change: transform, box-shadow;
}

.nav a::after,
.link-card a::after {
  will-change: transform;
}

/* Reduce motion overrides */
@media (prefers-reduced-motion: reduce) {
  .card:hover,
  .btn:hover,
  .stat:hover,
  .hero-card:hover,
  .collab-banner:hover,
  .nav a::after,
  .link-card a::after {
    will-change: auto;
  }
}
