/* =========================================================
   Special Glasses — Global Stylesheet
   Dark, cosmic, watercolor-inspired design system
   ========================================================= */

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

:root {
  /* Core palette */
  --color-bg: #07070a;
  --color-bg-alt: #0c0c12;
  --color-surface: #0f0f16;
  --color-surface-hover: #16161f;
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-hover: rgba(255, 255, 255, 0.12);

  /* Text */
  --color-text: #e8e6f0;
  --color-text-secondary: #8b87a0;
  --color-text-dim: #5e5a72;

  /* Brand accent: cosmic purple-blue (matches logo lenses) */
  --color-accent: #8b6ce7;
  --color-accent-hover: #a78bfa;
  --color-accent-glow: rgba(139, 108, 231, 0.25);
  --color-accent-subtle: rgba(139, 108, 231, 0.08);

  /* What They See: orange */
  --color-wts: #f59e0b;
  --color-wts-hover: #fbbf24;
  --color-wts-glow: rgba(245, 158, 11, 0.2);
  --color-wts-subtle: rgba(245, 158, 11, 0.08);

  /* KinSearch: teal/emerald */
  --color-ks: #34d399;
  --color-ks-glow: rgba(52, 211, 153, 0.15);
  --color-ks-subtle: rgba(52, 211, 153, 0.06);

  /* Watercolor splotch colors */
  --splotch-magenta: rgba(219, 39, 119, 0.12);
  --splotch-cyan: rgba(34, 211, 238, 0.1);
  --splotch-amber: rgba(245, 158, 11, 0.08);
  --splotch-violet: rgba(139, 92, 246, 0.12);

  /* Typography */
  --font-display: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Layout */
  --container-max: 1080px;
  --container-narrow: 720px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--color-accent);
  color: #fff;
}

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

/* === Container === */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 28px;
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* === Links === */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

a:hover {
  color: var(--color-accent-hover);
}

/* === Scroll-triggered Fade-in Animation === */
.fade-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-logo-img,
  .watercolor-orb,
  .feature-card,
  .btn {
    animation: none !important;
    transition: none !important;
  }
}

/* =========================================================
   WATERCOLOR DECORATIVE ELEMENTS
   Soft gradient blobs that evoke paint splotches
   ========================================================= */
.watercolor-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero {
  position: relative;
  padding: 64px 0 40px;
  text-align: center;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Cosmic background orbs */
.hero .watercolor-orb--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--splotch-violet), transparent 70%);
  top: -200px;
  right: -150px;
  animation: float-slow 20s ease-in-out infinite;
}

.hero .watercolor-orb--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--splotch-magenta), transparent 70%);
  bottom: -100px;
  left: -200px;
  animation: float-slow 25s ease-in-out infinite reverse;
}

.hero .watercolor-orb--3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--splotch-cyan), transparent 70%);
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  animation: float-slow 18s ease-in-out infinite;
}

@keyframes float-slow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

.hero-inner {
  position: relative;
  z-index: 1;
}

/* Logo image */
.hero-logo-img {
  width: 230px;
  height: auto;
  margin: 0 auto 24px;
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(139, 108, 231, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 60px rgba(139, 108, 231, 0.2);
  animation: logo-breathe 6s ease-in-out infinite;
}

@keyframes logo-breathe {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(139, 108, 231, 0.2),
      0 8px 32px rgba(0, 0, 0, 0.4),
      0 0 60px rgba(139, 108, 231, 0.2);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(139, 108, 231, 0.3),
      0 12px 48px rgba(0, 0, 0, 0.5),
      0 0 80px rgba(139, 108, 231, 0.35);
    transform: scale(1.015);
  }
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #e8e6f0 0%, #a78bfa 50%, #f0abfc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--color-text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* Scroll indicator */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--color-text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: scroll-bounce 2s ease-in-out infinite;
  z-index: 1;
}

.scroll-hint-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--color-text-dim), transparent);
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(8px); opacity: 0.5; }
}

/* =========================================================
   SECTION DIVIDER
   A soft gradient line between sections
   ========================================================= */
.section-divider {
  height: 1px;
  border: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-border-hover) 20%,
    var(--color-accent-glow) 50%,
    var(--color-border-hover) 80%,
    transparent 100%
  );
  margin: 0;
}

/* =========================================================
   PRODUCT SECTIONS
   ========================================================= */
.product {
  position: relative;
  padding: 120px 0;
  overflow: hidden;
}

/* What They See section */
.product--wts {
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 50%, var(--color-bg) 100%);
}

.product--wts .watercolor-orb--wts-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--splotch-amber), transparent 70%);
  top: -100px;
  right: -200px;
  animation: float-slow 22s ease-in-out infinite;
}

.product--wts .watercolor-orb--wts-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.06), transparent 70%);
  bottom: 10%;
  left: -150px;
  animation: float-slow 28s ease-in-out infinite reverse;
}

.product-inner {
  position: relative;
  z-index: 1;
}

.product-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 0;
}

.product-title-row .product-title {
  margin-bottom: 0;
}

.product-app-icon {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.product-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.badge--wts {
  background: var(--color-wts-subtle);
  color: var(--color-wts);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.badge--ks {
  background: var(--color-ks-subtle);
  color: var(--color-ks);
  border: 1px solid rgba(52, 211, 153, 0.12);
}

.product-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.product--wts .product-title {
  color: var(--color-wts);
}

.product-title-link {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s var(--ease-out), text-shadow 0.2s var(--ease-out);
}

.product-title-link:hover {
  color: inherit;
  opacity: 0.85;
  text-shadow: 0 0 24px var(--color-wts-glow);
}

.product-description {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  max-width: 640px;
  line-height: 1.8;
  margin-bottom: 20px;
}

.free-callout {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-wts);
  margin-bottom: 56px;
}

/* =========================================================
   FEATURE GRID (What They See)
   ========================================================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 56px;
}

.feature-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all 0.4s var(--ease-out);
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-wts), transparent);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.feature-card:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--color-border-hover);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--color-wts-subtle);
  color: var(--color-wts);
  transition: all 0.3s var(--ease-out);
}

.feature-card:hover .feature-icon {
  background: rgba(245, 158, 11, 0.15);
  box-shadow: 0 0 20px var(--color-wts-glow);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}

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

/* Privacy badge */
.privacy-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 40px;
  max-width: 640px;
}

.privacy-note-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-ks);
}

.privacy-note p {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.privacy-note strong {
  color: var(--color-text);
}

/* =========================================================
   BUTTONS
   ========================================================= */
.product-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-body);
  transition: all 0.3s var(--ease-out);
  border: none;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn--wts {
  background: var(--color-wts);
  color: #1a1000;
}

.btn--wts:hover {
  background: var(--color-wts-hover);
  color: #1a1000;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--color-wts-glow);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.btn--ghost:hover {
  color: var(--color-text);
  border-color: var(--color-border-hover);
  background: var(--color-surface);
}

.btn--accent {
  background: var(--color-accent);
  color: #fff;
}

.btn--accent:hover {
  background: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--color-accent-glow);
}

.app-store-badge {
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-store-badge:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.app-store-badge img {
  display: block;
  height: 48px;
  width: auto;
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* =========================================================
   KINSEARCH SECTION
   ========================================================= */
.product--ks {
  text-align: center;
  padding: 140px 0;
  background: var(--color-bg);
}

.product--ks .watercolor-orb--ks {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--color-ks-glow), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(100px);
  animation: float-slow 24s ease-in-out infinite;
}

.ks-inner {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
}

.product--ks .product-title {
  color: var(--color-ks);
  margin-bottom: 20px;
}

.ks-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--color-text-secondary);
  line-height: 1.75;
  margin-bottom: 40px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.ks-coming {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--color-text-dim);
  letter-spacing: 0.05em;
}

.ks-coming-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-ks);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  position: relative;
  border-top: 1px solid var(--color-border);
  padding: 56px 0 40px;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  transition: color 0.2s var(--ease-out);
}

.footer-links a:hover {
  color: var(--color-text);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.footer-tagline {
  font-size: 0.78rem;
  color: var(--color-text-dim);
  letter-spacing: 0.02em;
}

/* =========================================================
   LEGAL PAGES (Privacy, Terms)
   ========================================================= */
.legal-header {
  padding: 28px 0;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: rgba(7, 7, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  transition: color 0.2s var(--ease-out);
}

.back-link:hover {
  color: var(--color-text);
}

.legal-content {
  padding: 72px 0 80px;
}

.legal-content h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.legal-updated {
  font-size: 0.85rem;
  color: var(--color-text-dim);
  margin-bottom: 48px;
}

.legal-content h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 12px;
  color: var(--color-text);
}

.legal-content p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 14px;
  max-width: 680px;
}

.legal-content ul {
  margin: 10px 0 18px 20px;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  max-width: 680px;
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-content li strong {
  color: var(--color-text);
}

.legal-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: rgba(139, 108, 231, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s var(--ease-out);
}

.legal-content a:hover {
  text-decoration-color: var(--color-accent);
}

/* =========================================================
   CONTACT PAGE
   ========================================================= */
.contact-intro {
  margin-bottom: 12px;
}

.contact-intro p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 560px;
}

.contact-email-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--color-accent);
  margin-bottom: 40px;
}

.contact-email-link:hover {
  color: var(--color-accent-hover);
}

.contact-form-wrapper {
  margin-top: 32px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.4);
}

.contact-form-wrapper iframe {
  display: block;
  width: 100%;
  min-height: 800px;
  border: none;
}

/* =========================================================
   404 PAGE
   ========================================================= */
.not-found {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.not-found-inner {
  position: relative;
  z-index: 1;
}

.not-found-code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 15vw, 10rem);
  font-weight: 700;
  background: linear-gradient(135deg, rgba(139, 108, 231, 0.2), rgba(219, 39, 119, 0.15));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 16px;
}

.not-found p {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  margin-bottom: 36px;
}

.not-found .watercolor-orb {
  filter: blur(100px);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
  .hero {
    padding: 48px 0 32px;
  }

  .hero-logo-img {
    width: 180px;
    margin-bottom: 18px;
  }

  .product {
    padding: 80px 0;
  }

  .product--ks {
    padding: 100px 0;
  }

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

  .feature-card {
    padding: 24px 22px;
  }

  .feature-card:hover {
    transform: none;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 16px 24px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .scroll-hint {
    display: none;
  }

  .product-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .privacy-note {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 20px;
  }

  .hero-logo-img {
    width: 150px;
  }

  .product-description {
    font-size: 1rem;
  }
}
