/* ==========================================================================
   HINT Institute, hint.edu.pl
   Palette is sampled from the supplied logo artwork. Do not introduce new hues.
   One accent colour only. Cyan never carries small text on white, because
   #00BAFD on #FFFFFF is roughly 2:1 and fails legibility badly. Cyan is for
   fills, rules and marks; navy carries the words.
   ========================================================================== */

:root {
  --navy: #01173B;
  --navy-dark: #0D1D3C;   /* exact ground of the dark logo artwork, so it composites seamlessly */
  --cyan: #00BAFD;
  --white: #FFFFFF;

  --ink: var(--navy);
  --ink-soft: #47546B;
  --ink-faint: #6B7690;
  --line: #DFE4EC;
  --line-strong: #C3CBDA;
  --tint: #F4F7FB;
  --tint-deep: #E9EFF7;

  --on-dark: #FFFFFF;
  --on-dark-soft: #B9C4D8;
  --line-dark: rgba(255, 255, 255, 0.14);

  --wrap: 1140px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 3px;   /* near square. rounded cards read consumer, sharp reads institutional */

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --step-xs: 0.8125rem;
  --step-s: 0.9375rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.125rem, 0.4vw + 1.05rem, 1.3125rem);
  --step-2: clamp(1.375rem, 1vw + 1.1rem, 1.75rem);
  --step-3: clamp(1.75rem, 1.8vw + 1.3rem, 2.375rem);
  --step-4: clamp(2.125rem, 3vw + 1.4rem, 3.25rem);
  --step-5: clamp(2.5rem, 4.4vw + 1.4rem, 4.25rem);

  --sp-section: clamp(4rem, 8vw, 7.5rem);
}

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

/* The hidden attribute must beat any component display rule, or a
   JS-toggled element renders as a dead control when JS never runs. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.is-nav-open { overflow: hidden; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.14;
  letter-spacing: -0.021em;
  font-weight: 700;
  text-wrap: balance;
}

p, ul, ol, dl { margin: 0; }
img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: var(--white);
  padding: 0.75rem 1.25rem; font-weight: 600;
}
.skip:focus { left: 0; }

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

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

/* ============================================================ navigation */

.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(150%) blur(8px);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line);
  transition: background-color .28s ease, border-color .28s ease,
              -webkit-backdrop-filter .28s ease, backdrop-filter .28s ease;
}

/* Scrolled state. The 50% translucency is applied to the BACKGROUND only, never to the
   bar as a whole: opacity on .navbar would fade the wordmark and the links themselves and
   make them hard to read against passing content. A heavier blur compensates for the
   thinner background so the navy links keep enough separation from what scrolls under. */
.navbar--scrolled {
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom-color: rgba(1, 23, 59, 0.09);
}

.navbar__inner {
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem);
  min-height: 82px;
  transition: min-height .28s ease;
}
.navbar--scrolled .navbar__inner { min-height: 60px; }

.navbar__brand { display: flex; align-items: center; flex: 0 0 auto; }
.navbar__brand img { width: auto; height: 54px; transition: height .28s ease; }
.navbar--scrolled .navbar__brand img { height: 38px; }

.navbar--scrolled .navbar__cta.btn { padding: 0.5rem 0.95rem; }

.navbar__nav { display: none; gap: clamp(1rem, 2.2vw, 1.9rem); margin-inline-start: auto; }

.nav__link {
  text-decoration: none;
  font-size: var(--step-s);
  font-weight: 550;
  letter-spacing: 0.005em;
  color: var(--ink-soft);
  padding-block: 0.5rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav__link:hover { color: var(--navy); }
.nav__link--current { color: var(--navy); border-bottom-color: var(--cyan); }

.navbar__cta.btn { display: none; flex: 0 0 auto; }

.navbar__toggle {
  margin-inline-start: auto;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: none; border: 1px solid var(--line-strong); border-radius: var(--radius);
  cursor: pointer;
}
.navbar__bars, .navbar__bars::before, .navbar__bars::after {
  display: block; width: 18px; height: 2px; background: var(--navy); content: '';
}
.navbar__bars { position: relative; }
.navbar__bars::before { position: absolute; top: -6px; }
.navbar__bars::after { position: absolute; top: 6px; }

.navpanel {
  border-bottom: 1px solid var(--line);
  background: var(--white);
  max-height: calc(100dvh - 82px);
  overflow-y: auto;
}
.navpanel__nav { display: grid; gap: 0.25rem; padding-block: 1rem 1.75rem; }
.navpanel .nav__link {
  border-bottom: 1px solid var(--line);
  padding-block: 0.9rem;
  font-size: var(--step-1);
  color: var(--navy);
}
.navpanel .btn { margin-top: 1.25rem; justify-self: start; }

@media (min-width: 62rem) {
  .navbar__nav { display: flex; }
  .navbar__cta.btn { display: inline-flex; }
  .navbar__toggle { display: none !important; }
  .navpanel { display: none !important; }
}

/* ================================================================ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.6rem;
  font: inherit; font-size: var(--step-s); font-weight: 650;
  letter-spacing: 0.008em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.btn--sm { padding: 0.6rem 1.1rem; }

/* Cyan fill with navy text. Roughly 8:1, and it keeps the accent doing structural
   work instead of being decorative. */
.btn--primary { background: var(--cyan); color: var(--navy); }
.btn--primary:hover { background: #17C6FF; }

.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--navy); }

.btn--on-dark { background: transparent; color: var(--on-dark); border-color: rgba(255,255,255,0.34); }
.btn--on-dark:hover { border-color: var(--on-dark); background: rgba(255,255,255,0.06); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.link-arrow {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: var(--step-s); font-weight: 650;
  text-decoration: none;
  color: var(--navy);
  border-bottom: 2px solid var(--cyan);
  padding-bottom: 2px;
}
.link-arrow:hover { border-bottom-color: var(--navy); }

/* ============================================================== sections */

.section { padding-block: var(--sp-section); }
.section--tint { background: var(--tint); }
.section--dark { background: var(--navy-dark); color: var(--on-dark); }
.section--dark .eyebrow { color: var(--cyan); }
.section--dark .section__lede { color: var(--on-dark-soft); }
.section--tight { padding-block: clamp(3rem, 5vw, 4.5rem); }

.eyebrow {
  font-size: var(--step-xs);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}

.section__head { max-width: 46rem; margin-bottom: clamp(2.25rem, 4vw, 3.5rem); }
.section__head h2 { font-size: var(--step-3); }
.section__lede {
  margin-top: 1.1rem;
  font-size: var(--step-1);
  color: var(--ink-soft);
  line-height: 1.6;
}

.rule { height: 3px; width: 60px; background: var(--cyan); border: 0; margin: 0 0 1.75rem; }

/* ================================================================== hero */

.hero {
  background: var(--navy-dark);
  color: var(--on-dark);
  padding-block: clamp(4rem, 9vw, 8.5rem);
  border-bottom: 3px solid var(--cyan);
}
.hero__inner { max-width: 54rem; }
.hero__strap {
  font-size: var(--step-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.hero h1 { font-size: var(--step-5); letter-spacing: -0.028em; }
.hero__lede {
  margin-top: 1.5rem;
  font-size: var(--step-2);
  line-height: 1.45;
  color: var(--on-dark);
  font-weight: 400;
  max-width: 42rem;
}
.hero__sub {
  margin-top: 1.25rem;
  font-size: var(--step-0);
  color: var(--on-dark-soft);
  max-width: 40rem;
}
.hero .btn-row { margin-top: 2.5rem; }

.hero__tags {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  margin-top: 2.75rem; padding-top: 1.75rem;
  border-top: 1px solid var(--line-dark);
  list-style: none;
  padding: 0;
  font-size: var(--step-s);
  color: var(--on-dark-soft);
}

/* page hero, used on interior pages */
.phero {
  background: var(--navy-dark);
  color: var(--on-dark);
  padding-block: clamp(3rem, 6vw, 5.5rem);
  border-bottom: 3px solid var(--cyan);
}
.phero__inner { max-width: 48rem; }
.phero h1 { font-size: var(--step-4); }
.phero__lede { margin-top: 1.25rem; font-size: var(--step-1); color: var(--on-dark-soft); line-height: 1.6; }
.phero .eyebrow { color: var(--cyan); }

/* ================================================================== grids */

.grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.grid--2 { grid-template-columns: 1fr; }
@media (min-width: 48rem) { .grid--2 { grid-template-columns: 1fr 1fr; } }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
@media (min-width: 60rem) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--lead { grid-template-columns: 0.85fr 1.15fr; }
}

/* ================================================================== cards */

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 2.5vw, 2rem);
  display: flex; flex-direction: column;
}
.card__title { font-size: var(--step-2); }
.card__title a { text-decoration: none; }
.card__title a:hover { border-bottom: 2px solid var(--cyan); }
.card__lede { margin-top: 0.85rem; color: var(--ink-soft); }
.card__meta {
  font-size: var(--step-xs); font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.85rem;
}
.card__flag {
  font-size: var(--step-xs); font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--navy);
  margin-bottom: 0.85rem;
  display: inline-block; align-self: flex-start;
  background: var(--cyan); padding: 0.3rem 0.6rem; border-radius: 2px;
}
.card .link-arrow { margin-top: auto; padding-top: 1.5rem; align-self: flex-start; }

.section--tint .card { background: var(--white); }

/* numbered step cards */
.step { border-top: 3px solid var(--cyan); padding-top: 1.25rem; }
.step__n {
  font-size: var(--step-xs); font-weight: 700; letter-spacing: 0.12em;
  color: var(--ink-faint); text-transform: uppercase; margin-bottom: 0.6rem;
}
.step h3 { font-size: var(--step-1); }
.step p { margin-top: 0.6rem; color: var(--ink-soft); font-size: var(--step-s); }
.section--dark .step p { color: var(--on-dark-soft); }
.section--dark .step__n { color: var(--cyan); }

/* pillar, used for Understand / Apply / Adapt and Why HINT */
.pillar { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.pillar h3 { font-size: var(--step-1); }
.pillar p { margin-top: 0.65rem; color: var(--ink-soft); font-size: var(--step-s); }
.section--dark .pillar { border-top-color: var(--line-dark); }
.section--dark .pillar p { color: var(--on-dark-soft); }

/* ============================================================ fact tables */

.facts { margin-top: 1.5rem; border-top: 1px solid var(--line); }
.facts__row {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--step-s);
}
.facts__row dt { color: var(--ink-faint); }
.facts__row dd { margin: 0; text-align: right; font-weight: 600; }

/* =============================================================== modules */

.modules { list-style: none; padding: 0; counter-reset: m; display: grid; gap: 0; }
.modules > li {
  counter-increment: m;
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 0 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.modules > li::before {
  content: counter(m, decimal-leading-zero);
  font-size: var(--step-s); font-weight: 700;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}
.modules h3, .modules strong { font-size: var(--step-0); font-weight: 650; }
.modules p { grid-column: 2; margin-top: 0.3rem; color: var(--ink-soft); font-size: var(--step-s); }
.section--dark .modules > li { border-bottom-color: var(--line-dark); }
.section--dark .modules p { color: var(--on-dark-soft); }

/* ================================================================== lists */

.ticks { list-style: none; padding: 0; display: grid; gap: 0.7rem; }
.ticks > li { position: relative; padding-left: 1.6rem; }
.ticks > li::before {
  content: ''; position: absolute; left: 0; top: 0.62em;
  width: 0.6rem; height: 0.6rem; background: var(--cyan);
}

.offer-list { list-style: none; padding: 0; display: grid; gap: 0; }
.offer-list > li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 550;
}
.section--dark .offer-list > li { border-bottom-color: var(--line-dark); }

.prose { max-width: 42rem; }
.prose > * + * { margin-top: 1.25rem; }
.prose h2 { font-size: var(--step-2); margin-top: 2.75rem; }
.prose h3 { font-size: var(--step-1); margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.35rem; display: grid; gap: 0.5rem; }
.prose a { text-decoration: none; border-bottom: 2px solid var(--cyan); }
.prose a:hover { border-bottom-color: var(--navy); }
.prose small { color: var(--ink-faint); font-size: var(--step-s); }

/* ================================================================== forms */

.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; gap: 1.1rem; }
@media (min-width: 40rem) { .form__row--2 { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: 0.4rem; }
.field > label { font-size: var(--step-s); font-weight: 600; }
.field__hint { font-size: var(--step-xs); color: var(--ink-faint); }

input[type=text], input[type=email], select, textarea {
  font: inherit; font-size: var(--step-s);
  color: var(--ink);
  background: var(--white);
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  width: 100%;
}
textarea { min-height: 8rem; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-faint); }

.checks { display: grid; gap: 0.6rem; }
.check { display: grid; grid-template-columns: 1.15rem 1fr; gap: 0.7rem; align-items: start; font-size: var(--step-s); }
.check input { margin: 0.25rem 0 0; width: 1.15rem; height: 1.15rem; accent-color: var(--cyan); }
.check--consent { border-top: 1px solid var(--line); padding-top: 1.1rem; color: var(--ink-soft); }

.form__note { font-size: var(--step-xs); color: var(--ink-faint); }

.formcard {
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

/* ================================================================= footer */

.footer {
  background: var(--navy-dark);
  color: var(--on-dark);
  padding-top: clamp(3.5rem, 6vw, 5rem);
  border-top: 3px solid var(--cyan);
}
.footer__grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.footer__brand { max-width: 18rem; }
.footer__brand img { width: 190px; height: auto; }
.footer__strap {
  margin-top: 1.25rem;
  font-size: var(--step-xs); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cyan); font-weight: 700;
}
.footer__geo { margin-top: 0.5rem; font-size: var(--step-s); color: var(--on-dark-soft); }

.footer__col { display: grid; gap: 0.7rem; align-content: start; }
.footer__h {
  font-size: var(--step-xs); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--on-dark); font-weight: 700; margin-bottom: 0.35rem;
}
.footer__col a {
  text-decoration: none; font-size: var(--step-s); color: var(--on-dark-soft);
  width: fit-content;
}
.footer__col a:hover { color: var(--on-dark); border-bottom: 1px solid var(--cyan); }

.footer__base {
  border-top: 1px solid var(--line-dark);
  padding-block: 1.5rem 2rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem;
  font-size: var(--step-xs); color: var(--on-dark-soft);
}

/* ============================================================== utilities */

.stack-sm > * + * { margin-top: 0.75rem; }
.stack > * + * { margin-top: 1.25rem; }
.stack-lg > * + * { margin-top: 2rem; }
.center { text-align: center; margin-inline: auto; }

/* Heading sizes for headings that sit outside .section__head. */
.h2 { font-size: var(--step-3); }
.h1-page { font-size: var(--step-4); }

/* Measures. Prose sits near 42rem; wider values are for lists and module stacks
   where each line is short and a longer measure still scans. */
.measure { max-width: 42rem; }
.measure-wide { max-width: 46rem; }
.measure-xl { max-width: 52rem; }

/* Vertical rhythm. Named by role rather than by value, so a spacing change here
   stays consistent across every page that uses it. */
.flush { margin-top: 0; }
.mt-p { margin-top: 1.25rem; }
.mt-cta { margin-top: 1.5rem; }
.mt-list { margin-top: 2rem; }
.mt-btn { margin-top: 2.25rem; }
.mt-wide { margin-top: 2.5rem; }
.mt-block { margin-top: clamp(2.5rem, 5vw, 4rem); }
.mb-tight { margin-bottom: 2rem; }

.text-soft { color: var(--ink-soft); }
.section--dark .text-soft { color: var(--on-dark-soft); }

.cta-band {
  background: var(--navy-dark);
  color: var(--on-dark);
  padding-block: clamp(3rem, 6vw, 4.75rem);
  border-top: 3px solid var(--cyan);
}
.cta-band h2 { font-size: var(--step-3); max-width: 34rem; }
.cta-band p { margin-top: 1rem; color: var(--on-dark-soft); max-width: 38rem; }
.cta-band .btn-row { margin-top: 2rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
