/* ========================================
   Lakefrog Landing Page — Full Redesign
   ======================================== */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
body { line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, picture, video, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
a { color: inherit; }

/* --- Tokens --- */
:root {
  --bg: #1a1d2b;
  --bg-elevated: #222538;
  --bg-card: #272b42;
  --bg-card-hover: #303554;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);

  --text: #eaeaee;
  --text-muted: #7c7e8e;
  --text-dim: #4a4c5a;

  --brand: #3d8b83;
  --brand-light: #5ec4b8;
  --accent: #f5a623;
  --accent-warm: #e8734a;
  --accent-pink: #e84a8a;

  --ff-display: 'Space Grotesk', system-ui, sans-serif;
  --ff-body: 'Inter', system-ui, sans-serif;

  --fs-hero: clamp(2.8rem, 2rem + 4vw, 5.5rem);
  --fs-h2: clamp(2rem, 1.2rem + 3.5vw, 4rem);
  --fs-h3: clamp(1.15rem, 1rem + 0.5vw, 1.4rem);
  --fs-body: clamp(0.95rem, 0.88rem + 0.35vw, 1.15rem);
  --fs-small: clamp(0.8rem, 0.75rem + 0.2vw, 0.9rem);

  --space-section: clamp(5rem, 4rem + 6vw, 12rem);
  --max-w: 1140px;
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
}

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* --- Scroll Progress Bar --- */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transform-origin: left;
  transform: scaleX(0);
  z-index: 200;
}

@supports (animation-timeline: scroll()) {
  .progress-bar {
    animation: grow-x linear;
    animation-timeline: scroll();
  }
  @keyframes grow-x {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
  }
}

/* --- Nav --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.2rem 2rem;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav.scrolled {
  background: rgba(26, 29, 43, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  padding: 0.7rem 2rem;
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.nav-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
}
.nav-name {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  transition: color 0.3s;
}
.nav-brand:hover .nav-name { color: var(--text); }

.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-link {
  text-decoration: none;
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  transition: color 0.3s;
}
.nav-link:hover { color: var(--text); }

@media (max-width: 480px) {
  .nav-links { gap: 1.2rem; }
  .nav-link { font-size: 0.78rem; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255,255,255,0.15);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-hover);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.04);
}

.btn-lg {
  padding: 0.9rem 2.2rem;
  font-size: 1rem;
}

.btn-small {
  display: block;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1;
  text-align: left;
  opacity: 0.7;
}
.btn-big {
  display: block;
  font-size: 1rem;
  line-height: 1.2;
  text-align: left;
}

/* ===== HERO CINEMATIC ===== */
.hero-cinematic {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-cinematic-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 6rem 2rem 4rem;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Scroll cue — mouse icon */
.hero-scroll-cue {
  margin-top: 2rem;
  opacity: 0.4;
}
.scroll-mouse {
  width: 24px; height: 38px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}
.scroll-wheel {
  width: 3px; height: 8px;
  background: var(--text-muted);
  border-radius: 2px;
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 2s ease-in-out infinite;
}
@keyframes scroll-wheel {
  0% { opacity: 1; top: 6px; }
  100% { opacity: 0; top: 20px; }
}

.cinematic-bg {
  position: absolute;
  inset: 0;
}
.cinematic-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.4;
  transform: scale(1.05);
}
.cinematic-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(26,29,43,0.3) 0%, rgba(26,29,43,0.6) 40%, rgba(26,29,43,0.85) 70%, var(--bg) 100%),
    linear-gradient(90deg, rgba(26,29,43,0.7) 0%, transparent 50%, rgba(26,29,43,0.7) 100%);
}

.cinematic-heading {
  font-family: var(--ff-display);
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  text-shadow: 0 4px 30px rgba(0,0,0,0.4);
}

.cinematic-text {
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  color: rgba(255,255,255,0.75);
  line-height: 1.8;
  max-width: 52ch;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
  padding: var(--space-section) 2rem;
}

.how-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(4rem, 3rem + 5vw, 8rem);
}

.how-step {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  position: relative;
}

@media (min-width: 768px) {
  .how-step {
    grid-template-columns: auto 1fr;
    gap: 4rem;
  }
  .how-step-reverse {
    direction: rtl;
  }
  .how-step-reverse > * {
    direction: ltr;
  }
}

.how-number {
  position: absolute;
  top: -1rem;
  font-family: var(--ff-display);
  font-size: clamp(5rem, 4rem + 5vw, 10rem);
  font-weight: 700;
  color: rgba(255,255,255,0.02);
  letter-spacing: -0.05em;
  line-height: 1;
  user-select: none;
  z-index: 0;
}

@media (min-width: 768px) {
  .how-number {
    top: -2rem;
    left: -1rem;
  }
  .how-step-reverse .how-number {
    left: auto;
    right: -1rem;
  }
}

.how-phone {
  position: relative;
  z-index: 1;
  justify-self: center;
}

.how-text {
  position: relative;
  z-index: 1;
}

.how-text h3 {
  font-family: var(--ff-display);
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.8rem;
  letter-spacing: -0.02em;
}

.how-text p {
  color: var(--text-muted);
  max-width: 42ch;
  line-height: 1.8;
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.1rem);
}

/* Phone Frame (reusable) */
.phone-frame {
  width: clamp(180px, 40vw, 260px);
  aspect-ratio: 9 / 19.5;
  background: #111;
  border-radius: 32px;
  padding: 6px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 24px 64px rgba(0,0,0,0.6),
    0 0 100px rgba(61,139,131,0.06);
  overflow: hidden;
  position: relative;
}
.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 26px;
}

/* ===== FEATURES ===== */
.features {
  padding: var(--space-section) 2rem;
}

.features-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-heading {
  font-family: var(--ff-display);
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 4rem);
}

.heading-label {
  display: block;
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-light);
  margin-bottom: 0.6rem;
}

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

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-card-lg {
    grid-column: span 2;
  }
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.4s, transform 0.4s;
}
.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.feature-card-img {
  width: 100%;
  max-height: 300px;
  overflow: hidden;
}
.feature-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.feature-card:hover .feature-card-img img {
  transform: scale(1.03);
}

.feature-card-body {
  padding: clamp(1.2rem, 1rem + 1vw, 2rem);
}

.feature-card-body h3 {
  font-family: var(--ff-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card-body p {
  color: var(--text-muted);
  font-size: var(--fs-small);
  line-height: 1.7;
}

.feature-emoji {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

.feature-card-lg .feature-card-body {
  padding: clamp(1.5rem, 1rem + 1.5vw, 2.5rem);
}
.feature-card-lg .feature-card-body h3 {
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem);
}
.feature-card-lg .feature-card-body p {
  font-size: var(--fs-body);
}

/* ===== SHOWCASE (SWIPE CAROUSEL) ===== */
.showcase {
  padding: var(--space-section) 0;
  overflow: hidden;
}

.showcase-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

.carousel {
  position: relative;
  padding: 2rem 0;
  margin: 0 -2rem;
  overflow: hidden;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.carousel.grabbing {
  cursor: grabbing;
}

.carousel-track {
  display: flex;
  gap: clamp(1rem, 0.5rem + 1.5vw, 2rem);
  padding: 0 calc(50% - clamp(100px, 22vw, 140px));
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
}
.carousel.dragging .carousel-track {
  transition: none;
}

.carousel-slide {
  flex-shrink: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 0.4;
  transform: scale(0.85);
}
.carousel-slide.active {
  opacity: 1;
  transform: scale(1);
}

.carousel-slide .phone-frame {
  width: clamp(200px, 44vw, 270px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 24px 64px rgba(0,0,0,0.5),
    0 0 80px rgba(61,139,131,0.06);
}

/* Nav */
.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.carousel-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-hover);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.carousel-btn:hover {
  border-color: rgba(255,255,255,0.3);
  color: var(--text);
  background: var(--bg-card-hover);
}

.carousel-dots {
  display: flex;
  gap: 6px;
}
.carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  cursor: pointer;
  padding: 0;
  transition: all 0.3s;
}
.carousel-dot.active {
  background: var(--brand-light);
  transform: scale(1.3);
}
.carousel-dot:hover:not(.active) {
  background: rgba(255,255,255,0.3);
}

/* ===== CTA BANNER ===== */
.cta-banner {
  padding: var(--space-section) 2rem;
}

.cta-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(3rem, 2rem + 3vw, 5rem) 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.cta-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(61,139,131,0.08), transparent 70%);
}

.cta-logo {
  width: clamp(160px, 30vw, 260px);
  position: relative;
  z-index: 1;
}

.cta-text {
  font-family: var(--ff-display);
  font-size: clamp(1.3rem, 1rem + 1.5vw, 2.2rem);
  font-weight: 600;
  position: relative;
  z-index: 1;
}

/* ===== STUDIO ===== */
.studio {
  padding: var(--space-section) 2rem;
  border-top: 1px solid var(--border);
}

.studio-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.studio-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.studio-logo {
  width: clamp(140px, 25vw, 220px);
  height: auto;
  opacity: 0.8;
}

.studio-text {
  font-size: clamp(1.05rem, 0.9rem + 0.8vw, 1.35rem);
  color: var(--text-muted);
  max-width: 50ch;
  line-height: 1.8;
}

.studio-email {
  display: inline-block;
  color: var(--brand-light);
  text-decoration: none;
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: var(--fs-body);
  padding: 0.5rem 1.5rem;
  border: 1px solid rgba(94,196,184,0.2);
  border-radius: 100px;
  transition: all 0.3s;
}
.studio-email:hover {
  color: var(--text);
  border-color: rgba(94,196,184,0.5);
  background: rgba(94,196,184,0.06);
}

/* ===== FOOTER ===== */
.footer {
  padding: 2rem;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}
.footer-icon {
  width: 24px; height: 24px;
  border-radius: 5px;
  opacity: 0.5;
}

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

/* ===== SCROLL REVEAL ===== */

/* CSS Scroll-Driven (modern) */
@supports (animation-timeline: view()) {
  .reveal {
    animation: reveal-up linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }
  @keyframes reveal-up {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* Fallback */
@supports not (animation-timeline: view()) {
  .reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered children */
.features-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.features-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.features-grid .reveal:nth-child(4) { transition-delay: 0.24s; }
.features-grid .reveal:nth-child(5) { transition-delay: 0.32s; }
.features-grid .reveal:nth-child(6) { transition-delay: 0.40s; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* ===== SELECTION ===== */
::selection {
  background: rgba(94,196,184,0.3);
  color: var(--text);
}
