@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap');

/* --- Design Tokens --- */
:root {
  --bg-primary: #FAF9F6; /* Elegant warm off-white */
  --bg-card: #FFFFFF;
  --text-primary: #0C0F0F; /* Deep rich charcoal */
  --text-secondary: #4E5959;
  --color-brand: #FF4E20; /* Vibrant energetic coral-orange */
  --color-brand-hover: #E03D14;
  --color-brand-light: #FFF0ED;
  --color-accent: #00E676; /* Gamified success green */
  --color-accent-light: #E8FDF3;
  --color-border: #0C0F0F; /* High-contrast editorial border */
  --color-border-subtle: #E2E8F0;
  
  --font-primary: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;

  --border-width: 2px;
  --radius-lg: 16px;
  --radius-md: 8px;
  --radius-sm: 4px;
  
  /* High contrast shadow (editorial style) */
  --shadow-offset: 4px;
  --shadow-editorial: var(--shadow-offset) var(--shadow-offset) 0px 0px var(--text-primary);
  --shadow-editorial-hover: 6px 6px 0px 0px var(--text-primary);
  --shadow-editorial-active: 2px 2px 0px 0px var(--text-primary);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

.section-padding {
  padding: 100px 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-weight: 700;
  font-family: var(--font-display);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  background-color: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-editorial);
  position: relative;
  top: 0;
  left: 0;
}

.btn:hover {
  box-shadow: var(--shadow-editorial-hover);
  transform: translate(-2px, -2px);
}

.btn:active {
  box-shadow: var(--shadow-editorial-active);
  transform: translate(2px, 2px);
}

.btn-primary {
  background-color: var(--color-brand);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-brand-hover);
}

.btn-secondary {
  background-color: var(--bg-card);
}

/* --- Navigation Bar --- */
.navbar {
  padding: 20px 0;
  border-bottom: var(--border-width) solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-primary);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-dot {
  width: 10px;
  height: 10px;
  background-color: var(--color-brand);
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: inline-block;
}

.nav-links {
  display: none;
  list-style: none;
  gap: 32px;
  font-weight: 600;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-links a:hover {
  color: var(--color-brand);
}

/* --- Hero Section --- */
.hero {
  padding: 80px 0;
  background: radial-gradient(circle at 80% 20%, var(--color-brand-light) 0%, transparent 40%),
              radial-gradient(circle at 10% 80%, var(--color-accent-light) 0%, transparent 45%);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-card);
  border: var(--border-width) solid var(--color-border);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 24px;
  font-family: var(--font-display);
}

.hero-tag .tag-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-accent);
  border-radius: 50%;
  border: 1px solid var(--color-border);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 4rem;
  }
}

.hero-desc {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 48px;
}

.hero-mockup-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-mockup-wrapper {
  background-color: var(--bg-card);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-editorial);
  max-width: 420px;
  width: 100%;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-mockup-wrapper:hover {
  transform: rotate(1deg) scale(1.02);
}

.hero-mockup-img {
  border-radius: calc(var(--radius-lg) - 4px);
  border: var(--border-width) solid var(--color-border);
  width: 100%;
}

/* Floating HUD elements for editorial aesthetic */
.floating-hud {
  position: absolute;
  background-color: var(--bg-card);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  box-shadow: var(--shadow-editorial);
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.floating-hud-1 {
  top: 10%;
  left: -20px;
  transform: rotate(-4deg);
}

.floating-hud-2 {
  bottom: 12%;
  right: -20px;
  transform: rotate(3deg);
}

@media (max-width: 768px) {
  .floating-hud {
    display: none;
  }
}

/* --- Social Stats / Proof Banner --- */
.stats-banner {
  background-color: var(--bg-card);
  border-top: var(--border-width) solid var(--color-border);
  border-bottom: var(--border-width) solid var(--color-border);
  padding: 40px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  text-align: center;
}

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

.stat-item h3 {
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.stat-item p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- XP Calculator Section (Interactive Widget) --- */
.calculator-section {
  background-color: var(--bg-primary);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px auto;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

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

.calc-widget {
  background-color: var(--bg-card);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-editorial);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 992px) {
  .calc-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.slider-group {
  margin-bottom: 24px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 700;
}

.slider-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-value {
  font-family: var(--font-display);
  color: var(--color-brand);
  background-color: var(--color-brand-light);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.styled-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: var(--radius-sm);
  background: var(--color-border-subtle);
  outline: none;
  border: 1px solid var(--color-border);
}

.styled-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-brand);
  border: var(--border-width) solid var(--color-border);
  cursor: pointer;
  box-shadow: 2px 2px 0px 0px var(--text-primary);
  transition: transform 0.1s ease;
}

.styled-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.styled-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-brand);
  border: var(--border-width) solid var(--color-border);
  cursor: pointer;
  box-shadow: 2px 2px 0px 0px var(--text-primary);
  transition: transform 0.1s ease;
}

.styled-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
}

.calc-display {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--color-accent-light);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}

.xp-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 8px;
}

.xp-number {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1;
}

.badge-unlock {
  border: var(--border-width) solid var(--color-border);
  background-color: var(--bg-card);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  box-shadow: 3px 3px 0px 0px var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.badge-icon {
  font-size: 1.5rem;
}

.badge-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
}

.calc-level-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 240px;
}

/* --- Features Grid Section --- */
.features-section {
  background-color: var(--bg-card);
  border-top: var(--border-width) solid var(--color-border);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

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

.feature-card {
  background-color: var(--bg-primary);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-editorial);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-card:hover {
  box-shadow: var(--shadow-editorial-hover);
  transform: translate(-3px, -3px);
}

.feature-icon-wrapper {
  width: 56px;
  height: 56px;
  background-color: var(--bg-card);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 2px 2px 0 0 var(--text-primary);
}

.feature-card h3 {
  font-size: 1.5rem;
}

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

/* --- Testimonials Section (Slider-like cards) --- */
.testimonials-section {
  border-top: var(--border-width) solid var(--color-border);
  background-color: var(--color-brand-light);
}

.testimonial-track {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

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

.testimonial-card {
  background-color: var(--bg-card);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-editorial);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.quote-text {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.4;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: var(--border-width) solid var(--color-border);
  object-fit: cover;
}

.user-info h4 {
  font-size: 1rem;
}

.user-info p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* --- FAQs Section (Native details element) --- */
.faq-section {
  background-color: var(--bg-card);
  border-top: var(--border-width) solid var(--color-border);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

details.faq-item {
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  background-color: var(--bg-primary);
  box-shadow: 2px 2px 0 0 var(--text-primary);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

details.faq-item:hover {
  box-shadow: 4px 4px 0 0 var(--text-primary);
}

summary.faq-summary {
  padding: 20px 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

summary.faq-summary::-webkit-details-marker {
  display: none;
}

summary.faq-summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 500;
  transition: transform 0.2s ease;
}

details[open] summary.faq-summary::after {
  transform: rotate(45deg);
}

.faq-content {
  padding: 0 24px 20px 24px;
  color: var(--text-secondary);
  border-top: 1px solid var(--color-border-subtle);
  background-color: var(--bg-card);
}

/* --- Call To Action Section --- */
.cta-section {
  background-color: var(--bg-primary);
  border-top: var(--border-width) solid var(--color-border);
  padding: 120px 0;
  text-align: center;
}

.cta-box {
  max-width: 720px;
  margin: 0 auto;
}

.cta-box h2 {
  font-size: 3rem;
  margin-bottom: 24px;
}

.cta-box p {
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-size: 1.125rem;
}

/* --- Footer --- */
footer {
  background-color: var(--text-primary);
  color: #FFFFFF;
  border-top: var(--border-width) solid var(--color-border);
  padding: 60px 0 30px 0;
}

footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-logo-dot {
  width: 12px;
  height: 12px;
  background-color: var(--color-brand);
  border-radius: 50%;
  border: 1px solid #FFFFFF;
}

.footer-links {
  display: flex;
  gap: 32px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
  font-weight: 500;
}

.footer-links a {
  color: #CCCCCC;
}

.footer-links a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  width: 100%;
  border-top: 1px solid #2B3333;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.875rem;
  color: #8E9999;
}

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

/* --- Dialog / Modal Styles (Using modern top-layer guidelines) --- */
dialog.waitlist-dialog {
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 480px;
  width: calc(100% - 32px);
  box-shadow: var(--shadow-editorial);
  background-color: var(--bg-primary);
  margin: auto;
  
  /* Modern discrete transition settings */
  opacity: 0;
  transform: scale(0.9);
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.3s;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  transition-behavior: allow-discrete;
}

dialog.waitlist-dialog[open] {
  opacity: 1;
  transform: scale(1);

  @starting-style {
    opacity: 0;
    transform: scale(0.9);
  }
}

dialog.waitlist-dialog::backdrop {
  background-color: rgba(12, 15, 15, 0);
  transition:
    display 0.3s allow-discrete,
    overlay 0.3s allow-discrete,
    background-color 0.3s ease-out;
}

dialog.waitlist-dialog[open]::backdrop {
  background-color: rgba(12, 15, 15, 0.7);

  @starting-style {
    background-color: rgba(12, 15, 15, 0);
  }
}

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

.modal-header h3 {
  font-size: 1.75rem;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-primary);
  padding: 4px;
}

.btn-close:hover {
  color: var(--color-brand);
}

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 700;
  font-size: 0.875rem;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
  background-color: var(--bg-card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  border-color: var(--color-brand);
  box-shadow: 2px 2px 0px 0px var(--text-primary);
}

.error-msg {
  display: none;
  color: var(--color-brand);
  font-size: 0.8125rem;
  font-weight: 700;
}

/* User-invalid form style */
.form-control:user-invalid {
  border-color: var(--color-brand);
  background-color: #FFF2F0;
}

.form-control:user-invalid + .error-msg {
  display: block;
}

/* Modern styling: when input matches :user-invalid, we can bold its label or do style adjustments with :has() */
.form-group:has(.form-control:user-invalid) label {
  color: var(--color-brand);
}

.modal-desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 16px;
  text-align: center;
}

/* --- Success State within Modal --- */
.success-state {
  display: none;
  text-align: center;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
}

.success-icon {
  width: 64px;
  height: 64px;
  background-color: var(--color-accent-light);
  border: var(--border-width) solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 3px 3px 0 0 var(--text-primary);
}


/* --- Scroll Reveal Animations --- */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal-up {
      from {
        opacity: 0;
        transform: translateY(40px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    @keyframes fade-scale {
      from {
        opacity: 0.4;
        scale: 0.95;
      }
      to {
        opacity: 1;
        scale: 1;
      }
    }

    .reveal-scroll {
      animation: reveal-up auto linear backwards;
      animation-timeline: view();
      animation-range: entry 10% entry 40%;
    }
    
    .scale-scroll {
      animation: fade-scale auto linear backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 30%;
    }
  }
  
  /* Fallback selectors for JS-based Reveal */
  .reveal-fallback {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  .reveal-fallback.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog.waitlist-dialog {
    transform: none;
    transition-duration: 0.1s;
  }
  dialog.waitlist-dialog[open] {
    @starting-style {
      transform: none;
    }
  }
}
