@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  --font-display: "Outfit", "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: "DM Sans", "Noto Sans", sans-serif;
  
  --color-white: #ffffff;
  --color-black: #1c1c1e;
  --color-blue-450: #5b76fe;
  --color-blue-hover: #4a65eb;
  --color-success: #00b473;
  --color-border: #c7cad5;
  --color-slate: #555a6a;
  
  --pastel-coral: #ffc6c6;
  --pastel-teal: #c3faf5;
  --pastel-orange: #ffe6cd;
  --pastel-rose: #ffd8f4;
  
  --shadow-ring: rgb(224, 226, 232) 0px 0px 0px 1px;
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-elevated: 0 20px 60px -15px rgba(91, 118, 254, 0.12);
  
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
}

body {
  font-family: var(--font-body);
  color: var(--color-black);
  background-color: var(--color-white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
}

h1 { letter-spacing: -0.03em; }
h2 { letter-spacing: -0.025em; }
h3 { letter-spacing: -0.015em; }

.font-display {
  font-family: var(--font-display);
}

/* ---- Noise Texture Overlay ---- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
}

/* ---- Scroll Reveal System ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(4px);
  transition: opacity 0.9s var(--ease-out-expo),
              transform 0.9s var(--ease-out-expo),
              filter 0.9s var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

/* ---- Custom Utilities ---- */
.shadow-ring {
  box-shadow: var(--shadow-ring);
}

.shadow-premium {
  box-shadow: var(--shadow-ring), var(--shadow-soft);
}

.shadow-elevated {
  box-shadow: var(--shadow-elevated);
}

.bg-blue-450 {
  background-color: var(--color-blue-450);
}

.text-blue-450 {
  color: var(--color-blue-450);
}

.hover\:bg-blue-hover:hover {
  background-color: var(--color-blue-hover);
}

/* ---- Gradients and Backgrounds ---- */
.bg-gradient-hero {
  background: 
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(91, 118, 254, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(195, 250, 245, 0.15) 0%, transparent 60%),
    var(--color-white);
}

.bg-pastel-coral { background-color: var(--pastel-coral); }
.bg-pastel-teal { background-color: var(--pastel-teal); }
.bg-pastel-orange { background-color: var(--pastel-orange); }
.bg-pastel-rose { background-color: var(--pastel-rose); }

/* ---- Floating Island Nav ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0.75rem 1rem;
}

.navbar-inner {
  max-width: 56rem;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-radius: 9999px;
  padding: 0.625rem 1.25rem;
  box-shadow: 
    0 0 0 1px rgba(224, 226, 232, 0.5),
    0 4px 24px -4px rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: box-shadow 0.5s var(--ease-spring),
              background 0.5s var(--ease-spring);
}

.navbar.scrolled .navbar-inner {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 
    0 0 0 1px rgba(224, 226, 232, 0.7),
    0 8px 32px -8px rgba(0, 0, 0, 0.08);
}

.nav-link {
  position: relative;
  padding: 0.25rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--color-blue-450);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.35s var(--ease-out-expo);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

/* ---- Mobile Menu ---- */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  position: relative;
  z-index: 60;
}

.mobile-menu-btn span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--color-black);
  border-radius: 1px;
  transition: transform 0.4s var(--ease-spring), opacity 0.3s ease;
  position: absolute;
}

.mobile-menu-btn span:nth-child(1) { transform: translateY(-5px); }
.mobile-menu-btn span:nth-child(2) { transform: translateY(0); }
.mobile-menu-btn span:nth-child(3) { transform: translateY(5px); }

.mobile-menu-btn.open span:nth-child(1) { transform: rotate(45deg); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) { transform: rotate(-45deg); }

@media (max-width: 767px) {
  .mobile-menu-btn { display: flex; }
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-spring);
}

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

.mobile-overlay .mobile-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 2rem;
}

.mobile-overlay .mobile-link-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}

.mobile-overlay.open .mobile-link-item:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
.mobile-overlay.open .mobile-link-item:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.18s; }
.mobile-overlay.open .mobile-link-item:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.26s; }
.mobile-overlay.open .mobile-link-item:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.34s; }
.mobile-overlay.open .mobile-link-item:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.42s; }

.mobile-overlay .mobile-link-item a {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-black);
  letter-spacing: -0.02em;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 9999px;
  font-weight: 500;
  transition: 
    transform 0.25s var(--ease-out-quart),
    box-shadow 0.35s var(--ease-out-expo),
    background-color 0.25s ease;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-display);
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background-color: var(--color-blue-450);
  color: white;
  position: relative;
}

.btn-primary:hover {
  background-color: var(--color-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -4px rgba(91, 118, 254, 0.35);
}

.btn-primary .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.18);
  transition: transform 0.35s var(--ease-out-expo),
              background 0.25s ease;
}

.btn-primary:hover .btn-icon {
  transform: translate(2px, -1px) scale(1.05);
  background: rgba(255, 255, 255, 0.28);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-black);
  box-shadow: var(--shadow-ring);
}

.btn-outline:hover {
  background-color: #f8f9fa;
  transform: translateY(-1px);
}

/* ---- Layout Utilities ---- */
.section-padding {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

@media (min-width: 768px) {
  .section-padding {
    padding-top: 8rem;
    padding-bottom: 8rem;
  }
}

@media (min-width: 1024px) {
  .section-padding {
    padding-top: 10rem;
    padding-bottom: 10rem;
  }
}

/* ---- Double-Bezel Cards ---- */
.bezel {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 2rem;
  padding: 6px;
  box-shadow: var(--shadow-ring);
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}

.bezel:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-ring), 0 16px 40px -12px rgba(0, 0, 0, 0.06);
}

.bezel-inner {
  background: white;
  border-radius: calc(2rem - 6px);
  padding: 2rem;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6);
  height: 100%;
}

/* ---- Standard Cards ---- */
.card {
  background: white;
  border-radius: 24px;
  box-shadow: var(--shadow-ring);
  padding: 2rem;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-ring), 0 16px 40px -12px rgba(0, 0, 0, 0.06);
}

.icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.feature-icon-sprite {
  background-image: url('assets/feature-icons.png');
  background-size: 200% 200%;
  background-repeat: no-repeat;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-ring);
  background-color: white;
}

.icon-tl { background-position: 0% 0%; }
.icon-tr { background-position: 100% 0%; }
.icon-bl { background-position: 0% 100%; }
.icon-br { background-position: 100% 100%; }

/* ---- Hero Image Container ---- */
.hero-image-container {
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: 
    0 0 0 1px rgba(224, 226, 232, 0.4),
    0 24px 48px -12px rgba(0, 0, 0, 0.08);
  position: relative;
}

.hero-image-container::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 2rem;
  padding: 6px;
  background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, transparent 50%, rgba(91, 118, 254, 0.08) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

/* ---- Bento Grid ---- */
.bento-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

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

@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: 1fr 1fr 1.4fr;
    grid-template-rows: auto auto;
  }

  .bento-grid .card:nth-child(1) {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
  }

  .bento-grid .card:nth-child(4) {
    grid-column: 2 / -1;
  }
}

/* ---- Stat Counter ---- */
.stat-number {
  font-variant-numeric: tabular-nums;
}

/* ---- Testimonials ---- */
.testimonial-block {
  position: relative;
  padding: 2.5rem;
  border-radius: 24px;
  transition: transform 0.4s var(--ease-out-expo);
}

.testimonial-block:hover {
  transform: translateY(-3px);
}

.testimonial-block .quote-mark {
  font-size: 4rem;
  line-height: 1;
  opacity: 0.12;
  font-family: var(--font-display);
  font-weight: 700;
  position: absolute;
  top: 1rem;
  left: 2rem;
}

.testimonial-featured {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 3rem;
  border-radius: 24px;
  transition: transform 0.4s var(--ease-out-expo);
}

.testimonial-featured:hover {
  transform: translateY(-3px);
}

@media (min-width: 768px) {
  .testimonial-featured {
    flex-direction: row;
    align-items: center;
    gap: 3rem;
  }
}

.testimonial-featured .testimonial-portrait {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.1);
}

/* ---- Step Cards ---- */
.step-card {
  text-align: left;
  padding: 2rem;
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow-ring);
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}

.step-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-ring), 0 16px 40px -12px rgba(0, 0, 0, 0.06);
}

.step-card .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--color-blue-450);
  color: white;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  transition: transform 0.3s var(--ease-out-expo);
}

.step-card:hover .step-number {
  transform: scale(1.08);
}

/* ---- Waitlist CTA ---- */
.cta-section {
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 60% 80% at 20% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 70% at 80% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.cta-input {
  transition: box-shadow 0.3s var(--ease-out-expo), transform 0.3s var(--ease-out-expo);
}

.cta-input:focus {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25);
  transform: scale(1.01);
}

.cta-btn {
  transition: 
    transform 0.25s var(--ease-out-quart),
    box-shadow 0.35s var(--ease-out-expo),
    background-color 0.25s ease;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.15);
}

.cta-btn:active {
  transform: scale(0.97);
}

/* ---- Success State ---- */
#waitlist-success {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}

#waitlist-success.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ---- Checkmark Animation ---- */
@keyframes checkmark-draw {
  0% { stroke-dashoffset: 24; }
  100% { stroke-dashoffset: 0; }
}

.success-checkmark {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: checkmark-draw 0.6s var(--ease-out-expo) 0.2s forwards;
}

/* ---- Custom Scrollbar (Webkit) ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* ---- Kensho Interstitial ---- */
.kensho-section {
  position: relative;
  padding-top: 8rem;
  padding-bottom: 8rem;
  background: var(--color-white);
  overflow: hidden;
}

@media (min-width: 768px) {
  .kensho-section {
    padding-top: 10rem;
    padding-bottom: 10rem;
  }
}

.kensho-glyph {
  font-size: clamp(5rem, 12vw, 9rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #1c1c1e 0%, #555a6a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.kensho-divider {
  width: 48px;
  height: 2px;
  background: var(--color-blue-450);
  border-radius: 1px;
  opacity: 0.6;
}

.kensho-phonetic {
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #555a6a;
  font-weight: 500;
}

.kensho-body {
  max-width: 32rem;
  line-height: 1.75;
}

.kensho-body strong {
  color: var(--color-blue-450);
  font-weight: 600;
}

.kensho-accent-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91, 118, 254, 0.15) 30%, rgba(91, 118, 254, 0.15) 70%, transparent);
}
