:root {
  --bg: #f7efe2;
  --paper: #fffaf0;
  --paper-deep: #f3e5cf;
  --ink: #2c2924;
  --muted: #71685d;
  --line: rgba(44, 41, 36, 0.14);
  --terracotta: #b65b43;
  --terracotta-dark: #8e3f2d;
  --sage: #5f7f64;
  --blue: #53778f;
  --gold: #c89b42;
  --shadow: 0 22px 60px rgba(84, 61, 38, 0.14);
  --hand: "Ma Shan Zheng", "LXGW WenKai TC", "Kaiti SC", "STKaiti", cursive;
  --text: "LXGW WenKai TC", "Kaiti SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(44, 41, 36, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(44, 41, 36, 0.03) 1px, transparent 1px),
    var(--bg);
  background-size: 34px 34px;
  color: var(--ink);
  font-family: var(--text);
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 8%, rgba(95, 127, 100, 0.16), transparent 24%),
    radial-gradient(circle at 86% 18%, rgba(182, 91, 67, 0.13), transparent 22%),
    radial-gradient(circle at 70% 86%, rgba(83, 119, 143, 0.12), transparent 24%);
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 16px clamp(18px, 4vw, 48px);
  background: rgba(247, 239, 226, 0.82);
  border-bottom: 1px solid rgba(44, 41, 36, 0.08);
  backdrop-filter: blur(18px);
  transition: box-shadow 180ms ease, background 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(247, 239, 226, 0.9);
  box-shadow: 0 12px 34px rgba(84, 61, 38, 0.08);
}

.brand,
.nav-cta,
.main-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-family: var(--hand);
  font-size: 25px;
  color: var(--terracotta-dark);
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: var(--paper);
  border: 1px solid rgba(142, 63, 45, 0.22);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(84, 61, 38, 0.08);
}

.brand-mark svg {
  width: 22px;
  color: var(--terracotta);
}

.main-nav {
  justify-content: center;
  gap: clamp(16px, 3vw, 34px);
  color: var(--muted);
  font-size: 15px;
}

.main-nav a {
  position: relative;
  padding: 6px 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--terracotta);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
}

.nav-cta {
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 8px;
  font-size: 15px;
}

.nav-cta svg {
  width: 17px;
}

.hero {
  position: relative;
  min-height: min(760px, calc(100svh - 72px));
  overflow: hidden;
  display: grid;
  align-items: end;
  margin: 0 clamp(14px, 3vw, 34px) 0;
  padding: clamp(86px, 11vw, 150px) clamp(22px, 7vw, 86px) clamp(38px, 7vw, 78px);
  color: var(--paper);
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  left: clamp(22px, 7vw, 86px);
  right: clamp(22px, 7vw, 86px);
  bottom: 0;
  height: 1px;
  background: rgba(255, 250, 240, 0.42);
  z-index: 2;
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media {
  background: url("assets/family-drawing.jpg") center / cover no-repeat;
  transform: scale(1.02);
}

.hero-shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(29, 25, 20, 0.82) 0%, rgba(41, 34, 28, 0.58) 45%, rgba(41, 34, 28, 0.2) 100%),
    linear-gradient(0deg, rgba(29, 25, 20, 0.72) 0%, rgba(29, 25, 20, 0.12) 50%, rgba(29, 25, 20, 0.2) 100%);
}

.hero-content {
  max-width: 790px;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--terracotta);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f8d8a7;
}

.hero h1 {
  margin: 14px 0 16px;
  font-family: var(--hand);
  font-size: clamp(78px, 12vw, 158px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
}

.hero-copy {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 250, 240, 0.9);
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button svg {
  width: 19px;
}

.button-primary {
  color: var(--paper);
  background: var(--terracotta);
  box-shadow: 0 14px 34px rgba(142, 63, 45, 0.28);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--terracotta-dark);
}

.button-ghost {
  color: var(--paper);
  background: rgba(255, 250, 240, 0.1);
  border-color: rgba(255, 250, 240, 0.42);
}

.button-wide {
  width: 100%;
  margin-top: 20px;
}

.hero-note {
  position: absolute;
  right: clamp(20px, 6vw, 82px);
  bottom: clamp(28px, 5vw, 72px);
  width: min(310px, 32vw);
  padding: 20px 22px;
  color: var(--ink);
  background: rgba(255, 250, 240, 0.92);
  border: 1px solid rgba(255, 250, 240, 0.72);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
  transform: rotate(-2deg);
}

.hero-note span {
  display: block;
  margin-bottom: 9px;
  color: var(--terracotta);
  font-size: 13px;
  font-weight: 700;
}

.hero-note strong {
  display: block;
  font-family: var(--hand);
  font-size: 25px;
  font-weight: 400;
  line-height: 1.35;
}

.section {
  padding: clamp(70px, 9vw, 116px) clamp(18px, 4vw, 48px);
}

.section-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.7fr);
  gap: clamp(26px, 5vw, 70px);
  align-items: end;
  margin-bottom: clamp(32px, 5vw, 54px);
}

h2,
h3,
p {
  overflow-wrap: anywhere;
}

h2 {
  margin: 8px 0 0;
  max-width: 760px;
  font-family: var(--hand);
  font-size: clamp(40px, 6vw, 74px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0;
}

.section-heading p,
.section-copy,
.why-copy p,
.final-inner > div > p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
}

.band-light {
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.34), rgba(255, 250, 240, 0));
}

.moment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.moment-card {
  min-height: 270px;
  padding: 24px;
  background: rgba(255, 250, 240, 0.76);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(84, 61, 38, 0.08);
}

.card-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  margin-bottom: 34px;
  color: var(--terracotta);
  background: rgba(182, 91, 67, 0.12);
  border-radius: 8px;
}

.card-icon svg {
  width: 23px;
}

.card-icon-blue {
  color: var(--blue);
  background: rgba(83, 119, 143, 0.12);
}

.card-icon-green {
  color: var(--sage);
  background: rgba(95, 127, 100, 0.13);
}

.card-icon-gold {
  color: var(--gold);
  background: rgba(200, 155, 66, 0.14);
}

.moment-card h3,
.ritual-item h3,
.journal-preview h3,
.diary-page h3,
.prompt-box h3 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.25;
}

.moment-card p,
.ritual-item p,
.journal-preview p,
.diary-page p {
  margin: 0;
  color: var(--muted);
}

.band-warm {
  background: linear-gradient(135deg, rgba(243, 229, 207, 0.84), rgba(247, 239, 226, 0.88));
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(34px, 7vw, 92px);
  align-items: center;
}

.section-copy {
  max-width: 700px;
  margin-top: 22px;
}

.ritual-list {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

.ritual-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  padding: 20px;
  background: rgba(255, 250, 240, 0.62);
  border: 1px solid rgba(44, 41, 36, 0.12);
  border-radius: 8px;
}

.ritual-item span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--paper);
  background: var(--sage);
  border-radius: 8px;
  font-weight: 700;
}

.journal-preview {
  position: relative;
  padding: 32px;
  background:
    repeating-linear-gradient(0deg, rgba(83, 119, 143, 0.11) 0 1px, transparent 1px 34px),
    var(--paper);
  border: 1px solid rgba(44, 41, 36, 0.14);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transform: rotate(1.2deg);
}

.journal-preview::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 34px;
  width: 96px;
  height: 28px;
  background: rgba(200, 155, 66, 0.36);
  border: 1px solid rgba(134, 97, 35, 0.12);
  transform: rotate(-4deg);
}

.preview-date {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
}

.journal-preview ul {
  margin: 20px 0;
  padding-left: 20px;
  color: var(--ink);
}

.band-paper {
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.55), rgba(255, 250, 240, 0.24)),
    linear-gradient(90deg, transparent 0 49%, rgba(44, 41, 36, 0.06) 49% 50%, transparent 50% 100%);
}

.sample-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.diary-page {
  position: relative;
  min-height: 390px;
  padding: 34px 28px 28px;
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(182, 91, 67, 0.12) 31px 32px),
    var(--paper);
  border: 1px solid rgba(44, 41, 36, 0.14);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(84, 61, 38, 0.11);
}

.diary-page:nth-child(2) {
  margin-top: 34px;
}

.diary-page:nth-child(3) {
  margin-top: 12px;
}

.page-tape {
  position: absolute;
  top: -13px;
  left: 50%;
  width: 92px;
  height: 28px;
  background: rgba(182, 91, 67, 0.22);
  border: 1px solid rgba(182, 91, 67, 0.14);
  transform: translateX(-50%) rotate(2deg);
}

.tape-green {
  background: rgba(95, 127, 100, 0.24);
}

.tape-blue {
  background: rgba(83, 119, 143, 0.23);
}

.diary-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 14px;
}

.diary-page h3 {
  font-family: var(--hand);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 400;
}

blockquote {
  margin: 28px 0 0;
  padding-left: 18px;
  color: var(--terracotta-dark);
  border-left: 3px solid rgba(182, 91, 67, 0.45);
  font-family: var(--hand);
  font-size: 26px;
  line-height: 1.35;
}

.signature {
  margin-top: 30px;
  color: var(--sage);
  font-family: var(--hand);
  font-size: 24px;
  text-align: right;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.tag-row span,
.prompt-list span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  color: var(--ink);
  background: rgba(83, 119, 143, 0.1);
  border: 1px solid rgba(83, 119, 143, 0.18);
  border-radius: 8px;
  font-size: 14px;
}

.diary-page-soft {
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(95, 127, 100, 0.12) 31px 32px),
    #fff8e8;
}

.diary-page-blue {
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(83, 119, 143, 0.12) 31px 32px),
    #f9fbf5;
}

.band-quiet {
  background: rgba(95, 127, 100, 0.11);
}

.why-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: clamp(30px, 7vw, 92px);
  align-items: start;
}

.why-copy {
  padding-top: 14px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 34px 0 0;
}

.stats div {
  padding: 18px;
  background: rgba(255, 250, 240, 0.66);
  border: 1px solid rgba(44, 41, 36, 0.11);
  border-radius: 8px;
}

.stats dt {
  color: var(--terracotta-dark);
  font-family: var(--hand);
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1;
}

.stats dd {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.final-section {
  background:
    linear-gradient(135deg, rgba(44, 41, 36, 0.9), rgba(84, 61, 38, 0.84)),
    url("assets/family-drawing.jpg") center / cover;
  color: var(--paper);
}

.final-section .section-kicker,
.final-section h2,
.final-section p {
  color: var(--paper);
}

.final-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 430px);
  gap: clamp(30px, 7vw, 92px);
  align-items: center;
}

.prompt-box {
  padding: 28px;
  color: var(--ink);
  background: rgba(255, 250, 240, 0.92);
  border: 1px solid rgba(255, 250, 240, 0.5);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
}

.prompt-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompt-list span {
  background: rgba(182, 91, 67, 0.1);
  border-color: rgba(182, 91, 67, 0.16);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px clamp(18px, 4vw, 48px);
  color: var(--muted);
  background: #efe2cd;
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    display: none;
  }

  .hero {
    min-height: 720px;
  }

  .hero-note {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(100%, 360px);
    margin-top: 34px;
  }

  .section-heading,
  .two-column,
  .why-layout,
  .final-inner {
    grid-template-columns: 1fr;
  }

  .moment-grid,
  .sample-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .diary-page:nth-child(n) {
    margin-top: 0;
  }
}

@media (max-width: 680px) {
  .site-header {
    gap: 12px;
    padding: 12px 14px;
  }

  .brand {
    font-size: 22px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .nav-cta {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 14px;
  }

  .hero {
    min-height: 690px;
    margin: 0;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(29, 25, 20, 0.86) 0%, rgba(41, 34, 28, 0.62) 100%),
      linear-gradient(0deg, rgba(29, 25, 20, 0.76) 0%, rgba(29, 25, 20, 0.18) 100%);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-note {
    max-width: 310px;
  }

  .section {
    padding: 58px 16px;
  }

  .moment-grid,
  .sample-layout,
  .stats {
    grid-template-columns: 1fr;
  }

  .moment-card {
    min-height: 0;
  }

  .card-icon {
    margin-bottom: 22px;
  }

  .ritual-item {
    grid-template-columns: 1fr;
  }

  .journal-preview,
  .hero-note {
    transform: none;
  }

  .diary-head,
  .site-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
