/* =========================================================================
   Base — reset, typography, layout primitives
   ========================================================================= */

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

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

body {
  margin: 0;
  background: color-mix(in srgb, var(--bg) 60%, white 40%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-17);
  line-height: var(--lh-relaxed);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 500; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

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

:focus-visible {
  outline: 3px solid var(--brand-500);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

::selection { background: color-mix(in srgb, var(--brand-200) 60%, white 40%); color: var(--ink-900); }

/* ---- scrollbar ---- */
* { scrollbar-width: thin; scrollbar-color: var(--ink-200) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--ink-200) 60%, white 40%); border-radius: var(--r-pill); border: 3px solid var(--bg); }
*::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--ink-300) 60%, white 40%); }

/* =========================================================================
   Type scale
   ========================================================================= */

.display-1 { font-family: var(--font-display); font-size: var(--fs-88); line-height: var(--lh-tight); font-weight: 500; letter-spacing: -.02em; }
.display-2 { font-family: var(--font-display); font-size: var(--fs-68); line-height: 1.08;           font-weight: 500; letter-spacing: -.018em; }
.h1 { font-family: var(--font-display); font-size: var(--fs-52); line-height: 1.1;  font-weight: 500; letter-spacing: -.015em; }
.h2 { font-family: var(--font-display); font-size: var(--fs-40); line-height: 1.14; font-weight: 500; letter-spacing: -.012em; }
.h3 { font-family: var(--font-display); font-size: var(--fs-32); line-height: 1.2;  font-weight: 500; letter-spacing: -.01em; }
.h4 { font-family: var(--font-body);    font-size: var(--fs-26); line-height: 1.28; font-weight: 600; letter-spacing: -.008em; }
.h5 { font-family: var(--font-body);    font-size: var(--fs-22); line-height: 1.34; font-weight: 600; }
.h6 { font-family: var(--font-body);    font-size: var(--fs-18); line-height: 1.4;  font-weight: 700; }

.lead      { font-size: var(--fs-22); line-height: 1.56; color: var(--ink-600); font-weight: 400; }
.body-lg   { font-size: var(--fs-20); line-height: 1.62; }
.body      { font-size: var(--fs-17); line-height: var(--lh-relaxed); }
.body-sm   { font-size: var(--fs-16); line-height: 1.62; }
.caption   { font-size: var(--fs-15); line-height: 1.55; color: var(--text-muted); }
.micro     { font-size: var(--fs-14); line-height: 1.5; color: var(--text-muted); }

.muted { color: var(--text-muted); }
.soft  { color: var(--text-soft); }
.accent { color: var(--brand-700); }
.jade { color: var(--jade-600); }

.serif { font-family: var(--font-display); }
.italic { font-style: italic; }

/* Eyebrow — замість бейджів: тільки текст із розрядкою та тонкою рискою */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-12);
  font-size: var(--fs-14);
  font-weight: 700;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: none;
  color: var(--brand-700);
  line-height: 1.4;
}
.eyebrow::before {
  content: "";
  width: 30px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  flex: none;
}
.eyebrow--jade { color: var(--jade-600); }
.eyebrow--muted { color: var(--text-muted); }
.eyebrow--center { justify-content: center; }
.eyebrow--plain::before { display: none; }

/* =========================================================================
   Layout
   ========================================================================= */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell--narrow { max-width: var(--shell-narrow); }
.shell--wide { max-width: 1560px; }

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(48px, 5vw, 80px); }
.section--flush-top { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }

.section--cream { background: color-mix(in srgb, var(--bg-soft) 60%, white 40%); }
.section--sand  { background: color-mix(in srgb, var(--bg-sand) 60%, white 40%); }
.section--wash  { background: color-mix(in srgb, var(--bg-brand-wash) 60%, white 40%); }
.section--jade  { background: color-mix(in srgb, var(--bg-jade-wash) 60%, white 40%); }
.section--contrast {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 10% 0%, rgba(240,156,142,.38), transparent 36%),
    radial-gradient(circle at 92% 100%, rgba(224,160,48,.20), transparent 34%),
    linear-gradient(135deg, var(--brand-800), var(--brand-900) 58%, #3B100D);
}
.section--contrast::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .14;
  background-image:
    linear-gradient(rgba(255,255,255,.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.16) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
}
.section--contrast > .shell { position: relative; z-index: 1; }
.section--contrast .h1,
.section--contrast .h2,
.section--contrast .h3,
.section--contrast .h4,
.section--contrast .h5 { color: #fff; }
.section--contrast .lead,
.section--contrast .muted { color: rgba(255,255,255,.76); }
.section--contrast .eyebrow { color: var(--brand-200); }
.section--contrast .arrow-link { color: #fff; }
.section--contrast .arrow-link__arc { border-color: rgba(255,255,255,.42); }
.section--contrast .card {
  border-color: rgba(255,255,255,.16);
  box-shadow: 0 24px 56px -34px rgba(0,0,0,.72);
}

.section-head { display: grid; gap: var(--s-20); max-width: 780px; margin-bottom: clamp(40px, 4vw, 64px); }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }
.section-head--row {
  max-width: none;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--s-32);
}
.section-head--row > .section-head__text { display: grid; gap: var(--s-20); max-width: 720px; }

.stack { display: grid; }
.stack--8  { gap: var(--s-8); }
.stack--12 { gap: var(--s-12); }
.stack--16 { gap: var(--s-16); }
.stack--20 { gap: var(--s-20); }
.stack--24 { gap: var(--s-24); }
.stack--32 { gap: var(--s-32); }
.stack--40 { gap: var(--s-40); }
.stack--48 { gap: var(--s-48); }

.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-16); }
.row--gap-24 { gap: var(--s-24); }
.row--between { justify-content: space-between; }
.row--center { justify-content: center; }
.row--nowrap { flex-wrap: nowrap; }

.grid { display: grid; gap: var(--s-24); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--gap-32 { gap: var(--s-32); }
.grid--gap-40 { gap: var(--s-40); }

@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .section-head--row { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

.hr { height: 1px; background: color-mix(in srgb, var(--line) 60%, white 40%); border: 0; margin: 0; }
.hr--strong { background: color-mix(in srgb, var(--line-strong) 60%, white 40%); }

.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;
}

.text-center { text-align: center; }
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }
