/* ============================================================
   Jiaming Huang's landscape travel blog — design tokens & base
   Strictly restored from the Ardot design draft (Lovable style)
   ============================================================ */

:root {
  --bg: #f7f4ed;            /* cream page background */
  --ink: #1c1c1c;           /* charcoal text */
  --muted: #5f5f5d;         /* warm grey text */
  --card: #fcfbf8;          /* card surface */
  --border: #eceae4;        /* hairline border */
  --border-strong: #999996; /* ghost button border */
  --radius-badge: 4px;
  --radius-btn: 6px;
  --radius-img: 8px;
  --radius-card: 12px;
  --page-w: 1440px;
  --pad-x: 120px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---------- page shell ---------- */
.page {
  max-width: var(--page-w);
  margin: 0 auto;
  background: var(--bg);
}

/* ---------- navigation (64px, matches every page) ---------- */
.nav {
  height: 64px;
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand { font-size: 18px; font-weight: 600; color: var(--ink); }
.nav__links { display: flex; gap: 32px; align-items: center; }
.nav__link { font-size: 15px; font-weight: 400; color: var(--muted); }
.nav__link:hover { color: var(--ink); }
.nav__link.is-active { font-weight: 500; color: var(--ink); }
.nav__back { font-size: 14px; color: var(--muted); }
.nav__back:hover { color: var(--ink); }

/* dark CTA button (nav pill + primary) — Lovable shadow recipe */
.btn-dark {
  display: inline-flex;
  align-items: center;
  background: var(--ink);
  color: var(--card);
  border-radius: var(--radius-btn);
  font-weight: 400;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 0 0 0.5px rgba(0, 0, 0, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-dark:hover { background: #303030; }
.btn-dark--nav { font-size: 14px; padding: 8px 16px; }
.btn-dark--hero { font-size: 16px; padding: 10px 20px; }
.btn-dark a, .btn-dark span { color: var(--card); }

/* ghost button */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  color: var(--ink);
  border-radius: var(--radius-btn);
  background: transparent;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-ghost:hover { background: rgba(28, 28, 28, 0.04); }
.btn-ghost--hero { font-size: 16px; padding: 10px 20px; }

/* ---------- generic eyebrow / headings ---------- */
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.h1 {
  font-size: 48px;
  line-height: 54px;
  font-weight: 600;
  letter-spacing: -1.2px;
  color: var(--ink);
}
.h2 {
  font-size: 32px;
  line-height: 38px;
  font-weight: 600;
  letter-spacing: -0.8px;
  color: var(--ink);
}

/* ---------- meta chips (pill) ---------- */
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.chip--sm { padding: 6px 12px; font-size: 12.5px; }

/* ---------- card primitive ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

/* ---------- footer ---------- */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px var(--pad-x);
  border-top: 1px solid var(--border);
}
.footer__copy { font-size: 14px; color: var(--muted); }
.footer__links { display: flex; gap: 24px; }
.footer__link { font-size: 14px; color: var(--ink); }
.footer__link:hover { text-decoration: underline; }

/* ---------- media poster (video card cover) ---------- */
.poster {
  position: relative;
  height: 206px;
  background: #eceae4 center/cover no-repeat;
}
.poster img { width: 100%; height: 100%; object-fit: cover; }
.poster__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 48px; height: 48px;
  border-radius: 9999px;
  background: rgba(28, 28, 28, 0.85);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}
.poster:hover .poster__play { transform: translate(-50%, -50%) scale(1.06); background: rgba(28, 28, 28, 0.95); }
.poster__play svg { width: 19px; height: 26px; fill: var(--card); margin-left: 3px; }
.poster__duration {
  position: absolute;
  right: 12px; bottom: 14px;
  padding: 3px 8px;
  border-radius: var(--radius-badge);
  background: rgba(28, 28, 28, 0.75);
  color: var(--card);
  font-size: 12px;
}
.poster--radius-top { border-radius: var(--radius-card) var(--radius-card) 0 0; overflow: hidden; }

/* the real video element once activated */
.poster video, .filmcard video { width: 100%; height: 100%; object-fit: cover; background: #000; }

/* ---------- audio card ---------- */
.audiocard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.audiocard__row { display: flex; align-items: center; gap: 12px; }
.audiocard__play {
  flex: 0 0 36px;
  width: 36px; height: 36px;
  border-radius: 9999px;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 0 0 0.5px rgba(0, 0, 0, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.05);
}
.audiocard__play svg { width: 13px; height: 18px; fill: var(--card); margin-left: 2px; }
.audiocard__play.is-playing svg { margin-left: 0; }
.audiocard__title { flex: 1; font-size: 15px; font-weight: 500; color: var(--ink); }
.audiocard__duration { font-size: 13px; color: var(--muted); }
.audiocard__wave { display: flex; align-items: flex-end; gap: 2px; height: 28px; }
.audiocard__wave i {
  display: block;
  width: 4.12px;
  background: var(--ink);
  border-radius: 2px;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}
.audiocard__wave i.lit { opacity: 1; background: var(--ink); }
.audiocard__wave i.dim { opacity: 0.25; }
.audiocard__caption { font-size: 13px; line-height: 20px; color: var(--muted); }

/* ---------- photo / film / journey cards ---------- */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.mediacard { display: flex; flex-direction: column; }
.mediacard__body { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.mediacard__title { font-size: 16px; font-weight: 500; color: var(--ink); }
.mediacard__meta { font-size: 13px; color: var(--muted); }
.mediacard__caption { font-size: 13px; line-height: 20px; color: var(--muted); }

/* 颐和园 photographs — 2-col 528px cards */
.grid--photos { grid-template-columns: repeat(2, 1fr); }
.photocard__img { height: 352px; }
.photocard__img--tall { height: 704px; }
.photocard__img img { width: 100%; height: 100%; object-fit: cover; }
.photocard__body { padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.photocard__title { font-size: 18px; font-weight: 500; color: var(--ink); }
.photocard__caption { font-size: 14px; line-height: 22px; color: var(--muted); }

/* ---------- journey entry card (homepage) ---------- */
.journeycard { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; transition: box-shadow 0.2s ease, transform 0.2s ease; }
.journeycard:hover { box-shadow: 0 6px 24px rgba(28,28,28,0.08); transform: translateY(-2px); }
.journeycard__img { height: 240px; }
.journeycard__img img { width: 100%; height: 100%; object-fit: cover; }
.journeycard__body { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.journeycard__title { font-size: 20px; font-weight: 400; color: var(--ink); }
.journeycard__desc { font-size: 15px; line-height: 23px; color: var(--muted); }
.journeycard__link { font-size: 15px; font-weight: 500; color: var(--ink); }
.journeycard__link::after { content: ' →'; }

/* ---------- suzhou gallery card ---------- */
.szcard { padding: 10px; display: flex; flex-direction: column; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; }
.szcard__img { height: 260px; border-radius: var(--radius-img); overflow: hidden; background: #eceae4; }
.szcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.szcard:hover .szcard__img img { transform: scale(1.03); }
.szcard__title { font-size: 14px; font-weight: 600; color: var(--ink); }
.szcard__caption { font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* ---------- reflections (essay) ---------- */
.paper-hero { padding: 16px var(--pad-x) 64px; display: flex; flex-direction: column; gap: 24px; border-top: 1px solid var(--border); }
.paper-title { font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -0.6px; max-width: 1100px; }
.paper-meta { font-size: 14px; color: var(--muted); }
.abstract-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.abstract-card__label { font-size: 11.5px; letter-spacing: 1.2px; font-weight: 600; color: var(--muted); }
.abstract-card__text { font-size: 15px; line-height: 25px; color: var(--muted); max-width: 1080px; }
.chapter { padding: 72px var(--pad-x) 80px; display: flex; flex-direction: column; gap: 24px; }
.chapter__body { max-width: 900px; font-size: 16px; line-height: 27px; color: var(--muted); display: flex; flex-direction: column; gap: 24px; }
.figure { height: 360px; border-radius: var(--radius-card); overflow: hidden; }
.figure img { width: 100%; height: 100%; object-fit: cover; }
.figure-caption { font-size: 13px; line-height: 20px; color: var(--muted); }
.refs { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 72px var(--pad-x); display: flex; flex-direction: column; gap: 20px; }
.refs__label { font-size: 11.5px; letter-spacing: 1.2px; font-weight: 600; color: var(--muted); }
.refs__title { font-size: 24px; font-weight: 600; color: var(--ink); }
.refs__list { display: flex; flex-direction: column; gap: 12px; }
.refs__item { font-size: 13.5px; line-height: 21px; color: var(--muted); max-width: 1100px; }

/* ---------- responsive fallback (design is 1440 desktop-first) ---------- */
@media (max-width: 1200px) {
  .grid--3, .grid--photos { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  :root { --pad-x: 24px; }
  .h1 { font-size: 36px; line-height: 42px; }
  .grid--3, .grid--photos, .grid--2 { grid-template-columns: 1fr; }
  .nav__links { display: none; }
  .photocard__img, .photocard__img--tall { height: 260px; }
  .figure { height: 240px; }
}
