/* ============================================
   SkinLock — Website Styles
   Design System: Warm luxury skincare aesthetic
   ============================================ */

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

:root {
  /* Brand Colors */
  --peach: #FBBDA1;
  --pink: #F5C6BC;
  --rose: #F8DDD6;
  --cream: #FDF9F7;
  --white: #FFFFFF;
  --accent: #C08B5C;
  --accent-light: #D4A574;
  --accent-soft: #E8CEBA;
  --text-primary: #2D2A26;
  --text-secondary: #9B958E;
  --success: #6BBF8A;
  --fire: #E5943A;

  /* Spacing */
  --section-padding: 100px 0;
  --container-width: 1120px;
  --radius: 20px;
  --radius-sm: 12px;
  --radius-pill: 100px;

  /* Fonts — system rounded to match iOS app */
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Rounded', 'SF Pro Display', 'Helvetica Neue', sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--cream);
}

body {
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; border: none; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography --- */
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
p  { font-size: 1.05rem; color: var(--text-secondary); line-height: 1.7; }

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 0 16px;
  background: transparent;
  transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
}

.nav.scrolled {
  background: #FFFFFF;
  box-shadow: 0 1px 20px rgba(192, 139, 92, 0.08);
  padding: calc(10px + env(safe-area-inset-top, 0px)) 0 10px;
}

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

.nav-logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo .logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link-how {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-link-how:hover {
  color: var(--accent);
}

.nav-cta {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--white);
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(192, 139, 92, 0.35);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 100px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--rose) 0%, transparent 70%);
  opacity: 0.5;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
  width: 100%;
}

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

.hero-content {
  text-align: left;
}

.hero h1 {
  max-width: 700px;
  margin: 0 0 20px;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 0 40px;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* App Store Badge */
.app-store-badge-link {
  display: inline-block;
  transition: transform 0.2s, opacity 0.2s;
}

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

.app-store-badge-link img {
  height: 52px;
  width: auto;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--white);
  padding: 16px 36px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1.05rem;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(192, 139, 92, 0.35);
}

.btn-secondary {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.2s;
}

.btn-secondary:hover {
  color: var(--accent);
}

/* --- Phone Mockup Carousel --- */
.hero-phone {
  width: 100%;
  max-width: 320px;
  margin: 0 0 0 auto;
  position: relative;
}

.phone-frame {
  width: 100%;
  background: var(--white);
  border-radius: 36px;
  padding: 12px;
  box-shadow:
    0 20px 60px rgba(45, 42, 38, 0.1),
    0 4px 20px rgba(192, 139, 92, 0.08);
  border: 1px solid rgba(248, 221, 214, 0.5);
}

.phone-carousel {
  width: 100%;
  position: relative;
  aspect-ratio: 390 / 844;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--cream) 0%, var(--rose) 100%);
}

.phone-carousel .phone-screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  transform: translate3d(0, 0, 0);
}

.phone-carousel .phone-screen.active {
  opacity: 1;
}

.phone-carousel .phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 26px;
}

/* Caption track below phone */
.phone-caption-track {
  position: relative;
  height: 32px;
  margin-top: 16px;
  text-align: center;
}

.phone-caption {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-caption.active {
  opacity: 1;
}

/* --- Problem Section --- */
.problem {
  padding: var(--section-padding);
}

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

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

.problem-content p {
  margin-bottom: 28px;
}

.stat-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-card {
  background: var(--white);
  border: 1px solid rgba(248, 221, 214, 0.4);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 2px 12px rgba(45, 42, 38, 0.04);
  transition: transform 0.3s;
}

.stat-card:hover {
  transform: translateY(-3px);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.peach,
.stat-icon.accent,
.stat-icon.fire {
  background: rgba(192, 139, 92, 0.08);
  color: var(--accent);
}

.stat-card h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}

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

/* --- How It Works --- */
.how-it-works {
  padding: var(--section-padding);
  background: var(--white);
}

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

.section-header p {
  margin-top: 12px;
}

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

.step-card {
  text-align: center;
  padding: 40px 28px;
  border-radius: var(--radius);
  background: var(--cream);
  border: 1px solid rgba(248, 221, 214, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}

.step-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(192, 139, 92, 0.1);
}

.step-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(192, 139, 92, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--accent);
}

.step-card h3 {
  margin-bottom: 10px;
  color: var(--text-primary);
}

.step-card p {
  font-size: 0.95rem;
}

/* --- Features Section (Bento Grid) --- */
.features {
  padding: var(--section-padding);
}

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

.bento-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px;
  border: 1px solid rgba(248, 221, 214, 0.3);
  box-shadow: 0 2px 12px rgba(45, 42, 38, 0.03);
  transition: transform 0.3s, box-shadow 0.3s;
}

.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(192, 139, 92, 0.1);
}

.bento-card.span-2 {
  grid-column: span 2;
}

.bento-card.highlight {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border: none;
}

.bento-card.highlight h3,
.bento-card.highlight p {
  color: var(--white);
}

.bento-card.highlight .bento-icon {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.bento-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(192, 139, 92, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 20px;
}

.bento-card h3 {
  margin-bottom: 8px;
}

.bento-card p {
  font-size: 0.95rem;
}

/* --- Testimonials --- */
.testimonials {
  padding: var(--section-padding);
  background: var(--white);
}

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

.testimonial-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid rgba(248, 221, 214, 0.3);
}

.testimonial-stars {
  color: var(--fire);
  letter-spacing: 2px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.testimonial-card blockquote {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.6;
  font-style: normal;
  margin-bottom: 20px;
}

.testimonial-author {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* --- Testimonial Dots (mobile only) --- */
.testimonial-dots {
  display: none;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.testimonial-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-soft);
  transition: background 0.3s, transform 0.3s;
}

.testimonial-dots .dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

/* --- CTA Section --- */
.cta {
  padding: var(--section-padding);
  text-align: center;
}

.cta-box {
  background: var(--white);
  border: 1px solid rgba(248, 221, 214, 0.3);
  border-radius: var(--radius);
  padding: 80px 40px;
  box-shadow: 0 2px 12px rgba(45, 42, 38, 0.04);
}

.cta-box h2 {
  margin-bottom: 16px;
}

.cta-box p {
  max-width: 480px;
  margin: 0 auto 36px;
}

.cta-note {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 16px;
}

/* --- Footer --- */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--rose);
}

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

.footer-brand {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

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

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

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

/* --- Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

/* --- Legal Pages --- */
.legal {
  padding: 140px 0 80px;
}

.legal-content {
  max-width: 720px;
  margin: 0 auto;
}

.legal-content h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.legal-content .legal-date {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 40px;
}

.legal-content h2 {
  font-size: 1.3rem;
  margin-top: 36px;
  margin-bottom: 12px;
}

.legal-content p {
  margin-bottom: 16px;
  color: var(--text-primary);
  font-size: 1rem;
}

.legal-content ul {
  margin: 0 0 16px 20px;
  color: var(--text-primary);
}

.legal-content ul li {
  margin-bottom: 8px;
  font-size: 1rem;
  line-height: 1.6;
}

.legal-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

/* --- Responsive --- */
@media (max-width: 900px) {
  .nav {
    background: #FFFFFF;
  }

  .nav-link-how {
    display: none;
  }

  /* Hero: full first viewport, CTA at bottom */
  .hero {
    min-height: auto;
    display: block;
    padding: 0;
  }

  .hero-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .hero-content {
    min-height: 100dvh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(60px + env(safe-area-inset-top, 0px)) 0 40px;
  }

  .hero h1 {
    margin: 0 auto 20px;
  }

  .hero-subtitle {
    margin: 0 auto 32px;
  }

  .hero-cta-group {
    justify-content: center;
  }

  /* Phone mockup: prominent but elegant */
  .hero-phone {
    max-width: 260px;
    margin: 0 auto;
    padding: 20px 0 48px;
  }

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

  .steps-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Testimonials: auto-swipe carousel */
  .testimonials-grid {
    position: relative;
    display: block;
    max-width: none;
    overflow: hidden;
  }

  .testimonial-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0 !important;
    transform: translateX(20px) !important;
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
  }

  .testimonial-card.active {
    position: relative;
    opacity: 1 !important;
    transform: translateX(0) !important;
    pointer-events: auto;
  }

  .testimonial-dots {
    display: flex;
  }
}

@media (max-width: 600px) {
  :root {
    --section-padding: 64px 0;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-card.span-2 {
    grid-column: span 1;
  }

  .cta-box {
    padding: 48px 24px;
  }

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

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