/* IceGiant design system: pale ice, one cold accent, one typeface.
   Shared by icegiant, icegiant_about, icegiant_blog, icegiant_docs and icegiant_whitepaper. */

@font-face {
  font-family: 'Switzer';
  src: url('../fonts/switzer-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Switzer';
  src: url('../fonts/switzer-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Switzer';
  src: url('../fonts/switzer-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Ground, ink, accent. One of each. */
  --ground: #f3f7fb;
  --surface: #e7eef7;
  --surface-2: #d9e5f2;
  --surface-3: #c8d9ec;
  --ink: #08131f;
  --muted: #4b5f72;
  --accent: #0b5bd3;
  --accent-ink: #ffffff;
  --dark: #06182b;
  --dark-surface: #0c2740;
  --dark-ink: #e8f1fa;
  --dark-muted: #a3b9ce;

  --font: 'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', 'Helvetica Neue', Arial, sans-serif;

  /* One pair of margins, one grid, one rhythm. */
  --gutter: clamp(20px, 4.2vw, 64px);
  --page-max: 1440px;
  --col-gap: clamp(16px, 2vw, 32px);
  --section: clamp(88px, 9.5vw, 176px);
  --radius: 0px;

  /* Five sizes. */
  --step-display: clamp(60px, 7.2vw, 116px);
  --step-h2: clamp(28px, 3.8vw, 56px);
  --step-h3: clamp(20px, 1.75vw, 26px);
  --step-body: 18px;
  --step-small: 14px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
p, h1, h2, h3, h4, h5, h6, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

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

h1, h2, h3, h4 {
  font-weight: 500;
  letter-spacing: -0.032em;
  line-height: 1.04;
  text-wrap: balance;
}

p { text-wrap: pretty; }

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

/* --- Type roles --------------------------------------------------------- */

.display {
  font-size: var(--step-display);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.94;
}

.h2 {
  font-size: var(--step-h2);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.h3 {
  font-size: var(--step-h3);
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.18;
}

.lede {
  font-size: var(--step-body);
  line-height: 1.5;
  letter-spacing: -0.012em;
  color: var(--ink);
  max-width: 46ch;
}

.body { max-width: 62ch; color: var(--ink); }

.small {
  font-size: var(--step-small);
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--muted);
}

/* --- Actions ------------------------------------------------------------ */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: var(--step-body);
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color 180ms var(--ease), transform 180ms var(--ease);
}
.button:hover { background: var(--ink); color: var(--ground); }
.button:active { transform: translateY(1px); }

.button--ink { background: var(--ink); color: var(--ground); }
.button--ink:hover { background: var(--accent); color: var(--accent-ink); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 180ms var(--ease);
}
.text-link:hover { color: var(--ink); text-decoration-color: transparent; }

.text-link .arrow { transition: transform 180ms var(--ease); }
.text-link:hover .arrow { transform: translateX(4px); }

/* --- Navigation --------------------------------------------------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ground);
}
.site-head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.brand-mark { width: 24px; height: 24px; color: var(--accent); }
.brand:hover .brand-mark { color: var(--ink); }

.site-nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); }
.site-nav a {
  font-size: var(--step-small);
  font-weight: 400;
  color: var(--ink);
  transition: color 160ms var(--ease);
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current='page'] { color: var(--accent); font-weight: 500; }
.lang-switch { font-size: var(--step-small); color: var(--muted); }
.lang-switch:hover { color: var(--accent); }

.nav-toggle { display: none; }

@media (max-width: 720px) {
  .site-head-inner { min-height: 64px; flex-wrap: wrap; padding-block: 12px; }
  .site-nav {
    order: 3;
    width: 100%;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; }
}

/* --- Footer ------------------------------------------------------------- */

.site-foot {
  background: var(--ground);
  padding-top: var(--section);
  overflow: hidden;
}
.site-foot-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: clamp(40px, 5vw, 72px);
}
.site-foot-nav { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.site-foot-nav a { font-size: var(--step-small); color: var(--muted); transition: color 160ms var(--ease); }
.site-foot-nav a:hover { color: var(--ink); }
.site-foot-name {
  display: block;
  font-size: var(--step-display);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.78;
  color: var(--ink);
  white-space: nowrap;
}
.site-foot-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 24px;
  font-size: var(--step-small);
  color: var(--muted);
}
.site-social { display: flex; flex-wrap: wrap; gap: 18px; }
.site-social a { color: var(--muted); transition: color 160ms var(--ease); }
.site-social a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .site-foot-top { flex-direction: column; }
  .site-foot-bottom { flex-direction: column; align-items: flex-start; }
}

/* --- Motion ------------------------------------------------------------- */
/* Content is visible by default. The js class is added by brand.js before paint. */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition:
    opacity 640ms var(--ease) var(--reveal-delay, 0ms),
    transform 640ms var(--ease) var(--reveal-delay, 0ms);
}

@keyframes shutter {
  from { clip-path: inset(0 0 0 100%); }
  to { clip-path: inset(0 0 0 0); }
}
@keyframes settle {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}

.js .hero-stage { animation: shutter 1050ms var(--ease) 160ms both; }
.js .hero-stage > * { animation: settle 1200ms var(--ease) 160ms both; }

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

/* --- A quiet landing for a wrong turn ---------------------------------- */

.nf {
  display: flex;
  align-items: center;
  min-height: calc(100svh - 76px);
  padding-block: clamp(48px, 7vw, 110px);
}
.nf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}
.nf-title {
  font-size: clamp(40px, 5.4vw, 84px);
  letter-spacing: -0.045em;
  line-height: 0.96;
}
.nf .lede { margin-top: clamp(22px, 2.6vw, 32px); }
.nf .button { margin-top: clamp(26px, 3vw, 36px); }
.nf-art { overflow: hidden; background: var(--surface); }
.nf-art img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
@media (max-width: 820px) {
  .nf { min-height: 0; }
  .nf-grid { grid-template-columns: 1fr; }
}

.nf-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: clamp(28px, 4vw, 52px);
}
.nf-strip figure { overflow: hidden; background: var(--surface); }
.nf-strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 640px) { .nf-strip { grid-template-columns: 1fr; } }


/* --- Chinese setting ---------------------------------------------------- */

:lang(zh) body { letter-spacing: 0; }
:lang(zh) h1,
:lang(zh) h2,
:lang(zh) h3,
:lang(zh) h4 { letter-spacing: -0.012em; line-height: 1.16; }
:lang(zh) .display { letter-spacing: -0.02em; line-height: 1.04; }
:lang(zh) .h2 { letter-spacing: -0.015em; line-height: 1.16; }
:lang(zh) .h3 { letter-spacing: 0; line-height: 1.35; }
:lang(zh) .lede { line-height: 1.7; }
:lang(zh) .body,
:lang(zh) .paper-body,
:lang(zh) .prose { line-height: 1.85; }
:lang(zh) .feature-title,
:lang(zh) .features-title { line-height: 1.22; }
