/* ==========================================================================
   Self-Hosted Fonts (zero CLS, no third-party dependency)
   ========================================================================== */
@font-face {
  font-family: 'Noto Sans Georgian';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/notosansgeorgian-georgian.woff2') format('woff2');
  unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+205A, U+2D00-2D2F, U+2E31;
}
@font-face {
  font-family: 'Noto Sans Georgian';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/notosansgeorgian-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url('fonts/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   Design System & Variable Declarations (Light Mode Theme)
   ========================================================================== */
:root {
  /* Colors */
  --bg-obsidian: #ffffff; /* White base */
  --bg-surface: #f8fafc;  /* Slate-50 */
  --bg-surface-elevated: #f1f5f9; /* Slate-100 */
  
  --primary-glow: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%); /* Blue to Cyan */
  --secondary-glow: linear-gradient(135deg, #7c3aed 0%, #db2777 100%); /* Violet to Pink */
  
  --neon-cyan: #06b6d4;
  --neon-blue: #2563eb;
  --neon-green: #10b981;
  --neon-purple: #7c3aed;
  --neon-pink: #db2777;
  --neon-red: #ef4444;
  
  --text-white: #0f172a; /* Slate-900 (Main text) */
  --text-muted: #475569; /* Slate-600 (Muted text) */
  --text-dark: #ffffff;  /* White (Text on dark buttons) */
  
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-shadow: 0 8px 30px rgba(15, 23, 42, 0.04);
  
  /* Fonts */
  --font-primary: 'Noto Sans Georgian', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', sans-serif;
  
  /* Transition timings */
  --ease-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base Reset
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #f1f5f9; /* Soft grey background */
  color: var(--text-white);
  font-family: var(--font-primary);
  display: flex;
  justify-content: center;
  align-items: flex-start; /* Align to top to scroll naturally */
  min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-surface);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1; /* Slate-300 */
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--neon-blue);
}

/* ==========================================================================
   Desktop Simulated Device Frame (Light Premium Phone Frame)
   ========================================================================== */
.device-frame {
  position: relative;
  width: 100%;
  max-width: 480px;
  background-color: var(--bg-obsidian);
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.15),
              0 0 50px rgba(37, 99, 235, 0.03);
  border-radius: 40px;
  border: 10px solid #e2e8f0; /* Silver frame */
  overflow: hidden;
  margin: 40px auto; /* Centered with vertical spacing */
  transition: transform var(--ease-smooth);
}

.device-screen {
  width: 100%;
  position: relative;
}

/* On actual mobile viewports, remove the desktop container simulator */
@media (max-width: 480px) {
  body {
    background-color: var(--bg-obsidian);
  }
  .device-frame {
    max-width: 100%;
    margin: 0;
    border: none;
    border-radius: 0;
  }
}

/* ==========================================================================
   Layout & Container
   ========================================================================== */
.content-container {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  position: relative;
  background-color: var(--bg-obsidian);
}

section {
  padding: 40px 24px;
  position: relative;
  overflow: hidden;
}

/* Background Glowing Orbs (Soft Pastels for Light Theme) */
.glow-sphere {
  position: absolute;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.12;
  z-index: 0;
}
.cyan-glow {
  top: 10%;
  right: -50px;
  background-color: var(--neon-cyan);
}
.purple-glow {
  bottom: 10%;
  left: -50px;
  background-color: var(--neon-purple);
}

/* ==========================================================================
   Header Component
   ========================================================================== */
.app-header {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--glass-border);
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}
.logo-accent {
  background: var(--primary-glow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  text-transform: uppercase;
}
.neon-green-badge {
  background-color: rgba(16, 185, 129, 0.1);
  color: #047857; /* Darker green for contrast on white */
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding-top: 30px;
  padding-bottom: 20px;
  text-align: center;
}

.tagline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid rgba(37, 99, 235, 0.1);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--neon-blue);
  margin-bottom: 16px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--neon-blue);
  border-radius: 50%;
  animation: pulse-glow 1.5s infinite;
}

.hero-headline {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  color: #0f172a;
}

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

.hero-subheadline {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
  padding: 0 10px;
}

.cta-wrapper {
  margin-bottom: 35px;
  display: flex;
  justify-content: center;
}

/* Hero Image Box (Sleek Clean Frame) */
.hero-image-container {
  position: relative;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  background-color: #ffffff;
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
}

.image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-obsidian) 0%, transparent 20%);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  border-radius: 16px;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1rem;
  padding: 16px 28px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s var(--ease-elastic);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary-glow);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25);
}

.btn-primary:active {
  transform: scale(0.95);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.15);
}

.btn-secondary {
  background: var(--secondary-glow);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.25);
}
.btn-secondary:active {
  transform: scale(0.95);
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.15);
}

.btn-large {
  width: 100%;
  padding: 18px;
}

.btn-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg) translateX(-200%);
  animation: shine 3s infinite;
}

/* ==========================================================================
   "როგორ ვმუშაობთ" Section (Interactive Steps)
   ========================================================================== */
.section-header {
  text-align: center;
  margin-bottom: 30px;
}

.section-tag {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--neon-blue);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 8px;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
}

.section-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Interactive Vertical Steps */
.steps-container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Progress Tracking Line */
.progress-line-bg {
  position: absolute;
  top: 25px;
  left: 20px;
  width: 4px;
  height: calc(100% - 50px);
  background: var(--bg-surface-elevated);
  border-radius: 2px;
  z-index: 1;
}

.progress-line-fill {
  width: 100%;
  height: 0%;
  background: var(--primary-glow);
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.3);
  border-radius: 2px;
  transition: height 0.4s var(--ease-smooth);
}

.step-card {
  display: flex;
  gap: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 16px;
  position: relative;
  z-index: 2;
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.step-marker {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 2px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.3s var(--ease-smooth);
  position: relative;
}

.step-check {
  display: none;
  font-weight: bold;
}

.step-content h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: #1e293b;
  transition: color 0.3s var(--ease-smooth);
}

.step-content p {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
  transition: color 0.3s var(--ease-smooth);
}

/* Active Completed Steps Styles */
.step-card.is-active {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.06);
  transform: translateX(4px);
}

.step-card.is-active .step-marker {
  background: var(--primary-glow);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.3);
  transform: scale(1.1);
}

.step-card.is-active .step-number {
  display: none;
}

.step-card.is-active .step-check {
  display: block;
  animation: scale-up 0.25s var(--ease-elastic);
}

.step-card.is-active .step-content h3 {
  color: var(--neon-blue);
}
.step-card.is-active .step-content p {
  color: #334155;
}

/* ==========================================================================
   "ვისთვისაა" Section (Target Audiences)
   ========================================================================== */
.target-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 1;
  position: relative;
}

.target-card {
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.02);
  transition: all 0.3s var(--ease-smooth);
}

.target-card:hover, .target-card:focus-within {
  border-color: rgba(124, 58, 237, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.05);
}

.card-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.card-icon {
  font-size: 1.4rem;
}

.target-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #1e293b;
}

.target-card p {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ==========================================================================
   Final Call To Action & Footer
   ========================================================================== */
.final-cta-section {
  padding-bottom: 10px;
}

.cta-box {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary-glow);
}

.cta-box h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
}

.cta-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 24px;
}

.app-footer {
  padding: 20px 24px;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  background: #ffffff;
}

.app-footer p {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.8;
}

/* ==========================================================================
   Application Dialog Modal Style
   ========================================================================== */
dialog {
  margin: auto;
  border: none;
  background: transparent;
  color: var(--text-white);
  padding: 0;
  width: calc(100% - 32px);
  max-width: 440px;
  border-radius: 24px;
  overflow: hidden;
  z-index: 1000;
}

/* Dialog entry/exit transitions */
dialog[open] {
  animation: modal-enter 0.35s var(--ease-elastic) forwards;
}

dialog::backdrop {
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(10px) saturate(180%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

dialog[open]::backdrop {
  opacity: 1;
}

.dialog-content {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 24px;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
  position: relative;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.dialog-header h2 {
  font-size: 1.3rem;
  font-weight: 800;
  background: var(--primary-glow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-close {
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-close:hover {
  background: var(--neon-red);
  color: white;
  border-color: transparent;
}

/* Form Styles & Floating Labels */
#application-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

.form-group input,
.form-group textarea,
.form-group select {
  font-family: var(--font-primary);
  font-size: 0.9rem;
  color: #0f172a;
  background-color: var(--bg-surface);
  border: 1.5px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px 14px;
  outline: none;
  transition: all 0.3s var(--ease-smooth);
  width: 100%;
}

.form-group textarea {
  resize: none;
}

/* Floating labels effect */
.form-group label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: all 0.25s var(--ease-smooth);
}

.form-group textarea ~ label {
  top: 24px;
  transform: none;
}

.form-group select ~ label {
  top: 50%;
  transform: translateY(-50%);
}

/* Shift label when input has value or focus */
.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
  top: -8px;
  left: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--neon-blue);
  background-color: #ffffff;
  padding: 0 6px;
  transform: none;
}

/* Select field handling */
.form-group select:focus ~ label,
.form-group select:valid ~ label {
  top: -8px;
  left: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--neon-blue);
  background-color: #ffffff;
  padding: 0 6px;
  transform: none;
}

.form-group select option {
  background-color: #ffffff;
  color: #0f172a;
}

/* Focus and validation outlines */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--neon-blue);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.1);
}

/* User-valid styles */
.form-group input:is(:user-valid, .\:user-valid),
.form-group textarea:is(:user-valid, .\:user-valid),
.form-group select:is(:user-valid, .\:user-valid) {
  border-color: var(--neon-green);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.08);
}

/* User-invalid styles */
.form-group input:is(:user-invalid, .\:user-invalid),
.form-group textarea:is(:user-invalid, .\:user-invalid),
.form-group select:is(:user-invalid, .\:user-invalid) {
  border-color: var(--neon-red);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.08);
}

/* Error message display */
.error-message {
  font-size: 0.7rem;
  color: var(--neon-red);
  margin-top: 4px;
  display: none;
  padding-left: 4px;
}

.form-group input:is(:user-invalid, .\:user-invalid) ~ .error-message,
.form-group textarea:is(:user-invalid, .\:user-invalid) ~ .error-message,
.form-group select:is(:user-invalid, .\:user-invalid) ~ .error-message {
  display: block;
}

.btn-submit {
  width: 100%;
  padding: 16px;
  font-weight: 700;
  border-radius: 12px;
}

/* ==========================================================================
   Success Dialog State
   ========================================================================== */
.success-screen {
  position: absolute;
  inset: 0;
  background: #ffffff;
  border-radius: 24px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.success-screen.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.success-icon-wrapper {
  margin-bottom: 20px;
}

/* Checkmark animation */
.checkmark-svg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: block;
  stroke-width: 3;
  stroke: var(--neon-green);
  stroke-miterlimit: 10;
  box-shadow: inset 0 0 0 var(--neon-green);
  animation: fill-checkmark .4s ease-in-out .4s forwards, scale-up .3s ease-in-out .9s both;
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 3;
  stroke-miterlimit: 10;
  stroke: var(--neon-green);
  fill: none;
  animation: stroke-checkmark 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke-checkmark 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

.success-screen h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--neon-green);
}

.success-screen p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.btn-close-success {
  padding: 12px 30px;
  font-size: 0.9rem;
  border-radius: 12px;
}

/* ==========================================================================
   Confetti Canvas styling
   ========================================================================== */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  display: block;
}

/* ==========================================================================
   Keyframes & Animations
   ========================================================================== */
@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

@keyframes shine {
  0%   { transform: skewX(-25deg) translateX(-200%); }
  30%  { transform: skewX(-25deg) translateX(200%); }
  100% { transform: skewX(-25deg) translateX(200%); }
}

@keyframes modal-enter {
  0% {
    transform: scale(0.9) translateY(20px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes stroke-checkmark {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes fill-checkmark {
  100% {
    box-shadow: inset 0 0 0 45px rgba(16, 185, 129, 0.05);
  }
}

@keyframes scale-up {
  0%, 100% {
    transform: none;
  }
  50% {
    transform: scale(1.15);
  }
}

/* Fallback for popover classes if popover polyfill is used */
[popover]:is(:popover-open, .\:popover-open) {
  display: block;
}
