@font-face {
  font-family: "Manrope";
  src: url("../fonts/Manrope-VariableFont_wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --ink: #202327;
  --kod: #2b9286;
  --graphite: #47555a;
  --sheet: #bee7dd;
  --paper: #f7f8fb;
  --white: #ffffff;
  --mist: #dce2e6;
  --muted: #626970;
  --max: 1440px;
  --gutter: clamp(20px, 4vw, 64px);
  --line: 1px solid var(--mist);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Manrope", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
pre, code { overflow-wrap: anywhere; }

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.shell {
  width: min(100%, var(--max));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(32, 35, 39, .14);
  background: rgba(247, 248, 251, .96);
  backdrop-filter: blur(12px);
}
.nav {
  min-height: 78px;
  display: grid;
  grid-template-columns: 230px 1fr auto;
  gap: 32px;
  align-items: center;
}
.nav > * { min-width: 0; }
.nav-logo img { width: 205px; }
.nav-links { display: flex; gap: 22px; justify-content: center; }
.nav-links a {
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--kod); }

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid currentColor;
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}
.button:hover, .button:focus-visible { background: var(--ink); color: var(--white); }
.button--primary { border-color: var(--ink); background: var(--ink); color: var(--white); }
.button--primary:hover, .button--primary:focus-visible { border-color: var(--kod); background: var(--kod); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--kod);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 22px; height: 4px; background: var(--sheet); box-shadow: 8px -5px 0 -1px var(--kod); }

.hero {
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  border-bottom: var(--line);
}
.hero > * { min-width: 0; }
.hero-copy {
  padding: clamp(72px, 8vw, 128px) var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(58px, 8vw, 122px);
  font-weight: 800;
  letter-spacing: -.07em;
  line-height: .86;
  text-transform: uppercase;
}
.hero h1 span { color: var(--kod); }
.hero-lead { max-width: 700px; margin: 30px 0 0; color: var(--muted); font-size: clamp(18px, 2vw, 27px); line-height: 1.3; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-visual {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: grid;
  place-items: center;
  padding: clamp(40px, 6vw, 92px);
  background: var(--ink);
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../brand/patterns/registration-pattern.svg") center / cover no-repeat;
  opacity: .14;
}
.hero-mark { position: relative; width: min(78%, 600px); }
.hero-index { position: absolute; right: 28px; bottom: 22px; color: var(--sheet); font-size: 10px; font-weight: 700; letter-spacing: .12em; }

.section { padding-block: clamp(78px, 10vw, 142px); border-bottom: var(--line); }
.section--ink { background: var(--ink); color: var(--white); }
.section--kod { background: var(--kod); color: var(--white); }
.section--sheet { background: var(--sheet); }
.section--white { background: var(--white); }
.section-head { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr); gap: 48px; align-items: end; margin-bottom: 54px; }
.section-head > * { min-width: 0; }
.section h2 { max-width: 100%; margin: 0; font-size: clamp(42px, 4.6vw, 70px); font-weight: 800; letter-spacing: -.055em; line-height: .92; text-transform: uppercase; }
.section-intro { max-width: 700px; margin: 0; color: var(--muted); font-size: clamp(17px, 1.55vw, 22px); }
.section--ink .section-intro, .section--kod .section-intro { color: rgba(255,255,255,.72); }
.section--ink .eyebrow, .section--kod .eyebrow { color: var(--sheet); }

.story-grid { display: grid; grid-template-columns: .84fr 1.16fr; gap: 1px; background: var(--mist); border: var(--line); }
.story-grid > * { min-width: 0; }
.story-card { min-height: 380px; padding: clamp(30px, 4vw, 58px); background: var(--white); }
.story-card--mark { display: grid; place-items: center; background: var(--paper); }
.story-card--mark img { width: min(76%, 430px); }
.story-card--statement { display: flex; flex-direction: column; justify-content: center; }
.story-card h3 { margin: 0 0 18px; font-size: clamp(31px, 4vw, 56px); line-height: 1; letter-spacing: -.045em; }
.story-card p { max-width: 650px; margin: 0; color: var(--muted); font-size: 17px; }
.story-card .story-kicker { margin-bottom: 20px; color: var(--kod); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

.meaning-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 18px; background: var(--mist); border: var(--line); }
.meaning-card { min-width: 0; padding: 28px; background: var(--white); }
.meaning-card > span { display: block; margin: 30px 0 12px; color: var(--kod); font-size: 11px; font-weight: 800; }
.meaning-card h3 { margin: 0 0 10px; font-size: 20px; line-height: 1.1; }
.meaning-card p { margin: 0; color: var(--muted); font-size: 14px; }
.meaning-dot { display: block; width: 52px; height: 52px; clip-path: polygon(50% 0, 100% 28%, 100% 75%, 50% 100%, 0 75%, 0 28%); }
.meaning-dot--ink { background: var(--ink); }
.meaning-dot--teal { background: var(--kod); }
.meaning-dot--graphite { background: var(--graphite); }
.meaning-dot--sheet { background: var(--sheet); border: 1px solid var(--kod); }

.ecosystem-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 18px; align-items: stretch; }
.ecosystem-flow article { min-width: 0; padding: clamp(24px, 3vw, 42px); background: var(--white); border: 1px solid rgba(32,35,39,.12); }
.ecosystem-flow b { align-self: center; font-size: 28px; }
.ecosystem-flow small { display: block; color: var(--kod); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.ecosystem-flow strong { display: block; margin-top: 38px; font-size: clamp(25px, 3vw, 42px); line-height: 1; overflow-wrap: anywhere; }
.ecosystem-flow p { margin: 12px 0 0; color: var(--muted); }
.ecosystem-flow__result { background: var(--ink) !important; color: var(--white); }
.ecosystem-flow__result p { color: rgba(255,255,255,.68); }
.ecosystem-flow__result small { color: var(--sheet); }

.logo-showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.logo-showcase > div { min-width: 0; }
.logo-panel { min-height: 320px; display: grid; place-items: center; padding: clamp(28px, 4vw, 58px); border: 1px solid rgba(255,255,255,.18); }
.logo-panel--paper { background: var(--paper); }
.logo-panel--dark { background: #171a1d; }
.logo-panel img { width: min(100%, 760px); }
.logo-label { margin: 14px 0 0; color: rgba(255,255,255,.62); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.rules-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(255,255,255,.2); border-left: 1px solid rgba(255,255,255,.2); margin-top: 48px; }
.rule { min-width: 0; min-height: 180px; padding: 28px; border-right: 1px solid rgba(255,255,255,.2); border-bottom: 1px solid rgba(255,255,255,.2); }
.rule b { display: block; color: var(--sheet); font-size: 28px; }
.rule span { display: block; margin-top: 36px; color: rgba(255,255,255,.74); }

.palette { display: grid; grid-template-columns: repeat(5, 1fr); min-height: 430px; }
.swatch { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 22px; border-right: 1px solid rgba(32,35,39,.14); }
.swatch:last-child { border-right: 0; }
.swatch strong { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; }
.swatch code { font-family: "Manrope", sans-serif; font-size: 12px; }
.swatch--ink { background: var(--ink); color: var(--white); }
.swatch--kod { background: var(--kod); color: var(--white); }
.swatch--graphite { background: var(--graphite); color: var(--white); }
.swatch--sheet { background: var(--sheet); }
.swatch--paper { background: var(--paper); }

.type-specimen { display: grid; grid-template-columns: .72fr 1.28fr; gap: 70px; align-items: start; }
.type-specimen > * { min-width: 0; }
.type-meta { position: sticky; top: 112px; }
.type-meta h3 { margin: 0; font-size: clamp(44px, 6vw, 82px); line-height: 1; letter-spacing: -.055em; }
.type-meta p { color: var(--muted); }
.type-lines { border-top: var(--line); }
.type-row { padding: 28px 0; border-bottom: var(--line); }
.type-row span { display: block; color: var(--kod); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.type-row p { margin: 8px 0 0; line-height: 1; overflow-wrap: anywhere; }
.type-800 { font-size: clamp(47px, 6.5vw, 94px); font-weight: 800; letter-spacing: -.06em; }
.type-700 { font-size: clamp(32px, 4vw, 62px); font-weight: 600; letter-spacing: -.04em; }
.type-400 { max-width: 760px; font-size: 20px; line-height: 1.55 !important; }

.pattern-panel { overflow: hidden; min-height: 300px; background: var(--white); border: 1px solid rgba(32,35,39,.12); }
.pattern-panel img { width: 100%; height: 100%; min-height: 300px; object-fit: cover; }
.icon-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; margin-top: 18px; background: rgba(32,35,39,.12); border: 1px solid rgba(32,35,39,.12); }
.icon-grid figure { min-width: 0; margin: 0; padding: 20px; background: var(--white); }
.icon-grid img { width: 100%; aspect-ratio: 1; }
.icon-grid figcaption { margin-top: 12px; font-size: 11px; font-weight: 800; text-transform: uppercase; }

.application-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.application { overflow: hidden; min-width: 0; margin: 0; background: var(--paper); border: var(--line); }
.application img { width: 100%; height: 100%; object-fit: cover; }
.application--wide { grid-column: span 8; aspect-ratio: 16/4; }
.application--square { grid-column: span 4; aspect-ratio: 1; }
.application--card { grid-column: span 6; aspect-ratio: 1.8; }
.application--letter { grid-column: span 4; aspect-ratio: 210/297; }
.application--cover { grid-column: span 8; aspect-ratio: 3; align-self: start; }

.downloads-tools { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 16px; margin-bottom: 28px; }
.search { width: 100%; min-height: 48px; padding: 12px 15px; border: 1px solid rgba(255,255,255,.3); border-radius: 3px; background: transparent; color: var(--white); outline: none; }
.search::placeholder { color: rgba(255,255,255,.52); }
.search:focus { border-color: var(--sheet); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.filter { min-height: 42px; padding: 9px 13px; border: 1px solid rgba(255,255,255,.26); border-radius: 3px; background: transparent; color: var(--white); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; cursor: pointer; }
.filter:hover, .filter:focus-visible, .filter.is-active { border-color: var(--sheet); background: var(--sheet); color: var(--ink); }
.download-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.18); }
.download-card { min-width: 0; min-height: 220px; display: flex; flex-direction: column; padding: 24px; background: var(--ink); }
.download-card.is-hidden { display: none; }
.download-card small { color: var(--sheet); font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.download-card h3 { margin: 22px 0 7px; font-size: 21px; line-height: 1.12; overflow-wrap: anywhere; }
.download-card p { margin: 0; color: rgba(255,255,255,.58); font-size: 14px; }
.download-card footer { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-top: auto; padding-top: 24px; }
.download-card code { color: rgba(255,255,255,.42); font-family: "Manrope", sans-serif; font-size: 10px; }
.download-card a { color: var(--white); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.download-card a::after { content: " ↗"; color: var(--sheet); }
.downloads-empty { display: none; padding: 42px; border: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.68); }

.ai-grid { display: grid; grid-template-columns: .72fr 1.28fr; gap: 44px; align-items: start; }
.ai-grid > * { min-width: 0; }
.ai-aside { position: sticky; top: 112px; }
.ai-aside img { width: min(100%, 290px); margin-bottom: 28px; }
.ai-aside p { color: rgba(255,255,255,.76); }
.code-panel { position: relative; overflow: hidden; padding: clamp(24px, 4vw, 48px); border: 1px solid rgba(255,255,255,.28); background: rgba(32,35,39,.22); }
.code-panel--stacked { margin-top: 18px; }
.code-panel pre { max-width: 100%; margin: 0; white-space: pre-wrap; word-break: break-word; color: rgba(255,255,255,.92); font: 12px/1.75 ui-monospace, SFMono-Regular, Menlo, monospace; }
.code-panel .button + pre { padding-top: 78px; }
.code-panel .button { position: absolute; top: 18px; right: 18px; max-width: calc(100% - 36px); border-color: rgba(255,255,255,.5); color: var(--white); }
.section--kod .button { color: var(--white); }
.section--kod .button:hover { background: var(--white); color: var(--ink); }

.ai-page .hero { min-height: 620px; grid-template-columns: 1fr; background: var(--paper); }
.ai-page .hero-copy { max-width: var(--max); margin-inline: auto; width: 100%; }
.ai-page .hero h1 { max-width: 1200px; }
.spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.spec-card { min-width: 0; padding: 30px; border: var(--line); background: var(--white); }
.spec-card--full { grid-column: 1 / -1; }
.spec-card h3 { margin: 0 0 14px; font-size: 22px; }
.spec-card ul, .spec-card ol { margin: 0; padding-left: 20px; }
.token-list { display: grid; gap: 10px; }
.token { display: grid; grid-template-columns: 42px minmax(90px, 130px) 1fr; gap: 14px; align-items: center; }
.token-i { width: 42px; height: 42px; border: 1px solid rgba(32,35,39,.14); }
.token code { font-family: ui-monospace, monospace; font-size: 11px; }

.site-footer { padding-block: 42px; background: var(--paper); }
.footer-grid { display: grid; grid-template-columns: 220px 1fr auto; gap: 36px; align-items: end; }
.footer-grid > * { min-width: 0; }
.footer-grid img { width: 190px; }
.footer-grid p { margin: 0; color: var(--muted); font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; justify-content: flex-end; }
.footer-links a { color: var(--kod); font-size: 12px; font-weight: 700; text-decoration: none; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 80; padding: 14px 18px; background: var(--ink); color: var(--white); opacity: 0; transform: translateY(16px); pointer-events: none; transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1120px) {
  .nav { grid-template-columns: 190px 1fr auto; }
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { min-height: 480px; }
  .section-head, .story-grid, .type-specimen, .ai-grid { grid-template-columns: 1fr; }
  .type-meta, .ai-aside { position: static; }
  .meaning-grid { grid-template-columns: repeat(2, 1fr); }
  .rules-grid { grid-template-columns: repeat(2, 1fr); }
  .palette { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .swatch { min-height: 220px; border-bottom: 1px solid rgba(32,35,39,.14); }
  .icon-grid { grid-template-columns: repeat(3, 1fr); }
  .download-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .nav { min-height: 66px; grid-template-columns: 1fr auto; gap: 14px; }
  .nav-logo img { width: min(155px, 44vw); }
  .nav .button { min-height: 38px; padding: 9px 10px; font-size: 9px; }
  .hero { min-height: 0; }
  .hero-copy { padding-block: 62px; }
  .hero h1 { font-size: clamp(47px, 15vw, 72px); }
  .hero-lead { font-size: 18px; }
  .hero-visual { min-height: 350px; }
  .section { padding-block: 70px; }
  .section-head { gap: 24px; margin-bottom: 36px; }
  .section h2 { font-size: clamp(35px, 10.4vw, 52px); }
  .story-card { min-height: 280px; }
  .meaning-grid { grid-template-columns: 1fr; }
  .ecosystem-flow { grid-template-columns: 1fr; }
  .ecosystem-flow b { transform: rotate(90deg); justify-self: center; }
  .logo-showcase { grid-template-columns: 1fr; }
  .logo-panel { min-height: 220px; }
  .rules-grid, .spec-grid { grid-template-columns: 1fr; }
  .palette { grid-template-columns: 1fr; overflow: visible; }
  .swatch { min-height: 170px; border-right: 0; border-bottom: 1px solid rgba(32,35,39,.14); }
  .icon-grid { grid-template-columns: repeat(2, 1fr); }
  .application-grid { gap: 10px; }
  .application--wide, .application--square, .application--card, .application--letter, .application--cover { grid-column: 1 / -1; }
  .application--wide { aspect-ratio: 16/6; }
  .application--cover { aspect-ratio: 3; }
  .downloads-tools { grid-template-columns: 1fr; }
  .filters { justify-content: flex-start; }
  .download-grid { grid-template-columns: 1fr; }
  .download-card { min-height: 190px; }
  .code-panel .button { position: static; margin-bottom: 22px; max-width: 100%; }
  .code-panel .button + pre { padding-top: 0; }
  .token { grid-template-columns: 38px minmax(86px, 112px) 1fr; gap: 9px; }
  .token-i { width: 38px; height: 38px; }
  .footer-grid { grid-template-columns: 1fr; align-items: start; }
  .footer-links { justify-content: flex-start; }
}

@media (max-width: 390px) {
  .hero h1 { font-size: 45px; }
  .section h2 { font-size: 34px; }
  .story-card h3 { font-size: 29px; }
  .button { width: 100%; }
  .nav .button { width: auto; }
  .filter { font-size: 9px; padding-inline: 10px; }
  .icon-grid { grid-template-columns: 1fr 1fr; }
  .icon-grid figure { padding: 14px; }
}

@media (max-width: 330px) {
  #ecosystem h2 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
