/* Shared CSS for Public Pages
   SignUp, SupportPage, terms.html, privacy.html
   Lake & Sky Theme
*/

:root {
  /* Reference theme variables from index.css */
  --primary: 187 69% 28%;
  --primary-foreground: 40 30% 98%;
  --secondary: 199 89% 48%;
  --secondary-foreground: 210 40% 98%;
  --accent: 24 85% 58%;
  --accent-foreground: 40 30% 98%;
  --background: 40 30% 96%;
  --foreground: 215 25% 27%;
  --card: 40 25% 98%;
  --card-foreground: 215 25% 27%;
  --muted: 40 20% 92%;
  --muted-foreground: 215 15% 50%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 40 30% 98%;
  --border: 40 15% 85%;
  --input: 40 15% 85%;
  --ring: 187 69% 28%;
  --radius: 0.5rem;
  --navy: 220 50% 20%;
}

/* Typography */
body {
  font-family: Calibri, Arial, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Calibri, Arial, sans-serif;
  line-height: 1.2;
  margin-top: 0;
  color: hsl(var(--foreground));
}

/* Header Styles */
header[role="banner"] {
  background-color: hsla(var(--card), 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Navigation Links */
nav a {
  color: hsl(var(--foreground));
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Buttons */
button,
.button,
[role="button"] {
  font-family: Calibri, Arial, sans-serif;
  min-height: 44px;
  transition: all 0.2s ease;
  border-radius: calc(var(--radius) - 2px);
}

button.primary,
.button.primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

button.primary:hover,
.button.primary:hover {
  background-color: hsl(var(--primary) / 0.9);
}

button.secondary,
.button.secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

button.secondary:hover,
.button.secondary:hover {
  background-color: hsl(var(--secondary) / 0.9);
}

button.accent,
.button.accent {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

button.accent:hover,
.button.accent:hover {
  background-color: hsl(var(--accent) / 0.9);
}

/* Cards */
.card {
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* Form Elements */
input,
select,
textarea {
  font-family: Calibri, Arial, sans-serif;
  font-size: 16px;
  border: 1px solid hsl(var(--input));
  border-radius: calc(var(--radius) - 2px);
  padding: 0.5rem 0.75rem;
  background-color: hsl(var(--card));
  color: hsl(var(--foreground));
  transition: border-color 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.1);
}

/* Links */
a {
  color: hsl(var(--primary));
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: hsl(var(--primary) / 0.8);
}

a:visited {
  color: hsl(var(--primary));
}

/* Footer */
footer[role="contentinfo"] {
  background-color: hsl(var(--muted));
  border-top: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
}

/* Focus States */
*:focus-visible {
  outline: 3px solid hsl(var(--primary));
  outline-offset: 2px;
  border-radius: 2px;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 0;
  }
  
  section, article, aside {
    padding: 1rem;
  }
}

/* Accessibility */
.skip-to-main {
  position: absolute;
  top: -100px;
  left: 0;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: 1rem 1.5rem;
  text-decoration: none;
  font-weight: 900;
  z-index: 1000;
  border-radius: 0 0 0.5rem 0;
  font-size: 0.875rem;
}

.skip-to-main:focus {
  top: 0;
  outline: 3px solid hsl(var(--primary-foreground));
  outline-offset: 2px;
}

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
  body {
    background-color: #FFFFFF;
  }
  
  * {
    border-color: currentColor !important;
  }
}

/* Reduced Motion */
@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;
  }
}
