/* -------------------[ CSS Variables for Theming ]------------------- */
:root {
  /* Color Palette */
  --background-color: #000000; /* Black */
  --text-color: #FFFFFF; /* White */
  --form-background: rgba(255, 255, 255, 0.1);
  --input-background: rgba(255, 255, 255, 0.2);
  --input-border: #FFFFFF;
  --input-focus-border: #FFFF00; /* Yellow */
  --button-clear-bg: #FF4D4D; /* Red */
  --button-clear-hover-bg: #E60000; /* Darker Red */
  --button-submit-bg: #4CAF50; /* Green */
  --button-submit-hover-bg: #45A049; /* Darker Green */
  --message-success-bg: #D4EDDA;
  --message-success-text: #155724;
  --message-success-border: #C3E6CB;
  --message-error-bg: #F8D7DA;
  --message-error-text: #721C24;
  --message-error-border: #F5C6CB;

  /* Font Sizes */
  --font-size-h1: 2em;
  --font-size-h2: 1.5em;
  --font-size-label: 1em;
  --font-size-input: 1em;
  --font-size-button: 1em;

  /* Spacing */
  --spacing-small: 10px;
  --spacing-medium: 20px;
  --spacing-large: 30px;

  /* Border Radius */
  --border-radius: 10px;

  /* Box Shadows for Rainbow Effect */
  --rainbow-shadow:
      0 4px 6px rgba(255, 0, 0, 0.3), 
      0 4px 6px rgba(255, 127, 0, 0.3), 
      0 4px 6px rgba(255, 255, 0, 0.3), 
      0 4px 6px rgba(0, 255, 0, 0.3),
      0 4px 6px rgba(0, 0, 255, 0.3),
      0 4px 6px rgba(75, 0, 130, 0.3),
      0 4px 6px rgba(143, 0, 255, 0.3);
}

/* -------------------[ Light Mode Overrides ]------------------- */
.light-mode {
  --background-color: #FFFFFF; /* White */
  --text-color: #000000; /* Black */
  --form-background: rgba(0, 0, 0, 0.05);
  --input-background: rgba(0, 0, 0, 0.05);
  --input-border: #000000;
  --input-focus-border: #FF0; /* Yellow */
  --button-clear-bg: #FF4D4D; /* Red */
  --button-clear-hover-bg: #E60000; /* Darker Red */
  --button-submit-bg: #4CAF50; /* Green */
  --button-submit-hover-bg: #45A049; /* Darker Green */
  --message-success-bg: #D4EDDA;
  --message-success-text: #155724;
  --message-success-border: #C3E6CB;
  --message-error-bg: #F8D7DA;
  --message-error-text: #721C24;
  --message-error-border: #F5C6CB;
}

/* -------------------[ Global Styles ]------------------- */

* {
  box-sizing: border-box;
}

.content {
  margin-top: 80px; /* Adjust this to match nav height */
}

/* 🔥 Animated Rainbow Background */
body {
  background: #0f1012; /* neutral dark */
  min-height: 100vh;
  display: block;
}

/* Background animation (retained for legacy references; unused by default) */
@keyframes bgShift { 0% { opacity: 1; } 100% { opacity: 1; } }

/* Bear Flag Themed Text */
.bear-text {
  font-size: 50px;
  font-weight: bold;
  text-transform: uppercase;
  font-family: Arial, sans-serif;
  background: linear-gradient(90deg, 
    #3E1C00 0%, 
    #FF8C1A 20%, 
    #FFD700 40%, 
    #D1B280 55%, 
    #FFFFFF 70%, 
    #8A8D8F 85%, 
    #000000 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  text-align: center;
  text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);
  position: relative;
}

/* Elegant glassy shine animation */
.bear-text::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0.3) 100%);
  transform: skewX(-20deg);
  opacity: 0.8;
  animation: shine 3s infinite;
}

.bear-paws {
  opacity: 0.05; /* Subtle */
  font-size: 80px; /* Adjusted */
}

@keyframes pawFade {
  0% { opacity: 0.05; transform: scale(1); }
  100% { opacity: 0.12; transform: scale(1.05); }
}

    /* Sparkle effect for letters */
    @keyframes sparkle {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.5; transform: scale(1.1); }
    }
    
    /* Glowing rainbow hue effect */
    @keyframes rainbowGlow {
      0% { filter: hue-rotate(0deg); }
      100% { filter: hue-rotate(360deg); }
    }

    /* Floating up and down effect */
    @keyframes float {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-5px); }
    }

    /* Flashing dot effect */
    @keyframes flash {
      0%, 100% { fill: blue; }
      50% { fill: white; }
    }

    /* Apply animations */
    svg text {
      animation: float 2s infinite ease-in-out, rainbowGlow 5s infinite linear;
    }

    /* Sparkle each letter randomly */
    textPath tspan:nth-child(1) { animation: sparkle 1.2s infinite alternate; }
    textPath tspan:nth-child(2) { animation: sparkle 1.3s infinite alternate; }
    textPath tspan:nth-child(3) { animation: sparkle 1.4s infinite alternate; }
    textPath tspan:nth-child(4) { animation: sparkle 1.5s infinite alternate; }
    textPath tspan:nth-child(5) { animation: sparkle 1.6s infinite alternate; }
    textPath tspan:nth-child(6) { animation: sparkle 1.7s infinite alternate; }
    textPath tspan:nth-child(7) { animation: sparkle 1.8s infinite alternate; }
    textPath tspan:nth-child(8) { animation: sparkle 1.9s infinite alternate; }
    textPath tspan:nth-child(9) { animation: sparkle 2.0s infinite alternate; }
    textPath tspan:nth-child(10) { animation: sparkle 2.1s infinite alternate; }
    textPath tspan:nth-child(11) { animation: sparkle 2.2s infinite alternate; }

    /* Flashing dot */
    textPath tspan:nth-child(12) { animation: flash 0.8s infinite alternate; }
.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background-color: white;
  border-radius: 50%;
  opacity: 0.35;
  animation: sparkle 2.5s infinite alternate;
}

.star:nth-child(odd) {
  animation-duration: 2s;
}


/* -------------------[ Header & Navigation ]------------------- */
.header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  background: linear-gradient(90deg,#623B1C 0%,#F28C28 16%,#FFDE00 33%,#D9C39C 50%,#FFFFFF 66%,#B9B9B9 83%,#000000 100%);
  color: #fff; padding: 12px 20px;
  display:flex; align-items:center; justify-content:flex-start; gap:10px; min-height: 72px;
  z-index: 1000;
}
.nav { display:flex; gap:12px; padding:8px 0; flex-wrap:wrap; }
.nav a { color:#fff; text-decoration:none; padding:8px 12px; border-radius:5px; transition:background-color .3s ease; text-shadow:0 1px 2px rgba(0,0,0,.45); }
.nav a:hover { background-color: rgba(255,255,255,.2); }
.brand { display:flex; align-items:center; gap:8px; color:#fff; text-decoration:none; font-weight:700; letter-spacing:.2px; }
.brand { margin-left: 6px; }
.brand-logo{ width:56px; height:56px; display:inline-block; background-image:url('/assets/logo-paw.svg'); background-size:contain; background-repeat:no-repeat; background-position:center; }
.brand:hover{ opacity:.9; }
.brand-text{ font-size:18px; }
.brand svg{ width:56px; height:56px; }
.btn-checkout{ background: rgba(255,255,255,.15); border:1px solid rgba(255,255,255,.35); border-radius:9999px; }
.btn-checkout:hover{ background: rgba(255,255,255,.28); }
.menu-toggle{ display:none; background:transparent; color:#fff; border:none; font-size:22px; padding:6px 10px; }
@media (max-width:768px){
  .menu-toggle{ display:block; }
  .header{ flex-wrap:wrap; gap:8px; }
  .nav{ display:none; width:100%; padding:8px 10px; flex-direction:column; align-items:center; gap:10px; }
  .nav.open{ display:flex; }
  .nav a{ width:100%; text-align:center; }
}
body.light-mode .menu-toggle{ color:#1b1b1b; }

/* Theme icon anchored to top-right */
.button-theme-toggle { margin-left: auto; }
body.light-mode .button-theme-toggle{ color:#111; }

/* Extra-small devices */
@media (max-width: 480px) { .brand-text{ font-size:16px; } .menu-toggle{ font-size:20px; padding:6px 8px; } .button-theme-toggle{ font-size:18px; } }
@media (max-width: 360px) { .brand-text{ display:none; } .brand-logo{ width:40px; height:40px; } }

/* Base nav styling */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  /* Bear pride stripe gradient (tuned, no animation) */
  background: linear-gradient(90deg,#623B1C 0%,#F28C28 16%,#FFDE00 33%,#D9C39C 50%,#FFFFFF 66%,#B9B9B9 83%,#000000 100%);
  background-size: 100% 100%;
  color: white;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  z-index: 1000;
}

/* Navigation links */
.nav {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  flex-wrap: wrap;
}

.nav a {
  color: white;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.nav a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Brand lockup */
.brand { display:flex; align-items:center; gap:8px; color:#fff; text-decoration:none; font-weight:700; letter-spacing:0.2px; }
.brand:hover{ opacity:0.9; }
.brand-text{ font-size:18px; }

/* Checkout pill */
.btn-checkout{ background: rgba(255,255,255,0.15); border:1px solid rgba(255,255,255,0.35); border-radius:9999px; }
.btn-checkout:hover{ background: rgba(255,255,255,0.28); }

/* Light theme ensures contrast in nav */
body.light-mode .brand, body.light-mode .nav a { color:#1b1b1b; }
body.light-mode .btn-checkout{ background: rgba(0,0,0,0.08); border-color: rgba(0,0,0,0.18); color:#000; }
body.light-mode .btn-checkout:hover{ background: rgba(0,0,0,0.16); }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .header{ animation: none !important; }
  body{ animation: none !important; }
  .star{ animation: none !important; }
}

/* When scrolled - make it fixed */
.header.fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  background-color: rgba(0, 0, 0, 0.9); /* Slight transparency */
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Prevent content from jumping up when nav becomes fixed */
.content {
  margin-top: 100px; /* Adjust this to match nav height */
}


/* -------------------[ Hero Section ]------------------- */

.hero-section {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding-top: 80px; /* To account for fixed header */
  padding-bottom: 80px; /* To account for fixed footer */
  text-align: center;
}

.hero-overlay {
  max-width: 800px;
  width: 100%;
}


.button-theme-toggle {
  padding: 8px 14px;
  background-color: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: var(--font-size-button);
  transition: background-color 0.3s ease;
}

.button-theme-toggle:hover {
  background-color: rgba(255,255,255,0.25);
}
.button-theme-toggle:focus,
.header .nav a:focus,
.rounded-input:focus {
    outline: 3px solid var(--input-focus-border);
    outline-offset: 2px;
}
/* -------------------[ Main Content ]------------------- */

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-medium);
}

.form-container {
  width: 100%;
  max-width: 600px;
  background-color: var(--form-background);
  padding: var(--spacing-large);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

.form-container h2 {
  font-size: var(--font-size-h2);
  margin-bottom: var(--spacing-medium);
  text-align: center;
}

#contact-form {
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: var(--spacing-medium);
}

.form-group label {
  font-size: var(--font-size-label);
  margin-bottom: var(--spacing-small);
  display: block;
}

.rounded-input {
  width: 100%;
  padding: var(--spacing-small);
  border: 2px solid var(--input-border);
  border-radius: var(--border-radius);
  background-color: var(--input-background);
  color: var(--text-color);
  font-size: var(--font-size-input);
  transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.rounded-input:focus {
  outline: none;
  border-color: var(--input-focus-border);
}

textarea.rounded-input {
  resize: vertical;
  min-height: 130px;
}

.captcha-container {
  display: flex;
  justify-content: center;
  margin: var(--spacing-medium) 0;
}

/* -------------------[ Button Group Styling ]------------------- */
.button-group {
  display: flex;
  justify-content: flex-end; /* Align buttons to the right */
  gap: 10px; /* Space between buttons */
  margin-top: var(--spacing-medium); /* Optional: Add top margin */
}

/* -------------------[ Buttons ]------------------- */

button[type="button"],
button[type="submit"] {
  padding: 10px 20px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: var(--font-size-button);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

button#clearBtn {
  background-color: var(--button-clear-bg);
  color: var(--text-color);
}

button#clearBtn:hover {
  background-color: var(--button-clear-hover-bg);
  transform: scale(1.05);
}

button#submit-button {
  background-color: var(--button-submit-bg);
  color: var(--text-color);
}

button#submit-button:hover {
  background-color: var(--button-submit-hover-bg);
  transform: scale(1.05);
}

button:disabled {
  background-color: rgba(255, 255, 255, 0.3);
  cursor: not-allowed;
}

/* -------------------[ Footer ]------------------- */

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: var(--background-color);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  z-index: 1000;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
  color: var(--text-color);
}

/* -------------------[ Message Styling ]------------------- */

.message {
  padding: var(--spacing-small);
  margin-bottom: var(--spacing-medium);
  border-radius: 5px;
  text-align: center;
  font-size: 1em;
}

.message.success {
  background-color: var(--message-success-bg);
  color: var(--message-success-text);
  border: 1px solid var(--message-success-border);
}

.message.error {
  background-color: var(--message-error-bg);
  color: var(--message-error-text);
  border: 1px solid var(--message-error-border);
}


/* -------------------[ Media Queries for Responsiveness ]------------------- */
@media (max-width: 768px) {
  .header { flex-wrap: wrap; gap:8px; }
  /* Collapse with smooth transition */
  .header .nav {
    display: block;
    width: 100%;
    padding: 6px 10px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: scaleY(0.98);
    transform-origin: top;
    transition: max-height .25s ease, opacity .2s ease, transform .2s ease;
  }
  .header .nav.open {
    max-height: 420px;
    opacity: 1;
    transform: scaleY(1);
  }
  .header .nav a { display:block; width:100%; text-align:center; padding:10px 12px; }

  .form-container {
      padding: var(--spacing-medium);
  }

  .content {
    margin-top: 120px; /* More space for nav */
  }

  textarea.rounded-input {
      min-height: 100px;
  }

  .button-group {
      justify-content: center; /* Center buttons on smaller screens */
  }
}

@media (max-width: 480px) {
  .header .nav {
      position: static;
      transform: none;
      padding-top: var(--spacing-small);
      padding-bottom: var(--spacing-small);
  }

  .header .nav a {
      padding: 8px;
      font-size: 0.9em;
  }

  .form-container {
      padding: var(--spacing-small);
  }



  button[type="button"],
  button[type="submit"] {
      font-size: 0.9em;
      padding: 8px 16px;
  }
}

svg text {
  animation: float 3s ease-in-out infinite, rainbowGlow 8s infinite linear;
}
