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

html {
  scroll-behavior: smooth;
}

/* ── Theme Variables ──────────────────────────────────── */
:root {
  --bg: #f0e7db;
  --bg-secondary: rgba(255, 255, 255, 0.5);
  --text: #1a202c;
  --text-secondary: #4a5568;
  --accent: #d53f8c;
  --accent-soft: rgba(213, 63, 140, 0.12);
  --navbar-bg: rgba(240, 231, 219, 0.8);
  --card-bg: rgba(255, 255, 255, 0.6);
  --card-border: rgba(0, 0, 0, 0.08);
  --timer-bg: rgba(255, 255, 255, 0.7);
  --timer-border: rgba(0, 0, 0, 0.1);
  --toggle-bg: #805ad5;
  --toggle-text: #fff;
  --footer-text: rgba(0, 0, 0, 0.5);
  --link-color: #3d7aed;
  --shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
  --bg: #202023;
  --bg-secondary: rgba(255, 255, 255, 0.08);
  --text: #ffffffde;
  --text-secondary: #a0aec0;
  --accent: #ff63c3;
  --accent-soft: rgba(255, 99, 195, 0.15);
  --navbar-bg: rgba(32, 32, 35, 0.8);
  --card-bg: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.08);
  --timer-bg: rgba(255, 255, 255, 0.08);
  --timer-border: rgba(255, 255, 255, 0.12);
  --toggle-bg: #4a5568;
  --toggle-text: #fff;
  --footer-text: rgba(255, 255, 255, 0.4);
  --link-color: #ff63c3;
  --shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

body {
  font-family: 'Fira Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* ── Typography ───────────────────────────────────────── */
h1, h2, h3 {
  font-family: 'M PLUS Rounded 1c', 'Fira Sans', sans-serif;
  line-height: 1.2;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  text-decoration: underline;
}

/* ── Navbar ────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background: var(--navbar-bg);
  box-shadow: var(--shadow);
}

.navbar-brand {
  font-family: 'M PLUS Rounded 1c', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}

.navbar-brand:hover {
  text-decoration: none;
  color: var(--accent);
}

.navbar-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: none;
  background: var(--toggle-bg);
  color: var(--toggle-text);
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

.icon-btn:hover {
  transform: scale(1.08);
  opacity: 0.9;
}

.lang-btn {
  background: transparent;
  padding: 0;
  overflow: hidden;
}

.lang-btn img {
  width: 40px;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  display: block;
}

/* ── Hero Section ──────────────────────────────────────── */
.hero {
  /* min-height: 100vh; */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 2rem;
  text-align: center;
  position: relative;
}

.hero-teaser {
  display: inline-block;
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 0.5rem 1.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  backdrop-filter: blur(6px);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.hero .description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

/* ── 3D Model Container ───────────────────────────────── */
.model-wrapper {
  width: 100%;
  max-width: 480px;
  height: 400px;
  margin: -2rem auto 1rem;
  position: relative;
}

.model-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
}

.model-spinner::after {
  content: '';
  display: block;
  width: 48px;
  height: 48px;
  border: 3px solid var(--card-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── Photo Section ─────────────────────────────────────── */
.photo-section {
  padding: 4rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Slider ────────────────────────────────────────────── */
.slider {
  position: relative;
  max-width: 560px;
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.slider-track {
  display: flex;
  transition: transform 0.4s ease;
  will-change: transform;
}

.slide {
  min-width: 100%;
  margin: 0;
}

.slide img {
  width: 100%;
  height: auto;
  display: block;
}

.slide figcaption {
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-style: italic;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-70%);
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.slider:hover .slider-btn {
  opacity: 0.85;
}

.slider-btn:hover {
  background: var(--accent);
  color: #fff;
  opacity: 1 !important;
}

.slider-prev { left: 10px; }
.slider-next { right: 10px; }

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0.6rem 0 1rem;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--card-border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, transform 0.3s;
}

.slider-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

/* ── Timer Section ─────────────────────────────────────── */
.timer-section {
  padding: 2rem 1.5rem;
  text-align: center;
}

.timer-label {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.timer-grid {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.timer-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--timer-bg);
  border: 1px solid var(--timer-border);
  border-radius: 12px;
  padding: 1rem 0.8rem;
  min-width: 80px;
  backdrop-filter: blur(6px);
  transition: background 0.3s, transform 0.3s;
}

.timer-box:hover {
  transform: translateY(-2px);
}

.timer-value {
  font-size: 2rem;
  font-weight: 700;
  font-family: 'M PLUS Rounded 1c', monospace;
  color: var(--text);
  line-height: 1;
}

.timer-unit {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}

/* ── Divider ───────────────────────────────────────────── */
.section-divider {
  width: 60px;
  height: 3px;
  background: var(--accent);
  border: none;
  border-radius: 2px;
  margin: 0 auto 2rem;
  opacity: 0.6;
}

/* ── Footer ────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 2rem 1.5rem 3rem;
  font-size: 0.85rem;
  color: var(--footer-text);
}

.footer a {
  color: var(--footer-text);
  text-decoration: underline;
}

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

/* ── Scroll Reveal ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 600px) {
  .model-wrapper {
    height: 280px;
    max-width: 300px;
    margin-top: -3rem;
  }

  .hero {
    padding-top: 5rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero .description {
    font-size: 0.95rem;
  }

  .timer-box {
    min-width: 60px;
    padding: 0.7rem 0.5rem;
  }

  .timer-value {
    font-size: 1.5rem;
  }

  .timer-unit {
    font-size: 0.6rem;
  }

  .photo-section {
    padding: 2rem 1rem;
  }

  .slider-btn {
    opacity: 0.7;
    width: 34px;
    height: 34px;
    font-size: 1.2rem;
  }

  .timer-section {
    padding: 2rem 1rem 3rem;
  }
}
