/* =========================================================
   Salus feminis — profilaktyka zdrowia i szkolenia prozdrowotne
   Design system ported from Kropla Ciszy ("A Drop of Silence"):
   same type, rhythm and motion — re-toned to deep plum,
   porcelain white and the magenta of the Salus feminis logo.
   ========================================================= */

:root {
  /* Palette — plum + porcelain, magenta taken from the logo */
  --plum-900: #22101c; /* deepest — footer, hero overlay, dark cards */
  --plum-700: #3b1631; /* signature plum — buttons, headings        */
  --plum-500: #5e2a4f; /* mid plum — hover, numbers                 */
  --ink: #2a1a24; /* body text — plum-black                  */
  --ink-soft: #4d3c47; /* long-form reading text                 */
  --stone: #5a4b55; /* muted secondary text                    */
  --line: #eadfe3; /* warm hairline                           */
  --porcelain: #faf6f4; /* beige — page background + form fields */
  --blush-50: #f5ecef; /* tinted bands & callouts               */
  --paper: #ffffff; /* raised surfaces / cards                 */
  --magenta: #d1007a; /* logo magenta — eyebrows, rules, accents */
  --blush: #e9b8cf; /* soft pink — accents on dark             */
  --light: #fbf3f6; /* text on dark surfaces                   */
  --wordmark: #e6d6df; /* "Salus feminis" fill — hero + footer     */

  --maxw: 1220px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);

  --f-display: "Fraunces", Georgia, serif;
  --f-body: "Instrument Sans", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;
  --f-logo: "Bilbo", cursive; /* the logo's wordmark face — hero h1 only */

  /* Heading scale — one family, one weight, four sizes */
  --fw-heading: 300;
  /* hero wordmark (~4.3em wide) — scales with .hero__intro */
  --fs-h1: min(6.5rem, 20cqi);
  --fs-h2: clamp(2.1rem, 1.4rem + 3.4vw, 3.4rem); /* section titles */
  --fs-h3: clamp(1.8rem, 1.4rem + 1.6vw, 2.8rem); /* block titles */
  --fs-h4: clamp(1.3rem, 1.15rem + 0.6vw, 1.7rem); /* card / item titles */

  --ease: cubic-bezier(0.2, 0.65, 0.25, 1);
}

/* ---------- reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--f-body);
  background: var(--porcelain);
  color: var(--ink);
  line-height: 1.65;
  font-size: clamp(1rem, 0.97rem + 0.2vw, 1.075rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
.module__title,
.story__portrait figcaption strong {
  font-family: var(--f-display);
  font-optical-sizing: auto;
  font-weight: var(--fw-heading);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

/* ---------- shared layout ---------- */
.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  padding-block: clamp(4.5rem, 10vw, 9rem);
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 1.5rem;
}
.eyebrow--light {
  color: var(--light);
}
.eyebrow--blush {
  color: var(--blush);
}
.nowrap {
  white-space: nowrap;
}

.h-display {
  font-size: var(--fs-h2);
  letter-spacing: -0.02em;
  color: var(--plum-900);
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}
.section-head__lead {
  margin-top: 1.4rem;
  color: var(--stone);
  font-size: 1.075rem;
  max-width: 40rem;
}
.section-head--center .section-head__lead {
  margin-inline: auto;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.95em 1.9em;
  border-radius: 100px;
  border: 1px solid transparent;
  transition:
    transform 0.3s var(--ease),
    background 0.3s var(--ease),
    color 0.3s var(--ease),
    border-color 0.3s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn--plum {
  background: var(--plum-700);
  color: var(--light);
}
.btn--plum:hover {
  background: var(--plum-900);
}
.btn--magenta {
  background: var(--magenta);
  color: #fff;
}
.btn--magenta:hover {
  background: #b0006a;
}
.btn--paper {
  background: var(--paper);
  color: var(--plum-900);
}
.btn--paper:hover {
  background: var(--light);
}
.btn--ghost-light {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.btn--ghost-light:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  transition:
    background 0.4s var(--ease),
    box-shadow 0.4s var(--ease),
    border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
/* subtle scrim so white brand + toggle stay legible over the hero image */
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(34, 16, 28, 0.55),
    rgba(34, 16, 28, 0)
  );
  transition: opacity 0.4s var(--ease);
}
.nav.scrolled::before {
  opacity: 0;
}
.nav__inner {
  max-width: 1360px;
  margin-inline: auto;
  padding: 1.1rem var(--gutter);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
/* both logo variants share one grid cell and cross-fade on scroll */
.brand {
  display: grid;
  flex: none;
}
.brand__logo {
  grid-area: 1 / 1;
  width: auto;
  height: 48px;
  transition: opacity 0.4s var(--ease);
}
.brand__logo--light {
  filter: drop-shadow(0 2px 10px rgba(20, 8, 16, 0.35));
}
.brand__logo--color {
  opacity: 0;
}
.nav.scrolled .brand__logo--light {
  opacity: 0;
}
.nav.scrolled .brand__logo--color {
  opacity: 1;
}
.nav__links {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}
.nav__links a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.88);
  position: relative;
  padding-block: 0.3rem;
  transition: color 0.3s var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav__links a:hover::after {
  transform: scaleX(1);
}
.nav__cta {
  margin-left: 0.5rem;
}

/* scrolled state */
.nav.scrolled {
  background: rgba(250, 246, 244, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav.scrolled .nav__links a {
  color: var(--ink);
}
.nav.scrolled .nav__toggle span {
  background: var(--plum-900);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: 0;
  padding: 8px;
  margin-left: auto;
  cursor: pointer;
  filter: drop-shadow(0 1px 5px rgba(20, 8, 16, 0.55));
}
.nav.scrolled .nav__toggle {
  filter: none;
}
.nav__toggle span {
  width: 26px;
  height: 2px;
  background: #fff;
  transition:
    transform 0.3s var(--ease),
    opacity 0.3s var(--ease),
    background 0.4s var(--ease);
}
.nav__toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: var(--plum-900);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.mobile-menu[hidden] {
  display: none;
}
.mobile-menu:not([hidden]) {
  display: flex;
}
.mobile-menu.open {
  opacity: 1;
}
.mobile-menu a {
  font-family: var(--f-display);
  font-size: 1.7rem;
  color: var(--light);
}
.mobile-menu .btn {
  font-family: var(--f-mono);
  font-size: 0.8rem;
  margin-top: 1rem;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--gutter) clamp(2.5rem, 6vh, 5rem);
  overflow: hidden;
  background: var(--plum-900);
  isolation: isolate;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* keep all four faces in frame — they sit in the upper half of the photo */
  object-position: center 25%;
  animation: heroSettle 9s var(--ease) forwards;
}
@keyframes heroSettle {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1);
  }
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      180deg,
      rgba(34, 16, 28, 0.42) 0%,
      rgba(34, 16, 28, 0) 18%,
      rgba(34, 16, 28, 0) 42%,
      rgba(34, 16, 28, 0.62) 66%,
      rgba(34, 16, 28, 0.92) 100%
    ),
    linear-gradient(90deg, rgba(34, 16, 28, 0.35) 0%, rgba(34, 16, 28, 0) 45%);
}
.hero__content {
  max-width: var(--maxw);
  margin-inline: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: var(--light);
  text-shadow: 0 1px 30px rgba(20, 8, 16, 0.45);
  overflow-wrap: break-word;
}
.hero__intro {
  container-type: inline-size; /* sizes the h1 wordmark via cqi */
  width: min(100%, 44rem);
}
.hero .eyebrow--light {
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: riseIn 0.9s var(--ease) 0.3s forwards;
}
.hero__title {
  font-family: var(--f-logo);
  font-weight: 400;
  font-size: var(--fs-h1);
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--wordmark);
  text-shadow:
    0 3px 2px rgba(20, 8, 16, 0.55),
    0 1px 30px rgba(20, 8, 16, 0.45);
  margin-bottom: 1.8rem;
  opacity: 0;
  animation: riseIn 1.1s var(--ease) 0.45s forwards;
}
.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: riseIn 1s var(--ease) 0.7s forwards;
}
.hero__fact {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.8rem;
  opacity: 0;
  animation: riseIn 1s var(--ease) 0.9s forwards;
}
.hero__num {
  font-family: var(--f-display);
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1;
  color: #fff;
}
.hero__facttext {
  font-family: var(--f-mono);
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.6;
  color: rgba(251, 243, 246, 0.82);
}
.hero__facttext strong {
  color: var(--blush);
  font-weight: 500;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- shared media ---------- */
.media-tag {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: var(--paper);
  color: var(--plum-900);
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.55em 1em;
  border-radius: 100px;
}

.pullquote {
  padding-left: 1.6rem;
  border-left: 2px solid var(--magenta);
}
.pullquote blockquote {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem);
  line-height: 1.4;
  color: var(--plum-700);
}

/* =========================================================
   MISJA
   ========================================================= */
.mission__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}
.mission__text .h-display {
  margin-bottom: 0.5rem;
}
.mission__text p:not(.eyebrow) {
  color: var(--stone);
  margin-top: 1.3rem;
  max-width: 34rem;
}
.mission__media {
  position: relative;
}
.mission__media img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: 58% center;
  border-radius: 3px;
}

/* =========================================================
   PROFILAKTYKA — three pillars
   ========================================================= */
.pillars {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 2.5vw, 2rem);
}
.pillar {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 2px solid var(--magenta);
  border-radius: 4px;
  padding: clamp(1.6rem, 2.6vw, 2.3rem);
  transition:
    transform 0.5s var(--ease),
    box-shadow 0.5s var(--ease);
}
.pillar:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 50px -30px rgba(34, 16, 28, 0.35);
}
.pillar__num {
  display: block;
  font-family: var(--f-display);
  font-weight: 300;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--blush);
  margin-bottom: 1.4rem;
}
.pillar h3 {
  font-size: var(--fs-h4);
  color: var(--plum-700);
  margin-bottom: 0.4rem;
}
.pillar p {
  font-size: 0.97rem;
  color: var(--stone);
  margin-top: 0.9rem;
}
.chips {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}
.chips li {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  line-height: 1.4;
  color: var(--plum-700);
  background: rgba(209, 0, 122, 0.06);
  border: 1px solid rgba(209, 0, 122, 0.2);
  padding: 0.42em 0.85em;
  border-radius: 100px;
}

/* =========================================================
   HISTORIA — the letter
   ========================================================= */
.story__row {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}
.story__row--flip {
  grid-template-columns: 1.2fr 0.8fr;
}
.story__portrait {
  position: sticky;
  top: 110px;
}
.story__portrait img,
.story__media {
  position: relative;
}
.story__media img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 3px;
}
.story__media img {
  /* keep both faces — baby and mum sit in the right two-thirds */
  object-position: 85% center;
}
.story__portrait figcaption {
  margin-top: 1.2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--magenta);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--stone);
}
.story__portrait-accent {
  color: var(--plum-700);
}
.story__portrait figcaption strong {
  display: block;
  font-size: var(--fs-h4);
  color: var(--plum-700);
  margin-bottom: 0.2rem;
}
.story__text p {
  color: var(--ink-soft);
  line-height: 1.8;
  margin-top: 1.3rem;
  max-width: 38rem;
}
.story__text p:first-child {
  margin-top: 0;
}
/* the letter's opening „ and closing ” share one size */
.story__text .story__lead,
.story__sign-quote {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--plum-700);
}
.story__quote {
  max-width: 56rem;
  margin: clamp(3.5rem, 7vw, 6rem) auto;
}
.story__quote blockquote {
  font-size: clamp(1.45rem, 1.15rem + 1.3vw, 2.3rem);
  line-height: 1.35;
}
.story__sign {
  display: flex;
  align-items: flex-start;
}
.story__sign img {
  width: min(300px, 75%);
  margin-top: 1rem;
  opacity: 0.88;
  max-width: 230px;
}
.story__sign-quote {
  margin-left: 0.1em;
}

/* hairlines with the logo mark — closes the letter */
.divider {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-top: clamp(3.5rem, 7vw, 6rem);
}
.divider__line {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.divider__mark {
  width: 36px;
  height: 36px;
  flex: none;
}

/* cytology facts — Poland, then Finland (full width), then the results */
.facts {
  display: grid;
  gap: clamp(3rem, 6vw, 5rem);
  margin-top: clamp(3rem, 6vw, 5rem);
}
.facts__item h3 {
  margin-bottom: 0.8rem;
}
.results h3 {
  grid-column: 1 / -1;
  margin-bottom: -0.2rem;
}
.facts__item p,
.results__text p {
  color: var(--ink-soft);
  line-height: 1.8;
  margin-top: 1.1rem;
}
.results__text p:first-child {
  margin-top: 0;
}
.facts__item strong {
  font-weight: 600;
  color: var(--ink);
}
.results {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  column-gap: clamp(2rem, 4vw, 4rem);
  row-gap: 1.6rem;
  margin-top: clamp(4.5rem, 9vw, 7.5rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 2px solid var(--magenta);
  border-radius: 6px;
  padding: clamp(1.8rem, 4vw, 3.2rem);
}
.results__stats {
  display: flex;
  flex-direction: column;
  /* line-height 1.8 leaves ~0.4em of leading under the last line of copy */
  margin-block: 0.25em 0.3em;
}
.results__stats div {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.3rem 0;
  border-top: 1px solid var(--line);
}
.results__stats div:last-child {
  border-bottom: 1px solid var(--line);
}
.results__stats dt {
  font-family: var(--f-mono);
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plum-500);
}
.results__stats dd {
  margin: 0;
  text-align: right;
  font-family: var(--f-mono);
  font-size: 1rem;
  color: var(--stone);
}
.results__num {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: 2.3rem;
  line-height: 1;
  color: var(--magenta);
  margin-right: 0.4rem;
}

/* =========================================================
   SZKOLENIA — offer card + program accordion
   ========================================================= */
.offer {
  display: grid;
  grid-template-columns: 2fr 3fr; /* photo 40% / text 60% */
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.offer__media {
  position: relative;
  min-height: 320px;
}
.offer__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.offer__body {
  padding: clamp(2rem, 4vw, 3.4rem);
}
.offer__title {
  font-size: var(--fs-h3);
  letter-spacing: -0.02em;
  color: var(--plum-900);
}
.offer__sub {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.4rem);
  color: var(--magenta);
  margin-top: 0.5rem;
}
.offer__specs {
  margin: 2rem 0 2.4rem;
}
.offer__specs div {
  display: grid;
  grid-template-columns: 6.6rem 1fr; /* fits "ODBIORCY" in the mono caps */
  gap: 1.6rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.offer__specs div:last-child {
  border-bottom: 1px solid var(--line);
}
.offer__specs dt {
  font-family: var(--f-mono);
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plum-500);
  padding-top: 0.2rem;
}
.offer__specs dd {
  margin: 0;
  color: var(--ink-soft);
}
.offer__specs dd a {
  color: var(--plum-700);
  font-weight: 500;
}
.offer__specs dd a:hover {
  color: var(--magenta);
}

.program {
  margin-top: clamp(4rem, 8vw, 6.5rem);
}
.program__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--plum-700);
}
.program__head h3 {
  font-size: var(--fs-h3);
  letter-spacing: -0.02em;
  color: var(--plum-900);
}
.program__meta {
  font-family: var(--f-mono);
  font-size: 1rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stone);
}

.module {
  border-bottom: 1px solid var(--line);
}
.module summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 6.5rem 1fr 2.6rem;
  align-items: center;
  gap: 1rem;
  padding: 1.6rem 0;
}
.module--video summary {
  grid-template-columns: 6.5rem 1fr auto 2.6rem;
}
.module summary::-webkit-details-marker {
  display: none;
}
.module__num {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--plum-500);
  transition: color 0.3s var(--ease);
}
.module__title {
  font-size: var(--fs-h4);
  line-height: 1.2;
  color: var(--plum-900);
  transition: color 0.3s var(--ease);
}
.module__title small {
  display: block;
  font-family: var(--f-body);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--stone);
  margin-top: 0.35rem;
}
.module__icon {
  position: relative;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition:
    background 0.3s var(--ease),
    border-color 0.3s var(--ease),
    transform 0.4s var(--ease);
}
.module__icon::before,
.module__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  background: var(--plum-700);
  transform: translate(-50%, -50%);
  transition:
    transform 0.4s var(--ease),
    background 0.3s var(--ease);
}
.module__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}
.module summary:hover .module__title,
.module[open] .module__num {
  color: var(--magenta);
}
.module summary:hover .module__icon {
  border-color: var(--plum-700);
}
.module[open] .module__icon {
  background: var(--plum-700);
  border-color: var(--plum-700);
  transform: rotate(180deg);
}
.module[open] .module__icon::before,
.module[open] .module__icon::after {
  background: #fff;
}
.module[open] .module__icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}
.module__body {
  padding: 0 3.6rem 2.4rem 7.5rem;
}
.module__intro {
  color: var(--ink-soft);
  max-width: 44rem;
  margin-bottom: 1.4rem;
}
.module__label {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.6rem;
}
.module__topics {
  list-style: none;
  padding: 0;
  columns: 2;
  column-gap: 2.5rem;
}
.module__topics li {
  position: relative;
  break-inside: avoid;
  padding: 0.3rem 0 0.3rem 1.1rem;
  font-size: 0.97rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.module__topics li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--magenta);
}
.module__task {
  margin-top: 1.6rem;
  max-width: 44rem;
  background: var(--blush-50);
  border-left: 2px solid var(--magenta);
  border-radius: 0 4px 4px 0;
  padding: 1.1rem 1.4rem;
  font-size: 0.97rem;
  color: var(--ink);
}
.module__task strong {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 0.35rem;
}
/* minimised film window on the right of a program row — opens the player */
.module__video {
  position: relative;
  display: block;
  width: 9.5rem;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--plum-900);
  cursor: pointer;
  transition:
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
.module__video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.3s var(--ease);
}
.module__video:hover,
.module__video:focus-visible {
  border-color: var(--magenta);
  box-shadow: 0 6px 18px rgba(34, 16, 28, 0.18);
}
.module__video:hover img {
  opacity: 1;
}
.module__play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--magenta);
  transform: translate(-50%, -50%);
}
.module__play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #fff;
  transform: translate(-50%, -50%);
}

.video-modal {
  width: min(92vw, 960px);
  max-width: none;
  margin: auto; /* the global * { margin: 0 } reset un-centres <dialog> */
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
.video-modal::backdrop {
  background: rgba(34, 16, 28, 0.82);
}
.video-modal__frame {
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}
.video-modal__frame video,
.video-modal__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-modal__close {
  position: absolute;
  top: -2.8rem;
  right: 0;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid rgba(251, 243, 246, 0.4);
  border-radius: 50%;
  background: transparent;
  color: var(--light);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.video-modal__close:hover {
  border-color: var(--light);
}
.video-modal__close:focus-visible {
  outline-color: var(--blush);
  border-radius: 50%;
}

/* smooth open/close where the browser can animate to height:auto */
@supports (interpolate-size: allow-keywords) {
  .module {
    interpolate-size: allow-keywords;
  }
  .module::details-content {
    height: 0;
    overflow: hidden;
    transition:
      height 0.45s var(--ease),
      content-visibility 0.45s allow-discrete;
  }
  .module[open]::details-content {
    height: auto;
  }
}

/* =========================================================
   KONTAKT
   ========================================================= */
.contact__form {
  max-width: 40rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem 1.4rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: clamp(1.6rem, 3.5vw, 2.6rem);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.field--full {
  grid-column: 1 / -1;
}
.field label {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}
.field input,
.field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--porcelain);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.75rem 0.9rem;
  transition:
    border-color 0.3s var(--ease),
    background 0.3s var(--ease);
}
.field textarea {
  resize: vertical;
  min-height: 8rem;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--magenta);
  background: var(--paper);
}
.contact__form .btn {
  justify-self: start;
  margin-top: 0.4rem;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--plum-900);
  color: rgba(251, 243, 246, 0.82);
  padding-block: clamp(3.5rem, 6vw, 5.5rem) 2rem;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
/* proportions taken from logo_horizontal_clean.png: mark ≈ 1.9em wide,
   ≈ 0.35em gap, wordmark at Bilbo's natural spacing */
.footer__logo {
  display: flex;
  align-items: center;
  gap: 0.35em;
  font-family: var(--f-logo);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--wordmark);
}
.footer__logo img {
  width: 1.9em;
  flex: none;
}
.footer__logo span {
  white-space: nowrap;
  /* centre the capital S on the mark, as in the logo */
  translate: 0 0.09em;
}
.footer__tag {
  margin-top: 1.1rem;
  font-size: 0.95rem;
  color: rgba(251, 243, 246, 0.65);
  max-width: 26rem;
}
.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.footer__nav a {
  font-size: 0.92rem;
  color: rgba(251, 243, 246, 0.75);
  transition: color 0.3s var(--ease);
  width: fit-content;
}
.footer__nav a:hover {
  color: var(--blush);
}
.footer__meta {
  font-size: 0.92rem;
  line-height: 1.9;
  color: rgba(251, 243, 246, 0.65);
}
.footer__meta a {
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}
.footer__meta a:hover {
  color: #fff;
}
.footer__legal {
  max-width: var(--maxw);
  margin: clamp(3rem, 5vw, 4.5rem) auto 0;
  padding: 2rem var(--gutter) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(251, 243, 246, 0.5);
}

/* =========================================================
   REVEAL ANIMATIONS
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Render hook (?shot): freeze all entrance motion for static capture */
html.shot {
  scroll-behavior: auto;
}
.shot .hero {
  min-height: 760px;
}
.shot .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}
.shot .hero__content,
.shot .hero__content * {
  animation: none !important;
  opacity: 1 !important;
}
.shot .hero__media img {
  animation: none !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1000px) {
  .nav__links {
    display: none;
  }
  .nav__cta {
    display: none;
  }
  .nav__toggle {
    display: flex;
  }
}
@media (max-width: 900px) {
  .pillars {
    grid-template-columns: 1fr;
    max-width: 40rem;
  }
  .offer {
    grid-template-columns: 1fr;
  }
  .offer__media {
    min-height: 0;
    aspect-ratio: 16/10;
  }
}
@media (max-width: 760px) {
  html {
    scroll-padding-top: 72px;
  }
  .mission__grid,
  .story__row,
  .story__row--flip {
    grid-template-columns: 1fr;
  }
  .mission__media img {
    aspect-ratio: 4/3;
  }
  .story__portrait {
    position: static;
    max-width: 22rem;
  }
  .story__media img {
    aspect-ratio: 4/3;
  }
  .module summary {
    grid-template-columns: 4.2rem 1fr 2.2rem;
    gap: 0.8rem;
  }
  .module--video summary {
    grid-template-columns: 4.2rem 1fr auto 2.2rem;
  }
  .module__video {
    width: 5.5rem;
  }
  .module__num {
    font-size: 1.5rem;
    white-space: nowrap;
  }
  .module__icon {
    width: 2.2rem;
    height: 2.2rem;
  }
  .module__body {
    padding: 0 0 2rem;
  }
  .module__topics {
    columns: 1;
  }
  .results {
    grid-template-columns: 1fr;
  }
  .footer__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
@media (max-width: 600px) {
  /* portrait phones: photo on top, copy on solid plum underneath */
  .hero__media {
    bottom: auto;
    height: 64%;
  }
  .hero__media img {
    object-position: 60% center;
  }
  .hero__scrim {
    background: linear-gradient(
      180deg,
      rgba(34, 16, 28, 0.4) 0%,
      rgba(34, 16, 28, 0) 14%,
      rgba(34, 16, 28, 0) 36%,
      rgba(34, 16, 28, 0.85) 56%,
      var(--plum-900) 64%
    );
  }
}
@media (max-width: 540px) {
  .hero .eyebrow--light {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
  }
  .hero__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .hero__actions .btn {
    width: 100%;
  }
  .offer__specs div {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
  .results__stats dt {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
  }
  .contact__form {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */
:focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 3px;
  border-radius: 2px;
}
.hero :focus-visible,
.footer :focus-visible {
  outline-color: var(--blush);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .hero__media img {
    transform: none;
  }
}
