/* ═══════════════════════════════════════
   NORA — 模块化猫隧道系统
   北欧侘寂 · 温暖大地色调
   ═══════════════════════════════════════ */

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

:root {
  --clay:       #D4C5B9;
  --taupe:      #8B7D72;
  --terracotta: #A68B6B;
  --espresso:   #2C241B;
  --cream:      #E8DED5;
  --gold:       #C4A882;
  --silk:       #F5EFEA;
  --text-body:  #3A3229;
  --text-light: #7A7065;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:   cubic-bezier(0.76, 0, 0.24, 1);

  --nav-h: 72px;
  --gutter: clamp(24px, 5vw, 80px);
}

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

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

img, video { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ─── Grain Overlay ─── */
.grain-overlay {
  pointer-events: none;
  position: fixed; inset: 0; z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  mix-blend-mode: multiply;
}

/* ─── Container ─── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(80px, 12vw, 160px) 0;
}

.section__header {
  margin-bottom: 64px;
}

.label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--espresso);
}

/* ─── Navigation ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  transition: background 0.5s var(--ease-out-expo);
  padding: 0 var(--gutter);
}

.nav--scrolled {
  background: rgba(245, 239, 234, 0.85);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(44, 36, 27, 0.06);
}

.nav__inner {
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1280px; margin: 0 auto;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--espresso);
}

.nav__links {
  display: flex; gap: 36px;
}

.nav__links a {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text-light);
  transition: color 0.3s;
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px; background: var(--espresso);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease-out-expo);
}

.nav__links a:hover { color: var(--espresso); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__cta {
  padding: 10px 28px;
  border: 1px solid var(--espresso);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--espresso);
  transition: all 0.4s var(--ease-out-expo);
}

.nav__cta:hover {
  background: var(--espresso);
  color: var(--silk);
}

.nav__toggle { display: none; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 40px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  transition: all 0.5s var(--ease-out-expo);
}

.btn--primary {
  background: var(--espresso);
  color: var(--silk);
  border: 1px solid var(--espresso);
}

.btn--primary:hover {
  background: transparent;
  color: var(--espresso);
}

.btn--outline {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(232, 222, 213, 0.4);
}

.btn--outline:hover {
  background: rgba(232, 222, 213, 0.12);
  border-color: var(--cream);
}

.btn--lg {
  padding: 20px 52px;
  font-size: 0.95rem;
}

/* ─── Hero ─── */
.hero {
  position: relative;
  height: 100vh; min-height: 600px;
  display: flex; align-items: center;
  overflow: hidden;
}

.hero__video-wrap {
  position: absolute; inset: 0;
  z-index: 0;
}

.hero__video {
  width: 100%; height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    135deg,
    rgba(44, 36, 27, 0.55) 0%,
    rgba(44, 36, 27, 0.3) 50%,
    rgba(44, 36, 27, 0.65) 100%
  );
}

.hero__veil {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(245, 239, 234, 1) 100%
  );
}

.hero__content {
  position: relative; z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  padding-top: 40px;
}

.hero__badge {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid rgba(232, 222, 213, 0.3);
  border-radius: 100px;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out-expo) 0.2s forwards;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 300;
  line-height: 1.0;
  color: var(--cream);
  margin-bottom: 20px;
  overflow: hidden;
}

.hero__title-line {
  display: block;
  opacity: 0;
  transform: translateY(60px) scale(0.95);
  animation: heroTitleIn 1.2s var(--ease-out-expo) forwards;
}

.hero__title-line[data-delay="0"] { animation-delay: 0.4s; }
.hero__title-line[data-delay="0.15"] { animation-delay: 0.55s; }

.hero__subtitle {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  color: rgba(232, 222, 213, 0.8);
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out-expo) 0.7s forwards;
}

.hero__actions {
  display: flex; gap: 16px; flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out-expo) 0.9s forwards;
}

.hero__scroll {
  position: absolute; bottom: 48px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 24px; height: 36px;
  border: 1.5px solid rgba(232, 222, 213, 0.3);
  border-radius: 12px;
  display: flex; justify-content: center;
}

.hero__scroll span {
  display: block;
  width: 2px; height: 10px;
  background: var(--cream);
  border-radius: 2px;
  margin-top: 8px;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.4; }
}

@keyframes heroTitleIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Intro ─── */
.intro {
  background: var(--silk);
}

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

.intro__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--espresso);
  margin-bottom: 24px;
}

.intro__body {
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 16px;
}

.intro__image-inner {
  position: relative;
  width: 100%;
  padding-bottom: 120%;
  background: linear-gradient(145deg, var(--clay), var(--cream));
  border-radius: 50% 50% 40% 40% / 60% 60% 40% 40%;
  overflow: hidden;
}

.intro__shape {
  position: absolute;
  inset: 10%;
  background: radial-gradient(ellipse at 30% 40%, var(--gold), var(--terracotta));
  border-radius: inherit;
  opacity: 0.6;
  filter: blur(30px);
}

/* ─── Tunnels Grid ─── */
.tunnels {
  background: var(--cream);
}

.tunnels__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: rgba(139, 125, 114, 0.15);
}

.tunnel-card {
  position: relative;
  overflow: hidden;
  background: var(--silk);
  cursor: pointer;
  transition: all 0.5s var(--ease-out-expo);
  min-height: 240px;
}

.tunnel-card--tall {
  grid-row: span 2;
  min-height: 482px;
}

.tunnel-card--wide {
  grid-column: span 2;
}

.tunnel-card__img {
  position: absolute; inset: 0;
  transition: transform 0.8s var(--ease-out-expo);
}

.tunnel-card__placeholder {
  width: 100%; height: 100%;
  transition: transform 0.8s var(--ease-out-expo);
}

.tunnel-card:hover .tunnel-card__img,
.tunnel-card:hover .tunnel-card__placeholder {
  transform: scale(1.04);
}

.tunnel-card__info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px;
  background: linear-gradient(transparent, rgba(44, 36, 27, 0.6));
  color: var(--cream);
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.5s var(--ease-out-expo);
}

.tunnel-card:hover .tunnel-card__info {
  transform: translateY(0);
  opacity: 1;
}

.tunnel-card__info h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 4px;
}

.tunnel-card__info p {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ─── 3D Configurator ─── */
.config {
  background: var(--espresso);
  color: var(--cream);
  padding-bottom: 0;
}

.config .section__header { margin-bottom: 48px; }
.config .section__title { color: var(--cream); }
.config .label { color: var(--gold); }

.config__canvas-wrap {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
}

.config__canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.config__ui {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 10;
}

.config__controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.config__btn {
  padding: 10px 22px;
  border: 1px solid rgba(232, 222, 213, 0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--cream);
  background: rgba(232, 222, 213, 0.06);
  transition: all 0.4s var(--ease-out-expo);
}

.config__btn:hover,
.config__btn.active {
  background: var(--cream);
  color: var(--espresso);
  border-color: var(--cream);
}

.config__btn--clear {
  border-color: rgba(196, 168, 130, 0.3);
  color: var(--gold);
}

.config__btn--clear:hover {
  background: rgba(196, 168, 130, 0.15);
  border-color: var(--gold);
}

.config__hint {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  opacity: 0.4;
}

/* ─── Craft ─── */
.craft {
  background: var(--silk);
}

.craft__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: rgba(139, 125, 114, 0.12);
}

.craft__item {
  padding: clamp(48px, 6vw, 80px);
  background: var(--silk);
}

.craft__item--text {
  display: flex; flex-direction: column; justify-content: center;
}

.craft__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 300;
  color: var(--espresso);
  margin-bottom: 20px;
}

.craft__body {
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-light);
  max-width: 400px;
}

.craft__media {
  width: 100%;
  padding-bottom: 75%;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.craft__texture {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 4px,
    rgba(255,255,255,0.08) 4px,
    rgba(255,255,255,0.08) 5px
  );
}

.craft__texture--2 {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 6px,
    rgba(44,36,27,0.06) 6px,
    rgba(44,36,27,0.06) 7px
  );
}

.craft__label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-top: 16px;
  text-align: center;
}

.craft__quote {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.6;
  color: var(--taupe);
  max-width: 360px;
}

.craft__quote cite {
  display: block;
  margin-top: 16px;
  font-size: 0.8rem;
  font-style: normal;
  font-family: var(--font-body);
  color: var(--text-light);
}

/* ─── Stories ─── */
.stories {
  background: var(--cream);
}

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

.story-card {
  padding: 32px;
  background: var(--silk);
  border-radius: 16px;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s;
}

.story-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(44, 36, 27, 0.06);
}

.story-card__avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--silk);
  margin-bottom: 20px;
}

.story-card__content p {
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-body);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.story-card__author {
  font-size: 0.8rem;
  color: var(--text-light);
  letter-spacing: 0.03em;
}

/* ─── CTA ─── */
.cta {
  background: var(--espresso);
  color: var(--cream);
  text-align: center;
}

.cta__inner {
  max-width: 620px;
  margin: 0 auto;
}

.cta__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 20px;
}

.cta__body {
  font-weight: 300;
  color: rgba(232, 222, 213, 0.7);
  margin-bottom: 40px;
}

.cta__footnote {
  margin-top: 24px;
  font-size: 0.75rem;
  color: rgba(232, 222, 213, 0.4);
  letter-spacing: 0.05em;
}

/* ─── Footer ─── */
.footer {
  background: var(--espresso);
  border-top: 1px solid rgba(232, 222, 213, 0.06);
  padding: 64px 0 32px;
  color: rgba(232, 222, 213, 0.6);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer__logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--cream);
  letter-spacing: 0.12em;
}

.footer__tagline {
  font-size: 0.8rem;
  margin-top: 8px;
  font-style: italic;
  font-family: var(--font-display);
  color: var(--gold);
}

.footer__links h4 {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(232, 222, 213, 0.4);
  margin-bottom: 16px;
}

.footer__links a {
  display: block;
  font-size: 0.85rem;
  color: rgba(232, 222, 213, 0.6);
  margin-bottom: 10px;
  transition: color 0.3s;
}

.footer__links a:hover { color: var(--cream); }

.footer__bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(232, 222, 213, 0.06);
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
}

.footer__legal { display: flex; gap: 24px; }
.footer__legal a { transition: color 0.3s; }
.footer__legal a:hover { color: var(--cream); }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .tunnels__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tunnel-card--tall { grid-row: span 1; min-height: 280px; }
  .tunnel-card--wide { grid-column: span 1; }

  .intro__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

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

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

@media (max-width: 768px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle {
    display: flex; flex-direction: column; gap: 5px;
    padding: 8px;
  }
  .nav__toggle span {
    display: block;
    width: 24px; height: 1.5px;
    background: var(--espresso);
    transition: all 0.3s;
  }

  .hero__title {
    font-size: clamp(2.4rem, 12vw, 3.6rem);
  }

  .tunnels__grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }

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

  .config__canvas-wrap {
    height: 420px;
  }

  .config__ui {
    bottom: 16px;
    gap: 8px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .section { padding: 60px 0; }
  .hero__actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .craft__item { padding: 32px; }
}
