/*
 * SwimNexus.co.uk CSS Design System
 * Clean, serious, and operational styling using HSL colors, glassmorphism, and modern CSS layout techniques.
 */

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

:root {
  /* Color Palette */
  --bg-primary: hsl(222, 47%, 9%);
  --bg-secondary: hsl(223, 40%, 14%);
  --bg-tertiary: hsl(224, 35%, 18%);
  
  --bg-glass: hsla(223, 45%, 12%, 0.65);
  --bg-glass-card: hsla(223, 40%, 15%, 0.55);
  
  --border-glass: hsla(220, 30%, 90%, 0.08);
  --border-glass-hover: hsla(220, 50%, 90%, 0.16);
  
  --text-primary: hsl(210, 40%, 98%);
  --text-secondary: hsl(215, 25%, 78%);
  --text-muted: hsl(215, 16%, 56%);
  
  --accent-cyan: hsl(190, 95%, 46%);
  --accent-blue: hsl(215, 95%, 55%);
  --accent-blue-hover: hsl(215, 95%, 62%);
  --accent-purple: hsl(265, 80%, 60%);
  
  --success: hsl(145, 75%, 45%);
  --success-bg: hsla(145, 75%, 45%, 0.1);
  --error: hsl(355, 85%, 60%);
  --error-bg: hsla(355, 85%, 60%, 0.1);
  
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 1px 1px 0 rgba(255, 255, 255, 0.05) inset;
}

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

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle background glows */
body::before {
  content: '';
  position: fixed;
  top: -15%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, hsla(190, 95%, 46%, 0.06) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  bottom: -20%;
  left: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, hsla(215, 95%, 55%, 0.05) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  letter-spacing: -0.01em;
}

p {
  color: var(--text-secondary);
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--accent-blue-hover);
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-cols-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* Glassmorphism Panels */
.glass-panel {
  background: var(--bg-glass-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: var(--border-glass-hover);
  transform: translateY(-2px);
}

/* Sticky Header Navigation */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.site-logo span {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue) 0%, hsla(215, 95%, 45%, 1) 100%);
  color: var(--text-primary);
  box-shadow: 0 4px 15px -3px hsla(215, 95%, 55%, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -3px hsla(215, 95%, 55%, 0.45);
  background: linear-gradient(135deg, var(--accent-blue-hover) 0%, var(--accent-blue) 100%);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-glass-hover);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: hsla(220, 30%, 90%, 0.05);
  border-color: var(--text-primary);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, hsl(190, 95%, 38%) 100%);
  color: var(--bg-primary);
  box-shadow: 0 4px 15px -3px hsla(190, 95%, 46%, 0.3);
}

.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -3px hsla(190, 95%, 46%, 0.45);
  filter: brightness(1.1);
}

/* Sections */
.section {
  padding-block: 5rem;
}

.hero {
  padding-block: 7rem 5rem;
  position: relative;
}

.hero-content {
  max-width: 750px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: hsla(190, 95%, 46%, 0.1);
  border: 1px solid hsla(190, 95%, 46%, 0.3);
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
}

.badge-warning {
  background: hsla(38, 92%, 50%, 0.1);
  border-color: hsla(38, 92%, 50%, 0.3);
  color: hsl(38, 92%, 55%);
}

.badge-protected {
  background: hsla(265, 80%, 60%, 0.1);
  border-color: hsla(265, 80%, 60%, 0.3);
  color: hsl(265, 80%, 65%);
}

.hero-title {
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Product Cards */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-icon {
  margin-bottom: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: hsla(215, 95%, 55%, 0.1);
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card:nth-child(2) .product-icon {
  background: hsla(190, 95%, 46%, 0.1);
  color: var(--accent-cyan);
}

.product-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.product-card p {
  flex-grow: 1;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.product-features-list {
  list-style: none;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.product-features-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.product-features-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  font-weight: bold;
}

.status-indicator {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-glass);
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-indicator span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
}

.status-indicator.development span::before {
  background: hsl(38, 92%, 50%);
}

/* Forms & Login Card */
.form-container {
  max-width: 450px;
  margin: 4rem auto;
}

.form-title {
  margin-bottom: 0.5rem;
  font-size: 2rem;
  text-align: center;
}

.form-subtitle {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  transition: var(--transition-smooth);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px hsla(215, 95%, 55%, 0.2);
}

.form-checkbox {
  accent-color: var(--accent-blue);
}

/* Notifications / Banners */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: 1px solid transparent;
}

.alert-danger {
  background: var(--error-bg);
  border-color: var(--error);
  color: var(--text-primary);
}

.alert-success {
  background: var(--success-bg);
  border-color: var(--success);
  color: var(--text-primary);
}

.alert-info {
  background: hsla(215, 95%, 55%, 0.1);
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

.credential-box {
  background: var(--bg-secondary);
  border: 1px dashed var(--border-glass-hover);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

.credential-box strong {
  color: var(--accent-cyan);
}

/* App Dashboard UI */
.dashboard-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dashboard-card {
  padding: 2.5rem;
}

/* Footer styling */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-glass);
  background: var(--bg-secondary);
  padding-block: 3rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-wrapper {
    flex-direction: row;
  }
}

.footer-logo {
  font-weight: 700;
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text-secondary);
}

.footer-disclaimer {
  max-width: 500px;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-disclaimer {
    text-align: right;
  }
}

/* SVG icons styling */
svg.icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

svg.icon-lg {
  width: 32px;
  height: 32px;
}

/* Micro-animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animated {
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
