/* ==========================================================================
   GreenKey Health Under Construction Page - Premium CSS Design System
   ========================================================================== */

/* Typography & Variables */
:root {
  /* Color Palette (Base HSL) */
  --color-primary-h: 168;
  --color-primary-s: 72%;
  --color-primary-l: 14%; /* #0A3D33 */
  
  --color-accent-h: 82;
  --color-accent-s: 84%;
  --color-accent-l: 67%; /* #BEF264 */
  
  --color-sage-h: 127;
  --color-sage-s: 37%;
  --color-sage-l: 47%; /* #4CA456 */
  
  /* Theme Variables Default (Dark Theme) */
  --bg-app: radial-gradient(circle at 50% -20%, hsl(168, 60%, 8%) 0%, hsl(168, 80%, 4%) 100%);
  --bg-body-fallback: hsl(168, 80%, 3%);
  --text-primary: hsl(0, 0%, 98%);
  --text-secondary: hsl(168, 15%, 75%);
  --text-muted: hsl(168, 10%, 55%);
  
  --card-bg: rgba(10, 61, 51, 0.25);
  --card-border: rgba(190, 242, 100, 0.08);
  --card-glow: rgba(190, 242, 100, 0.02);
  
  --header-bg: rgba(5, 20, 17, 0.65);
  --header-border: rgba(190, 242, 100, 0.05);
  
  --input-bg: rgba(5, 20, 17, 0.5);
  --input-border: rgba(255, 255, 255, 0.1);
  --input-focus-border: hsl(82, 84%, 67%);
  --input-focus-shadow: rgba(190, 242, 100, 0.15);
  
  --btn-primary-bg: hsl(82, 84%, 67%);
  --btn-primary-text: hsl(168, 72%, 8%);
  --btn-primary-hover-bg: hsl(82, 90%, 75%);
  --btn-primary-hover-shadow: rgba(190, 242, 100, 0.4);
  
  --gradient-text: linear-gradient(135deg, hsl(82, 84%, 67%) 0%, hsl(127, 45%, 65%) 100%);
  --pill-bg: rgba(190, 242, 100, 0.08);
  --pill-text: hsl(82, 84%, 72%);
  --pill-border: rgba(190, 242, 100, 0.15);
  
  --ring-bg: rgba(255, 255, 255, 0.05);
  --ring-fill: hsl(82, 84%, 67%);

  --modal-bg: rgba(5, 25, 21, 0.95);
  --modal-border: rgba(190, 242, 100, 0.15);
  --modal-overlay-bg: rgba(2, 12, 10, 0.85);

  /* Fonts */
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables */
body.theme-light {
  --bg-app: radial-gradient(circle at 50% -20%, hsl(120, 30%, 97%) 0%, hsl(168, 40%, 94%) 100%);
  --bg-body-fallback: hsl(168, 40%, 94%);
  --text-primary: hsl(168, 60%, 10%);
  --text-secondary: hsl(168, 30%, 30%);
  --text-muted: hsl(168, 20%, 48%);
  
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-border: rgba(10, 61, 51, 0.08);
  --card-glow: rgba(10, 61, 51, 0.01);
  
  --header-bg: rgba(255, 255, 255, 0.75);
  --header-border: rgba(10, 61, 51, 0.06);
  
  --input-bg: rgba(255, 255, 255, 0.9);
  --input-border: rgba(10, 61, 51, 0.15);
  --input-focus-border: hsl(168, 72%, 18%);
  --input-focus-shadow: rgba(10, 61, 51, 0.1);
  
  --btn-primary-bg: hsl(168, 72%, 18%);
  --btn-primary-text: hsl(0, 0%, 100%);
  --btn-primary-hover-bg: hsl(168, 72%, 25%);
  --btn-primary-hover-shadow: rgba(10, 61, 51, 0.25);
  
  --gradient-text: linear-gradient(135deg, hsl(168, 72%, 14%) 0%, hsl(127, 50%, 35%) 100%);
  --pill-bg: rgba(76, 164, 86, 0.1);
  --pill-text: hsl(127, 60%, 25%);
  --pill-border: rgba(76, 164, 86, 0.2);
  
  --ring-bg: rgba(10, 61, 51, 0.06);
  --ring-fill: hsl(168, 72%, 18%);

  --modal-bg: rgba(255, 255, 255, 0.98);
  --modal-border: rgba(10, 61, 51, 0.12);
  --modal-overlay-bg: rgba(10, 30, 25, 0.4);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-body-fallback);
  background-image: var(--bg-app);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition-smooth), color var(--transition-smooth);
}

/* Floating Particles Canvas */
#waves-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  opacity: 0.8;
  transition: opacity var(--transition-smooth);
}

/* Utility Containers */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Header Styling */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background var(--transition-smooth), border-color var(--transition-smooth);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Fallback Logo */
.logo-fallback-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-svg {
  width: 36px;
  height: 36px;
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.brand-logo .accent-text {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text-muted);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.control-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.control-btn:hover {
  transform: scale(1.05);
  border-color: var(--input-focus-border);
  background: rgba(190, 242, 100, 0.08);
  box-shadow: 0 0 12px var(--input-focus-shadow);
}

.control-btn .icon {
  width: 20px;
  height: 20px;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.5s ease;
}

.theme-toggle-btn:hover .icon {
  transform: rotate(30deg);
}

/* Main Content Wrapper */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 40px;
  padding-bottom: 40px;
  min-height: calc(100vh - 160px); /* Center perfectly between header (80px) and footer (80px) */
  z-index: 10;
}

/* Hero Section */
.hero-section {
  text-align: center;
  max-width: 800px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badge-container {
  margin-bottom: 24px;
  animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pill-badge {
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  color: var(--pill-text);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: inline-block;
  box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1.1;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -1.5px;
  margin-bottom: 24px;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.highlight-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-desc {
  font-size: clamp(16px, 2.5vw, 19px);
  color: var(--text-secondary);
  max-width: 680px;
  margin-bottom: 48px;
  font-weight: 400;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

/* Responsive Countdown Clock */
.countdown-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 580px;
  margin-bottom: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.countdown-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 16px 8px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(2,12,10,0.15), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: var(--transition-smooth);
}

.countdown-item:hover {
  transform: translateY(-4px);
  border-color: rgba(190, 242, 100, 0.25);
  box-shadow: 0 12px 40px var(--card-glow);
}

.countdown-spinner-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.progress-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: transparent;
  stroke: var(--ring-bg);
  stroke-width: 4;
}

.progress-ring-fill {
  fill: transparent;
  stroke: var(--ring-fill);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 283; /* 2 * PI * r (r=45) = 282.7 */
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 0.5s ease;
}

.countdown-val {
  position: absolute;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.countdown-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}



/* Footer Styling */
.app-footer {
  width: 100%;
  background: var(--header-bg);
  border-top: 1px solid var(--header-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background var(--transition-smooth), border-color var(--transition-smooth);
}

.footer-bottom {
  padding: 28px 0;
  font-size: 13px;
  color: var(--text-muted);
}

body.theme-light .footer-bottom {
  border-top-color: rgba(10, 61, 51, 0.05);
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-simple-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-simple-links .footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition-fast);
}

.footer-simple-links .footer-link:hover {
  color: var(--ring-fill);
}

.footer-simple-links .divider {
  color: var(--text-muted);
  font-size: 14px;
  user-select: none;
}

/* Modal Overlay & Dialog */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--modal-overlay-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 24px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--modal-bg);
  border: 1px solid var(--modal-border);
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  padding: 48px 40px 40px;
  text-align: center;
  position: relative;
  box-shadow: 0 30px 70px rgba(0,0,0,0.3);
  transform: translateY(30px) scale(0.95);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

body.theme-light .modal-close-btn:hover {
  background: rgba(0,0,0,0.05);
}

.modal-close-btn .icon {
  width: 20px;
  height: 20px;
}

.modal-icon-box {
  width: 64px;
  height: 64px;
  background: rgba(76, 164, 86, 0.1);
  color: hsl(127, 45%, 55%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

body.theme-light .modal-icon-box {
  background: rgba(76, 164, 86, 0.15);
  color: hsl(127, 60%, 35%);
}

.modal-success-svg {
  width: 28px;
  height: 28px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal-heading {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.modal-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
}

.modal-desc strong {
  color: var(--text-primary);
}

.modal-action-btn {
  width: 100%;
  height: 50px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border: none;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-action-btn:hover {
  background: var(--btn-primary-hover-bg);
  box-shadow: 0 6px 20px var(--btn-primary-hover-shadow);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Breakpoints */
@media (max-width: 600px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .app-header {
    height: 72px;
  }
  
  .header-container {
    height: 72px;
  }
  
  .brand-logo-img {
    height: 38px;
  }
  
  .logo-text {
    font-size: 18px;
  }

  .main-wrapper {
    padding-top: 20px;
    padding-bottom: 40px;
  }
  
  .hero-section {
    margin-bottom: 20px;
  }

  .countdown-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .countdown-spinner-wrap {
    width: 72px;
    height: 72px;
  }
  
  .countdown-val {
    font-size: 20px;
  }
  
  .waitlist-card {
    padding: 30px 20px;
  }
  
  .input-group {
    flex-direction: column;
    gap: 12px;
  }
  
  .submit-btn {
    width: 100%;
    justify-content: center;
  }

  .footer-bottom-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-simple-links {
    justify-content: center;
    gap: 10px 14px;
  }
}
