/* ==========================================================================
   XINGUANGHUI · Design Tokens
   Product first. Project proves capability. Light is atmosphere.

   Ratio the palette is built around: 70% white / warm grey, 20% imagery,
   10% dark. Warm gold and cool blue exist only as accents, never as fields.
   ========================================================================== */

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../assets/fonts/schibsted-latin.woff2") format("woff2");
}

:root {
  /* ---------------------------------------------------------------- colour */
  --white: #ffffff;
  /* Two grounds, not one: pure white for the plain blocks and a warm grey for
     the ones that carry product. The alternation is what separates one screen
     from the next — on white alone the page runs together. */
  --paper: #f6f5f2;      /* warm white, the product ground */
  --paper-2: #edece7;    /* one step down, behind an image before it arrives */
  --paper-3: #e3e1db;
  --line: #e2e0da;
  --line-2: #d2cfc7;

  --ink: #14181d;        /* near black */
  --ink-2: #4a525b;
  --ink-3: #858c94;
  --ink-4: #adb3b9;

  --navy: #0e1a28;       /* the 10% dark */
  --navy-2: #080f19;
  --navy-line: rgba(255, 255, 255, 0.13);
  --navy-text: rgba(255, 255, 255, 0.94);
  --navy-text-2: rgba(255, 255, 255, 0.6);
  --navy-text-3: rgba(255, 255, 255, 0.4);

  --warm: #ffb524;       /* accent only */
  --cool: #5ab0f5;       /* accent only */

  --focus: #14181d;

  /* ------------------------------------------------------------------ type */
  --font-sans: "Schibsted Grotesk", "Helvetica Neue", Helvetica, Arial,
    "Segoe UI", system-ui, sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --fs-micro: 0.6875rem;  /* 11 — spec labels */
  --fs-sm: 0.8125rem;     /* 13 */
  --fs-base: 0.9375rem;   /* 15 */
  --fs-lg: 1.0625rem;     /* 17 */

  --fs-h3: clamp(1.0625rem, 1.4vw, 1.25rem);
  --fs-h2: clamp(1.75rem, 3.6vw, 2.75rem);
  --fs-display: clamp(2.25rem, 5.4vw, 4.5rem);

  --lh-display: 0.98;
  --lh-heading: 1.08;
  --lh-body: 1.62;

  --ls-display: -0.035em;
  --ls-heading: -0.022em;
  --ls-eyebrow: 0.2em;
  --ls-spec: 0.08em;

  /* ----------------------------------------------------------------- space */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  --section-y: clamp(48px, 5vw, 88px);
  --gutter: 20px;

  /* ---------------------------------------------------------------- layout */
  /* Fluid: the page fills the screen instead of sitting in a 1440 box with
     white either side. Long text is capped per block, not by the container. */
  --container: 100%;
  --container-text: 660px;
  --header-h: 64px;

  /* ------------------------------------------------------- image ratios */
  --ratio-product: 4 / 5;
  --ratio-scene: 16 / 9;
  --ratio-project: 16 / 9;

  /* ----------------------------------------------------------------- shape */
  --radius: 2px;
  --radius-lg: 4px;

  /* ---------------------------------------------------------------- motion */
  --dur-fast: 200ms;
  --dur: 320ms;
  --dur-slow: 560ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

html.is-locked {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

img {
  height: auto;
}

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

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

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
p,
figure,
figcaption,
dl,
dd,
dt {
  margin: 0;
}

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

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

::selection {
  background: var(--warm);
  color: var(--ink);
}

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

.eyebrow {
  display: block;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Technical values read as design elements, not as body copy. */
.spec {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-spec);
  text-transform: uppercase;
  color: var(--ink-3);
}

.spec li {
  position: relative;
}

.spec li + li::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-5) / 2);
  top: 50%;
  width: 3px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section--paper {
  background: var(--paper);
}

.section--navy {
  background: var(--navy);
  color: var(--navy-text);
}

.section--navy .eyebrow {
  color: var(--navy-text-3);
}

.skip-link {
  position: absolute;
  left: var(--space-5);
  top: var(--space-5);
  z-index: 200;
  padding: var(--space-3) var(--space-5);
  background: var(--ink);
  color: var(--white);
  font-size: var(--fs-sm);
  font-weight: 600;
  transform: translateY(-250%);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

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