/* ============================================
   PEEK PLACE — Design System & Styles
   Inspired by Duolingo's playful, animated design
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

/* --- CSS Variables / Design Tokens --- */
:root {
  --teal: #2EC4B6;
  --teal-dark: #1A9E92;
  --teal-light: #E8FBF9;
  --navy: #1B2838;
  --navy-light: #243447;
  --orange: #F5A623;
  --orange-dark: #D4901A;
  --white: #FFFFFF;
  --light-gray: #F5F7FA;
  --mid-gray: #E2E8F0;
  --text-dark: #1B2838;
  --text-muted: #64748B;
  --success: #4ADE80;
  --purple: #8B5CF6;
  --pink: #EC4899;

  --font-main: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 50px;
  --shadow-sm: 0 2px 8px rgba(27, 40, 56, 0.08);
  --shadow-md: 0 4px 20px rgba(27, 40, 56, 0.12);
  --shadow-lg: 0 8px 40px rgba(27, 40, 56, 0.16);
  --shadow-btn: 0 4px 0 var(--teal-dark);
  --shadow-btn-orange: 0 4px 0 var(--orange-dark);
  --shadow-btn-navy: 0 4px 0 #0F1B27;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- Preloader --- */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--navy);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

#preloader .spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

#preloader p {
  color: var(--white);
  font-weight: 700;
  letter-spacing: 1px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
  font-weight: 800;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

.subtitle {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--orange);
}

.text-muted {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

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

section {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

/* --- 3D Press Buttons (Duolingo-style) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 36px;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  user-select: none;
}

.btn-primary {
  background: var(--teal);
  color: var(--white);
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-primary:active {
  box-shadow: none;
  transform: translateY(3px);
}

.btn-orange {
  background: var(--orange);
  color: var(--white);
  box-shadow: var(--shadow-btn-orange);
}

.btn-orange:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-orange:active {
  box-shadow: none;
  transform: translateY(3px);
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow-btn-navy);
}

.btn-navy:hover {
  filter: brightness(1.3);
  transform: translateY(-1px);
}

.btn-navy:active {
  box-shadow: none;
  transform: translateY(3px);
}

.btn-outline {
  background: transparent;
  color: var(--teal);
  border: 3px solid var(--teal);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--teal);
  color: var(--white);
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all 0.4s ease;
  background: transparent;
}

.navbar.scrolled {
  background: rgba(27, 40, 56, 0.95);
  backdrop-filter: blur(20px);
  padding: 10px 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--white);
}

.nav-logo img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  font-size: 0.95rem;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--orange);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

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

.nav-cta {
  padding: 10px 24px !important;
  font-size: 0.85rem !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.nav-toggle span {
  width: 26px;
  height: 3px;
  background: var(--white);
  border-radius: 3px;
  transition: var(--transition);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--navy) 0%, #0F3460 50%, var(--teal-dark) 100%);
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(circle, rgba(46, 196, 182, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  position: relative;
  z-index: 2;
}

.hero-content {
  color: var(--white);
}

.hero-content .subtitle {
  color: var(--orange);
  margin-bottom: 16px;
}

.hero-content h1 {
  margin-bottom: 20px;
  line-height: 1.15;
}

.hero-content h1 .highlight {
  color: var(--teal);
  position: relative;
  display: inline-block;
}

.hero-content p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 36px;
  max-width: 480px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

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

.hero-image img,
.hero-image video {
  max-width: 280px;
  width: 100%;
  filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.3));
  animation: heroFloat 4s ease-in-out infinite;
  border-radius: var(--radius-lg);
  background: transparent;
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.hero-bg-shapes .shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.07;
  background: var(--teal);
}

.hero-bg-shapes .shape:nth-child(1) {
  width: 300px;
  height: 300px;
  top: 10%;
  left: -5%;
}

.hero-bg-shapes .shape:nth-child(2) {
  width: 200px;
  height: 200px;
  bottom: 15%;
  right: 5%;
  background: var(--orange);
}

.hero-bg-shapes .shape:nth-child(3) {
  width: 150px;
  height: 150px;
  top: 60%;
  left: 40%;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: scrollBounce 2s ease infinite;
}

.scroll-indicator .arrow {
  width: 24px;
  height: 24px;
  border-right: 3px solid rgba(255, 255, 255, 0.5);
  border-bottom: 3px solid rgba(255, 255, 255, 0.5);
  transform: rotate(45deg);
}

/* --- Features Section (3 cards) --- */
.features {
  background: var(--white);
  padding: 120px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header .subtitle {
  margin-bottom: 12px;
  display: block;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--white);
  border: 2px solid var(--mid-gray);
  border-radius: var(--radius-md);
  padding: 40px 30px;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  transition: height 0.4s ease;
}

.feature-card:nth-child(1)::before {
  background: var(--teal);
}

.feature-card:nth-child(3)::before {
  background: var(--orange);
}

.feature-card:nth-child(2)::before {
  background: var(--purple);
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: transparent;
  box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
  height: 6px;
}

.feature-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 2rem;
}

.feature-card:nth-child(1) .feature-icon {
  background: var(--teal-light);
}

.feature-card:nth-child(2) .feature-icon {
  background: #FFF4E0;
}

.feature-card:nth-child(3) .feature-icon {
  background: #F3EEFF;
}

.feature-card h3 {
  margin-bottom: 12px;
  font-size: 1.3rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- Split Sections (alternating layout) --- */
.split-section .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
}

.split-content .subtitle {
  margin-bottom: 12px;
  display: block;
}

.split-content h2 {
  margin-bottom: 20px;
}

.split-content p {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.split-content .feature-list {
  margin-bottom: 32px;
}

.split-content .feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.split-content .feature-list li .check {
  width: 24px;
  height: 24px;
  min-width: 24px;
  background: var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.75rem;
  margin-top: 2px;
}

.split-image {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.split-image img,
.split-image video {
  max-width: 400px;
  width: 100%;
  filter: drop-shadow(0 16px 48px rgba(0, 0, 0, 0.15));
  border-radius: var(--radius-lg);
  background: transparent;
}

.split-image .blob {
  position: absolute;
  width: 110%;
  height: 110%;
  border-radius: 50%;
  z-index: -1;
  opacity: 0.08;
}

/* Section-specific backgrounds */
.bg-light {
  background: var(--light-gray);
}

.bg-teal-light {
  background: linear-gradient(135deg, #E8FBF9 0%, #F0FFF4 100%);
}

.bg-white {
  background: var(--white);
}

/* Reverse layout for alternating pattern */
.split-reverse .container {
  direction: rtl;
}

.split-reverse .container>* {
  direction: ltr;
}

/* --- Support/CTA Section --- */
.support-section {
  background: linear-gradient(135deg, var(--navy) 0%, #0F3460 100%);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.support-section::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -20%;
  width: 140%;
  height: 180%;
  background: radial-gradient(ellipse, rgba(46, 196, 182, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.support-section .container {
  position: relative;
  z-index: 2;
}

img.support-mascot,
video.support-mascot {
  max-width: 280px;
  margin: 0 auto 40px;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
  border-radius: var(--radius-lg);
  background: transparent;
}

.support-section h2 {
  margin-bottom: 16px;
}

.support-section p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.1rem;
  max-width: 550px;
  margin: 0 auto 36px;
}

.support-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Particle canvas for support section */
.particles-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* --- Team Section --- */
.team-section {
  background: var(--light-gray);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.team-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 40px 28px;
  text-align: center;
  border: 2px solid var(--mid-gray);
  transition: all 0.4s ease;
}

.team-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal);
}

.team-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--white);
  font-weight: 900;
}

.team-card h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.team-card .role {
  color: var(--teal);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.team-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --- Social / CTA Footer --- */
.social-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  text-align: center;
  padding: 80px 0;
}

.social-section h2 {
  margin-bottom: 12px;
}

.social-section p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 36px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
}

.social-link {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--white);
  transition: all 0.3s ease;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
}

.social-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.social-link:active {
  transform: translateY(2px);
  box-shadow: none;
}

.social-link.facebook {
  background: #1877F2;
}

.social-link.instagram {
  background: linear-gradient(135deg, #F58529, #DD2A7B, #8134AF);
}

.social-link.tiktok {
  background: #010101;
}

.social-link.snapchat {
  background: #FFFC00;
  color: #000;
}

img.social-mascot,
video.social-mascot {
  max-width: 180px;
  margin: 0 auto 20px;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.4));
  border-radius: var(--radius-lg);
  background: transparent;
}

/* --- Footer --- */
.footer {
  background: #0D1B2A;
  color: rgba(255, 255, 255, 0.6);
  padding: 40px 0;
  text-align: center;
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--white);
  font-size: 1.1rem;
}

.footer-logo img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 0.85rem;
}

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

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

/* Reveal from bottom */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Reveal from left */
.reveal-left {
  opacity: 0;
  transform: translateX(-80px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

/* Reveal from right */
.reveal-right {
  opacity: 0;
  transform: translateX(80px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* Reveal scale */
.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays for grids */
.stagger-1 {
  transition-delay: 0ms;
}

.stagger-2 {
  transition-delay: 150ms;
}

.stagger-3 {
  transition-delay: 300ms;
}

.stagger-4 {
  transition-delay: 450ms;
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

@keyframes heroFloat {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }
}

@keyframes scrollBounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

@keyframes gentleFloat {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  33% {
    transform: translateY(-12px) rotate(1deg);
  }

  66% {
    transform: translateY(4px) rotate(-1deg);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.float-anim {
  animation: gentleFloat 5s ease-in-out infinite;
}

.pulse-anim {
  animation: pulse 2.5s ease-in-out infinite;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero {
    padding-top: 120px;
  }

  .hero-image img {
    max-width: 320px;
  }

  .split-section .container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .split-reverse .container {
    direction: ltr;
  }

  .split-image img {
    max-width: 320px;
    margin: 0 auto;
  }

  .split-image {
    order: -1;
  }

  .split-content .feature-list {
    display: inline-block;
    text-align: left;
  }
}

@media (max-width: 768px) {
  section {
    padding: 70px 0;
  }

  .features-grid,
  .team-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: var(--navy);
    flex-direction: column;
    padding: 100px 40px 40px;
    gap: 24px;
    transition: right 0.4s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  .hero-image img {
    max-width: 260px;
  }

  .support-mascot {
    max-width: 200px;
  }

  .social-link {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    padding: 14px 28px;
    font-size: 0.9rem;
  }

  .support-buttons {
    flex-direction: column;
    align-items: center;
  }
}

/* --- Utility for reduced motion --- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}