/* ==========================================================
   蜜桃视界 Site Kit
   共享样式 /assets/site.css
   ========================================================== */

/* ---------- CSS Variables ---------- */
:root {
  --peach: #FFB7C5;
  --peach-soft: #FFE3E8;
  --purple: #6B1A3A;
  --purple-deep: #2A0A1A;
  --gold: #D4AF37;
  --rock: #7A7A6A;
  --footer-text: #8C8C7C;
  --moss: #4A5D4E;
  --terracotta: #C26A4E;
  --cream: #F5EFE6;
  --ink: #1A1A1A;

  --font-serif: "Playfair Display", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  --font-sans: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Helvetica Neue", Arial, sans-serif;

  --text-display: clamp(2.5em, 6vw, 4em);
  --text-h1: clamp(2em, 4vw, 3em);
  --text-h2: clamp(1.5em, 3vw, 2.2em);
  --text-h3: clamp(1.2em, 2vw, 1.5em);
  --text-body: 1rem;
  --text-small: 0.875rem;

  --page-width: 76rem;
  --page-gutter: clamp(1rem, 4vw, 2rem);
  --nav-gap: clamp(0.75rem, 1.5vw, 1.75rem);

  --shadow-sm: 0 2px 8px rgba(42, 10, 26, 0.12);
  --shadow-md: 0 6px 24px rgba(42, 10, 26, 0.18);
  --shadow-peach: 0 0 24px rgba(255, 183, 197, 0.28);

  --gold-line: 1px solid rgba(212, 175, 55, 0.35);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 16px;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--cream);
  background: var(--purple-deep);
  overflow-x: hidden;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

ul,
ol {
  padding-left: 1.6em;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-wrap: balance;
  margin: 0 0 0.75em;
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }

p {
  margin: 0 0 1em;
  max-width: 70ch;
}

[hidden] {
  display: none !important;
}

/* ---------- Main Content Shell ---------- */
#main-content {
  flex: 1 0 auto;
  background: var(--cream);
  color: var(--ink);
  outline: none;
}

#main-content:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: -2px;
}

/* ---------- Focus Visible ---------- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 1300;
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--peach);
  color: var(--purple-deep);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 1px solid var(--gold);
  transition: top 0.2s ease;
}

.skip-link:focus-visible {
  top: 0.75rem;
}

/* ---------- Scroll Progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1200;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--peach), var(--gold));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

/* ---------- Typography Helpers ---------- */
.page-title {
  font-size: var(--text-h1);
  line-height: 1.18;
  letter-spacing: 0.02em;
}

.section-title {
  font-size: var(--text-h2);
  line-height: 1.25;
}

.lead {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--rock);
}

/* ---------- Section ---------- */
.section {
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.section--tight {
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
}

.section--alt {
  background: var(--peach-soft);
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(12, 1fr);
}

.grid__item {
  grid-column: 1 / -1;
}

@media (min-width: 640px) {
  .grid__item--half { grid-column: span 6; }
  .grid__item--third { grid-column: span 4; }
  .grid__item--quarter { grid-column: span 3; }
  .grid__item--two-thirds { grid-column: span 8; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn--primary {
  background: var(--peach);
  color: var(--purple-deep);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--gold);
  color: var(--purple-deep);
  box-shadow: var(--shadow-peach);
}

.btn--outline {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold);
}

.btn--outline:hover,
.btn--outline:focus-visible {
  background: rgba(212, 175, 55, 0.12);
  color: var(--cream);
}

.btn--dark {
  background: var(--purple);
  color: var(--cream);
}

.btn--dark:hover,
.btn--dark:focus-visible {
  background: var(--purple-deep);
  color: var(--peach);
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  margin-bottom: 1.5rem;
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--rock);
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.breadcrumbs__item + .breadcrumbs__item::before {
  content: '/';
  color: var(--rock);
  opacity: 0.5;
}

.breadcrumbs__link {
  color: var(--purple);
  text-decoration: none;
}

.breadcrumbs__link:hover,
.breadcrumbs__link:focus-visible {
  color: var(--gold);
  text-decoration: underline;
}

.breadcrumbs__link[aria-current="page"] {
  color: var(--rock);
  text-decoration: none;
  pointer-events: none;
}

/* ---------- Card ---------- */
.card {
  background: var(--cream);
  border: 1px solid rgba(122, 122, 106, 0.3);
  padding: 1.5rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__title {
  font-size: var(--text-h3);
  margin-bottom: 0.5rem;
}

.card__text {
  font-size: 0.9375rem;
  color: var(--rock);
}

/* ---------- Media Frame ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--purple-deep), var(--purple));
  aspect-ratio: 4 / 3;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.media-frame:hover img,
.media-frame:focus-within img {
  transform: scale(1.03);
}

.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--portrait { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.875rem 1rem;
  background: linear-gradient(transparent, rgba(42, 10, 26, 0.82));
  color: var(--cream);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  margin: 0 0 0 0.5rem;
  padding: 0 0 0 1.75rem;
  border-left: 1px solid var(--rock);
}

.timeline__item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -2.06rem;
  top: 0.4rem;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--gold);
  transform: rotate(45deg);
}

.timeline__date {
  display: block;
  font-size: var(--text-small);
  color: var(--rock);
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.timeline__title {
  font-size: var(--text-h3);
  margin-bottom: 0.35rem;
}

.timeline__text {
  font-size: 0.9375rem;
  color: var(--rock);
}

/* ==========================================================
   Header
   ========================================================== */
.site-header {
  position: relative;
  z-index: 50;
  background: linear-gradient(160deg, var(--purple-deep) 0%, var(--purple) 55%, var(--purple-deep) 100%);
  color: var(--cream);
  border-bottom: var(--gold-line);
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  top: -6rem;
  right: -4rem;
  width: 18rem;
  height: 18rem;
  background: radial-gradient(circle, rgba(255, 183, 197, 0.16) 0%, transparent 70%);
  pointer-events: none;
}

.site-header::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 9rem;
  height: 0.25rem;
  background: linear-gradient(90deg, var(--peach), var(--gold));
  transform: skewX(-24deg);
  transform-origin: left bottom;
  opacity: 0.7;
  pointer-events: none;
}

.site-header__inner {
  position: relative;
  max-width: var(--page-width);
  margin-inline: auto;
  padding: 0.875rem var(--page-gutter) 0.75rem;
}

.site-header__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.22);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: rgba(245, 239, 230, 0.66);
}

.site-header__meta-mark {
  color: var(--gold);
  font-size: 0.625em;
}

.site-header__main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--cream);
  flex-shrink: 0;
}

.brand__mark {
  width: 2.6rem;
  height: auto;
  color: var(--peach);
  filter: drop-shadow(0 0 0.6rem rgba(255, 183, 197, 0.4));
  transition: color 0.2s ease, filter 0.2s ease;
}

.brand:hover .brand__mark,
.brand:focus-visible .brand__mark {
  color: var(--gold);
  filter: drop-shadow(0 0 0.8rem rgba(212, 175, 55, 0.55));
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand__name {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.08em;
}

.brand__label {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1.2;
}

/* Nav Toggle */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  background: transparent;
  border: 1px solid rgba(245, 239, 230, 0.3);
  color: var(--cream);
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--peach);
  background-color: rgba(255, 183, 197, 0.1);
}

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 1rem;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:first-child {
  transform: translateY(3px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

/* Site Nav */
.site-nav {
  flex-basis: 100%;
  order: 3;
  display: none;
  margin-top: 0.25rem;
}

.site-nav[data-open] {
  display: block;
}

.site-nav__list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0;
  border-top: 1px solid rgba(212, 175, 55, 0.22);
}

.site-nav__link {
  display: block;
  padding: 0.75rem 0.25rem;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  color: rgba(245, 239, 230, 0.85);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 239, 230, 0.08);
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--peach);
  border-bottom-color: var(--peach);
  background-color: rgba(255, 183, 197, 0.06);
}

.site-nav__link[aria-current="page"] {
  color: var(--gold);
  border-bottom-color: var(--gold);
  font-weight: 500;
}

/* ==========================================================
   Footer
   ========================================================== */
.site-footer {
  background: linear-gradient(180deg, var(--purple-deep) 0%, #1A0510 100%);
  color: var(--footer-text);
  border-top: 1px solid rgba(212, 175, 55, 0.25);
}

.site-footer__inner {
  max-width: var(--page-width);
  margin-inline: auto;
  padding: 2.5rem var(--page-gutter) 1.75rem;
}

.site-footer__top {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: 1fr;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-footer__mark {
  width: 2.1rem;
  height: auto;
  color: var(--peach);
}

.site-footer__brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.site-footer__brand-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cream);
  line-height: 1.1;
}

.site-footer__brand-en {
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.site-footer__link {
  color: rgba(245, 239, 230, 0.72);
  text-decoration: none;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-footer__link:hover,
.site-footer__link:focus-visible {
  color: var(--peach);
  border-bottom-color: var(--peach);
}

.site-footer__link[aria-current="page"] {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.site-footer__divider {
  margin: 1.75rem 0 1.25rem;
  border: 0;
  border-top: 1px solid rgba(212, 175, 55, 0.18);
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}

.site-footer__legal-link {
  color: var(--peach);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer__legal-link:hover,
.site-footer__legal-link:focus-visible {
  color: var(--gold);
  text-decoration: underline;
}

.site-footer__dot {
  color: var(--rock);
  opacity: 0.55;
}

.site-footer__contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  font-size: 0.8125rem;
  color: var(--footer-text);
  margin-bottom: 0.875rem;
}

.site-footer__copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  font-size: 0.75rem;
  color: var(--footer-text);
  opacity: 0.8;
}

/* ==========================================================
   Responsive Breakpoints
   ========================================================== */
@media (max-width: 479.98px) {
  .site-header__meta {
    display: none;
  }

  .brand__name {
    font-size: 1.4rem;
  }

  .brand__label {
    font-size: 0.575rem;
  }
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .site-header__main {
    flex-wrap: nowrap;
  }

  .site-nav {
    flex-basis: auto;
    order: initial;
    display: block;
    margin-top: 0;
  }

  .site-nav__list {
    flex-direction: row;
    align-items: center;
    gap: var(--nav-gap);
    padding: 0;
    border-top: 0;
  }

  .site-nav__link {
    display: inline-block;
    padding: 0.5rem 0.25rem;
    border-bottom: 1px solid transparent;
  }

  .site-nav__link:hover,
  .site-nav__link:focus-visible {
    background-color: transparent;
    border-bottom-color: var(--peach);
  }

  .site-nav__link[aria-current="page"] {
    border-bottom-color: var(--gold);
  }

  .site-footer__top {
    grid-template-columns: 1.1fr 2fr;
    align-items: start;
  }
}

/* ==========================================================
   Reduced Motion
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
