/* ==========================================================================
   dsh-genui site — foundation
   fonts, tokens, reset, typography, primitives
   ========================================================================== */

/* ----- fonts (self-hosted, latin subsets only; Chinese uses the system) ---- */
@font-face {
  font-family: 'Geist';
  src: url('../fonts/geist-sans-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  src: url('../fonts/geist-sans-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  src: url('../fonts/geist-sans-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('../fonts/geist-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('../fonts/geist-mono-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/instrument-serif-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/instrument-serif-latin-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ----- tokens ------------------------------------------------------------- */
:root {
  /* surfaces */
  --bg: #0a0a0b;
  --bg-2: #0d0e10;
  --bg-3: #111214;
  --surface: #131417;
  --surface-2: #191b1f;
  --surface-3: #202329;

  /* lines */
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.16);
  --line-faint: rgba(255, 255, 255, 0.04);

  /* text */
  --text: #f3f1ec;
  --text-2: #a9a7a1;
  --text-3: #6f6e6a;
  --text-4: #4a4946;

  /* accent */
  --accent: #e6d3ac;
  --accent-dim: #c9b78f;
  --accent-soft: rgba(230, 211, 172, 0.1);
  --accent-line: rgba(230, 211, 172, 0.28);

  /* status (only for real state) */
  --ok: #86b892;
  --warn: #d8a55c;
  --err: #d08a7d;

  /* type */
  --font-sans: 'Geist', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: 'Geist Mono', 'SFMono-Regular', 'JetBrains Mono', Menlo, monospace;
  --font-serif: 'Instrument Serif', 'Songti SC', 'Noto Serif SC', Georgia, serif;
  --font-zh: 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;

  /* layout */
  --w-content: 1240px;
  --w-wide: 1360px;
  --gutter: 24px;
  --nav-h: 68px;

  /* motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-1: 220ms;
  --dur-2: 420ms;
  --dur-3: 700ms;

  /* radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

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

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

code,
pre,
kbd {
  font-family: var(--font-mono);
}

::selection {
  background: var(--accent);
  color: #151412;
}

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

/* ----- atmosphere --------------------------------------------------------- */
/* one soft champagne glow per page + a fine grain overlay */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(760px 520px at 62% -8%, rgba(230, 211, 172, 0.055), transparent 62%),
    radial-gradient(980px 620px at 12% 4%, rgba(120, 132, 170, 0.05), transparent 68%);
}
.grain {
  position: fixed;
  inset: -50%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  transform: translateZ(0);
}

main {
  position: relative;
  z-index: 2;
}

/* ----- layout helpers ----------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--w-content);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide {
  max-width: var(--w-wide);
}

.section {
  position: relative;
  padding-block: 132px;
}
.section--tight {
  padding-block: 96px;
}
.section--band {
  background: var(--bg-2);
  border-block: 1px solid var(--line-faint);
}

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ----- typography primitives --------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.eyebrow::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(230, 211, 172, 0.8);
  flex: none;
}
.eyebrow--plain::before {
  display: none;
}

.display {
  font-family: var(--font-zh);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.h2 {
  font-family: var(--font-zh);
  font-weight: 600;
  font-size: clamp(30px, 3.6vw, 50px);
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.lede {
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: -0.005em;
}

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.serif {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: 0;
}
.serif em {
  font-style: italic;
}

.text-2 {
  color: var(--text-2);
}
.text-3 {
  color: var(--text-3);
}
.accent {
  color: var(--accent);
}

/* ----- buttons ------------------------------------------------------------ */
.btn {
  --btn-h: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--btn-h);
  padding-inline: 22px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition:
    background-color var(--dur-1) var(--ease-out),
    color var(--dur-1) var(--ease-out),
    border-color var(--dur-1) var(--ease-out),
    transform var(--dur-1) var(--ease-out);
}
.btn:active {
  transform: translateY(1px);
}
.btn svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.btn--primary {
  background: var(--accent);
  color: #17150f;
}
.btn--primary:hover {
  background: #f0e0bd;
}

.btn--ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.015);
}
.btn--ghost:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.btn--quiet {
  height: 40px;
  padding-inline: 0;
  color: var(--text-2);
  font-size: 14px;
}
.btn--quiet:hover {
  color: var(--text);
}
.btn--quiet svg {
  transition: transform var(--dur-1) var(--ease-out);
}
.btn--quiet:hover svg {
  transform: translateX(3px);
}

/* pill text chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding-inline: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.chip--accent {
  border-color: var(--accent-line);
  color: var(--accent);
}

/* ----- reveal ------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ----- utilities ---------------------------------------------------------- */
.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;
}
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: #17150f;
  border-radius: var(--r-sm);
  font-size: 13px;
  transform: translateY(-160%);
  transition: transform var(--dur-1) var(--ease-out);
}
.skip-link:focus {
  transform: none;
}

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

@media (max-width: 720px) {
  :root {
    --gutter: 18px;
    --nav-h: 60px;
  }
  .section {
    padding-block: 88px;
  }
}
