/* ==========================================================================
   PANISOFT - Under Construction Page Stylesheet
   Modern CSS: light-dark(), color-scheme, CSS Grid, container responsiveness
   ========================================================================== */

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

:root {
  /* Color Scheme declaration for native browser theming */
  color-scheme: light dark;

  /* Theme selector overrides mapping meta tag to CSS cascade */
  &:has(> head > meta[name="color-scheme"][content="dark"]) {
    color-scheme: dark;
  }
  &:has(> head > meta[name="color-scheme"][content="light"]) {
    color-scheme: light;
  }

  /* Color Tokens using light-dark() */
  --bg-page-light: #f8fafc;
  --bg-page-dark: #06090e;
  --bg-page: light-dark(var(--bg-page-light), var(--bg-page-dark));

  --bg-subtle-light: #f1f5f9;
  --bg-subtle-dark: #0d121c;
  --bg-subtle: light-dark(var(--bg-subtle-light), var(--bg-subtle-dark));

  --text-primary-light: #0f172a;
  --text-primary-dark: #f8fafc;
  --text-primary: light-dark(var(--text-primary-light), var(--text-primary-dark));

  --text-secondary-light: #475569;
  --text-secondary-dark: #94a3b8;
  --text-secondary: light-dark(var(--text-secondary-light), var(--text-secondary-dark));

  --text-muted-light: #64748b;
  --text-muted-dark: #64748b;
  --text-muted: light-dark(var(--text-muted-light), var(--text-muted-dark));

  --card-bg-light: rgba(255, 255, 255, 0.85);
  --card-bg-dark: rgba(13, 18, 28, 0.7);
  --card-bg: light-dark(var(--card-bg-light), var(--card-bg-dark));

  --card-border-light: rgba(226, 232, 240, 0.8);
  --card-border-dark: rgba(255, 255, 255, 0.08);
  --card-border: light-dark(var(--card-border-light), var(--card-border-dark));

  --card-border-hover-light: rgba(99, 102, 241, 0.3);
  --card-border-hover-dark: rgba(99, 102, 241, 0.4);
  --card-border-hover: light-dark(var(--card-border-hover-light), var(--card-border-hover-dark));

  --input-bg-light: #ffffff;
  --input-bg-dark: #0a0e17;
  --input-bg: light-dark(var(--input-bg-light), var(--input-bg-dark));

  --brand-primary: #4f46e5;
  --brand-primary-hover: #4338ca;
  --brand-cyan: #06b6d4;
  --brand-purple: #8b5cf6;
  --brand-emerald: #10b981;

  --accent-glow-light: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
  --accent-glow-dark: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
  --accent-glow: light-dark(var(--accent-glow-light), var(--accent-glow-dark));

  --shadow-sm-light: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm-dark: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: light-dark(var(--shadow-sm-light), var(--shadow-sm-dark));

  --shadow-lg-light: 0 10px 30px -5px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-lg-dark: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: light-dark(var(--shadow-lg-light), var(--shadow-lg-dark));

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Global UI */
  accent-color: var(--brand-primary);
}

/* Accessibility: Skip to Content */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 1rem;
  background: var(--brand-primary);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus {
  top: 1rem;
}

/* Base Body Setup */
body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle background glow effect */
.bg-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: var(--accent-glow);
}

.bg-grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.25;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, light-dark(rgba(0,0,0,0.05), rgba(255,255,255,0.04)) 1px, transparent 1px),
    linear-gradient(to bottom, light-dark(rgba(0,0,0,0.05), rgba(255,255,255,0.04)) 1px, transparent 1px);
}

/* Container */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Navigation */
.site-header {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: light-dark(rgba(248, 250, 252, 0.8), rgba(6, 9, 14, 0.8));
}

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

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.brand-logo {
  width: 34px;
  height: 34px;
  display: block;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.domain-pill {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--card-border);
  display: none;
}
@media (min-width: 640px) {
  .domain-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }
}

/* Theme Toggle Control (Accessible & Modern) */
.theme-toggle-group {
  display: inline-flex;
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  border-radius: 9999px;
  padding: 2px;
  gap: 2px;
}

.theme-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease-in-out;
}
.theme-btn:hover {
  color: var(--text-primary);
}
.theme-btn[aria-pressed="true"] {
  background: var(--card-bg);
  color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
}
.theme-btn svg {
  width: 16px;
  height: 16px;
}

/* Main Content Layout */
main {
  flex: 1;
  padding: 3.5rem 0 4rem;
}

.hero-section {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 4rem;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: light-dark(rgba(79, 70, 229, 0.08), rgba(99, 102, 241, 0.15));
  border: 1px solid light-dark(rgba(79, 70, 229, 0.2), rgba(99, 102, 241, 0.3));
  color: light-dark(#4338ca, #a5b4fc);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.75rem;
  letter-spacing: 0.01em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--brand-emerald);
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Headings */
.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.text-gradient {
  background: linear-gradient(135deg, #38bdf8 0%, #6366f1 50%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 660px;
  margin: 0 auto 2.5rem;
}

/* Milestone Progress Ticker */
.progress-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  margin-bottom: 3.5rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.progress-track {
  height: 8px;
  width: 100%;
  background: var(--bg-subtle);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.progress-fill {
  height: 100%;
  width: 72%;
  background: linear-gradient(90deg, #38bdf8, #6366f1, #a855f7);
  border-radius: 9999px;
}

.milestones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  text-align: left;
}

.milestone-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.milestone-status {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.milestone-status.done {
  color: var(--brand-emerald);
}
.milestone-status.in-progress {
  color: var(--brand-cyan);
}
.milestone-status.upcoming {
  color: var(--text-muted);
}

.milestone-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Newsletter / Notification Form */
.notify-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
  max-width: 580px;
  margin: 0 auto 4rem;
  text-align: center;
}

.notify-box h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.notify-box p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

.notify-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
@media (min-width: 520px) {
  .notify-form {
    flex-direction: row;
  }
}

.notify-input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 0.9375rem;
  outline: none;
  transition: all 0.2s ease;
}
.notify-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px light-dark(rgba(79, 70, 229, 0.15), rgba(99, 102, 241, 0.25));
}
.notify-input::placeholder {
  color: var(--text-muted);
}

.notify-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--brand-primary);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 0.875rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.1s ease;
}
.notify-btn:hover {
  background: var(--brand-primary-hover);
}
.notify-btn:active {
  transform: scale(0.98);
}
.notify-btn svg {
  width: 18px;
  height: 18px;
}

.form-feedback {
  margin-top: 1rem;
  font-size: 0.875rem;
  min-height: 1.25rem;
  transition: all 0.2s ease;
}
.form-feedback.success {
  color: var(--brand-emerald);
  font-weight: 600;
}
.form-feedback.error {
  color: #ef4444;
  font-weight: 500;
}

/* Feature Preview Cards Grid */
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-align: center;
  margin-bottom: 0.5rem;
}
.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.75rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--card-border-hover);
  box-shadow: var(--shadow-lg);
}

.feature-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  background: light-dark(rgba(79, 70, 229, 0.08), rgba(99, 102, 241, 0.15));
  color: var(--brand-primary);
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.55;
}

/* Direct Contact Bar */
.contact-banner {
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  text-align: center;
}
@media (min-width: 768px) {
  .contact-banner {
    flex-direction: row;
    text-align: left;
  }
}

.contact-text h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.contact-text p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-secondary:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--card-border);
  padding: 2.5rem 0;
  background-color: light-dark(rgba(248, 250, 252, 0.5), rgba(6, 9, 14, 0.5));
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  text-align: center;
}
@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    text-align: left;
  }
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s ease;
}
.footer-link:hover {
  color: var(--brand-primary);
}

/* 404 Specific Page Styles */
.notfound-card {
  max-width: 580px;
  margin: 4rem auto;
  text-align: center;
  padding: 3rem 2rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

.notfound-code {
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 1rem;
}

/* Focus styles for keyboard accessibility */
:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 3px;
}

/* Respect user's motion preferences */
@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;
  }
}
