/* ========================================
   Global Variables
   ======================================== */
:root {
  --bg-primary: hsl(220, 35%, 15%);
  --bg-secondary: hsl(220, 30%, 20%);
  --text-primary: hsl(210, 50%, 98%);
  --text-secondary: hsl(215, 25%, 78%);
  --text-muted: hsl(215, 20%, 62%);
  --accent-teal: hsl(165, 80%, 45%);
  --accent-blue: hsl(200, 90%, 52%);
  --accent-cyan: hsl(185, 85%, 55%);
  --glass-bg: hsla(220, 30%, 30%, 0.35);
  --glass-border: hsla(210, 40%, 60%, 0.18);
  --blur-light: 8px;
  --blur-medium: 20px;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 60px;
  --space-3xl: 80px;
  --space-4xl: 100px;
  --container-max: 1200px;
  --gutter: 60px;
  --gutter-sm: 25px;
}

/* ========================================
   Resets & Base Styles
   ======================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@supports (scroll-behavior: smooth) {
  html {
    scroll-behavior: smooth;
  }
}

html {
  scroll-padding-top: 100px;
  overflow-y: scroll; /* Prevent layout shift from scrollbar appearing/disappearing */
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  caret-color: var(--accent-teal);
}

/* ========================================
   Typography
   ======================================== */
.section-label {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent-teal);
  margin-bottom: 20px;
}

.section-title {
  font-size: 3rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 30px;
}

.section-text {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.9;
  max-width: 800px;
}

.section-text + .section-text {
  margin-top: 20px;
}

.hero h1 {
  font-size: 4.5rem;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 30px;
}

.hero .lede {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.8;
}

.features-section h2,
.benefits-section h2 {
  font-size: 2.5rem;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
}

.features-section h2 {
  margin-bottom: 50px;
}

.benefits-section h2 {
  margin-bottom: 25px;
}

.benefits-section p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.8;
}

.legal-content h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 20px;
}

.legal-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.legal-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.legal-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.legal-content ul,
.legal-content ol {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
  padding-left: 24px;
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-content strong {
  color: var(--text-primary);
}

.footer-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.text-xs {
  font-size: 0.75rem;
}

/* ========================================
   Layout
   ======================================== */
header nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0f1629;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1080px;
  padding: 0 60px;
}

main {
  position: relative;
  z-index: 10;
  padding-top: 100px;
  min-height: 100vh;
}

section {
  padding: 60px 60px;
  max-width: var(--container-max);
  margin: 0 auto;
}

section,
[id] {
  scroll-margin-top: 100px;
}

.hero {
  text-align: center;
  padding: 60px 60px 40px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 35px;
  backdrop-filter: blur(10px);
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-teal);
  border-radius: 50%;
  animation: pulse-dot 2s ease infinite;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s ease infinite;
}

.scroll-indicator svg {
  width: 30px;
  height: 30px;
  stroke: var(--text-muted);
}

.story {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 80px;
  align-items: center;
}

.story-visual {
  position: relative;
  height: 500px;
}

.liquid-card {
  position: absolute;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 30px;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.liquid-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 30px 60px rgba(0, 212, 170, 0.15);
}

.card-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  stroke: #ffffff;
}

.cta {
  text-align: center;
  padding: 150px 60px;
  position: relative;
}

.cta h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 25px;
}

.cta p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 550px;
  margin: 0 auto 45px;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-button {
  display: inline-block;
  padding: 18px 45px;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  color: var(--bg-primary);
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.cta-button span {
  position: relative;
  z-index: 1;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(0, 212, 170, 0.35);
}

.cta-button:hover::before {
  opacity: 1;
}

.cta-button-secondary {
  background: transparent;
  border: 2px solid var(--glass-border);
  color: var(--text-primary);
}

.cta-button-secondary::before {
  display: none;
}

.cta-button-secondary:hover {
  background: var(--glass-bg);
  border-color: var(--accent-teal);
  box-shadow: 0 20px 40px rgba(0, 212, 170, 0.15);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

body.app-page {
  display: block;
  padding: 80px 0 0;
}

.app-page .container {
  max-width: 900px;
  padding: 20px;
}

.main-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  transform: none;
  width: 100%;
  height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  padding: 0 max(20px, calc((100% - 900px) / 2));
  background: rgba(11, 16, 32, 0.92);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(8, 12, 24, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100;
}

.main-navbar .nav-tab {
  flex: 1;
  min-width: 72px;
  padding: 6px 8px;
  gap: 2px;
  justify-content: center;
  position: relative;
}

.main-navbar .nav-tab:hover {
  color: var(--text-primary);
  background: rgba(56, 189, 248, 0.12);
}

.main-navbar .nav-tab.active {
  color: var(--accent-teal);
  background: rgba(56, 189, 248, 0.18);
  box-shadow: inset 0 -3px 6px -2px rgba(56, 189, 248, 0.35);
}

.main-navbar .nav-tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-teal);
}

.main-navbar .nav-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.main-navbar .nav-badge {
  top: 0;
  right: -2px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  font-size: 9px;
  line-height: 14px;
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  z-index: 1;
}

.story-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.benefits-section {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 60px 80px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 800px;
  margin: 0 auto 40px;
  text-align: center;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 30px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-socials {
  display: flex;
  gap: 20px;
}

.footer-socials a {
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.footer-socials a:hover {
  color: var(--accent-teal);
}

.dashboard-container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 100px 30px 60px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.action-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.dashboard-footer {
  margin-top: 40px;
  padding: 24px 0 24px;
  border-top: 1px solid var(--glass-border);
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
}

.dashboard-footer .footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.dashboard-footer .footer-bottom {
  max-width: 900px;
  margin: 16px auto 0;
  padding: 16px 20px 0;
  border-top: 1px solid var(--glass-border);
  text-align: left;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.dashboard-footer .footer-content .btn {
  margin-left: auto;
  width: auto;
  min-width: 80px;
}

.dashboard-footer .footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ========================================
   Components
   ======================================== */
/* Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-teal);
  color: var(--bg-primary);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  z-index: 1000;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 20px;
}

/* Liquid Blob Background */
.liquid-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.12;
  animation: float 25s ease-in-out infinite;
  will-change: transform;
}

.blob-1 {
  width: 700px;
  height: 700px;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  top: -250px;
  right: -150px;
  animation-delay: 0s;
}

.blob-2 {
  width: 600px;
  height: 600px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  bottom: -200px;
  left: -150px;
  animation-delay: -8s;
}

.blob-3 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-teal));
  top: 40%;
  left: 40%;
  transform: translate(-50%, -50%);
  animation-delay: -15s;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
  align-items: center;
  min-width: 350px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:focus-visible {
  outline: 3px solid var(--accent-teal);
  outline-offset: 4px;
  border-radius: 4px;
}

.nav-cta {
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  border-radius: 50px;
  font-weight: 600;
  color: var(--bg-primary) !important;
  -webkit-text-fill-color: var(--bg-primary) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-width: 105px;
  text-align: center;
  visibility: hidden;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 212, 170, 0.3);
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientFlow 5s ease infinite;
}

@media (prefers-contrast: high) {
  .logo,
  .hero h1 span {
    background: none;
    color: var(--accent-teal);
    -webkit-text-fill-color: currentColor;
  }
}

.mission-section {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 40px;
  margin: 40px auto;
  padding: 80px 60px;
  text-align: center;
  max-width: 1080px;
}

.mission-section .section-text {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  max-width: 65ch;
}

.card-top-border,
.value-card,
.feature-card {
  position: relative;
  overflow: hidden;
}

.glass {
  background: rgba(11, 18, 35, 0.95);
  border: 1px solid var(--glass-border);
}

@supports (backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px)) {
  .glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-medium));
    -webkit-backdrop-filter: blur(var(--blur-medium));
  }
}

.card-top-border::before,
.value-card::before,
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-blue), var(--accent-cyan));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.card-top-border:hover::before,
.value-card:hover::before,
.feature-card:hover::before {
  transform: scaleX(1);
}

.value-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 40px 30px;
  transition: all 0.4s ease;
}

.value-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.08);
}

.value-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  display: block;
}

.value-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.value-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.features-section {
  text-align: center;
}

.feature-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 35px 30px;
  text-align: left;
  transition: all 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.1);
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.feature-card h3 span {
  font-size: 1.5rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

footer {
  padding: 30px 60px 40px;
  background: #0f1629;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  position: relative;
  z-index: 1;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand {
  max-width: 300px;
}

.footer-brand .logo {
  margin-bottom: 20px;
  display: inline-block;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 12px;
}

.footer-section a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--accent-teal);
}

.signup {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: center;
  margin: 40px auto 0;
  max-width: 420px;
}

.input,
.signup input[type="email"],
.form-control,
.form-row input {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  caret-color: var(--accent-teal);
}

.input::placeholder,
.signup input[type="email"]::placeholder,
.form-control::placeholder,
.form-row input::placeholder {
  color: var(--text-muted);
}

.input:focus,
.signup input[type="email"]:focus,
.form-control:focus,
.form-row input:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.2);
}

.input--pill,
.signup input[type="email"] {
  border-radius: 50px;
  padding: 16px 20px;
}

.input--rounded,
.form-control,
.form-row input {
  border-radius: 12px;
}

.input--subtle,
.form-row input {
  background: rgba(255, 255, 255, 0.05);
}

.btn-container {
  width: 100%;
}

.btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.btn-md,
.btn {
  padding: 16px 32px;
  font-size: 1rem;
  min-height: 48px;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.85rem;
  min-height: auto;
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.1rem;
  min-height: 52px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  color: var(--bg-primary);
}

.btn-outline,
.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--glass-border);
  color: var(--text-secondary);
}

.btn-appointment {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: var(--bg-primary);
}

.btn-danger {
  background: linear-gradient(135deg, #f87171, #ef4444);
  color: #ffffff;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 212, 170, 0.3);
}

.btn:focus-visible {
  outline: 3px solid var(--accent-teal);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(0, 212, 170, 0.4);
}

@media (prefers-contrast: high) {
  *:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
  }
}

.btn-outline:hover,
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  transform: none;
  box-shadow: none;
}

.btn-danger:hover {
  box-shadow: 0 10px 30px rgba(248, 113, 113, 0.3);
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn .spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: var(--bg-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn.loading .spinner {
  display: block;
}

.btn.loading .label {
  opacity: 0.7;
}

#msg {
  text-align: center;
  font-size: 0.95rem;
  min-height: 1.5em;
}

#msg:empty {
  display: none;
}

#msg.success {
  color: var(--accent-teal);
}

#msg.error {
  color: #f87171;
}

.signup-link {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 20px;
}

.signup-link a {
  color: var(--accent-teal);
  font-weight: 500;
  transition: color 0.3s ease;
}

.signup-link a:hover {
  color: var(--accent-cyan);
}

.contact-form {
  max-width: 500px;
  margin: 40px auto 0;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group .optional {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.9rem;
}

.form-group .required {
  color: var(--accent-teal);
}

.form-control {
  font-family: inherit;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

select.form-control option {
  background: var(--bg-primary);
  color: var(--text-primary);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.alert {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.alert-success {
  background: rgba(0, 212, 170, 0.15);
  border: 1px solid rgba(0, 212, 170, 0.3);
  color: var(--accent-teal);
}

.alert-error {
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #f87171;
}

.legal-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px;
}

.legal-content a {
  color: var(--accent-teal);
  transition: color 0.3s ease;
}

.legal-content a:hover {
  color: var(--accent-cyan);
}

.legal-callout {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
}

.back-link {
  color: var(--accent-teal);
  font-weight: 500;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: var(--accent-cyan);
}

.dashboard-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 12px 0;
  background: rgba(11, 16, 32, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 20px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-tab:hover,
.nav-tab.active {
  color: var(--accent-teal);
}

.nav-tab:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 4px;
  border-radius: 4px;
}

.nav-tab .nav-icon {
  width: 24px;
  height: 24px;
}

.nav-tab .nav-label {
  font-size: var(--font-size-xs);
  font-weight: 500;
}

.nav-icon-wrapper {
  position: relative;
}

.nav-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 5px;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.125rem;
  text-align: center;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  color: var(--bg-primary);
  border-radius: 10px;
}

.nav-badge:empty {
  display: none;
}

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  color: var(--text-primary);
  font-size: 1.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-value .svg-icon {
  width: 32px;
  height: 32px;
  stroke: var(--text-secondary);
  cursor: pointer;
  transition: stroke 0.3s ease, transform 0.2s ease;
  margin-top: 6px;
}

.stat-value .svg-icon:hover {
  stroke: var(--accent-teal);
  transform: scale(1.1);
}

.card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 20px 40px rgba(5, 10, 22, 0.35);
}

.card h2 {
  margin: 0 0 16px;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.card-subtext {
  color: var(--text-secondary);
  margin: 0 0 16px;
}

.card p {
  margin: 0 0 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.dashboard-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-blue), var(--accent-cyan));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dashboard-card:hover::before {
  opacity: 1;
}

.dashboard-card h2 {
  margin: 0 0 16px;
  font-size: 1.4rem;
  color: var(--text-primary);
}

.dashboard-card .card-subtext {
  color: var(--text-secondary);
  margin: 0 0 20px;
  font-size: 0.95rem;
}

.welcome-card {
  text-align: center;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.2), rgba(56, 189, 248, 0.25));
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.welcome-card h2 {
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-card .card-subtext,
.welcome-card .form-help,
.welcome-card .form-feedback {
  color: var(--text-primary);
}

.welcome-card input {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
}

.welcome-card input:focus {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(148, 233, 255, 0.2);
}

.welcome-card .btn {
  background: #0f172a;
  color: #ffffff;
  border: 2px solid rgba(148, 233, 255, 0.3);
  font-weight: 600;
}

.welcome-card .btn:hover {
  background: #1e293b;
  border-color: rgba(148, 233, 255, 0.5);
  transform: translateY(-1px);
}

.form-row input {
  flex: 1;
  min-width: 200px;
}

.form-row input:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 2px;
}

.form-help {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.form-feedback {
  min-height: 1.2em;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.form-feedback.error {
  color: #f87171;
}

.form-feedback.success {
  color: var(--accent-teal);
}

.slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.slot-title {
  margin: 0;
  font-size: 1rem;
  color: var(--text-primary);
}

.phone-status {
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.phone-status.verified {
  border-color: rgba(0, 212, 170, 0.4);
  background: rgba(0, 212, 170, 0.1);
  color: var(--accent-teal);
}

.phone-status.pending {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
}

.phone-status.invalid {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.1);
  color: #f87171;
}

.status-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 500;
}

.status-badge.verified {
  background: rgba(0, 212, 170, 0.15);
  color: var(--accent-teal);
}

.status-check {
  width: 20px;
  height: 20px;
  margin-left: auto;
  stroke: currentColor;
}

.status-check.is-hidden {
  display: none;
}

#callStatusCard .btn-block {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#callStatusCard .btn-block .label {
  flex: 1;
  text-align: left;
}

.welcome-card {
  text-align: center;
  padding: 40px 30px;
}

.welcome-card h2 {
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.account-settings-card {
  position: relative;
}

.account-settings-card .form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--glass-border);
}

.account-settings-card .form-row:last-child {
  border-bottom: none;
}

.account-settings-card .form-label {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.account-settings-card .form-value {
  color: var(--text-primary);
}

.account-settings-card .action-stack {
  align-items: flex-start;
}

.account-settings-card .btn-danger {
  width: auto;
  min-width: 120px;
  padding: 8px 16px;
  font-size: 0.875rem;
  min-height: 36px;
}

.card-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: rgba(248, 113, 113, 0.2);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #f87171;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: background 0.2s ease, transform 0.1s ease;
}

.card-close-btn:focus-visible {
  outline: 2px solid var(--bg-primary);
  outline-offset: 2px;
}

.card-close-btn:hover {
  background: rgba(248, 113, 113, 0.3);
}

.card-close-btn:active {
  transform: scale(0.95);
}

.card-close-btn svg {
  width: 20px;
  height: 20px;
}

.divider {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: 20px 0;
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(var(--blur-light));
  -webkit-backdrop-filter: blur(var(--blur-light));
  z-index: 200;
  animation: fadeIn 0.2s ease-out;
}

.modal-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 32px;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  animation: slideIn 0.3s ease-out;
}

.modal-header {
  margin-bottom: 16px;
}

.modal-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-body {
  margin-bottom: 24px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-footer .btn {
  min-width: 100px;
}

#notification-banner {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 96vw;
  max-width: 900px;
  min-height: 48px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  color: var(--text-primary);
  text-align: center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
  padding-left: max(16px, env(safe-area-inset-left, 0));
  padding-right: max(16px, env(safe-area-inset-right, 0));
  border-radius: 12px 12px 0 0;
  font-size: 1rem;
  box-shadow: 0 -4px 18px rgba(6, 12, 28, 0.35);
  z-index: 9999;
  line-height: 1.4;
  display: none;
  opacity: 0;
}

#notification-banner.is-visible {
  display: block;
  animation: notificationFadeIn 0.3s ease forwards;
}

#notification-banner.is-hiding {
  display: block;
  animation: notificationFadeOut 0.4s ease forwards;
}

#notification-banner:empty {
  display: none;
}

.dashboard-footer .footer-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.dashboard-footer .footer-link:hover {
  color: var(--accent-teal);
}

.dashboard-footer .footer-divider {
  color: var(--text-muted);
  opacity: 0.5;
}

/* ========================================
   Utilities & Helpers
   ======================================== */
.visually-hidden,
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.visually-hidden:focus,
.visually-hidden:focus-within {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.mt-lg {
  margin-top: 24px;
}

.btn-block {
  display: block;
  width: 100%;
}

.initially-hidden {
  display: none;
}

.is-hidden {
  display: none !important;
}

/* ========================================
   Animations
   ======================================== */
@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  25% {
    transform: translate(60px, -60px) scale(1.15) rotate(5deg);
  }
  50% {
    transform: translate(-40px, 40px) scale(0.9) rotate(-5deg);
  }
  75% {
    transform: translate(40px, 60px) scale(1.1) rotate(3deg);
  }
}

@keyframes gradientFlow {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateX(-50%) translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

@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;
  }

  .blob {
    animation: none;
  }

  .btn .spinner {
    animation: none;
  }

  .modal-overlay,
  .modal,
  #notification-banner {
    animation: none;
  }
}

/* ========================================
   Media Queries
   ======================================== */
@media (max-width: 900px) {
  header nav {
    padding: 15px 25px;
  }

  section {
    padding: 60px 25px;
  }

  .hero {
    padding: 40px 25px 60px;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .mission-section {
    margin: 30px 20px;
    padding: 50px 30px;
    border-radius: 24px;
  }

  .mission-section .section-text {
    text-align: center;
  }

  .benefits-section {
    padding: 40px 25px 60px;
  }

  footer {
    padding: 50px 25px 30px;
  }
}

@media (max-width: 600px) {
  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .nav-links {
    gap: 0;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero .lede {
    font-size: 1.05rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .dashboard-container {
    padding: 20px 20px 40px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-card {
    padding: 24px 20px;
  }

  .nav-tab {
    padding: 8px 12px;
  }

  .form-row {
    flex-direction: column;
  }

  .form-row input {
    width: 100%;
    min-width: auto;
  }

  .modal-footer {
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
  }
}
