/* ====================
   FlipYear Official Website
   Design inspired by MindMarket
   ==================== */

/* --------------------
   CSS Variables
   -------------------- */
:root {
  /* Primary Colors - Lime Green Theme */
  --lime: #C8E14B;
  --lime-light: #D4E96F;
  --lime-dark: #A5C42A;
  --lime-bg: #F7FBE8;

  /* Accent Colors */
  --coral: #FF6B6B;
  --coral-light: #FF8F8F;
  --sky: #4ECDC4;
  --purple: #9B5DE5;
  --pink: #F15BB5;
  --orange: #FF9F43;

  /* Neutrals */
  --white: #FFFFFF;
  --bg-cream: #FFFEF9;
  --text-dark: #1A1A1A;
  --text-body: #444444;
  --text-muted: #888888;
  --border: #E5E5E5;

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;
  --space-3xl: 8rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --shadow-lime: 0 10px 40px rgba(200,225,75,0.3);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* --------------------
   Typography
   -------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-dark);
  line-height: 1.2;
  font-weight: 400;
}

h1 { font-size: clamp(3rem, 8vw, 6rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h4 { font-size: 1.25rem; }

.highlight {
  background: var(--lime);
  padding: 0 12px;
  border-radius: 6px;
  color: var(--text-dark);
}

.text-lime { color: var(--lime); }

/* --------------------
   Layout
   -------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* --------------------
   Buttons
   -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: var(--transition-normal);
  height: 56px;
}

.btn-lime {
  background: var(--lime);
  color: var(--text-dark);
}

.btn-lime:hover {
  background: var(--lime-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lime);
}

.btn-outline {
  background: transparent;
  color: var(--text-dark);
  border: 2px solid var(--text-dark);
}

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

/* App Store Badge */
.app-store-badge {
  display: inline-flex;
  align-items: center;
  transition: var(--transition-normal);
}

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

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

/* --------------------
   Header
   -------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,254,249,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-dark);
}

.logo-icon {
  width: 40px;
  height: 40px;
}

.nav {
  display: none;
  gap: var(--space-lg);
}

.nav a {
  font-weight: 500;
  color: var(--text-body);
}

.nav a:hover {
  color: var(--text-dark);
}

.header-cta {
  padding: 10px 20px;
  height: auto;
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
}

/* --------------------
   Hero Section
   -------------------- */
.hero {
  position: relative;
  padding: calc(72px + var(--space-3xl)) 0 var(--space-3xl);
  background: linear-gradient(180deg, var(--white) 0%, var(--bg-cream) 100%);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
  }
}

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

@media (min-width: 1024px) {
  .hero-content {
    text-align: left;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 8px 16px;
  background: var(--lime);
  color: var(--text-dark);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.hero-title {
  margin-bottom: var(--space-md);
}

.hero-title .line {
  display: block;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-body);
  max-width: 500px;
  margin-bottom: var(--space-lg);
}

@media (min-width: 1024px) {
  .hero-subtitle {
    margin-left: 0;
    margin-right: auto;
  }
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-cta {
    flex-direction: row;
    justify-content: flex-start;
  }
}

/* Hero Visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 500px;
}

@media (min-width: 1024px) {
  .hero-visual {
    min-height: 600px;
  }
}

.hero-illustration {
  width: 100%;
  max-width: 450px;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.1));
}

/* Floating Elements */
.floating-element {
  position: absolute;
  z-index: 1;
}

.floating-1 { top: 5%; left: -5%; }
.floating-2 { bottom: 5%; right: -10%; }
.floating-3 { top: 15%; right: 5%; }
.floating-4 { bottom: 25%; left: 0; }

.speech-bubble {
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}

.bubble-coral {
  background: var(--coral);
  color: var(--white);
}

.bubble-lime {
  background: var(--lime);
  color: var(--text-dark);
}

.float-shape {
  animation: float 6s ease-in-out infinite;
}

/* Hero Wave */
.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  line-height: 0;
}

.hero-wave svg {
  width: 100%;
  height: 80px;
}

/* --------------------
   Flowing Path Section
   -------------------- */
.flow-section {
  position: relative;
  padding: var(--space-3xl) 0;
  background: var(--lime-bg);
  overflow: hidden;
}

.flow-path-svg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  min-height: 2000px;
  pointer-events: none;
}

.flow-path {
  opacity: 0.5;
}

.flow-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
  position: relative;
  z-index: 2;
}

.flow-header p {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

/* Flow Steps */
.flow-step {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
  margin-bottom: var(--space-3xl);
  position: relative;
  z-index: 2;
}

@media (min-width: 768px) {
  .flow-step {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }

  .flow-step.reverse .flow-step-content {
    order: 2;
  }

  .flow-step.reverse .flow-step-visual {
    order: 1;
  }
}

.flow-step-content {
  padding: var(--space-lg);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--lime);
  color: var(--text-dark);
  font-family: var(--font-display);
  font-size: 1.5rem;
  border-radius: 50%;
  margin-bottom: var(--space-md);
}

.flow-step-content h3 {
  margin-bottom: var(--space-sm);
}

.flow-step-content p {
  color: var(--text-body);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.flow-step-visual {
  display: flex;
  justify-content: center;
}

.step-illustration {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* Flow Decorations */
.flow-decoration {
  position: absolute;
  z-index: 3;
  width: 150px;
  height: auto;
  pointer-events: none;
}

.decor-1 {
  top: 10%;
  right: -5%;
  transform: rotate(10deg);
}

.decor-2 {
  bottom: 10%;
  left: -5%;
  transform: scaleX(-1);
}

@media (max-width: 767px) {
  .flow-decoration {
    display: none;
  }
}

/* --------------------
   Statistics Section
   -------------------- */
.stats-section {
  padding: var(--space-3xl) 0;
  background: var(--white);
}

.stats-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

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

.stat-item {
  text-align: center;
  padding: var(--space-lg);
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  color: var(--text-dark);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-number span {
  color: var(--lime);
}

.stat-label {
  font-size: 0.9375rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --------------------
   Features Section
   -------------------- */
.features-section {
  padding: var(--space-3xl) 0;
  background: var(--bg-cream);
}

.features-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.features-header p {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

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

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--white);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  transition: var(--transition-normal);
  border: 1px solid var(--border);
}

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

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.icon-lime { background: rgba(200,225,75,0.2); color: var(--lime-dark); }
.icon-coral { background: rgba(255,107,107,0.15); color: var(--coral); }
.icon-sky { background: rgba(78,205,196,0.15); color: var(--sky); }
.icon-purple { background: rgba(155,93,229,0.15); color: var(--purple); }
.icon-orange { background: rgba(255,159,67,0.15); color: var(--orange); }
.icon-pink { background: rgba(241,91,181,0.15); color: var(--pink); }

.feature-card h4 {
  margin-bottom: var(--space-xs);
  font-family: var(--font-body);
  font-weight: 700;
}

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

/* --------------------
   Privacy Section
   -------------------- */
.privacy-section {
  position: relative;
  padding: var(--space-3xl) 0;
  background: var(--text-dark);
  color: var(--white);
  overflow: hidden;
}

.privacy-bg-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: var(--lime);
  top: -100px;
  right: -100px;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: var(--coral);
  bottom: -80px;
  left: -80px;
}

.privacy-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.privacy-section .privacy-content h2 {
  color: var(--white);
  margin-bottom: var(--space-md);
}

.privacy-section .privacy-content p {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--space-xl);
}

.privacy-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
}

.privacy-badge {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 12px 20px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.2);
}

.privacy-badge svg {
  width: 20px;
  height: 20px;
  stroke: var(--lime);
}

/* --------------------
   CTA Section
   -------------------- */
.cta-section {
  position: relative;
  padding: var(--space-3xl) 0;
  background: var(--lime);
  overflow: hidden;
}

.cta-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-content h2 {
  margin-bottom: var(--space-md);
}

.cta-content p {
  font-size: 1.125rem;
  color: var(--text-body);
  margin-bottom: var(--space-lg);
}

.cta-badge img {
  height: 60px;
}

.cta-decorations {
  position: absolute;
  bottom: -50px;
  right: 5%;
  z-index: 1;
  opacity: 0.3;
  pointer-events: none;
}

.cta-illustration {
  width: 300px;
  transform: rotate(-10deg);
}

@media (max-width: 767px) {
  .cta-decorations {
    display: none;
  }
}

/* --------------------
   Footer
   -------------------- */
.footer {
  background: var(--lime-dark);
  padding: var(--space-2xl) 0 var(--space-lg);
  color: var(--text-dark);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
  margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
}

.footer-tagline {
  color: rgba(26,26,26,0.7);
  font-size: 0.9375rem;
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-links a {
  font-weight: 500;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  opacity: 0.7;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(26,26,26,0.2);
}

.footer-bottom p {
  font-size: 0.875rem;
  color: rgba(26,26,26,0.6);
}

/* --------------------
   Animations
   -------------------- */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* Scroll Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animations */
.flow-step:nth-child(2) .animate-on-scroll { transition-delay: 0.1s; }
.flow-step:nth-child(3) .animate-on-scroll { transition-delay: 0.2s; }

.features-grid .feature-card:nth-child(1) { transition-delay: 0s; }
.features-grid .feature-card:nth-child(2) { transition-delay: 0.1s; }
.features-grid .feature-card:nth-child(3) { transition-delay: 0.2s; }
.features-grid .feature-card:nth-child(4) { transition-delay: 0.3s; }
.features-grid .feature-card:nth-child(5) { transition-delay: 0.4s; }
.features-grid .feature-card:nth-child(6) { transition-delay: 0.5s; }

/* --------------------
   3D Flip Book Animation
   -------------------- */
.flip-book-container {
  perspective: 2000px;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

.flip-book {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  transform-style: preserve-3d;
  transform: rotateY(-8deg) rotateX(5deg);
}

.book-cover {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--lime) 0%, var(--lime-dark) 100%);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-cover-inner {
  text-align: center;
  color: var(--text-dark);
}

.book-cover-title {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 8px;
}

.book-cover-year {
  font-size: 3rem;
  font-weight: 700;
}

.book-page {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transition: transform 1.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  backface-visibility: hidden;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  background: white;
}

.book-page.flipping {
  transform: rotateY(-180deg);
  z-index: 10;
}

.page-content {
  width: 100%;
  height: 100%;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #FFFEF8 0%, #FFF 100%);
}

.page-photo {
  width: 85%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
  box-shadow: var(--shadow-sm);
}

.page-date {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.book-spine {
  position: absolute;
  left: 0;
  top: 0;
  width: 15px;
  height: 100%;
  background: linear-gradient(90deg, var(--lime-dark) 0%, var(--lime) 100%);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  transform: rotateY(-90deg) translateX(-7.5px);
  transform-origin: right center;
}

/* Hero Book Visual Container */
.hero-book-visual {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 380px;
  z-index: 1;
}

/* CTA Phone Mockup */
.cta-mockup {
  max-width: 280px;
  margin: var(--space-xl) auto 0;
  position: relative;
}

.cta-mockup-img {
  background: white;
  border-radius: 40px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
}

.cta-mockup-screen {
  background: linear-gradient(180deg, var(--bg-cream) 0%, white 100%);
  border-radius: 32px;
  aspect-ratio: 9/19;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

/* --------------------
   Privacy Page Styles
   -------------------- */
.privacy-page {
  padding: calc(72px + var(--space-2xl)) 0 var(--space-3xl);
  min-height: 100vh;
  background: var(--bg-cream);
}

.privacy-page .privacy-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.privacy-page .privacy-header h1 {
  margin-bottom: var(--space-sm);
}

.privacy-updated {
  color: var(--text-muted);
}

.privacy-page .privacy-content {
  max-width: 800px;
  margin: 0 auto;
  background: var(--white);
  padding: var(--space-2xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.privacy-page .privacy-content h2 {
  font-size: 1.5rem;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--lime);
  color: var(--text-dark);
}

.privacy-page .privacy-content p {
  margin-bottom: var(--space-md);
  line-height: 1.8;
  color: var(--text-body);
}

.privacy-page .privacy-content ul {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

.privacy-page .privacy-content li {
  margin-bottom: var(--space-xs);
  line-height: 1.8;
}

.privacy-page .privacy-content a {
  color: var(--lime-dark);
  text-decoration: underline;
}

.privacy-page .privacy-content a:hover {
  color: var(--text-dark);
}

.privacy-highlight {
  background: var(--lime-bg);
  border-left: 4px solid var(--lime);
  padding: var(--space-md);
  margin: var(--space-lg) 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.privacy-highlight p {
  margin-bottom: 0;
  font-weight: 500;
  color: var(--text-dark);
}

/* --------------------
   Responsive Utilities
   -------------------- */
@media (max-width: 767px) {
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .floating-1, .floating-2 {
    display: none;
  }
}
