/* ============================================
   山野咖啡日记 — Camping × Coffee Blog
   ============================================ */

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

:root {
  /* 大地色系 */
  --espresso: #2d1b0e;
  --dark-roast: #3d2b1f;
  --coffee: #6f4e37;
  --latte: #c4a882;
  --cream: #f5f0e8;
  --smoke: #f9f6f1;
  --white: #fefdfb;

  /* 露营色系 */
  --fire: #e17055;
  --fire-light: #fab1a0;
  --forest: #2d3436;
  --sky-night: #0c2461;
  --dawn: #ffeaa7;
  --moss: #636e72;

  /* 排版 */
  --serif: 'Playfair Display', 'Noto Serif SC', 'Georgia', serif;
  --sans: 'Inter', -apple-system, 'Noto Sans SC', sans-serif;

  /* 间距 */
  --section-pad: clamp(4rem, 8vw, 7rem);
  --container-max: 1200px;
  --radius: 12px;
  --radius-lg: 20px;

  /* 动画 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

body {
  font-family: var(--sans);
  background: var(--smoke);
  color: var(--dark-roast);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: all 0.4s var(--ease-out);
}

.nav.scrolled {
  background: rgba(254, 253, 251, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(45, 27, 14, 0.06);
  padding: 0.6rem 0;
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  transition: color 0.3s;
}

.nav.scrolled .nav-logo { color: var(--espresso); }

.nav-logo-icon {
  width: 28px;
  height: 28px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  transition: color 0.3s;
  position: relative;
}

.nav.scrolled .nav-link { color: var(--moss); }

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--fire);
  transition: width 0.3s var(--ease-out);
}

.nav-link:hover::after { width: 100%; }
.nav-link:hover { color: var(--white); }
.nav.scrolled .nav-link:hover { color: var(--fire); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}

.nav.scrolled .nav-toggle span { background: var(--espresso); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0f0f23;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(225, 112, 85, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(45, 27, 14, 0.3) 0%, transparent 50%),
    linear-gradient(180deg, #0a0a1a 0%, #1a1a2e 40%, #2d1b0e 100%);
}

.hero-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.5px 1.5px at 25% 35%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 40% 10%, rgba(255,255,255,0.5), transparent),
    radial-gradient(2px 2px at 55% 25%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 70% 18%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 85% 30%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 15% 50%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 90% 12%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 45% 45%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 65% 8%, rgba(255,255,255,0.7), transparent);
  animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

.hero-mountains {
  position: absolute;
  bottom: 20%;
  left: 0;
  right: 0;
  height: 40%;
  background:
    linear-gradient(135deg, transparent 33%, #1a1a2e 33%, #1a1a2e 34%, transparent 34%),
    linear-gradient(160deg, transparent 40%, #263545 40%, #263545 41%, transparent 41%),
    linear-gradient(120deg, transparent 55%, #1e2d3d 55%, #1e2d3d 56%, transparent 56%);
  opacity: 0.5;
}

.hero-ground {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 25%;
  background: linear-gradient(180deg, #1a1207 0%, #2d1b0e 60%, #3d2b1f 100%);
}

.hero-tent {
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 80px;
}

.hero-tent::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 60px solid transparent;
  border-right: 60px solid transparent;
  border-bottom: 70px solid rgba(225, 112, 85, 0.6);
}

.hero-tent::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 25px;
  background: rgba(255, 234, 167, 0.8);
  border-radius: 4px 4px 0 0;
  box-shadow: 0 0 20px rgba(255, 234, 167, 0.4), 0 0 60px rgba(225, 112, 85, 0.2);
}

.hero-smoke {
  position: absolute;
  bottom: 32%;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 60px;
}

.hero-smoke::before,
.hero-smoke::after {
  content: '';
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  animation: smoke 3s ease-out infinite;
}

.hero-smoke::before {
  left: -8px;
  width: 12px;
  height: 12px;
  animation-delay: 0s;
}

.hero-smoke::after {
  left: 4px;
  width: 8px;
  height: 8px;
  animation-delay: 1.5s;
}

@keyframes smoke {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.15;
  }
  100% {
    transform: translateY(-80px) translateX(20px) scale(3);
    opacity: 0;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 2rem;
}

.hero-tag {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fire-light);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.3s forwards;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.5s forwards;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.65);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.7s forwards;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2.2rem;
  background: var(--fire);
  color: var(--white);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s var(--ease-out);
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.9s forwards;
}

.hero-cta:hover {
  background: #d35400;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(225, 112, 85, 0.35);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  z-index: 2;
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, rgba(255,255,255,0.3), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}

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

/* ---------- Sections ---------- */
.section {
  padding: var(--section-pad) 0;
}

.section--dark {
  background: var(--forest);
  color: var(--cream);
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fire);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--moss);
  max-width: 500px;
  margin: 0 auto;
}

.section--dark .section-desc {
  color: rgba(196, 168, 130, 0.7);
}

/* ---------- Story Cards ---------- */
.stories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.story-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  box-shadow: 0 2px 20px rgba(45, 27, 14, 0.04);
}

.story-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(45, 27, 14, 0.1);
}

.story-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}

.story-card-image {
  position: relative;
  overflow: hidden;
}

.story-card-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
}

.story-card--featured .story-card-image-placeholder {
  min-height: 320px;
}

.story-card-image-placeholder svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--fire);
  color: var(--white);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.story-card-body {
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
}

.story-card--featured .story-card-body {
  padding: 2rem 2.25rem;
  justify-content: center;
}

.story-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--moss);
  margin-bottom: 0.75rem;
}

.story-card-dot {
  opacity: 0.4;
}

.story-card-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  transition: color 0.3s;
}

.story-card--featured .story-card-title {
  font-size: 1.6rem;
}

.story-card:hover .story-card-title {
  color: var(--fire);
}

.story-card-excerpt {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--moss);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-card--featured .story-card-excerpt {
  -webkit-line-clamp: 4;
}

.story-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(45, 27, 14, 0.06);
}

.story-card-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: rgba(225, 112, 85, 0.08);
  color: var(--fire);
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 500;
}

.story-card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--coffee);
  white-space: nowrap;
  transition: color 0.3s;
}

.story-card-link:hover { color: var(--fire); }

.stories-more {
  text-align: center;
  margin-top: 3rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s var(--ease-out);
  cursor: pointer;
  border: none;
}

.btn-outline {
  border: 1.5px solid var(--latte);
  color: var(--coffee);
  background: transparent;
}

.btn-outline:hover {
  background: var(--fire);
  border-color: var(--fire);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(225, 112, 85, 0.25);
}

/* ---------- Gear Cards ---------- */
.gear-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.gear-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(196, 168, 130, 0.1);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  transition: all 0.3s var(--ease-out);
}

.gear-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(225, 112, 85, 0.2);
  transform: translateY(-4px);
}

.gear-icon {
  width: 48px;
  height: 48px;
  color: var(--fire);
  margin-bottom: 1.25rem;
}

.gear-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.gear-desc {
  font-size: 0.85rem;
  color: rgba(196, 168, 130, 0.6);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.gear-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.gear-list li {
  font-size: 0.82rem;
  color: rgba(196, 168, 130, 0.5);
  padding-left: 1rem;
  position: relative;
}

.gear-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--fire);
  font-weight: bold;
}

/* ---------- Recipe Cards ---------- */
.recipes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.recipe-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 2px 20px rgba(45, 27, 14, 0.04);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(45, 27, 14, 0.08);
}

.recipe-number {
  font-family: var(--serif);
  font-size: 4rem;
  font-weight: 700;
  color: rgba(225, 112, 85, 0.08);
  position: absolute;
  top: 0.5rem;
  right: 1.5rem;
  line-height: 1;
}

.recipe-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.recipe-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.recipe-meta span {
  font-size: 0.8rem;
  color: var(--moss);
}

.recipe-params {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(225, 112, 85, 0.04);
  border-radius: var(--radius);
}

.recipe-param {
  text-align: center;
}

.recipe-param-label {
  display: block;
  font-size: 0.7rem;
  color: var(--moss);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.recipe-param-value {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--coffee);
}

.recipe-steps {
  counter-reset: step;
  list-style: none;
}

.recipe-steps li {
  counter-increment: step;
  padding: 0.5rem 0 0.5rem 2rem;
  position: relative;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--dark-roast);
  border-left: 1px solid rgba(225, 112, 85, 0.15);
}

.recipe-steps li::before {
  content: counter(step);
  position: absolute;
  left: -0.6rem;
  top: 0.5rem;
  width: 1.2rem;
  height: 1.2rem;
  background: var(--fire);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: center;
}

.about-avatar {
  max-width: 260px;
  margin: 0 auto;
}

.about-avatar svg {
  width: 100%;
  border-radius: 50%;
}

.about-content p {
  margin-bottom: 1rem;
  color: rgba(196, 168, 130, 0.75);
  line-height: 1.8;
}

.about-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.about-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(196, 168, 130, 0.2);
  border-radius: 50%;
  color: var(--latte);
  transition: all 0.3s;
}

.about-link:hover {
  background: var(--fire);
  border-color: var(--fire);
  color: var(--white);
  transform: translateY(-2px);
}

/* ---------- Footer ---------- */
.footer {
  padding: 3rem 0;
  border-top: 1px solid rgba(45, 27, 14, 0.06);
}

.footer-inner {
  text-align: center;
}

.footer-brand {
  margin-bottom: 1rem;
}

.footer-logo {
  font-size: 1.8rem;
}

.footer-brand p {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--coffee);
  margin-top: 0.3rem;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--moss);
  margin-bottom: 0.5rem;
}

.footer-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--latte);
  opacity: 0.6;
}

/* ---------- Scroll Animations ---------- */
.story-card,
.gear-card,
.recipe-card,
.about-grid {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.story-card.visible,
.gear-card.visible,
.recipe-card.visible,
.about-grid.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .gear-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(254, 253, 251, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  }

  .nav-links.open { display: flex; }

  .nav-links .nav-link {
    color: var(--dark-roast) !important;
    font-size: 1rem;
  }

  .nav-toggle { display: flex; }

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

  .story-card--featured {
    grid-template-columns: 1fr;
  }

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

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

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .about-content .section-title {
    text-align: center !important;
  }

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

  .hero-scroll { display: none; }
}

@media (max-width: 480px) {
  .recipe-params {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .story-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* ---------- Smooth Scrollbar Custom ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--smoke); }
::-webkit-scrollbar-thumb {
  background: var(--latte);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--coffee); }
