/* ==========================================================================
   GIPWEAR — base design system
   Shared tokens, reset, chrome (header / footer), controls, motion
   ========================================================================== */

/* Brand display face — 汇文明朝体 GBK (free for commercial use, see
   assets/fonts/汇文明朝体-授权声明.jpg). Subset to the characters this site
   uses; regenerate with tools/build_font.py after copy changes. */
@font-face {
  font-family: "Huiwen Mincho";
  src: url("../fonts/huiwen-mincho-subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  /* CJK only: Latin/西文 continues to the next family so the distressed
     letterpress Latin of the source font doesn't hit big English headlines */
  unicode-range: U+00B7, U+2014, U+2018-201D, U+2026, U+3000-303F,
                 U+4E00-9FFF, U+F900-FAFF, U+FF01-FF65;
}

:root {
  /* palette — sampled from the brand assets: deep ocean, sea glass, sand, coral */
  --ocean-950: #05161f;
  --ocean-900: #071f2a;
  --ocean-800: #0b2b39;
  --ocean-700: #10404f;
  --ocean-600: #16566a;
  --sea-400: #6fb3b8;
  --sea-300: #9ccdd1;
  --coral: #e2603c;
  --coral-dark: #c44a29;
  --gold: #c9a15a;
  --sand-100: #fbf7ef;
  --sand-200: #f4ecdd;
  --sand-300: #e9dcc4;
  --sand-400: #d9c6a5;
  --ink: #17262e;
  --ink-soft: #4b6068;
  --ink-mute: #7d8f95;
  --line: rgba(23, 38, 46, .12);
  --line-light: rgba(255, 255, 255, .18);

  /* type */
  --serif: "Huiwen Mincho", Georgia, "Iowan Old Style", "Noto Serif SC",
           "Songti SC", "STSong", "SimSun", ui-serif, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;

  /* metrics */
  --wrap: 1200px;
  --wrap-narrow: 880px;
  --radius-s: 8px;
  --radius-m: 16px;
  --radius-l: 26px;
  --shadow-s: 0 2px 10px rgba(7, 31, 42, .08);
  --shadow-m: 0 18px 45px -22px rgba(7, 31, 42, .45);
  --shadow-l: 0 40px 90px -40px rgba(7, 31, 42, .6);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

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

body {
  margin: 0;
  background: var(--sand-100);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

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

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

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

::selection { background: rgba(226, 96, 60, .22); }

/* ---------------------------------------------------------------- layout */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}
.wrap--narrow { max-width: var(--wrap-narrow); }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: 0 0 10px 10px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

/* ---------------------------------------------------------------- type */
.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: .01em;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.lede { font-size: clamp(16px, 1.15vw, 18px); color: var(--ink-soft); line-height: 1.85; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(18px, 4vw, 46px);
  transition: background .35s var(--ease), padding .35s var(--ease),
              box-shadow .35s var(--ease), color .35s var(--ease);
  color: #fff;
}
.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  opacity: .5;
  transition: opacity .3s;
}
.site-header.is-solid {
  background: rgba(251, 247, 239, .92);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  color: var(--ink);
  padding-block: 12px;
  box-shadow: 0 1px 0 rgba(7, 31, 42, .07);
}
.site-header.is-solid::after { opacity: 0; }

/* backdrop-filter creates a containing block for fixed children — drop it
   while the full-screen mobile menu is open so the nav can cover the viewport */
body.menu-open .site-header {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: transparent;
  box-shadow: none;
  color: #fff;
}
body.menu-open .site-header .brand__logo-light { display: block; }
body.menu-open .site-header .brand__logo-dark { display: none; }
body.menu-open .site-header .lang button[aria-pressed="true"] span { color: var(--ocean-900); }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
}
.brand img { height: 26px; width: auto; }
.brand__logo-light { display: block; }
.brand__logo-dark { display: none; }
.site-header.is-solid .brand__logo-light { display: none; }
.site-header.is-solid .brand__logo-dark { display: block; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 34px);
  margin-left: auto;
}
.nav a {
  font-size: 13.5px;
  letter-spacing: .06em;
  opacity: .86;
  position: relative;
  padding: 6px 0;
  transition: opacity .2s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav a:hover { opacity: 1; }
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { opacity: 1; }

.header-tools { display: flex; align-items: center; gap: 10px; position: relative; z-index: 3; }

/* language switch */
.lang {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid currentColor;
  border-radius: 999px;
  opacity: .58;
  transition: opacity .25s;
}
.lang:hover { opacity: .95; }
.lang button {
  font-size: 11.5px;
  letter-spacing: .08em;
  padding: 4px 10px;
  border-radius: 999px;
  opacity: .8;
  transition: background .22s, color .22s, opacity .22s;
  white-space: nowrap;
}
.lang button:hover { opacity: 1; }
.lang button[aria-pressed="true"] {
  background: currentColor;
  opacity: 1;
}
.lang button[aria-pressed="true"] span { color: var(--ocean-900); }
.site-header.is-solid .lang button[aria-pressed="true"] span { color: var(--sand-100); }

.nav-toggle {
  position: relative;
  z-index: 3;
  display: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  opacity: .7;
}
.nav-toggle span {
  display: block;
  width: 16px; height: 1.5px;
  background: currentColor;
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px; height: 1.5px;
  background: currentColor;
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after { transition: transform .3s var(--ease), background .3s; }
body.menu-open .nav-toggle span { background: transparent; }
body.menu-open .nav-toggle span::before { transform: translateY(5px) rotate(45deg); }
body.menu-open .nav-toggle span::after { transform: translateY(-5px) rotate(-45deg); }

/* ---------------------------------------------------------------- buttons */
.btn {
  --btn-bg: var(--coral);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 14px;
  letter-spacing: .1em;
  font-weight: 600;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background .25s, color .25s, border-color .25s;
  box-shadow: 0 10px 24px -14px rgba(226, 96, 60, .9);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); background: var(--coral-dark); }
.btn:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  box-shadow: none;
  opacity: .85;
}
.btn--ghost:hover { background: rgba(255, 255, 255, .08); opacity: 1; }
.on-light .btn--ghost:hover { background: rgba(7, 31, 42, .05); }

.btn--sm { padding: 10px 20px; font-size: 12.5px; letter-spacing: .08em; }

.btn--dark { background: var(--ocean-800); box-shadow: 0 10px 24px -14px rgba(7,31,42,.8); }
.btn--dark:hover { background: var(--ocean-900); }

/* ---------------------------------------------------------------- footer */
.site-footer {
  background: var(--ocean-950);
  color: rgba(255, 255, 255, .72);
  padding: clamp(48px, 7vw, 84px) 0 34px;
  margin-top: 0;
}
.site-footer .f-top {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.site-footer .f-brand { max-width: 330px; }
.site-footer .f-brand img { height: 28px; margin-bottom: 18px; }
.site-footer .f-brand p { font-size: 13.5px; line-height: 1.85; color: rgba(255,255,255,.55); }
.site-footer .f-cols { display: flex; gap: clamp(30px, 5vw, 76px); flex-wrap: wrap; }
.site-footer h4 {
  font-size: 11.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  font-weight: 600;
}
.site-footer .f-cols a {
  display: block;
  font-size: 13.5px;
  padding: 6px 0;
  color: rgba(255, 255, 255, .62);
  transition: color .2s;
}
.site-footer .f-cols a:hover { color: #fff; }
.site-footer .f-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  padding-top: 26px;
  font-size: 12px;
  color: rgba(255, 255, 255, .38);
  letter-spacing: .03em;
}
.site-footer .f-sign {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .12em;
  color: rgba(255, 255, 255, .82);
}

/* ---------------------------------------------------------------- motion */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .12s; }
.reveal[data-delay="2"] { transition-delay: .24s; }
.reveal[data-delay="3"] { transition-delay: .36s; }

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

/* ---------------------------------------------------------------- toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 38px;
  transform: translate(-50%, 24px);
  z-index: 300;
  background: rgba(7, 31, 42, .94);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 13.5px;
  letter-spacing: .03em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  box-shadow: var(--shadow-m);
  max-width: min(90vw, 460px);
  text-align: center;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- page shell */
.page-hero {
  position: relative;
  padding: calc(env(safe-area-inset-top, 0px) + 150px) 0 64px;
  background: var(--ocean-900);
  color: #fff;
  overflow: hidden;
}
.page-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .34;
  transform: scale(1.04);
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,22,31,.72) 0%, rgba(5,22,31,.5) 45%, rgba(5,22,31,.94) 100%);
}
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1.2;
  letter-spacing: .02em;
  margin: 14px 0 16px;
}
.page-hero p { max-width: 620px; color: rgba(255,255,255,.76); font-size: 15.5px; line-height: 1.85; }

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  transition: color .2s, gap .2s;
}
.back-home:hover { color: #fff; gap: 12px; }

/* ---------------------------------------------------------------- misc */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--ink-soft);
  background: rgba(255,255,255,.6);
  transition: all .22s var(--ease);
  cursor: pointer;
}
.chip:hover { border-color: var(--sand-400); color: var(--ink); }
.chip[aria-pressed="true"] {
  background: var(--ocean-800);
  border-color: var(--ocean-800);
  color: #fff;
}

.divider-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: .35;
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .site-header { justify-content: flex-start; gap: 12px; }
  .nav-toggle { display: flex; order: 3; margin-left: 2px; }
  .header-tools { order: 2; margin-left: auto; }
  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    background: var(--ocean-950);
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease);
    margin: 0;
  }
  .nav.is-open { opacity: 1; pointer-events: auto; }
  .nav a {
    font-family: var(--serif);
    font-size: 26px;
    letter-spacing: .04em;
    padding: 12px 0;
  }
  .nav a::after { display: none; }
  .site-header.is-solid .nav { color: #fff; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .site-header { padding: 14px 18px; }
  .brand img { height: 22px; }
  .site-footer .f-top { gap: 30px; }
}
