/* ==========================================================================
   幸运澳洲站 · 共享样式 /assets/site.css
   ========================================================================== */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, figcaption, blockquote, dl, dd, hr {
  margin: 0;
}
ul, ol { padding: 0; }
ul[class], ol[class] { list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; }
button, [role="tab"] { cursor: pointer; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--yellow-400);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- 2. Tokens ---------- */
:root {
  color-scheme: dark;

  --ink-900: #0E1116;
  --ink-700: #1A222B;
  --ochre-600: #B24A22;
  --ochre-300: #E39A6B;
  --sea-700: #0F3A5F;
  --sea-400: #3E7FA8;
  --yellow-400: #F2C230;
  --turquoise-400: #2FA48E;
  --sand-100: #F3EDE3;
  --line-gold: #7A5A2E;

  --font-heading: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --header-h: 56px;
  --wrap: 1280px;
  --gutter: clamp(20px, 5vw, 56px);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: 200ms;

  --text-strong: #F3EDE3;
  --text-body: #C4BDB2;
  --text-dim: #8E877D;
  --grid-line: rgba(122, 90, 46, .09);
}

/* ---------- 3. Base / 中文排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink-900);
  background-image:
    radial-gradient(1100px 620px at 88% -12%, rgba(15, 58, 95, .55), transparent 68%),
    radial-gradient(900px 520px at -8% 14%, rgba(178, 74, 34, .16), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: auto, auto, 96px 96px, 96px 96px;
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.18;
  letter-spacing: -.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 900; line-height: 1.06; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
h4 { font-size: 1.05rem; letter-spacing: 0; }

p { line-height: 1.8; }
strong { color: var(--text-strong); font-weight: 700; }
small { font-size: .82em; }

.num,
[class*="__num"] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

::selection { background: var(--ochre-600); color: var(--sand-100); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 4. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 999;
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--yellow-400);
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 180ms var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 5. Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 220ms var(--ease), border-color 220ms var(--ease);
}

.site-header[data-scrolled] {
  background-color: rgba(14, 17, 22, .94);
  border-bottom-color: rgba(122, 90, 46, .6);
}

.site-header[data-open] {
  background-color: rgba(14, 17, 22, .98);
  border-bottom-color: rgba(122, 90, 46, .8);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  width: 100%;
  max-width: var(--wrap);
  min-height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.header-rule {
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-gold) 16%, var(--line-gold) 84%, transparent);
  opacity: .55;
}

/* 品牌字标 */
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: .55em;
  white-space: nowrap;
  text-decoration: none;
  flex: 0 0 auto;
}
.brand__mark {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: -.01em;
  color: var(--sand-100);
}
.brand__suffix {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--ochre-300);
  text-transform: uppercase;
}
.brand--footer .brand__mark { font-size: 22px; }
.brand:hover .brand__suffix { color: var(--yellow-400); }

/* 固定序号条 */
.nav { margin-left: auto; }

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(2px, 1.8vw, 26px);
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 17px 2px 15px;
  color: #B9B2A7;
  text-decoration: none;
  transition: color 180ms var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 7px;
  height: 2px;
  background: var(--ochre-600);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 200ms var(--ease), background-color 200ms var(--ease);
}
.nav__link:hover .nav__label,
.nav__link:focus-visible .nav__label { color: var(--sand-100); }
.nav__link:hover::after,
.nav__link:focus-visible::after {
  transform: scaleX(1);
  background: var(--ochre-300);
}
.nav__link[aria-current="page"] .nav__label { color: var(--sand-100); }
.nav__link[aria-current="page"] .nav__num { color: var(--yellow-400); }
.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--ochre-600);
}

.nav__num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  color: var(--sea-400);
  transition: color 180ms var(--ease);
}
.nav__label {
  font-size: 13.5px;
  letter-spacing: .04em;
  white-space: nowrap;
  transition: color 180ms var(--ease);
}

/* 移动端开关 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 9px 16px;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-pill);
  color: var(--sand-100);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .18em;
  transition: border-color 180ms var(--ease), color 180ms var(--ease);
}
.nav-toggle:hover { border-color: var(--ochre-300); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
  transition: background-color 160ms var(--ease), box-shadow 160ms var(--ease);
}

.site-header[data-open] .nav-toggle {
  border-color: var(--yellow-400);
  color: var(--yellow-400);
}
.site-header[data-open] .nav-toggle__bars {
  background: transparent;
  box-shadow: none;
}
.site-header[data-open] .nav-toggle__bars::before,
.site-header[data-open] .nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 18px; height: 2px;
  background: currentColor;
}
.site-header[data-open] .nav-toggle__bars::before { transform: rotate(45deg); }
.site-header[data-open] .nav-toggle__bars::after { transform: rotate(-45deg); }

/* ---------- 6. Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { position: relative; padding-block: clamp(56px, 8vw, 112px); }
.section--band { border-top: 6px solid var(--ochre-600); }
.section--band-sea { border-top: 6px solid var(--sea-700); }

.rule-band { height: 6px; background: var(--ochre-600); border: 0; }
.rule-band--sea { background: var(--sea-700); }

.prose { max-width: 72ch; }
.prose > * + * { margin-top: 1.05em; }
.prose p { max-width: 68ch; }
.prose h2 { margin-top: 1.9em; }
.prose h3 { margin-top: 1.6em; color: var(--ochre-300); }
.prose ul, .prose ol { padding-left: 1.35em; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .5em; }
.prose a {
  color: var(--yellow-400);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.prose a:hover { color: var(--sand-100); }
.prose strong { color: var(--sand-100); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ochre-300);
}

.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- 7. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  padding: .82em 1.75em;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--ochre-600); color: var(--sand-100); }
.btn--primary:hover { background: var(--ochre-300); color: var(--ink-900); }

.btn--yellow { background: var(--yellow-400); color: var(--ink-900); }
.btn--yellow:hover { background: var(--sand-100); color: var(--ink-900); }

.btn--ghost { border-color: var(--line-gold); color: var(--sand-100); }
.btn--ghost:hover { border-color: var(--yellow-400); color: var(--yellow-400); }

/* ---------- 8. Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .55em;
  padding-block: 18px 6px;
  font-size: 12.5px;
  letter-spacing: .03em;
  color: var(--text-dim);
}
.breadcrumb a {
  color: var(--sea-400);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.breadcrumb a:hover { color: var(--yellow-400); border-bottom-color: currentColor; }
.breadcrumb__sep { font-family: var(--font-mono); opacity: .55; }

/* ---------- 9. Plates（票据 / 铭牌 / 条带） ---------- */
.plate {
  position: relative;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-lg);
  background: var(--ink-700);
  overflow: hidden;
}
.plate > * + * { margin-top: .85em; }

.plate--ticket {
  border-color: transparent;
  border-radius: 14px;
  box-shadow: inset 0 0 0 4px var(--ink-900), inset 0 0 0 5px var(--line-gold);
}

.plate--nameplate {
  border-radius: var(--radius-sm);
  background: rgba(15, 58, 95, .38);
  box-shadow: inset 0 0 0 4px rgba(14, 17, 22, .6);
}

.plate--strip {
  padding: 18px 0;
  border: 0;
  border-top: 1px solid var(--line-gold);
  border-bottom: 1px solid var(--line-gold);
  border-radius: 0;
  background: transparent;
}

.plate__num {
  position: absolute;
  right: 18px; bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--ochre-300);
}

/* ---------- 10. Figure ---------- */
.figure-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(140deg, rgba(15, 58, 95, .55), rgba(14, 17, 22, .9) 62%),
    var(--ink-700);
}
.figure-frame--wide { aspect-ratio: 21 / 9; }
.figure-frame--tall { aspect-ratio: 4 / 5; }

.figure-frame__img,
.figure-frame > img,
.figure-frame > svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(122, 90, 46, .22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 90, 46, .22) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: .45;
}
.figure-frame__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--text-dim);
}

/* ---------- 11. Tabs ---------- */
.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tabs__tab {
  padding: .62em 1.15em;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-pill);
  background: transparent;
  color: #B9B2A7;
  font-size: 13.5px;
  letter-spacing: .03em;
  transition: background-color 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease);
}
.tabs__tab:hover { border-color: var(--ochre-300); color: var(--sand-100); }
.tabs__tab[aria-selected="true"] {
  background: var(--yellow-400);
  border-color: var(--yellow-400);
  color: var(--ink-900);
  font-weight: 700;
}
.tabs__tab[aria-selected="true"]:hover { color: var(--ink-900); }
.tabs__panel { padding-top: clamp(18px, 3vw, 28px); }
.tabs__panel[hidden] { display: none; }

/* ---------- 12. Checklist ---------- */
.checklist {
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-md);
  background: rgba(26, 34, 43, .62);
  overflow: hidden;
}
.checklist__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  font-size: 15px;
}
.checklist__row + .checklist__row { border-top: 1px solid rgba(122, 90, 46, .42); }

/* ---------- 13. Reveal ---------- */
.is-js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}
.is-js [data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
}

/* ---------- 14. Footer ---------- */
.site-footer {
  position: relative;
  border-top: 6px solid var(--ochre-600);
  background-color: var(--ink-900);
  background-image: linear-gradient(rgba(122, 90, 46, .14) 1px, transparent 1px);
  background-size: 100% 56px;
  color: #B9B2A7;
  font-size: 14px;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.45fr 1fr;
  gap: clamp(28px, 4vw, 52px);
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(48px, 7vw, 88px) var(--gutter) clamp(36px, 4vw, 56px);
}

.footer-block__title {
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .2em;
  line-height: 1.5;
  color: var(--ochre-300);
}

.footer-brand__line {
  margin-top: 18px;
  max-width: 24ch;
  font-family: var(--font-heading);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: .01em;
  color: #B9B2A7;
}

.footer-nav__list { display: grid; gap: 10px; }

.footer-nav__link {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  padding-block: 2px;
  color: #CFC8BC;
  text-decoration: none;
  transition: color 170ms var(--ease);
}
.footer-nav__link:hover { color: var(--yellow-400); }
.footer-nav__link:hover .footer-nav__num { color: var(--ochre-300); }

.footer-nav__num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--sea-400);
  transition: color 170ms var(--ease);
}

.footer-contact__list { display: grid; gap: 14px; }
.footer-contact__item { display: grid; gap: 2px; }

.footer-contact__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sea-400);
}
.footer-contact__value {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--sand-100);
  word-break: break-word;
}

.footer-note {
  margin-top: 16px;
  max-width: 36ch;
  font-size: 12.5px;
  line-height: 1.72;
  color: var(--text-dim);
}

.footer-legal__list { display: grid; gap: 10px; margin-bottom: 20px; }
.footer-legal__link {
  color: #CFC8BC;
  text-decoration: none;
  border-bottom: 1px solid var(--line-gold);
  padding-bottom: 2px;
  transition: color 170ms var(--ease), border-color 170ms var(--ease);
}
.footer-legal__link:hover { color: var(--yellow-400); border-bottom-color: var(--yellow-400); }

.footer-legal__icp {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .05em;
  color: var(--text-dim);
}

.footer-colophon { border-top: 1px solid rgba(122, 90, 46, .38); background: rgba(15, 58, 95, .18); }
.footer-colophon > p {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 16px var(--gutter);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--text-dim);
}

/* ---------- 15. Responsive ---------- */
@media (max-width: 1024px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .site-header__inner { gap: 12px; }
  .nav-toggle { display: inline-flex; }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    margin: 0;
    padding: 6px 10px 18px;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    background: var(--ink-900);
    border-top: 1px solid var(--line-gold);
    border-bottom: 6px solid var(--ochre-600);
    box-shadow: 0 28px 60px -26px #000;
  }
  .site-header[data-open] .nav { display: block; }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav__link {
    padding: 15px 18px;
    border-bottom: 1px solid rgba(122, 90, 46, .35);
  }
  .nav__link::after { display: none; }
  .nav__link[aria-current="page"] {
    background: rgba(178, 74, 34, .16);
    box-shadow: inset 3px 0 0 var(--ochre-600);
  }
  .nav__link[aria-current="page"] .nav__num { color: var(--yellow-400); }
  .nav__num { font-size: 11px; }
  .nav__label { font-size: 15px; }

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

@media (max-width: 640px) {
  body { font-size: 16px; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .site-footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-brand__line { max-width: none; }
  .footer-note { max-width: none; }
  .breadcrumb { font-size: 12px; }
}

/* ---------- 16. Motion / a11y ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .is-js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
