/* ==========================================================
   点点生活 — Glassmorphism + Bento Grid Design System
   Style:  Apple-style Bento Grid × Glassmorphism
   Color:  Cool Blue (#2563EB primary) + Cyan accent
   Font:   Caveat (display) + Quicksand (body)
   ========================================================== */

/* --- Design Tokens --- */
:root {
  /* Cool Blue Palette */
  --color-primary:       #2563EB;
  --color-primary-light: #3B82F6;
  --color-primary-dark:  #1D4ED8;
  --color-accent:        #06B6D4;
  --color-accent-light:  #22D3EE;
  --color-bg:            #F8FAFC;
  --color-bg-warm:       #F1F5F9;
  --color-bg-deep:       #BFDBFE;
  --color-surface:       #FFFFFF;
  --color-surface-glass: rgba(255, 255, 255, 0.55);
  --color-foreground:    #0F172A;
  --color-text:          #1E293B;
  --color-text-secondary:#64748B;
  --color-text-muted:    #94A3B8;
  --color-border:        #CBD5E1;
  --color-border-light:  #E2E8F0;

  /* Glassmorphism */
  --glass-blur:          20px;
  --glass-bg:            rgba(255, 255, 255, 0.45);
  --glass-bg-strong:     rgba(255, 255, 255, 0.7);
  --glass-border:        1px solid rgba(255, 255, 255, 0.5);
  --glass-shadow:        0 8px 32px rgba(37, 99, 235, 0.06);

  /* Bento Grid */
  --grid-gap:            20px;
  --card-radius:         24px;
  --card-radius-sm:      16px;

  /* Typography */
  --font-display:        -apple-system, 'Segoe UI', sans-serif;
  --font-body:           -apple-system, 'Segoe UI', sans-serif;

  /* Spacing Scale (8dp) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;
  --space-10: 80px;
  --space-12: 96px;

  /* Shadows */
  --shadow-sm:   0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md:   0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg:   0 8px 32px rgba(15, 23, 42, 0.08);
  --shadow-xl:   0 16px 48px rgba(15, 23, 42, 0.1);
  --shadow-warm: 0 8px 32px rgba(37, 99, 235, 0.1);

  /* Transitions */
  --ease-out:    cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration:    0.3s;
}

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

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

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

a { color: var(--color-primary); text-decoration: none; transition: color var(--duration) var(--ease-out); }
a:hover { color: var(--color-primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

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

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ========== NAVIGATION ========== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: var(--space-2) 0;
  transition: all var(--duration) var(--ease-out);
}

.navbar.scrolled {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: var(--glass-border);
  box-shadow: var(--shadow-sm);
}

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

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: color var(--duration) var(--ease-out);
}

.navbar.scrolled .nav-brand { color: var(--color-foreground); }

.nav-brand .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: inline-block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  position: relative;
  padding: 4px 0;
  cursor: pointer;
}
.navbar.scrolled .nav-links a { color: var(--color-text-secondary); }
.nav-links a:hover { color: #fff; }
.navbar.scrolled .nav-links a:hover { color: var(--color-primary); }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--color-primary-light);
  border-radius: 1px;
  transition: width var(--duration) var(--ease-out);
}
.nav-links a:hover::after { width: 100%; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: #fff; margin: 5px 0;
  border-radius: 2px;
  transition: all var(--duration) var(--ease-out);
}
.navbar.scrolled .nav-toggle span { background: var(--color-foreground); }

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(145deg, #1E3A8A 0%, #1E40AF 25%, #2563EB 50%, #3B82F6 75%, #60A5FA 100%);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(96, 165, 250, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(6, 182, 212, 0.15) 0%, transparent 50%);
  z-index: 1;
}

/* Decorative floating shapes */
.hero-shapes {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  background: #fff;
}
.hero-shape:nth-child(1) { width: 300px; height: 300px; top: -80px; right: -60px; }
.hero-shape:nth-child(2) { width: 180px; height: 180px; bottom: 10%; left: 5%; }
.hero-shape:nth-child(3) { width: 100px; height: 100px; top: 40%; right: 15%; border-radius: var(--card-radius); transform: rotate(45deg); }
.hero-shape:nth-child(4) { width: 60px; height: 60px; top: 20%; left: 20%; }

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 var(--space-3);
  max-width: 780px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--space-4);
  animation: fadeInUp 0.7s var(--ease-out) both;
}
.hero-tag .glow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-accent-light);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.6);
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin-bottom: var(--space-3);
  animation: fadeInUp 0.7s var(--ease-out) 0.12s both;
}

.hero-content h1 .highlight {
  background: linear-gradient(135deg, #BFDBFE, #93C5FD);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  margin-bottom: var(--space-6);
  animation: fadeInUp 0.7s var(--ease-out) 0.24s both;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  animation: fadeInUp 0.7s var(--ease-out) 0.36s both;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all var(--duration) var(--ease-out);
  touch-action: manipulation;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: #fff;
  color: var(--color-primary-dark);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  color: var(--color-primary);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  transform: translateY(-2px);
}

/* Scroll indicator */
.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: fadeInUp 0.7s var(--ease-out) 0.8s both;
}
.scroll-hint span {
  display: block;
  width: 24px; height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  margin: 0 auto;
  position: relative;
}
.scroll-hint span::after {
  content: '';
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 3px; height: 8px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 2px;
}

/* ========== SECTIONS ========== */
.section {
  padding: var(--space-12) 0;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-8);
}

.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-1);
  letter-spacing: 1px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--color-foreground);
  line-height: 1.3;
  margin-bottom: var(--space-2);
}

.section-header p {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ========== BENTO GRID ========== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: auto;
  gap: var(--grid-gap);
}

.bento-card {
  background: var(--color-surface);
  border-radius: var(--card-radius);
  padding: var(--space-4);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration) var(--ease-out);
  position: relative;
  overflow: hidden;
  cursor: default;
}
.bento-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-warm);
  border-color: var(--color-border);
}

/* Bento span variants */
.bento-card.span-2 {
  grid-column: span 2;
}
.bento-card.span-row-2 {
  grid-row: span 2;
}

/* Glass variant */
.bento-card.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* Feature card inner */
.bento-icon {
  width: 52px; height: 52px;
  border-radius: var(--card-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: var(--space-3);
}
.bento-icon.amber  { background: #DBEAFE; color: #2563EB; }
.bento-icon.green  { background: #D1FAE5; color: #059669; }
.bento-icon.rose   { background: #FFE4E6; color: #E11D48; }
.bento-icon.blue   { background: #CFFAFE; color: #0891B2; }
.bento-icon.violet { background: #EDE9FE; color: #7C3AED; }
.bento-icon.orange { background: #FEF3C7; color: #D97706; }

.bento-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-foreground);
  margin-bottom: var(--space-1);
}

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

/* Hero stat card inside bento */
.bento-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-5) var(--space-4);
}
.bento-stat .stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: var(--space-1);
}
.bento-stat .stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

/* ========== GALLERY (Bento Image Grid) ========== */
.section-gallery {
  background: var(--color-bg-warm);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 280px 280px;
  gap: var(--grid-gap);
}

.gallery-item {
  position: relative;
  border-radius: var(--card-radius);
  overflow: hidden;
  cursor: pointer;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.gallery-item:hover img { transform: scale(1.06); }

.gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery-item:nth-child(4) { grid-column: span 2; }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(28, 25, 23, 0.7) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-3);
  opacity: 0;
  transition: opacity var(--duration) var(--ease-out);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-overlay h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.gallery-overlay p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  transform: translateY(8px);
  transition: transform var(--duration) var(--ease-out);
}
.gallery-item:hover .gallery-overlay p { transform: translateY(0); }

/* ========== QUOTE SECTION ========== */
.section-quote {
  background: linear-gradient(145deg, #1E3A8A, #1E40AF, #2563EB);
  padding: var(--space-10) 0;
}

.quote-card {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  padding: var(--space-6);
}

.quote-card blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
  margin-bottom: var(--space-3);
}

.quote-card cite {
  font-style: normal;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
}

/* ========== CTA ========== */
.section-cta {
  padding: var(--space-10) 0;
}

.cta-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: var(--glass-border);
  border-radius: var(--card-radius);
  padding: var(--space-8) var(--space-4);
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.cta-glass::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1), transparent 60%);
  border-radius: 50%;
}

.cta-glass h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-foreground);
  margin-bottom: var(--space-2);
  position: relative;
}

.cta-glass p {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.btn-warm {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25);
  position: relative;
}
.btn-warm:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.35);
  color: #fff;
}

/* ========== FOOTER ========== */
.footer {
  padding: var(--space-5) 0 var(--space-3);
  border-top: 1px solid var(--color-border-light);
  background: var(--color-bg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-foreground);
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-brand .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-primary-light);
}

.footer-nav {
  display: flex;
  gap: var(--space-3);
}
.footer-nav a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}
.footer-nav a:hover { color: var(--color-primary); }

.footer-bottom {
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.footer-bottom p,
.footer-bottom a {
  font-size: 0.78rem;
  color: var(--color-text-secondary);
}
.footer-bottom a:hover { color: var(--color-primary); }
.footer-sep {
  color: var(--color-border);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-card.span-2 { grid-column: span 2; }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 240px 240px 240px;
  }
  .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 1; }
  .gallery-item:nth-child(4) { grid-column: span 1; }
}

@media (max-width: 767px) {
  .section { padding: var(--space-8) 0; }

  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--space-2) var(--space-3);
    gap: 0;
    box-shadow: var(--shadow-md);
    border-radius: 0 0 var(--card-radius-sm) var(--card-radius-sm);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    color: var(--color-text);
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border-light);
  }
  .nav-links li:last-child a { border-bottom: none; }

  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-card.span-2,
  .bento-card.span-row-2 {
    grid-column: span 1;
    grid-row: span 1;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .gallery-item,
  .gallery-item:nth-child(1),
  .gallery-item:nth-child(4) {
    grid-column: span 1;
    grid-row: span 1;
    aspect-ratio: 16/10;
  }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-nav { flex-wrap: wrap; justify-content: center; }

  .cta-glass { padding: var(--space-6) var(--space-3); border-radius: var(--card-radius-sm); }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .bento-stat .stat-number { font-size: 2.4rem; }
}
