/* 迷路学家Oscar · 总入口  v2  2026-11-17
   Colors match 奥斯卡路书 / 入境卡助手, plus a warm coral accent. */

:root {
  --bg: #f6f3ee;
  --bg-card: #fffcf8;
  --ink: #1f2a33;
  --ink-2: #3a4650;
  --muted: #3a4650;
  --line: #e4ded4;
  --line-soft: #eee9e0;
  --brand: #4a6f8c;
  --brand-hover: #3e5f78;
  --brand-soft: #e8eef3;
  --brand-ring: rgba(74, 111, 140, 0.28);
  --btn-bg: #4a6f8c;
  --btn-text: #fff;
  --accent: #c45c4a;
  --accent-soft: #f3e0d8;
  --map-land: #e4d3bb;
  --map-stroke: #4a6f8c;
  --map-sea: #dce8ee;
  --wash-top: #f8e6d4;
  --wash-bottom: #e4eef3;
  --shadow: 0 1px 2px rgba(31, 42, 51, 0.05), 0 8px 24px rgba(31, 42, 51, 0.06);
  --shadow-hover: 0 2px 4px rgba(31, 42, 51, 0.06), 0 16px 40px rgba(31, 42, 51, 0.1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 20px;
  --max: 70rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14191d;
    --bg-card: #1c2328;
    --ink: #e8edf0;
    --ink-2: #b7c3cb;
    --muted: #b7c3cb;
    --line: #34404a;
    --line-soft: #29323a;
    --brand: #93b8d6;
    --brand-hover: #b0cde4;
    --brand-soft: #22313d;
    --brand-ring: rgba(147, 184, 214, 0.4);
    --btn-bg: #4a6f8c;
    --btn-text: #fff;
    --accent: #e09a86;
    --accent-soft: #3a2a26;
    --map-land: #2c3c48;
    --map-stroke: #93b8d6;
    --map-sea: #1a242c;
    --wash-top: #1c1714;
    --wash-bottom: #141c22;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.28);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(70rem 28rem at 6% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 55%),
    radial-gradient(50rem 24rem at 100% 0%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 52%),
    linear-gradient(180deg, var(--wash-top) 0%, var(--bg) 28%, var(--bg) 70%, var(--wash-bottom) 100%);
  padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
  padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .route-mask { stroke-dashoffset: 0 !important; }
}

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

h1, h2, h3 { text-wrap: balance; margin: 0; }
p, li { text-wrap: pretty; }

a { color: var(--brand); }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--brand-ring);
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 20;
  padding: 0.5rem 0.85rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 600;
  transform: translateY(-200%);
}
.skip:focus,
.skip:focus-visible { transform: none; }

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

/* i18n: default Chinese; JS sets html[data-lang] */
.i18n-en { display: none; }
html[data-lang="en"] .i18n-zh { display: none; }
html[data-lang="en"] .i18n-en { display: inline; }
html[data-lang="en"] p .i18n-en,
html[data-lang="en"] h1 .i18n-en,
html[data-lang="en"] h2 .i18n-en,
html[data-lang="en"] .hook .i18n-en,
html[data-lang="en"] .note .i18n-en,
html[data-lang="en"] figcaption .i18n-en,
html[data-lang="en"] .stats .i18n-en { display: inline; }

.wrap {
  width: min(100%, var(--max));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ---- doodles (decorative) ---- */
.doodles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.doodle {
  position: absolute;
  color: var(--brand);
  opacity: 0.15;
  fill: none;
  stroke: currentColor;
}
@media (prefers-color-scheme: dark) {
  .doodle { opacity: 0.2; }
}
.doodle-plane { top: 5.2rem; right: 3%; width: 6.2rem; }
.doodle-boat { bottom: 5.5rem; left: 2%; width: 3.4rem; }
.doodle-pack { top: 38%; left: 1.2%; width: 2.4rem; }
.doodle-stamp { top: 46%; right: 1.5%; width: 3rem; color: var(--accent); }
.doodle-palm { bottom: 1.5rem; right: 6%; width: 2.6rem; }
.doodle-mtn { bottom: 2.2rem; left: 18%; width: 3.2rem; }

@media (max-width: 47.99rem) {
  .doodle { opacity: 0.1; }
  .doodle-pack, .doodle-stamp, .doodle-mtn { display: none; }
  .doodle-plane { top: 4.2rem; right: -0.4rem; width: 4.6rem; }
  .doodle-boat { left: auto; right: 4%; bottom: 4.8rem; width: 2.6rem; }
  .doodle-palm { left: 3%; right: auto; bottom: 1.2rem; }
}

/* ---- header ---- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: max(1rem, env(safe-area-inset-top, 0px));
  padding-bottom: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 0.55rem;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--ink);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-card);
  flex-shrink: 0;
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  min-height: 2.5rem;
  min-width: 2.75rem;
  padding: 0 0.85rem;
  border-radius: 999px;
  cursor: pointer;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--btn-bg);
  color: var(--btn-text);
}

/* ---- hero + map ---- */
.hero-block {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  padding: 0.5rem 0 0.35rem;
}

@media (min-width: 52rem) {
  .hero-block {
    grid-template-columns: minmax(0, 1fr) minmax(16.5rem, 21rem);
    gap: 1.5rem 2rem;
    padding: 0.6rem 0 0.5rem;
    align-items: start;
  }
  .hero { padding-top: 1.1rem; }
}

.hero { max-width: 38rem; }

.kicker {
  margin: 0 0 0.45rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brand);
}

.hero h1 {
  font-size: clamp(1.65rem, 4vw + 0.8rem, 2.5rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.lede {
  margin: 0.7rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-2);
}

.hero-map {
  margin: 0;
  background: var(--map-sea);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  padding: 0.4rem 0.4rem 0;
  overflow: hidden;
}

.hero-map svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 18.5rem;
  margin: 0 auto;
}

@media (min-width: 52rem) {
  .hero-map svg {
    width: auto;
    max-width: 100%;
    max-height: 22rem;
  }
}

.hero-map .land {
  fill: var(--map-land);
  stroke: var(--map-stroke);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.hero-map .wave {
  fill: none;
  stroke: var(--map-stroke);
  stroke-width: 1.15;
  stroke-linecap: round;
  opacity: 0.35;
}

.hero-map .route {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 5 4;
}

.hero-map .route-mask {
  fill: none;
  stroke: #fff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw-route 2.4s var(--ease) 0.35s forwards;
}

.hero-map .dot {
  fill: var(--accent);
  stroke: var(--bg-card);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: pop-dot 0.45s var(--ease) backwards;
}
.hero-map .dot:nth-of-type(1) { animation-delay: 0.7s; }
.hero-map .dot:nth-of-type(2) { animation-delay: 1.15s; }
.hero-map .dot:nth-of-type(3) { animation-delay: 1.6s; }
.hero-map .dot:nth-of-type(4) { animation-delay: 2.15s; }

@keyframes draw-route {
  to { stroke-dashoffset: 0; }
}
@keyframes pop-dot {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.hero { animation: rise 0.7s var(--ease) both; }
.hero-map { animation: rise 0.8s var(--ease) 0.1s both; }

.hero-map figcaption {
  margin: 0;
  padding: 0.15rem 0.7rem 0.45rem;
  text-align: right;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--ink-2);
}

/* ---- stats ---- */
.stats {
  list-style: none;
  margin: 1.15rem 0 1.6rem;
  padding: 0.85rem 0.5rem;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.65rem 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  box-shadow: var(--shadow);
  animation: rise 0.7s var(--ease) 0.18s both;
}

/* 11 / 34 / 12 on the first row; the two longer labels share the second. */
.stats li:nth-child(1) { grid-column: 1 / 3; grid-row: 1; }
.stats li:nth-child(2) { grid-column: 3 / 5; grid-row: 1; }
.stats li:nth-child(5) { grid-column: 5 / 7; grid-row: 1; }
.stats li:nth-child(3) { grid-column: 1 / 4; grid-row: 2; }
.stats li:nth-child(4) { grid-column: 4 / 7; grid-row: 2; }

@media (min-width: 52rem) {
  .stats {
    grid-template-columns: repeat(5, 1fr);
    padding: 0.95rem 0.4rem;
    gap: 0.4rem;
  }
  .stats li:nth-child(1),
  .stats li:nth-child(2),
  .stats li:nth-child(3),
  .stats li:nth-child(4),
  .stats li:nth-child(5) { grid-column: auto; grid-row: auto; }
}

.stats li {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.1rem;
  padding: 0.15rem 0.35rem;
}

.stats strong {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.stats span {
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--ink-2);
}

/* ---- cards ---- */
.cards {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: 1fr;
  align-items: stretch;
  padding-bottom: 2rem;
}

@media (min-width: 48rem) {
  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0 0 1.3rem;
  min-height: 100%;
  overflow: hidden;
  animation: rise 0.7s var(--ease) both;
}
.card:nth-child(1) { animation-delay: 0.26s; }
.card:nth-child(2) { animation-delay: 0.38s; }

@media (min-width: 48rem) {
  .card { padding-bottom: 1.45rem; }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card {
    transition: transform 280ms var(--ease), box-shadow 280ms var(--ease), border-color 280ms var(--ease);
  }
  .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  }
}
.card:has(.cta:active) { transform: translateY(-2px); }

.card-art {
  height: 6.75rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
}
.card-art--entry { background: var(--accent-soft); }
.card-art--guide { background: var(--brand-soft); }
.card-art svg {
  width: 100%;
  height: 100%;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.15rem 1.25rem 0;
  flex: 1 1 auto;
}
@media (min-width: 48rem) {
  .card-body { padding: 0.2rem 1.5rem 0; }
}

.card h2 {
  font-size: clamp(1.35rem, 2vw + 0.8rem, 1.65rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.hook {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.features {
  margin: 0.15rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
  flex: 1 1 auto;
}

.features li {
  display: grid;
  grid-template-columns: 1.15rem 1fr;
  gap: 0.55rem;
  align-items: start;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink);
}

.tick {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  color: var(--brand);
}

.note {
  margin: 0.15rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
  min-height: 3rem;
  width: 100%;
  padding: 0.7rem 1.1rem;
  border-radius: 0.85rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.cta svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* Stretch the main CTA so the whole card is clickable, without nesting links. */
.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

@media (hover: hover) {
  .cta:hover { background: var(--brand-hover); }
}

.cta:focus-visible {
  outline-offset: 2px;
  z-index: 1;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.35rem 0 1.25rem;
  text-align: center;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.footer-line {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}
