/* Values come from the Figma frames (1440px wide). */
:root {
  --bg: #051314;
  --primary: #93b8bd;
  --secondary: #2f4f51;
  --accent: #ffb05c;
  --panel: rgba(47, 79, 81, .2);
  --chip: rgba(47, 79, 81, .85);
  --text: #fff;
  --gutter: 45px;
  --pad: 35px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; }

body {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 18px/25px "Sora", system-ui, sans-serif;
  overflow-x: hidden;
}
/* dark gradient behind the nav (Figma "Navigator", 44% opacity) */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 370px;
  background: url(assets/nav-bg.png) 0 0 / 100% 100%;
  opacity: .44;
  pointer-events: none;
  z-index: 1;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- type ---------- */
h1, h2 {
  font-family: "Montagu Slab", Georgia, serif;
  font-weight: 600;
  line-height: normal;
  text-transform: capitalize;
}
h1 { font-size: 50px; }
h2 { font-size: 35px; }
.eyebrow {
  font-weight: 200;
  font-size: 20px;
  line-height: 25px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.body + .body { margin-top: 25px; }
.light { font-weight: 200; }
.center { text-align: center; }

.btn {
  display: inline-flex;
  align-items: center;
  height: 43px;
  padding: 0 17px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: filter .2s, translate .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { filter: brightness(1.1); translate: 0 -2px; box-shadow: 0 8px 20px -10px rgba(147, 184, 189, .6); }
.btn:active { translate: 0 0; transition-duration: .08s; }
.btn-dark { background: var(--secondary); color: var(--text); }
.feature-text .btn + .btn { margin-left: 12px; }

/* ---------- header / footer ---------- */
.header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 132px;
  padding: 0 55px 0 24px;
}
.logo img { width: 81px; height: 76px; object-fit: cover; }
.nav { display: flex; gap: 37px; }
.nav a {
  font-weight: 600;
  line-height: normal;
  text-decoration: none;
  transition: opacity .2s;
}
.nav a:hover { opacity: .7; }
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .2s var(--ease), opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

main { flex: 1; padding-top: 164px; }
.page-home main { padding-top: 0; }

.footer {
  position: relative;
  height: 157px;
  margin-top: 77px;
  padding: 96px 16px 0;
  text-align: center;
}
.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url(assets/footer-bg.png) 0 0 / 100% 100%;
  opacity: .44;
  z-index: -1;
}

/* ---------- panels ---------- */
.panel {
  width: min(1349px, 100% - 2 * var(--gutter));
  margin: 0 auto;
  border-radius: 15px;
  background: var(--panel);
}
.panel + .panel { margin-top: 47px; }

/* ---------- home: hero ---------- */
.hero {
  position: relative;
  height: max(560px, 100vh);
  height: max(560px, 100svh);
  display: grid;
  place-items: center;
  background: #000;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .3; /* design has .21 for the still image; a bit brighter so the video reads */
}
.hero::after { /* bottom fade */
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 370px;
  background: url(assets/hero-fade.png) 0 0 / 100% 100%;
  opacity: .44;
}
.hero-text { position: relative; z-index: 2; text-align: center; padding: 60px 16px 0; }
.hero-text .eyebrow { margin-bottom: 12px; }
/* scale the hero copy with the screen past the 1440px design width */
@media (min-width: 1441px) {
  .hero-text h1 { font-size: min(3.47vw, 96px); }
  .hero-text .eyebrow { font-size: min(1.39vw, 38px); line-height: 1.25; letter-spacing: .15em; margin-bottom: .6vw; }
}

.sheet {
  position: relative;
  z-index: 2;
  margin-top: -24px;
  padding-top: 70px;
  border-radius: 25px 25px 0 0;
  background: var(--bg);
}
.sheet > .services,
.sheet > .testimonials,
.sheet > .skills,
.sheet > .feature:last-child { margin-top: 92px; }

/* ---------- feature (text + images) ---------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: var(--pad);
}
.feature-text { align-self: center; max-width: 571px; }
.feature-text h2 { margin-bottom: 20px; }
.feature-text .btn { margin-top: 45px; }
.feature.flip .feature-text { order: 2; padding-left: var(--pad); }
.feature-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 187px;
  gap: 21px 17px;
}
.feature-media img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.feature-media img:first-child { grid-column: 1 / -1; }
/* Single image on the home contact block and the contact page. Same frame on both. */
.feature-media.single { grid-auto-rows: auto; min-height: 0; align-self: start; }
.feature-media.single img { height: 395px; }
.page-contact .feature { margin-top: 21px; }
.page-contact .feature-text h2 { margin-bottom: 20px; }

/* ---------- cards (services + projects) ---------- */
.card {
  position: relative;
  display: block;
  padding: 9px 12px 9px 11px;
  border-radius: 15px;
  background: var(--panel);
  text-decoration: none;
  transition: translate .35s var(--ease), background-color .35s;
}
.card:hover { translate: 0 -4px; background-color: rgba(47, 79, 81, .32); }
.corner img { transition: translate .3s var(--ease); }
.card:hover .corner img, .skill-img:hover .corner img { translate: 3px 0; }
.card-img { display: block; aspect-ratio: 603 / 374; border-radius: 10px; overflow: hidden; }
.card-img { position: relative; }
.card-img :is(img, video) { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover .card-img :is(img, video) { transform: scale(1.04); }
.tag {
  position: absolute;
  top: 9px;
  left: 11px;
  height: 45px;
  padding: 11px 32px 0 10px;
  border-radius: 10px 0 10px 0;
  background: var(--chip);
  font-weight: 600;
  line-height: normal;
}
.corner {
  position: absolute;
  right: 12px;
  bottom: 9px;
  display: grid;
  place-items: center;
  width: 56px;
  height: 50px;
  border-radius: 10px 0 10px 0;
  background: var(--chip);
}

.services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 53px;
  padding: 22px 23px 28px 21px;
}
.services-text { padding: 25px 0 0 14px; max-width: 585px; }
.services-text h2 { margin-bottom: 25px; }

.group { padding: 42px 31px 35px 29px; }
.group + .group { margin-top: 43px; }
.group > .eyebrow, .group > h2 { margin-left: 6px; }
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 37px;
  margin-top: 48px;
}

/* ---------- testimonials ---------- */
.testimonials { padding: 29px 33px 36px 34px; }
.quote-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  text-align: center;
}
.quote-title img { width: 42px; transform: scaleY(-1); }
.t-box {
  margin-top: 28px;
  padding-bottom: 16px;
  border-radius: 15px;
  background: var(--panel);
}
.t-slides { overflow: hidden; border-radius: 15px; }
.t-track { display: flex; transition: transform .9s var(--ease); }
.t-card {
  flex: 0 0 100%;
  min-height: 271px;
  padding: 33px 37px 24px 38px;
  border-radius: 15px;
  background: var(--panel);
}
.t-head { display: flex; align-items: center; gap: 36px; }
.t-avatar { width: 75px; height: 79px; border-radius: 5px; object-fit: cover; }
.t-name { font-weight: 600; line-height: 24px; }
.t-role { margin-top: 11px; }
a.t-head { width: fit-content; text-decoration: none; }
a.t-head .t-avatar { transition: scale .3s var(--ease), box-shadow .3s var(--ease); }
a.t-head .t-name { width: fit-content; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .3s var(--ease), color .2s; }
a.t-head:hover .t-avatar { scale: 1.05; box-shadow: 0 0 0 2px var(--accent); }
a.t-head:hover .t-name { color: var(--accent); background-size: 100% 1px; }
.t-text { margin-top: 24px; font-weight: 300; font-size: 15px; }
.dots { display: flex; justify-content: center; gap: 16px; margin-top: 17px; }
.dots button {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--chip);
  cursor: pointer;
  transition: background-color .3s, scale .3s var(--ease);
}
.dots button:hover { scale: 1.15; }
.dots button.on { background: var(--primary); }
.testimonials > .eyebrow { margin: 39px 0 18px; }
/* every logo gets an equal-width slot and is centred in it, however many clients there are */
.clients {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 16px 40px;
  height: 110px;
  padding: 0 40px;
  border-radius: 15px;
  background: var(--panel);
}
.clients > * { display: grid; place-items: center; max-width: 100%; }
.clients img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(64px * var(--s, 1)); /* optional per-logo "scale" in config */
  mix-blend-mode: exclusion;
  object-fit: contain;
}
.clients a { transition: opacity .2s, scale .3s var(--ease); }
.clients a:hover { opacity: .75; scale: 1.04; }

/* ---------- skills ---------- */
.skills { padding: 29px var(--pad) 32px; }
.skills .intro { max-width: 968px; margin: 50px auto 0; }
.skill-grid {
  display: grid;
  grid-template-columns: 404fr 383fr 404fr;
  grid-template-rows: repeat(3, 76px);
  gap: 29px 44px;
  margin-top: 49px;
}
.skill-img {
  position: relative;
  grid-column: 2;
  grid-row: 1 / 4;
  border-radius: 10px;
  overflow: hidden;
}
.skill-img > img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.skill-img:hover > img, .feature-media img:hover { transform: scale(1.04); }
.feature-media img { transition: transform .8s var(--ease); }
.skill-img .corner { right: 0; bottom: 0; }
.skill {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 5px 12px;
  padding: 10px 21px 11px 12px;
  border-radius: 10px;
  background: var(--panel);
  font-weight: 600;
  line-height: normal;
}
.skill img { width: 40px; height: 40px; border-radius: 5px; object-fit: cover; }
/* The track is only drawn to the right of the fill (never underneath it), so its light colour
   can't bleed through the fill's anti-aliased rounded end. The fill carries a copy of the track
   gradient under its own, so it looks the same as a semi-transparent fill over the track. */
.bar {
  position: relative;
  grid-column: 1 / -1;
  height: 10px;
}
.bar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  clip-path: inset(0 0 0 calc(var(--l) * 1% - 5px));
}
.bar i {
  position: relative;
  overflow: hidden;
  display: block;
  height: 100%;
  border-radius: 5px;
  background:
    linear-gradient(90deg, rgba(7, 5, 4, .8), rgba(255, 176, 92, .8)),
    linear-gradient(90deg, var(--primary), var(--secondary)) 0 0 / calc(10000% / var(--l)) 100%;
}
.software {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 29px;
  padding: 11px 13px 11px 12px;
  border-radius: 10px;
  background: var(--panel);
}
.software img { width: 54px; height: 54px; border-radius: 5px; object-fit: cover; }

/* ---------- project detail ---------- */
.detail { padding: 31px 34px 26px; }
.detail > div {
  border-radius: 15px;
  background: var(--panel);
}
.detail > div + div { margin-top: 24px; }
.d-head {
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 232px;
  padding: 21px 19px 21px 22px;
}
.d-logo { width: 341px; height: 75px; object-fit: contain; mix-blend-mode: exclusion; }
.d-actions {
  grid-column: 1 / -1;
  align-self: end;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.d-links { display: flex; gap: 27px; }
.btn-back {
  height: 44px;
  gap: 15px;
  padding: 0 5px 0 9px;
  background: var(--chip);
  color: var(--text);
}
.btn-back img { transform: scaleX(-1); }

.d-viewer { padding: 20px 21px 19px; }
.v-stage { aspect-ratio: 2; border-radius: 10px; overflow: hidden; background: #000; }
.v-stage > * { display: block; width: 100%; height: 100%; border: 0; }
.v-stage > img { object-fit: cover; }
.v-stage > video { object-fit: contain; }
.v-strip { position: relative; margin-top: 16px; }
.v-thumbs {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.v-thumbs button {
  position: relative;
  flex: 0 0 calc((100% - 80px) / 5);
  aspect-ratio: 232 / 131;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}
.v-thumbs :is(img, video) { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.v-thumbs button:hover :is(img, video) { transform: scale(1.06); }
.v-thumbs button::after { /* dim inactive thumbs */
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(147, 184, 189, .5);
  transition: opacity .2s;
}
.v-thumbs button:hover::after { opacity: .4; }
.v-thumbs button.on::after {
  opacity: 1;
  background: none;
  border-bottom: 5px solid var(--primary);
  border-radius: 10px;
}
.v-prev, .v-next {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 50px;
  padding: 0;
  border: 0;
  background: var(--chip);
  cursor: pointer;
  transition: background-color .25s;
}
.v-prev:hover, .v-next:hover { background: var(--secondary); }
.v-prev { left: 0; border-radius: 0 10px 10px 0; }
.v-prev img { transform: scaleX(-1); }
.v-next { right: 0; border-radius: 10px 0 0 10px; }
.d-detail { padding: 23px 20px 26px 21px; }
.d-detail img { width: 100%; border-radius: 10px; }
/* play badge on video thumbnails */
.play {
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--chip);
}
.play::after {
  content: "";
  position: absolute;
  inset: 13px 0 0 17px;
  border-style: solid;
  border-width: 9px 0 9px 14px;
  border-color: transparent transparent transparent var(--accent);
  width: 0;
  height: 0;
}

/* README text on project pages */
.md video, .md iframe { display: block; width: 100%; border: 0; border-radius: 10px; background: #000; }
.md iframe { aspect-ratio: 16 / 9; }
.md > * + * { margin-top: 20px; }
.md h1, .md h2, .md h3 { font-family: "Montagu Slab", Georgia, serif; font-weight: 600; text-transform: none; }
.md h1 { font-size: 35px; } .md h2 { font-size: 28px; } .md h3 { font-size: 22px; }
.md :is(h1, h2, h3) + * { margin-top: 12px; }
.md ul, .md ol { padding-left: 22px; }
.md li + li { margin-top: 6px; }
.md li::marker { color: var(--primary); }
.md a { color: var(--primary); }
.md code { font-size: .9em; padding: 2px 6px; border-radius: 5px; background: var(--panel); }

/* ---------- about page ---------- */
.about-intro {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 56px;
  padding: var(--pad);
}
.about-text { padding: 20px 0 20px 10px; }
.about-text h1 { font-size: 44px; line-height: 1.15; margin-bottom: 28px; }
.about-text .body { max-width: 640px; }
.about-buttons { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }
.about-img { width: 100%; aspect-ratio: 4 / 5; max-height: 600px; object-fit: cover; border-radius: 10px; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: min(1349px, 100% - 2 * var(--gutter));
  margin: 24px auto 0;
}
.panel.stat { width: auto; margin: 0; padding: 28px var(--pad); }
.stat strong {
  display: block;
  font: 600 50px/1 "Montagu Slab", Georgia, serif;
  color: var(--primary);
}
.stat span { display: block; margin-top: 12px; font-weight: 200; }

/* free-form text from config/about.html */
.prose { margin-top: 24px; padding: 42px var(--pad) 40px; }
.prose > * { max-width: 900px; }
.prose h2 { margin-bottom: 24px; }
.prose h3 { margin: 36px 0 14px; font-size: 22px; font-weight: 600; line-height: 1.3; }
.prose p { font-weight: 300; line-height: 1.7; }
.prose p + p { margin-top: 18px; }
.prose strong { font-weight: 600; }
.prose ul { padding-left: 20px; }
.prose ul li { font-weight: 300; line-height: 1.7; }
.prose ul li + li { margin-top: 10px; }
.prose ul li::marker { color: var(--primary); }
.prose a { color: var(--primary); }

/* ---------- artwork ---------- */
.page-artwork main { padding-top: 168px; }
.page-artwork .panel { padding: 43px 39px 40px 41px; }
.gallery {
  display: grid;
  grid-template-columns: 388fr 416fr 391fr;
  gap: 37px;
}
.col { display: flex; flex-direction: column; gap: 42px; }
.col > .tile:last-child { flex: 1; }
.tile {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: #0a1718;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}
.tile :is(img, video) {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.tile:hover :is(img, video) { transform: scale(1.04); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  grid-template-rows: 1fr auto;
  align-items: center;
  background: rgba(2, 8, 9, .94);
}
.lightbox[hidden] { display: none; }
.lb-stage { grid-column: 2; text-align: center; min-height: 0; }
.lb-media :is(img, video) {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: calc(100vh - 160px);
  border-radius: 10px;
}
.lb-media iframe {
  display: block;
  width: min(100%, calc((100vh - 160px) * 16 / 9));
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  border: 0;
  border-radius: 10px;
}
.lb-stage figcaption { margin-top: 10px; opacity: .8; font-size: 14px; }
.lightbox button {
  background: none;
  border: 0;
  color: var(--text);
  font-size: 48px;
  cursor: pointer;
  opacity: .7;
}
.lightbox button:hover { opacity: 1; }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }
.lb-close { position: absolute; top: 8px; right: 16px; }
.lb-thumbs {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 12px 16px 20px;
  overflow-x: auto;
}
.lb-thumb {
  position: relative;
  flex: none;
  height: 60px;
  min-width: 60px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  opacity: .5;
  transition: opacity .2s;
}
.lb-thumb :is(img, video) { display: block; height: 100%; }
.lb-thumb .play { scale: .6; }
.lb-thumb.active, .lb-thumb:hover { opacity: 1; }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  :root { --gutter: 24px; --pad: 24px; }
  .services, .cards, .feature { grid-template-columns: 1fr; gap: 24px; }
  .feature.flip .feature-text { order: 0; padding-left: 0; }
  .feature-text { max-width: none; }
  .services-text { padding: 12px; max-width: none; }
  .skill-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .skill-img { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 383 / 286; }
  .software { flex-wrap: wrap; justify-content: center; }
  .about-intro { grid-template-columns: 1fr; gap: 24px; }
  .about-img { aspect-ratio: 16 / 10; }
}
@media (max-width: 700px) {
  :root { --gutter: 16px; --pad: 16px; }
  body { font-size: 16px; line-height: 23px; }
  h1 { font-size: 34px; }
  h2 { font-size: 26px; }
  .header {
    height: auto;
    padding: 12px 12px 12px 16px;
    align-items: center;
    justify-content: space-between;
  }
  .logo { line-height: 0; }
  .logo img { width: 46px; height: auto; object-fit: contain; }
  .nav-toggle { display: flex; }
  .nav {
    display: none;
    position: absolute;
    top: calc(100% - 6px);
    right: 12px;
    width: min(220px, calc(100vw - 24px));
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(5, 19, 20, .94);
    border: 1px solid rgba(147, 184, 189, .28);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
  }
  .nav.open { display: flex; }
  .nav a {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 16px;
  }
  .nav a:hover,
  .nav a[aria-current="page"] {
    opacity: 1;
    background: var(--chip);
  }
  .nav a[aria-current="page"] { color: var(--accent); }
  main { padding-top: 96px; }
  .page-artwork main { padding-top: 96px; }
  .group, .testimonials, .detail, .page-artwork .panel { padding: 16px; }
  .feature-media { grid-auto-rows: 120px; gap: 12px; }
  .feature-media.single img { height: 240px; }
  .t-card { padding: 20px; }
  .t-head { flex-wrap: wrap; gap: 16px; }
  .quote-title { gap: 12px; }
  .quote-title img { width: 28px; }
  .clients { grid-auto-flow: row; grid-template-columns: 1fr 1fr; height: auto; padding: 16px; }
  .skill-grid { grid-template-columns: 1fr; }
  .d-head { grid-template-columns: 1fr; gap: 16px; }
  .d-logo { width: 220px; height: auto; }
  .d-actions, .d-links { flex-wrap: wrap; gap: 12px; }
  .v-thumbs button { flex-basis: calc((100% - 40px) / 3); }
  .gallery { grid-template-columns: 1fr; gap: 16px; }
  .col { gap: 16px; }
  .col > .tile:last-child { flex: none; }
  .about-text { padding: 0; }
  .about-text h1 { font-size: 32px; }
  .stats { grid-template-columns: 1fr; gap: 16px; }
  .stat strong { font-size: 40px; }
  .lightbox { grid-template-columns: 40px 1fr 40px; }
}

/* ---------- motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s var(--ease) var(--d, 0s), transform .8s var(--ease) var(--d, 0s),
    translate .35s var(--ease), background-color .35s;
}
.reveal.in { opacity: 1; transform: none; }

/* skill bars fill in when the row appears, then a glow keeps sweeping along them */
.bar i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 214, 160, .75), transparent) no-repeat;
  background-size: 40% 100%;
  background-position: -60% 0;
  animation: glow 3.2s ease-in-out calc(var(--d, 0s) + 1.6s) infinite;
}
.skill.in .bar i { animation: pulse 3.2s ease-in-out calc(var(--d, 0s) + 1.6s) infinite; }
@keyframes glow { 0% { background-position: -60% 0; } 60%, 100% { background-position: 160% 0; } }
@keyframes pulse { 0%, 100% { filter: brightness(1); } 40% { filter: brightness(1.3); } }
.skill .bar i { clip-path: inset(0 100% 0 0 round 5px); transition: clip-path 1.4s var(--ease) calc(var(--d, 0s) + .25s); }
.skill.in .bar i { clip-path: inset(0 0 0 0 round 5px); }
.skill.in .bar::before { clip-path: inset(0 0 0 calc(var(--l) * 1% - 5px)); }
/* the track's start follows the fill as it grows */
.skill .bar::before { clip-path: inset(0); transition: clip-path 1.4s var(--ease) calc(var(--d, 0s) + .25s); }

.hero-text > * { animation: rise 1s var(--ease) both; }
.hero-text > :nth-child(2) { animation-delay: .15s; }
.hero-bg { animation: fade 1.6s ease both; }
.lightbox:not([hidden]) { animation: fade .3s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .skill .bar i { clip-path: none; }
  .skill .bar::before { clip-path: inset(0 0 0 calc(var(--l) * 1% - 5px)); }
}

/* ---------- footer links ---------- */
.footer a { text-decoration: none; opacity: .8; transition: opacity .2s; }
.footer a:hover, .footer a[aria-current] { opacity: 1; }

/* ---------- impressum ---------- */
.legal { padding: 42px var(--pad) 40px; }
.legal h1 { margin-bottom: 12px; }
.legal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
}
.legal-item { padding: 24px 26px; border-radius: 10px; background: var(--panel); }
.legal-num { display: block; color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: 2px; }
.legal-item h3 { margin: 6px 0 14px; font-size: 18px; font-weight: 600; }
.legal-item a { color: var(--primary); }
@media (max-width: 900px) { .legal-grid { grid-template-columns: 1fr; } }
.legal-item .body + .body { margin-top: 2px; }

.feature-text .btn { vertical-align: top; }

/* ---------- scrollbar ---------- */
html { scrollbar-color: var(--secondary) var(--bg); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--secondary); border: 2px solid var(--bg); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
.v-thumbs::-webkit-scrollbar, .lb-thumbs::-webkit-scrollbar { height: 0; }
