/* Global Variables & Reset */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  /* Core Color Palette (Green & Gold) */
  --primary: #1a6b4a;
  --primary-light: #e8f5ee;
  --primary-dark: #124d35;
  --accent: #d4a017;
  --accent-light: #fdf6e3;

  /* Ethereal / Vaporwave Additional Accents */
  --ethereal-cyan: #00f0ff;
  --ethereal-purple: #b026ff;
  --ethereal-pink: #ff71ce;

  /* Neutrals */
  --neutral-900: #1c1c1e;
  --neutral-700: #3a3a3c;
  --neutral-400: #8e8e93;
  --neutral-100: #f5f5f7;
  --neutral-50: #fafafa;
  --white: #ffffff;

  /* Status */
  --danger: #c0392b;
  --success: #1a6b4a;
  --info: #1560a8;
  --warning: #d4a017;
  --border: #e0e0e0;

  /* Typography - Modular Scale */
  --font-base: 'Poppins';

  /* Radii */
  --radius-input: 8px;
  --radius-card: 16px;
  --radius-modal: 24px;
  --radius-pill: 999px;

  /* Premium Shadows (Softer, Broader) */
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, .05);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, .08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, .12);
  --shadow-glow: 0 0 20px rgba(26, 107, 74, 0.4);

  /* Transitions */
  --transition-fast: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-slow: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.6;
  color: var(--neutral-900);
  background-color: var(--neutral-50);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}

html { width: 100%; overflow-x: hidden; text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }

/* Shared responsive safety rules. */
*, *::before, *::after { min-width: 0; }
img, svg, video, canvas, iframe { max-width: 100%; }
img, video { height: auto; }
iframe { border: 0; }
p, li, td, th, label, a, button, h1, h2, h3, h4 { overflow-wrap: anywhere; }
input, select, textarea, button { max-width: 100%; }

.required-fields-note {
  margin: 0 0 18px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
}

.required-fields-note span {
  color: var(--primary);
  font-weight: 700;
}

@media (max-width: 639px) {
  body { font-size: 14px; }
  .container { width: min(100% - 28px, var(--container)); }
  h1 { font-size: clamp(1.8rem, 9vw, 2.5rem); }
  h2 { font-size: clamp(1.45rem, 7vw, 2rem); }
  :is(.btn-primary, .btn-outline) { white-space: normal; text-align: center; }
}

@media (max-width: 360px) {
  .container { width: min(100% - 20px, var(--container)); }
}

/* Typography elements - Scaled up for full screen */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 5rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
  font-size: clamp(18px, 1.3vw, 24px);
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.4;
  letter-spacing: -0.02em;
}

@media (max-width: 639px) {
  body { font-size: 14px; }
  h1 { font-size: clamp(2rem, 10vw, 2.65rem); }
  h2 { font-size: clamp(1.6rem, 8vw, 2.1rem); }
  h3 { font-size: clamp(18px, 1.3vw, 24px); }
  .container { width: calc(100% - 24px); }
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

/* Consistent responsive page-title sizing across public and authenticated areas. */
:root body h1 {
  font-size: clamp(1.2rem, 2.5vw, 2.35rem) !important;
}

img {
  max-width: 100%;
  display: block;
}

/* -----------------------------
   Dynamic Aurora Background
----------------------------- */
.bg-aurora {
  background: linear-gradient(-45deg, var(--primary-light), var(--accent-light), #e0f7fa, #f3e5f5);
  background-size: 400% 400%;
  animation: auroraFlow 15s ease infinite;
}

@keyframes auroraFlow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* -----------------------------
   Scroll Animations
----------------------------- */

/* Base setup for animated elements */
.animate-on-scroll,
.fade-in-up,
.slide-in-left,
.slide-in-right,
.zoom-in {
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Specific animations */
.fade-in-up {
  transform: translateY(50px);
}

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

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

.zoom-in {
  transform: scale(0.9);
}

/* When the element is in view */
.is-visible {
  opacity: 1 !important;
  transform: none !important;
}

/* Delay modifiers for staggered animations */
.delay-100 {
  transition-delay: 100ms;
}

.delay-200 {
  transition-delay: 200ms;
}

.delay-300 {
  transition-delay: 300ms;
}

.delay-400 {
  transition-delay: 400ms;
}

.delay-500 {
  transition-delay: 500ms;
}

/* Layout Constraint - Full Screen Approach */
.container {
  max-width: 1600px;
  width: 95%;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 639px) {
  .container { width: 100%; padding-inline: 16px; }
}

/* Accessibility */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: var(--white);
  padding: 8px;
  z-index: 10000;
}

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

/* --- ADVANCED UI STYLING UTILITIES --- */

/* Glassmorphism */
.glass-panel {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

.glass-header {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .glass-panel,
[data-theme="dark"] .glass-header {
  background: rgba(26, 35, 31, 0.6);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Aurora Background */
.aurora-bg {
  position: relative;
  overflow: hidden;
  background-color: var(--primary-light);
}

.aurora-bg::before,
.aurora-bg::after {
  content: "";
  position: absolute;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  opacity: 0.6;
  animation: auroraFlow 15s infinite alternate ease-in-out;
  pointer-events: none;
}

.aurora-bg::before {
  background: radial-gradient(circle, var(--ethereal-cyan) 0%, transparent 70%);
  top: -20%;
  left: -10%;
}

.aurora-bg::after {
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  bottom: -20%;
  right: -10%;
  animation-delay: -5s;
}

@keyframes auroraFlow {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(10%, 15%) scale(1.1);
  }
  100% {
    transform: translate(-10%, -10%) scale(0.9);
  }
}

[data-theme="dark"] .aurora-bg {
  background-color: var(--bg-color);
}
[data-theme="dark"] .aurora-bg::before {
  background: radial-gradient(circle, var(--primary-dark) 0%, transparent 70%);
  opacity: 0.3;
}
[data-theme="dark"] .aurora-bg::after {
  background: radial-gradient(circle, var(--ethereal-cyan) 0%, transparent 70%);
  opacity: 0.15;
}
