/* DEF IT Informatikai Zrt. — site styles
   Contents: fonts, tokens, base, header, hero, about, competencies,
   partners, contact, footer, motion preferences. */

/* ---------- Fonts (self-hosted, OFL) ---------- */
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/jost-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/jost-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Commissioner";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/commissioner-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Commissioner";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/commissioner-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  --green: #96bb39; /* logo green, fills and graphics only */
  --pine-black: #061417;
  --font-display: "Jost", "Century Gothic", "Avenir Next", system-ui, sans-serif;
  --font-body: "Commissioner", "Segoe UI", system-ui, sans-serif;
  --wrap: 77.5rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --header-h: 4.75rem;
  --bar: 0.375rem; /* thickness of the rounded bars taken from the wordmark */
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
}

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #061417;
  --bg-raised: #0a1e22;
  --ink: #e8eee6;
  --ink-soft: #a3b4ab;
  --line: rgba(214, 232, 220, 0.13);
  --line-strong: rgba(214, 232, 220, 0.3);
  --accent-text: #b4d65c;
  --plate: #030d0f;
  --net-rgb: 150, 187, 57;
  --glow: rgba(150, 187, 57, 0.16);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f5f1;
  --bg-raised: #ffffff;
  --ink: #0a2326;
  --ink-soft: #4c5f5b;
  --line: rgba(10, 35, 38, 0.13);
  --line-strong: rgba(10, 35, 38, 0.32);
  --accent-text: #47650c;
  --plate: #061417;
  --net-rgb: 104, 140, 28;
  --glow: rgba(150, 187, 57, 0.22);
}

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

html {
  scroll-behavior: smooth;
  /* Anchor jumps stop below the fixed header; sections bring their own top padding. */
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}

h1,
h2,
h3,
h4,
p,
ul,
dl,
dd,
address {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

address {
  font-style: normal;
}

a {
  color: inherit;
}

img,
svg,
canvas {
  display: block;
}

::selection {
  background: var(--green);
  color: var(--pine-black);
}

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

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

.sprite {
  position: absolute;
}

/* Moving network field behind the whole page (drawn by network.js).
   z-index -1 keeps it above the page background and below all content. */
.field {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--green);
  color: var(--pine-black);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 0.98rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn--primary {
  background: var(--green);
  color: var(--pine-black);
}

.btn--primary:hover {
  background: #a9cd4c;
}

.btn--quiet {
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--quiet:hover {
  border-color: var(--ink);
}

.section {
  padding-block: clamp(4.5rem, 10vw, 9rem);
}

.section__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.25rem, 1.4rem + 3.2vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.site-header.is-stuck {
  background: rgba(6, 20, 23, 0.86);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.brand__mark {
  width: 2.9rem;
  height: auto;
  aspect-ratio: 144 / 130;
  fill: var(--green);
}

.brand__word {
  width: 5.4rem;
  height: auto;
  aspect-ratio: 175 / 46;
  fill: var(--ink);
  transition: fill 0.4s ease;
}

.site-nav {
  margin-left: auto;
}

.site-nav__list {
  display: flex;
  gap: clamp(1.25rem, 2.6vw, 2.5rem);
}

.site-nav a {
  position: relative;
  display: block;
  padding: 0.5rem 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.25s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1.5rem;
  height: 0.1875rem;
  border-radius: 999px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--ink);
}

.site-nav a.is-active::after {
  transform: scaleX(1);
}

.site-tools {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lang {
  display: flex;
  gap: 0.55rem;
  margin-right: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.lang span {
  color: var(--ink);
}

.lang a {
  color: var(--ink-soft);
  text-decoration: none;
}

.lang a:hover {
  color: var(--accent-text);
}

.tool-btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.25s ease;
}

.tool-btn:hover {
  border-color: var(--line-strong);
}

.theme-toggle .icon {
  grid-area: 1 / 1;
  width: 1.25rem;
  height: 1.25rem;
  transition: opacity 0.3s ease, transform 0.5s var(--ease);
}

[data-theme="dark"] .icon--moon,
[data-theme="light"] .icon--sun {
  opacity: 0;
  transform: rotate(-60deg) scale(0.6);
}

.menu-toggle {
  display: none;
  align-content: center;
  gap: 0.375rem;
}

.menu-toggle__bar {
  width: 1.125rem;
  height: 0.125rem;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.35s var(--ease);
}

.menu-open .menu-toggle__bar:first-child {
  transform: translateY(0.25rem) rotate(45deg);
}

.menu-open .menu-toggle__bar:last-child {
  transform: translateY(-0.25rem) rotate(-45deg);
}

@media (max-width: 56.24rem) {
  :root {
    --header-h: 4rem;
  }

  .site-header__inner {
    gap: 0.75rem;
  }

  .brand {
    position: relative;
    z-index: 2;
  }

  .site-tools {
    position: relative;
    z-index: 2;
    margin-left: auto;
  }

  .menu-toggle {
    display: grid;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: var(--header-h) var(--gutter) 2rem;
    background: var(--bg);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
  }

  .menu-open .site-nav {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
  }

  .site-nav__list {
    flex-direction: column;
    gap: 0.5rem;
  }

  .site-nav a {
    padding: 0.4rem 0 0.7rem;
    color: var(--ink);
    font: 300 clamp(2rem, 9vw, 2.75rem) / 1.1 var(--font-display);
  }

  .menu-open .site-header {
    background: var(--bg);
    transform: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: calc(var(--header-h) + 1.5rem) clamp(2.5rem, 8vh, 4.5rem);
  overflow: hidden;
}

.hero__inner {
  position: relative;
  display: grid;
  gap: clamp(2rem, 6vh, 3.5rem);
}

/* The emblem is the supplied logo artwork, unaltered. Only its container moves. */
.hero__emblem {
  position: relative;
  isolation: isolate;
  order: -1;
  justify-self: end;
  width: min(52vw, 14rem);
  margin-right: 3vw;
}

.hero__emblem::before {
  content: "";
  position: absolute;
  inset: -45%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 62%);
}

.hero__mark {
  width: 100%;
  height: auto;
  aspect-ratio: 144 / 130;
  fill: var(--green);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.75rem, 0.9rem + 6.2vw, 6.75rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

/* Each headline line sits in its own mask so it can rise into view. */
.hero__title .line {
  display: block;
  overflow: hidden;
  margin-top: -0.14em;
  padding: 0.14em 0 0.1em;
}

.hero__title .line__in {
  display: block;
}

.hero__lead {
  max-width: 33rem;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--ink-soft);
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.25rem);
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

@media (min-width: 56.25rem) {
  .hero {
    align-items: center;
    padding-block: calc(var(--header-h) + 2rem) 4rem;
  }

  .hero__inner {
    grid-template-columns: minmax(0, 8fr) minmax(0, 5fr);
    align-items: center;
    gap: 2rem;
  }

  .hero__emblem {
    order: 0;
    justify-self: center;
    width: min(100%, 26rem);
    margin-right: 0;
  }
}

/* Intro start state. Applied only when scripts run (html.js). The delayed
   animations are a failsafe that shows everything even if the intro never runs;
   main.js switches them off (html.intro-done) once the intro has finished. */
.js .hero__title .line__in {
  transform: translateY(115%);
  animation: intro-failsafe 0.01s 5s forwards;
}

.js .hero [data-intro] {
  opacity: 0;
  animation: intro-failsafe 0.01s 5s forwards;
}

.js .hero__emblem,
.js .field {
  opacity: 0;
  animation: intro-failsafe-fade 0.01s 5s forwards;
}

.intro-done .hero__title .line__in,
.intro-done .hero [data-intro],
.intro-done .hero__emblem,
.intro-done .field {
  animation: none;
}

@keyframes intro-failsafe {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes intro-failsafe-fade {
  to {
    opacity: 1;
  }
}

/* ---------- About ---------- */
.about__grid {
  display: grid;
  gap: 2.5rem;
}

.about__lead {
  max-width: 44rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.35rem, 1.1rem + 1.05vw, 1.95rem);
  line-height: 1.34;
  letter-spacing: -0.005em;
}

.about__text {
  display: grid;
  gap: 1.15em;
  max-width: 41rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  color: var(--ink-soft);
}

.certs {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-strong);
}

.certs__title {
  font: 500 1.25rem/1.3 var(--font-display);
}

.certs__text {
  max-width: 41rem;
  margin-top: 0.5rem;
  color: var(--ink-soft);
}

.certs__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}

.cert {
  position: relative;
  display: grid;
  gap: 0.3rem;
  padding: 1.4rem 1.5rem 1.5rem 2.6rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--bg-raised);
}

.cert::before {
  content: "";
  position: absolute;
  left: 1.25rem;
  top: 1.5rem;
  bottom: 1.5rem;
  width: var(--bar);
  border-radius: 999px;
  background: var(--green);
}

.cert__std {
  font: 400 1.4rem/1.2 var(--font-display);
}

.cert__name {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

@media (min-width: 56.25rem) {
  .about__grid {
    grid-template-columns: 4fr 8fr;
    gap: 2rem;
  }

  .about__grid > .section__title {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
    align-self: start;
  }
}

/* ---------- Competencies ---------- */
/* Slightly see-through, so the field stays faintly visible behind this band. */
.competencies {
  background: var(--bg-raised);
  background: color-mix(in srgb, var(--bg-raised) 80%, transparent);
  transition: background-color 0.4s ease;
}

.competencies__head {
  display: grid;
  gap: 1.5rem;
}

.competencies__intro {
  max-width: 40rem;
  font: 300 clamp(1.3rem, 1.1rem + 0.9vw, 1.75rem) / 1.35 var(--font-display);
}

/* Experience: bar length encodes years, on one shared scale. */
.experience {
  margin-top: clamp(3rem, 6vw, 5rem);
}

.experience__list {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.25rem);
}

.exp {
  display: grid;
  grid-template-columns: clamp(4.75rem, 12vw, 8.5rem) 1fr;
  column-gap: clamp(1rem, 2.5vw, 2rem);
  row-gap: 0.7rem;
  align-items: end;
}

.exp__label {
  display: contents;
}

.exp__num {
  grid-row: 1 / 3;
  font: 300 clamp(2.5rem, 1.6rem + 3.4vw, 4.5rem) / 0.86 var(--font-display);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.exp__text {
  max-width: 38rem;
  color: var(--ink-soft);
}

.exp__track {
  display: block;
  height: var(--bar);
  border-radius: 999px;
  background: var(--line);
}

.exp__fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: var(--green);
  transform-origin: left;
}

.exp[data-share="75"] .exp__fill {
  width: 75%;
}

.exp[data-share="50"] .exp__fill {
  width: 50%;
}

/* Register of competencies: grouped rows, not cards. */
.register {
  margin-top: clamp(3.5rem, 8vw, 6.5rem);
}

.group {
  display: grid;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-strong);
}

.group + .group {
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.group__title {
  font: 500 1.25rem/1.3 var(--font-display);
}

.cap {
  position: relative;
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  column-gap: 1.1rem;
  row-gap: 0.25rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.cap:first-child {
  padding-top: 0.25rem;
}

.cap__icon {
  grid-row: 1 / 3;
  margin-top: 0.2rem;
  color: var(--accent-text);
}

.cap__title {
  font: 400 1.3rem/1.3 var(--font-display);
}

.cap__text {
  grid-column: 2;
  color: var(--ink-soft);
  font-size: 1rem;
}

@media (min-width: 56.25rem) {
  .competencies__head {
    grid-template-columns: 4fr 8fr;
    gap: 2rem;
    align-items: end;
  }

  .group {
    grid-template-columns: 4fr 8fr;
    gap: 2rem;
  }

  .group__title {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
    align-self: start;
    max-width: 15rem;
  }

  .cap {
    grid-template-columns: 1.5rem minmax(11rem, 17rem) 1fr;
    align-items: baseline;
  }

  .cap__icon {
    grid-row: auto;
    align-self: start;
    margin-top: 0.3rem;
  }

  .cap__text {
    grid-column: 3;
  }
}

/* ---------- Partners (dark plate in both themes: logos are dark-background versions) ---------- */
.partners {
  --ink: #e8eee6;
  --ink-soft: #a3b4ab;
  --line: rgba(214, 232, 220, 0.13);
  --accent-text: #b4d65c;
  background: var(--plate);
  color: var(--ink);
}

.partners__head {
  display: grid;
  gap: 1.5rem;
}

.partners__lead {
  max-width: 40rem;
  color: var(--ink-soft);
}

.partners__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  /* The 1px gaps show this background. Near the pointer the grid lines glow
     (main.js moves --gx/--gy); the default position parks the glow off-screen. */
  background-color: var(--line);
  background-image: radial-gradient(15rem circle at var(--gx, -60rem) var(--gy, -60rem), rgba(150, 187, 57, 0.8), transparent 70%);
  overflow: hidden;
}

.partner {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  background: var(--plate);
  transition: box-shadow 0.45s ease;
}

/* Light inside the cell: follows the pointer across neighbouring cells
   (--mx/--my from main.js), or sits in the centre of a highlighted cell. */
.partner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(16rem circle at var(--mx, 50%) var(--my, 50%), rgba(150, 187, 57, 0.17), transparent 62%);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.partners__grid.is-pointed .partner::before,
.partner.is-lit::before {
  opacity: 1;
}

.partner.is-lit {
  box-shadow: inset 0 0 0 1px rgba(150, 187, 57, 0.6);
}

.partner img {
  width: auto;
  height: auto;
  max-width: 64%;
  max-height: 40%;
  transition: filter 0.45s ease, opacity 0.45s ease, transform 0.6s var(--ease);
}

/* Partner name, shown under the logo of the highlighted cell (wide screens). */
.partner__name {
  display: none;
}

/* Logos that are too dark for the plate in their brand colours. */
.partner--lift img {
  filter: brightness(1.7);
}

/* JPEG on white: invert to a dark ground, then let black drop out. */
.partner--invert img {
  filter: invert(1) hue-rotate(180deg);
  mix-blend-mode: screen;
}

/* With scripts: quiet monochrome wall. One partner at a time is highlighted
   (.is-lit, set by main.js): the one under the pointer, otherwise a slow rotation. */
.js .partner img {
  filter: grayscale(1) brightness(1.5);
  opacity: 0.78;
}

.js .partner--lift img {
  filter: grayscale(1) brightness(2.6);
}

.js .partner--invert img {
  filter: invert(1) hue-rotate(180deg) grayscale(1);
}

/* While the pointer is on the wall, everything but the chosen partner steps back. */
.js .partners__grid.is-pointed .partner:not(.is-lit) img {
  opacity: 0.4;
}

.js .partner.is-lit img {
  filter: none;
  opacity: 1;
  transform: scale(1.07);
}

.js .partner--lift.is-lit img {
  filter: brightness(1.7);
}

.js .partner--invert.is-lit img {
  filter: invert(1) hue-rotate(180deg);
}

@media (min-width: 48rem) {
  .partner__name {
    position: absolute;
    inset: auto 0.75rem 11%;
    display: block;
    overflow: hidden;
    color: var(--ink);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(0.4rem);
    transition: opacity 0.4s ease, transform 0.6s var(--ease);
  }

  .partner.is-lit .partner__name {
    opacity: 1;
    transform: none;
  }

  /* The logo moves up to make room for the name. */
  .js .partner.is-lit img {
    transform: translateY(-0.6rem) scale(1.07);
  }
}

@media (min-width: 22.5rem) {
  .partners__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 48rem) {
  .partners__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 56.25rem) {
  .partners__head {
    grid-template-columns: 4fr 8fr;
    gap: 2rem;
    align-items: end;
  }
}

@media (min-width: 68.75rem) {
  .partners__grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* ---------- Contact ---------- */
.contact__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
}

.contact__company {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  font: 500 1.25rem/1.3 var(--font-display);
}

.contact__list {
  display: grid;
  gap: 1.75rem;
  margin-top: 1.75rem;
}

.contact__list dt {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.contact__list dd {
  margin-top: 0.2rem;
  font: 300 clamp(1.4rem, 1.15rem + 1vw, 1.9rem) / 1.3 var(--font-display);
}

.contact__list a {
  text-decoration-color: var(--green);
  text-decoration-thickness: 0.125rem;
  text-underline-offset: 0.25em;
}

.contact__list a:hover {
  color: var(--accent-text);
}

.map {
  position: relative;
  min-height: 22rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background-color: var(--bg-raised);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 3rem 3rem;
  background-position: center;
  overflow: hidden;
}

.map__cover {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.9rem;
  height: 100%;
  min-height: inherit;
  padding: 2rem 1.5rem;
  text-align: center;
}

.map__pin {
  width: 2.25rem;
  height: 2.25rem;
  color: var(--accent-text);
}

.map__address {
  font: 400 1.2rem/1.3 var(--font-display);
}

.map__note {
  max-width: 24rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.5;
}

.map__link {
  font-size: 0.95rem;
  text-decoration-color: var(--green);
  text-underline-offset: 0.25em;
}

.map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (min-width: 56.25rem) {
  .contact__grid {
    grid-template-columns: 5fr 7fr;
    align-items: stretch;
  }

  .map {
    min-height: 28rem;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.site-footer__inner {
  display: grid;
  gap: 1rem;
  padding-block: 2.5rem;
}

.site-footer .brand__mark {
  width: 2.4rem;
}

.site-footer .brand__word {
  width: 4.5rem;
}

@media (min-width: 56.25rem) {
  .site-footer__inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2.5rem;
  }
}

/* ---------- Motion preferences ---------- */
/* Set by main.js when the animation library is missing or motion is reduced. */
.no-motion .hero__title .line__in,
.no-motion .hero [data-intro],
.no-motion .hero__emblem,
.no-motion .field {
  transform: none;
  opacity: 1;
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  /* Nothing slides or scales; colour and opacity fades stay. */
  .site-header,
  .site-nav a::after,
  .menu-toggle__bar,
  .theme-toggle .icon {
    transition-property: background-color, border-color, opacity;
  }

  /* Highlighted partner changes colour only; logo and name stay in place. */
  .js .partner.is-lit img,
  .partner__name {
    transform: none;
  }

  /* Headline fades in instead of rising (main.js runs the fade). */
  .js .hero__title .line__in {
    transform: none;
    opacity: 0;
  }
}
