/* ============================================================
   March, Sunday Reflections — 每日天空志
   ============================================================ */

:root {
  --bg: #000;
  --ink: #f2efe9;
  --ink-dim: #9b978d;
  --ink-faint: #5b5852;
  --line: rgba(242, 239, 233, 0.16);
  --accent: #c8a86b;
  --serif: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.22, .8, .25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(200, 168, 107, .28); color: #fff; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }

/* ---------- header ---------- */
#site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.4rem clamp(1.2rem, 4vw, 3.2rem);
  transition: background .5s var(--ease), padding .5s var(--ease);
}
#site-header.scrolled {
  padding-top: .9rem;
  padding-bottom: .9rem;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.brand {
  font-size: .95rem;
  letter-spacing: .06em;
  font-weight: 500;
  white-space: nowrap;
  opacity: .92;
}
.brand-dot { color: var(--accent); margin: 0 .35em; }

#site-nav { display: flex; gap: clamp(1.2rem, 3vw, 2.6rem); }
#site-nav a {
  font-family: var(--serif);
  font-size: 1.02rem;
  letter-spacing: .28em;
  text-indent: .28em;
  color: var(--ink-dim);
  position: relative;
  padding: .2em 0;
  transition: color .35s;
}
#site-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right .4s var(--ease);
}
#site-nav a:hover, #site-nav a.active { color: var(--ink); }
#site-nav a:hover::after, #site-nav a.active::after { right: 0; }

#nav-toggle { display: none; }

/* ---------- views / transitions ---------- */
main { min-height: 100vh; }
.view { animation: viewIn .9s var(--ease) both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- home / hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: -4%;
  background-size: cover;
  background-position: center;
  animation: slowZoom 24s var(--ease) infinite alternate;
  filter: saturate(.88);
}
@keyframes slowZoom {
  from { transform: scale(1); }
  to   { transform: scale(1.07); }
}
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.28) 46%, rgba(0,0,0,.42) 100%),
    radial-gradient(120% 90% at 80% 0%, transparent 40%, rgba(0,0,0,.35) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 8rem clamp(1.2rem, 4vw, 3.2rem) 7rem;
}
.hero-en {
  font-size: .78rem;
  letter-spacing: .5em;
  text-indent: .5em;
  color: var(--accent);
  margin-bottom: 1.6rem;
  font-family: var(--serif);
}
.hero-title {
  font-size: clamp(2.6rem, 7.5vw, 5.2rem);
  font-weight: 400;
  line-height: 1.34;
  letter-spacing: .06em;
  text-shadow: 0 2px 40px rgba(0,0,0,.6);
}
.hero-sub {
  margin-top: 1.4rem;
  color: var(--ink-dim);
  font-size: clamp(.95rem, 1.6vw, 1.1rem);
  letter-spacing: .14em;
}
.hero-actions { margin-top: 3rem; display: flex; flex-wrap: wrap; gap: 2.4rem; align-items: center; }
.hero-link {
  font-size: 1.05rem;
  letter-spacing: .34em;
  text-indent: .34em;
  border-bottom: 1px solid var(--line);
  padding-bottom: .5em;
  transition: border-color .35s, color .35s;
}
.hero-link:hover { border-color: var(--accent); color: var(--accent); }
.hero-count { color: var(--ink-faint); font-size: .92rem; letter-spacing: .18em; }
.hero-count em { font-style: normal; color: var(--ink-dim); }

.hero-scroll {
  position: absolute;
  right: clamp(1.2rem, 4vw, 3.2rem);
  bottom: 2.4rem;
  z-index: 2;
  writing-mode: vertical-rl;
  font-size: .72rem;
  letter-spacing: .5em;
  color: var(--ink-faint);
  animation: drift 2.6s ease-in-out infinite;
}
@keyframes drift { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* latest strip */
.latest {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6.5rem clamp(1.2rem, 4vw, 3.2rem) 4rem;
}
.section-label {
  font-size: .76rem;
  letter-spacing: .46em;
  text-indent: .46em;
  color: var(--ink-faint);
  margin-bottom: 2.6rem;
  text-align: center;
}
.latest-card {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(1.6rem, 4vw, 4rem);
  align-items: center;
}
.latest-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  opacity: .94;
  transition: opacity .5s, transform .8s var(--ease);
}
.latest-card:hover img { opacity: 1; transform: scale(1.015); }
.latest-date { color: var(--accent); font-size: .95rem; letter-spacing: .22em; margin-bottom: 1.2rem; }
.latest-text {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.75;
  letter-spacing: .05em;
  font-weight: 400;
}
.latest-more { display: inline-block; margin-top: 2rem; color: var(--ink-dim); font-size: .98rem; letter-spacing: .28em; }
.latest-more:hover { color: var(--accent); }

/* ---------- archive ---------- */
#view-archive { padding: 9rem 0 5rem; }
.archive-inner { max-width: 1080px; margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 3.2rem); }
.archive-title {
  text-align: center;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 400;
  letter-spacing: .3em;
  text-indent: .3em;
  margin-bottom: .8rem;
}
.archive-sub { text-align: center; color: var(--ink-faint); font-size: .92rem; letter-spacing: .16em; margin-bottom: 4.5rem; }

.year-title {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: .4em;
  text-indent: .4em;
  font-weight: 400;
  margin: 4.2rem 0 2.6rem;
  padding-top: 2.6rem;
  border-top: 1px solid var(--line);
  color: var(--ink);
}
.year-title:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.year-title .en { display: block; font-size: .7rem; letter-spacing: .42em; color: var(--ink-faint); margin-top: .6rem; }

.monets { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 3rem 3.4rem; }
.month-name { font-size: 1.15rem; letter-spacing: .3em; margin-bottom: 1.1rem; color: var(--ink); }
.month-name .en { color: var(--ink-faint); font-size: .72rem; letter-spacing: .3em; margin-left: .8em; }

.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .2rem; text-align: center; }
.cal-wd { font-size: .68rem; color: var(--ink-faint); letter-spacing: .1em; padding-bottom: .5rem; }
.cal-cell {
  font-size: .92rem;
  aspect-ratio: 1/1.15;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #3a3833;
  font-family: var(--serif);
}
a.cal-cell { color: var(--ink); cursor: pointer; transition: color .3s; }
a.cal-cell::before {
  content: '';
  position: absolute;
  inset: 16% 10%;
  border: 1px solid transparent;
  transition: border-color .35s, background .35s, inset .35s var(--ease);
}
a.cal-cell:hover { color: var(--accent); }
a.cal-cell:hover::before { border-color: rgba(200,168,107,.55); inset: 6%; }

/* ---------- detail ---------- */
#view-detail { padding: 7rem 0 6rem; }
.detail-inner { max-width: 920px; margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 3.2rem); }
.detail-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2rem; }
.detail-back, .detail-nav { color: var(--ink-dim); font-size: .92rem; letter-spacing: .24em; transition: color .3s; }
.detail-back:hover, .detail-nav:hover { color: var(--accent); }
.detail-navs { display: flex; gap: 1.8rem; }
.detail-photo {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #0a0a0a;
}
.detail-meta { text-align: center; margin: 2.4rem 0 1.6rem; }
.detail-date { font-size: 1.35rem; letter-spacing: .22em; font-weight: 400; }
.detail-weekday { color: var(--ink-faint); font-size: .82rem; letter-spacing: .4em; margin-top: .5rem; }
.detail-text {
  text-align: center;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  line-height: 2.1;
  letter-spacing: .08em;
  max-width: 640px;
  margin: 0 auto;
  color: var(--ink);
  font-weight: 400;
  white-space: pre-wrap;
}
.detail-text:empty { display: none; }
.detail-bottom-nav { display: flex; justify-content: space-between; margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.detail-bottom-nav .detail-nav.disabled { pointer-events: none; color: #33312d; }

/* ---------- about / message ---------- */
.narrow {
  max-width: 660px;
  margin: 0 auto;
  padding: 11rem clamp(1.4rem, 4vw, 2rem) 6rem;
  min-height: 100vh;
}
.narrow-title { font-size: clamp(1.9rem, 4vw, 2.5rem); font-weight: 400; letter-spacing: .3em; text-indent: .3em; text-align: center; }
.narrow-en { text-align: center; color: var(--ink-faint); font-size: .82rem; letter-spacing: .34em; margin: .9rem 0 3.6rem; }
.prose p { font-size: 1.12rem; line-height: 2.35; letter-spacing: .05em; margin-bottom: 1.8rem; color: #dedad1; }
.prose p:first-of-type::first-letter {
  font-size: 2.6em;
  float: left;
  line-height: 1;
  padding: .08em .18em 0 0;
  color: var(--accent);
  font-family: var(--serif);
}
.prose .sign { color: var(--ink-faint); text-align: right; letter-spacing: .2em; margin-top: 3rem; font-size: .95rem; }

/* form */
.message-form { margin-top: 1rem; }
.field { margin-bottom: 2.4rem; position: relative; }
.field label { display: block; font-size: .82rem; letter-spacing: .3em; color: var(--ink-dim); margin-bottom: .7rem; }
.field input, .field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: .05em;
  padding: .7rem .1rem;
  outline: none;
  resize: vertical;
  transition: border-color .3s;
}
.field textarea { min-height: 140px; line-height: 1.9; }
.field input:focus, .field textarea:focus { border-bottom-color: var(--accent); }
.field.honeypot { position: absolute; left: -9999px; }

.submit-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: .4em;
  text-indent: .4em;
  padding: .95em 2.6em;
  cursor: pointer;
  transition: all .4s var(--ease);
}
.submit-btn:hover { border-color: var(--accent); color: var(--accent); }
.submit-btn:disabled { opacity: .5; cursor: wait; }

.form-note { margin-top: 2.4rem; color: var(--ink-faint); font-size: .92rem; line-height: 2; letter-spacing: .06em; }
.form-note a { color: var(--accent); border-bottom: 1px solid rgba(200,168,107,.4); }
.form-status { margin-top: 1.8rem; font-size: 1rem; letter-spacing: .08em; line-height: 1.9; min-height: 1.5em; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: #d98b6f; }

.featured { margin-top: 5.5rem; }
.featured h3 { font-weight: 400; font-size: 1rem; letter-spacing: .36em; color: var(--ink-dim); margin-bottom: 2.2rem; text-align: center; }
.msg-item { padding: 1.8rem 0; border-top: 1px solid var(--line); }
.msg-item:first-of-type { border-top: 0; }
.msg-head { display: flex; justify-content: space-between; color: var(--ink-dim); font-size: .85rem; letter-spacing: .14em; margin-bottom: .7rem; }
.msg-head .who { color: var(--ink); }
.msg-body { font-size: 1.05rem; color: #cfcbc2; line-height: 2; letter-spacing: .04em; }
.msg-empty { text-align: center; color: var(--ink-faint); letter-spacing: .15em; }

/* ---------- footer ---------- */
#site-footer {
  border-top: 1px solid var(--line);
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.4rem clamp(1.2rem, 4vw, 3.2rem) 2.8rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-faint);
  font-size: .82rem;
  letter-spacing: .14em;
  flex-wrap: wrap;
}
.footer-en { font-style: italic; font-family: var(--serif); font-size: .95rem; letter-spacing: .05em; }

/* ---------- hover preview ---------- */
.hover-preview {
  position: fixed;
  z-index: 80;
  width: 220px;
  top: -9999px;
  left: -9999px;
  pointer-events: none;
  box-shadow: 0 12px 50px rgba(0,0,0,.7);
  border: 1px solid var(--line);
}
.hover-preview img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  #site-nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(72vw, 300px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    background: rgba(8,8,8,.96);
    backdrop-filter: blur(18px);
    transform: translateX(100%);
    transition: transform .5s var(--ease);
  }
  #site-nav.open { transform: none; }
  #site-nav a { font-size: 1.3rem; }
  #nav-toggle {
    display: block;
    background: none;
    border: 1px solid var(--line);
    color: var(--ink);
    font-family: var(--serif);
    letter-spacing: .2em;
    font-size: .82rem;
    padding: .4em .9em;
    cursor: pointer;
    z-index: 60;
  }
  .latest-card { grid-template-columns: 1fr; gap: 1.8rem; }
  .hero-scroll { display: none; }
  .detail-bottom-nav { gap: 1rem; }
  .monets { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
