:root {
  color-scheme: dark;
  --ink: #f3efe5;
  --paper: #ded8c9;
  --muted: #a8aaa1;
  --deep: #0d100e;
  --forest: #151b17;
  --moss: #87977b;
  --amber: #d3a854;
  --rust: #b7684e;
  --line: rgba(243, 239, 229, 0.16);
  --shell: min(1180px, calc(100% - 48px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--deep);
  color: var(--ink);
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  letter-spacing: 0;
}

body::selection {
  background: var(--amber);
  color: var(--deep);
}

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

button,
textarea,
select {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 76px;
  padding: 0 clamp(24px, 4.6vw, 72px);
  border-bottom: 1px solid transparent;
  transition: background 300ms ease, border-color 300ms ease, min-height 300ms ease;
}

.site-header.is-scrolled {
  min-height: 64px;
  border-color: var(--line);
  background: rgba(13, 16, 14, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  justify-self: start;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
}

.brand-seal {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(243, 239, 229, 0.54);
  border-radius: 50%;
  color: var(--amber);
  font-size: 15px;
}

nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: rgba(243, 239, 229, 0.72);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
}

nav a {
  position: relative;
  padding: 12px 0;
}

nav a::after {
  position: absolute;
  right: 50%;
  bottom: 5px;
  left: 50%;
  height: 1px;
  content: "";
  background: var(--amber);
  transition: right 180ms ease, left 180ms ease;
}

nav a:hover,
nav a:focus-visible {
  color: var(--ink);
}

nav a:hover::after,
nav a:focus-visible::after {
  right: 0;
  left: 0;
}

.header-date {
  justify-self: end;
  color: rgba(243, 239, 229, 0.66);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(88svh, 920px);
  overflow: hidden;
  isolation: isolate;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-image {
  z-index: -3;
  background-image: url("assets/time-dawn.jpg");
  background-position: center center;
  background-size: cover;
  transform: scale(1.02);
  animation: settle 2.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(8, 10, 9, 0.96) 0%, rgba(8, 10, 9, 0.74) 32%, rgba(8, 10, 9, 0.1) 68%),
    linear-gradient(0deg, rgba(8, 10, 9, 0.72) 0%, transparent 42%);
}

.hero::after {
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 30%;
  content: "";
  background: linear-gradient(to bottom, transparent, var(--deep));
}

.hero-content {
  width: var(--shell);
  margin: 0 auto;
  padding: 128px 0 82px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--amber);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 680px;
  margin-bottom: 26px;
  font-size: clamp(64px, 9vw, 128px);
  font-weight: 600;
  line-height: 0.98;
}

.hero-lead {
  max-width: 520px;
  margin-bottom: 32px;
  color: rgba(243, 239, 229, 0.78);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.9;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 36px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(243, 239, 229, 0.42);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  transition: gap 180ms ease, border-color 180ms ease;
}

.text-link:hover,
.text-link:focus-visible {
  gap: 48px;
  border-color: var(--amber);
}

.hero-meta {
  position: absolute;
  right: clamp(24px, 4.6vw, 72px);
  bottom: 42px;
  display: flex;
  gap: 30px;
  color: rgba(243, 239, 229, 0.56);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: clamp(24px, 4.6vw, 72px);
  display: none;
  align-items: center;
  gap: 10px;
  color: rgba(243, 239, 229, 0.5);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 10px;
}

.scroll-cue span {
  width: 36px;
  height: 1px;
  background: currentColor;
}

@keyframes settle {
  from { opacity: 0; transform: scale(1.08); }
  to { opacity: 1; transform: scale(1.02); }
}

.section-shell {
  width: var(--shell);
  margin: 0 auto;
}

.today-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(48px, 8vw, 118px);
  align-items: start;
  padding: 132px 0;
}

.section-intro h2,
.section-heading h2,
.rhythm-title h2,
.letter-copy h2,
.closing-section h2 {
  margin-bottom: 22px;
  font-size: clamp(40px, 5.6vw, 72px);
  font-weight: 500;
  line-height: 1.12;
}

.section-intro > p:last-child,
.section-heading > p,
.letter-copy > p {
  color: var(--muted);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 2;
}

.today-board {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 38px 48px;
  padding: clamp(26px, 4vw, 50px);
  border: 1px solid var(--line);
  background: #121713;
}

.day-progress {
  grid-row: span 2;
}

.progress-ring {
  position: relative;
  display: grid;
  width: 190px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--amber) calc(var(--progress) * 1%), rgba(243, 239, 229, 0.1) 0);
}

.progress-ring::after {
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  content: "";
  background: #121713;
}

.progress-ring div {
  z-index: 1;
  display: grid;
  gap: 4px;
  text-align: center;
}

.progress-ring strong {
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 38px;
  font-weight: 400;
}

.progress-ring span,
.day-progress > p,
.today-details span {
  color: var(--muted);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
}

.day-progress > p {
  margin: 18px 0 0;
  line-height: 1.8;
  text-align: center;
}

.today-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  border-top: 1px solid var(--line);
}

.today-details div {
  display: grid;
  gap: 10px;
  padding: 22px 16px 0 0;
}

.today-details strong {
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 400;
  white-space: nowrap;
}

.today-details b {
  color: var(--amber);
  font-weight: 400;
}

.today-board blockquote {
  align-self: end;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--paper);
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.65;
}

.chapters-section {
  padding: 132px 0;
  background: #e9e4d8;
  color: #171a17;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1fr);
  gap: clamp(48px, 10vw, 160px);
  align-items: end;
  margin-bottom: 92px;
}

.section-heading .eyebrow {
  color: #8b6335;
}

.section-heading > p {
  max-width: 580px;
  margin-bottom: 4px;
  color: #626860;
}

.chapter-list {
  border-top: 1px solid rgba(23, 26, 23, 0.24);
}

.chapter {
  display: grid;
  grid-template-columns: 90px minmax(260px, 0.9fr) minmax(280px, 1fr);
  gap: clamp(26px, 5vw, 76px);
  align-items: start;
  padding: 42px 0 48px;
  border-bottom: 1px solid rgba(23, 26, 23, 0.24);
  transition: padding 220ms ease;
}

.chapter:hover {
  padding-right: 18px;
  padding-left: 18px;
}

.chapter-number {
  color: #9a7240;
  font-family: Georgia, serif;
  font-size: 14px;
}

.chapter-label {
  margin-bottom: 14px;
  color: #868b83;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.chapter h3 {
  max-width: 430px;
  margin-bottom: 0;
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 500;
  line-height: 1.45;
}

.chapter > p {
  margin: 0;
  color: #60665e;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 2;
}

.interlude {
  display: grid;
  min-height: 52vh;
  padding: 72px 24px;
  place-items: center;
  background:
    linear-gradient(rgba(13, 16, 14, 0.48), rgba(13, 16, 14, 0.82)),
    url("assets/time-dawn.jpg") center 66% / cover fixed;
}

.interlude p {
  max-width: 980px;
  margin: 0;
  text-align: center;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.5;
}

.seasons-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(48px, 8vw, 118px);
  align-items: start;
  padding: 132px 0;
}

.season-experience {
  border-top: 1px solid var(--line);
}

.season-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.season-tabs button {
  min-height: 72px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  transition: background 180ms ease, color 180ms ease;
}

.season-tabs button:first-child {
  border-left: 1px solid var(--line);
}

.season-tabs button[aria-selected="true"] {
  background: var(--ink);
  color: var(--deep);
}

.season-stage {
  --season-accent: #a9bd92;
  position: relative;
  display: grid;
  min-height: 440px;
  overflow: hidden;
  padding: clamp(32px, 5vw, 62px);
  border: 1px solid var(--line);
  border-top: 0;
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--season-accent) 22%, transparent), transparent 52%),
    #131814;
  transition: background 300ms ease;
}

.season-stage[data-active-season="summer"] { --season-accent: #d8b452; }
.season-stage[data-active-season="autumn"] { --season-accent: #b7684e; }
.season-stage[data-active-season="winter"] { --season-accent: #90aab3; }

.season-character {
  position: absolute;
  top: -46px;
  right: -10px;
  color: color-mix(in srgb, var(--season-accent) 16%, transparent);
  font-size: clamp(220px, 31vw, 390px);
  font-weight: 700;
  line-height: 1;
  user-select: none;
}

.season-copy {
  z-index: 1;
  align-self: end;
  max-width: 640px;
}

.season-copy > p:first-child {
  margin-bottom: 16px;
  color: var(--season-accent);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.season-copy h3 {
  margin-bottom: 18px;
  font-size: clamp(28px, 3.8vw, 48px);
  font-weight: 500;
  line-height: 1.38;
}

.season-copy > p:last-child {
  max-width: 560px;
  margin-bottom: 0;
  color: var(--muted);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 2;
}

.season-mark {
  position: absolute;
  top: 36px;
  left: 38px;
  display: flex;
  gap: 7px;
}

.season-mark span {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--season-accent);
}

.season-mark span:nth-child(2) { opacity: 0.55; }
.season-mark span:nth-child(3) { opacity: 0.25; }

.rhythm-section {
  padding: 132px 0;
  border-top: 1px solid var(--line);
  background: var(--forest);
}

.rhythm-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(48px, 8vw, 118px);
}

.rhythm-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rhythm-list li {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.rhythm-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.rhythm-list time {
  padding-top: 4px;
  color: var(--amber);
  font-family: Georgia, serif;
  font-size: 13px;
}

.rhythm-list strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 500;
}

.rhythm-list p {
  margin-bottom: 0;
  color: var(--muted);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.8;
}

.letter-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(48px, 8vw, 118px);
  align-items: start;
  padding: 132px 0;
}

.privacy-note {
  margin-top: 28px;
  color: #777e75 !important;
  font-size: 11px !important;
}

.letter-form {
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid var(--line);
  background: #121713;
}

.letter-form > label,
.letter-controls > label {
  display: block;
  margin-bottom: 14px;
  color: var(--paper);
  font-size: 18px;
}

.letter-form textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  padding: 20px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.9;
}

.letter-form textarea::placeholder {
  color: #686e68;
}

.letter-form textarea:focus {
  border-color: var(--amber);
}

.letter-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 20px;
  align-items: end;
  padding-top: 24px;
}

.letter-controls > label {
  grid-column: 1 / -1;
  margin-bottom: 0;
  color: var(--muted);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
}

.letter-controls select,
.letter-controls button {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 0;
}

.letter-controls select {
  width: 100%;
  padding: 0 14px;
  background: #171d18;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.letter-controls button {
  padding: 0 24px;
  border-color: var(--ink);
  background: var(--ink);
  color: var(--deep);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.letter-controls button span {
  margin-left: 20px;
}

.letter-status {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--amber);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
}

.closing-section {
  display: grid;
  min-height: 76vh;
  padding: 90px 24px;
  place-items: center;
  background:
    linear-gradient(rgba(10, 12, 10, 0.5), rgba(10, 12, 10, 0.88)),
    url("assets/time-dawn.jpg") center / cover;
}

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

.closing-section h2 {
  margin-bottom: 42px;
  font-size: clamp(46px, 7vw, 88px);
}

footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  padding: 30px clamp(24px, 4.6vw, 72px);
  color: var(--muted);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
}

footer span:nth-child(2) {
  text-align: center;
}

footer span:last-child {
  text-align: right;
}

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

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

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

  nav {
    display: none;
  }

  .header-date {
    display: block;
  }

  .today-section,
  .seasons-section,
  .rhythm-grid,
  .letter-section {
    grid-template-columns: 1fr;
  }

  .today-section,
  .seasons-section,
  .letter-section {
    gap: 54px;
  }

  .chapter {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .chapter > p {
    grid-column: 2;
  }
}

@media (max-width: 680px) {
  :root {
    --shell: calc(100% - 36px);
  }

  .site-header {
    min-height: 64px;
    padding: 0 18px;
  }

  .brand-name {
    font-size: 13px;
  }

  .header-date {
    display: none;
  }

  .hero {
    min-height: 86svh;
    align-items: end;
  }

  .hero-image {
    background-position: 62% center;
  }

  .hero-shade {
    background:
      linear-gradient(0deg, rgba(8, 10, 9, 0.96) 0%, rgba(8, 10, 9, 0.52) 62%, rgba(8, 10, 9, 0.32)),
      linear-gradient(90deg, rgba(8, 10, 9, 0.7), transparent);
  }

  .hero-content {
    padding: 120px 0 76px;
  }

  h1 {
    font-size: clamp(58px, 20vw, 82px);
  }

  .hero-lead {
    font-size: 15px;
    line-height: 1.8;
  }

  .hero-meta {
    display: none;
  }

  .today-section,
  .chapters-section,
  .seasons-section,
  .rhythm-section,
  .letter-section {
    padding-top: 88px;
    padding-bottom: 88px;
  }

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

  .day-progress {
    grid-row: auto;
  }

  .progress-ring {
    width: 172px;
    margin: 0 auto;
  }

  .today-details {
    grid-template-columns: 1fr;
  }

  .today-details div {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .today-details strong {
    font-size: 22px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 56px;
  }

  .chapter {
    grid-template-columns: 42px 1fr;
    gap: 20px;
    padding: 30px 0 34px;
  }

  .chapter:hover {
    padding-right: 0;
    padding-left: 0;
  }

  .chapter > p {
    grid-column: 1 / -1;
    padding-left: 62px;
  }

  .interlude {
    min-height: 44vh;
    background-attachment: scroll;
  }

  .season-stage {
    min-height: 450px;
    padding: 30px 24px;
  }

  .season-character {
    top: 0;
    font-size: 220px;
  }

  .season-copy h3 {
    font-size: 30px;
  }

  .season-mark {
    top: 28px;
    left: 24px;
  }

  .rhythm-list li {
    grid-template-columns: 64px 1fr;
    gap: 18px;
  }

  .letter-controls {
    grid-template-columns: 1fr;
  }

  .letter-controls button {
    width: 100%;
  }

  .closing-section {
    min-height: 62vh;
  }

  footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  footer span:last-child {
    text-align: center;
  }
}

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

  .hero-image,
  .reveal {
    animation: none;
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
