/* =========================================================
   Husfix Sweden AB — Stylesheet
   Palette: warm cream, deep ink, amber accent
   ========================================================= */

:root {
  --bg: #FAFAF7;
  --bg-soft: #F2EFE7;
  --ink: #111111;
  --ink-soft: #2B2B2B;
  --ink-muted: #6B6B6B;
  --line: #E5E1D6;
  --accent: #F4C430;
  --accent-deep: #E0AE0E;
  --accent-soft: #FFF3C2;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 4px;
  --radius-lg: 12px;

  --t-fast: 160ms cubic-bezier(.2,.7,.3,1);
  --t-med: 280ms cubic-bezier(.2,.7,.3,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

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

button { font: inherit; cursor: pointer; }

::selection { background: var(--accent); color: var(--ink); }

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0 0 .5em;
  color: var(--ink);
}

h1 {
  font-size: clamp(40px, 6vw, 76px);
  font-variation-settings: "opsz" 144, "SOFT" 30;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(30px, 4vw, 48px);
  font-variation-settings: "opsz" 96, "SOFT" 30;
}

h3 {
  font-size: clamp(22px, 2.4vw, 28px);
  font-variation-settings: "opsz" 36;
}

p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 18px;
}

.lede {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 60ch;
}

/* ---------- Layout ---------- */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(64px, 8vw, 120px) 0;
}

.section--tight { padding: clamp(40px, 5vw, 72px) 0; }

.section--soft { background: var(--bg-soft); }

.section--ink {
  background: var(--ink);
  color: var(--bg);
}
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--bg); }
.section--ink .lede { color: rgba(250,250,247,.75); }
.section--ink .eyebrow { color: rgba(250,250,247,.6); }

.grid { display: grid; gap: 32px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250,250,247,.85);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-med);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand__mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transform: translateY(-4px);
}
.brand__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand__mark--fallback {
  color: var(--accent);
  font-family: var(--sans);
  font-weight: 800;
  font-size: 18px;
}
.brand > span:not(.brand__mark) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
  gap: 3px;
}
.brand__sub {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: var(--radius);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav__link:hover { color: var(--ink); background: var(--bg-soft); }
.nav__link.is-active { color: var(--ink); }
.nav__link.is-active::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--accent);
  margin: 4px auto 0;
}

.lang {
  display: flex;
  gap: 2px;
  margin-left: 8px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.lang a { padding: 6px 8px; color: var(--ink-muted); border-radius: var(--radius); }
.lang a.is-active { color: var(--ink); background: var(--bg-soft); }
.lang a[aria-disabled="true"] { color: var(--ink-muted); opacity: .45; pointer-events: none; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 12px; right: 12px; height: 2px;
  background: var(--ink); transition: transform var(--t-med), opacity var(--t-fast), top var(--t-med);
}
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 28px; }
body.nav-open .nav-toggle span:nth-child(1) { top: 22px; transform: rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { background: var(--ink-soft); }
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: var(--accent-deep); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn--ghost-light { background: transparent; color: var(--bg); border-color: rgba(250,250,247,.4); }
.btn--ghost-light:hover { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.btn .arrow { transition: transform var(--t-fast); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Liquid-glass background ---------- */

.hero, .page-head {
  isolation: isolate;
}
.hero > .container,
.page-head > .container {
  position: relative;
  z-index: 1;
}

.liquid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.liquid-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--bg) 0%,
    transparent 22%,
    transparent 78%,
    var(--bg) 100%
  );
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.34;
  will-change: transform;
  transform: translateZ(0);
}
.blob--1 {
  width: 420px; height: 420px;
  background: var(--accent);
  top: 20%; left: 4%;
  animation: drift-a 18s ease-in-out infinite;
}
.blob--2 {
  width: 320px; height: 320px;
  background: #FFE49A;
  top: 28%; right: 6%;
  animation: drift-b 22s ease-in-out infinite;
}
.blob--3 {
  width: 280px; height: 280px;
  background: #FFD16E;
  top: 48%; left: 36%;
  animation: drift-c 16s ease-in-out infinite;
}
.blob--4 {
  width: 220px; height: 220px;
  background: #F6E4B3;
  top: 52%; left: 6%;
  animation: drift-d 20s ease-in-out infinite;
  opacity: 0.28;
}

@keyframes drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%       { transform: translate3d(160px, 40px, 0) scale(1.18); }
}
@keyframes drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%       { transform: translate3d(-180px, -30px, 0) scale(1.22); }
}
@keyframes drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(120px, -35px, 0) scale(0.92); }
  66%      { transform: translate3d(-100px, 35px, 0) scale(1.15); }
}
@keyframes drift-d {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%       { transform: translate3d(180px, -40px, 0) scale(1.12); }
}

.page-head .blob--1 { width: 360px; height: 360px; }
.page-head .blob--2 { width: 280px; height: 280px; }
.page-head .blob--3 { width: 220px; height: 220px; }
.page-head .blob--4 { width: 180px; height: 180px; }

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(48px, 7vw, 96px) 0 clamp(80px, 9vw, 140px);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(32px, 4vw, 56px);
  align-items: center;
}
.hero__copy h1 {
  margin-bottom: 24px;
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero__copy h1 em {
  position: relative;
  font-style: italic;
  display: inline-block;
  padding: 0 4px;
}
.hero__copy h1 em::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 4%;
  height: 38%;
  background: var(--accent-soft);
  z-index: -1;
  transform-origin: left center;
  animation: underline-grow 900ms cubic-bezier(.65,.05,.36,1) 700ms both;
}
@keyframes underline-grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__copy h1 em::before { animation: none; transform: scaleX(1); }
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}
.hero__media {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.35);
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero__badge {
  position: absolute;
  bottom: 24px; left: 24px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex; gap: 14px; align-items: center;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.4);
}
.hero__badge strong { font-family: var(--serif); font-size: 22px; line-height: 1; }
.hero__badge span { font-size: 12px; color: var(--ink-muted); display: block; margin-top: 4px; letter-spacing: 0.08em; text-transform: uppercase; }
.hero__badge .dot {
  position: relative;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: dot-pulse 2.4s ease-in-out infinite;
}
.hero__badge .dot::before,
.hero__badge .dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  animation: pulse-ring 2.4s ease-out infinite;
}
.hero__badge .dot::after { animation-delay: 1.2s; }

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--accent-soft); }
  50%      { box-shadow: 0 0 0 7px var(--accent-soft); }
}
@keyframes pulse-ring {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(3.5); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__badge .dot,
  .hero__badge .dot::before,
  .hero__badge .dot::after { animation: none; }
}

/* ---------- Trust strip ---------- */

.trust {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
}
.trust__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  align-items: center;
}
.trust__item { font-size: 14px; color: var(--ink-muted); display: flex; gap: 12px; align-items: center; }
.trust__item strong { color: var(--ink); display: block; font-size: 15px; font-weight: 600; }
.trust__icon {
  width: 40px; height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: grid; place-items: center;
  color: var(--ink);
}
.trust__icon svg { width: 20px; height: 20px; }

/* ---------- Service cards ---------- */

.service {
  display: block;
  padding: 28px 28px 32px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform var(--t-med), border-color var(--t-fast), box-shadow var(--t-med);
  height: 100%;
}
.service:hover {
  transform: translateY(-3px);
  border-color: var(--ink);
  box-shadow: 0 18px 40px -22px rgba(0,0,0,.25);
}
.service__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--accent-deep);
}
.service__icon {
  width: 28px;
  height: 28px;
  color: var(--ink);
  margin-bottom: 18px;
  display: block;
  transition: color var(--t-fast), transform var(--t-fast);
}
.service:hover .service__icon {
  color: var(--accent-deep);
  transform: translateY(-2px);
}
.service h3 { margin: 0 0 10px; }
.service p { color: var(--ink-muted); font-size: 15px; margin: 0; }

/* ---------- Project cards ---------- */

.projects-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.project { grid-column: span 4; position: relative; }
.project--wide { grid-column: span 8; }
.project--tall .project__media { aspect-ratio: 3/4; }

.project__media {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
}
.project__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(.2,.7,.3,1);
}
.project:hover .project__media img { transform: scale(1.04); }
.project__caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}
.project__title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}
.project__meta {
  font-size: 13px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}
.project__tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

/* ---------- Section heading combo ---------- */

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 56px;
}
.section-head__title h2 { margin: 0; }
.section-head__copy { color: var(--ink-muted); font-size: 17px; max-width: 48ch; }

/* ---------- Featurettes (split content) ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.split__media {
  aspect-ratio: 5/6;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.split__media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Pillars (why us) ---------- */

.pillar {
  padding: 32px 28px;
  border-top: 1px solid rgba(255,255,255,.16);
}
.pillar__num {
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
  color: var(--accent);
  display: block;
  margin-bottom: 12px;
}
.pillar h3 { color: var(--bg); font-size: 22px; margin: 0 0 12px; }
.pillar p { color: rgba(250,250,247,.7); font-size: 15px; margin: 0; }

/* ---------- CTA block ---------- */

.cta-block {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  padding: clamp(40px, 5vw, 72px);
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.cta-block::before {
  content: "";
  position: absolute;
  top: -40%; right: -10%;
  width: 360px; height: 360px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: .25;
  pointer-events: none;
}
.cta-block h2 { color: var(--bg); margin: 0 0 16px; }
.cta-block p { color: rgba(250,250,247,.75); margin: 0; }
.cta-block__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(250,250,247,.7);
  padding: 80px 0 32px;
  font-size: 14px;
}
.site-footer h4 {
  color: var(--bg);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.site-footer a { color: rgba(250,250,247,.7); transition: color var(--t-fast); }
.site-footer a:hover { color: var(--accent); }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.site-footer__list { list-style: none; padding: 0; margin: 0; }
.site-footer__list li { margin-bottom: 10px; }
.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--bg);
  margin-bottom: 14px;
  line-height: 1;
}
.site-footer__logo {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
}
.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 13px;
}

/* ---------- WhatsApp floating button ---------- */

.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px 14px 18px;
  background: #25D366;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border-radius: 999px;
  box-shadow: 0 10px 30px -10px rgba(37,211,102,.6), 0 6px 18px -8px rgba(0,0,0,.3);
  transition: transform var(--t-fast), box-shadow var(--t-med), bottom 420ms cubic-bezier(.2,.7,.3,1);
}
body.has-cookie .wa-float { bottom: 110px; }
@media (max-width: 600px) {
  body.has-cookie .wa-float { bottom: 150px; }
}
.wa-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px -10px rgba(37,211,102,.7), 0 8px 22px -8px rgba(0,0,0,.35);
  color: #fff;
}
.wa-float svg { width: 20px; height: 20px; }
@media (max-width: 600px) {
  .wa-float span { display: none; }
  .wa-float { padding: 14px; }
}

/* ---------- Page header (subpages) ---------- */

.page-head {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 9vw, 128px) 0 clamp(48px, 6vw, 88px);
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  max-width: 28ch;
  margin: 0 0 20px;
  font-size: clamp(32px, 4.2vw, 52px);
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.page-head .lede { max-width: 56ch; }

/* ---------- Services list (services page) ---------- */

.svc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); }
.svc-list__item {
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  align-items: start;
  scroll-margin-top: 100px;
}
.case { scroll-margin-top: 100px; }
.svc-list__item:nth-child(odd) { padding-right: 32px; }
.svc-list__item:nth-child(even) { padding-left: 32px; border-left: 1px solid var(--line); }
.svc-list__num {
  font-family: var(--serif);
  font-size: 32px;
  color: var(--accent-deep);
  font-style: italic;
}
.svc-list__item h3 { margin: 0 0 8px; }
.svc-list__item p { color: var(--ink-muted); margin: 0; font-size: 15px; }

/* ---------- Project gallery ---------- */

.case { padding: clamp(56px, 7vw, 96px) 0; }
.case + .case { padding-top: 0; }
.case-head__hero {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg-soft);
}
.case-head__hero img { width: 100%; height: 100%; object-fit: cover; }

.case-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}
.case-nav a {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-soft);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.case-nav a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.carousel {
  position: relative;
  margin-top: 40px;
}
.gallery {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 18px;
  scroll-padding-left: 4px;
  scrollbar-color: var(--ink-muted) var(--bg-soft);
  scrollbar-width: thin;
}
.gallery::-webkit-scrollbar { height: 6px; }
.gallery::-webkit-scrollbar-track { background: var(--bg-soft); border-radius: 999px; }
.gallery::-webkit-scrollbar-thumb { background: var(--ink-muted); border-radius: 999px; }

.gallery__item {
  flex: 0 0 auto;
  height: clamp(280px, 48vw, 520px);
  scroll-snap-align: start;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  cursor: zoom-in;
  transition: transform var(--t-fast), box-shadow var(--t-med);
}
.gallery__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -16px rgba(0,0,0,.25);
}
.gallery__item img {
  height: 100%;
  width: auto;
  display: block;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.carousel__btn {
  position: absolute;
  top: calc(50% - 9px);
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 10px 28px -12px rgba(0,0,0,.3);
  transition: transform var(--t-fast), background var(--t-fast), border-color var(--t-fast), opacity var(--t-fast);
  display: grid;
  place-items: center;
  padding-bottom: 3px;
}
.carousel__btn:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.carousel__btn--prev { left: -22px; }
.carousel__btn--next { right: -22px; }
.carousel__btn.is-disabled {
  opacity: 0.25;
  pointer-events: none;
  cursor: default;
}
.carousel.is-static .carousel__btn,
.carousel.is-static .carousel__counter { display: none; }

.carousel__counter {
  position: absolute;
  top: -36px;
  right: 0;
  font-size: 13px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

@media (max-width: 720px) {
  .carousel__btn { display: none; }
  .carousel__counter { top: -28px; }
  .gallery__item { height: 300px; }
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed; inset: 0;
  background: rgba(17,17,17,.95);
  display: none;
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
}
.lightbox.is-open { display: flex; }
.lightbox__img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6);
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--t-fast);
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,.18); }
.lightbox__close { top: 24px; right: 24px; }
.lightbox__nav--prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__counter {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.6);
  font-size: 13px;
  letter-spacing: 0.1em;
}

/* ---------- Project detail header ---------- */

.case-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  padding: 80px 0 56px;
}
.case-head__meta { font-size: 14px; color: var(--ink-muted); margin-top: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.case-head__meta strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; font-family: var(--sans); }

/* ---------- Contact form ---------- */

.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: block; }
.form .label-text {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.form input, .form textarea, .form select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  font: inherit;
  color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form textarea { min-height: 140px; resize: vertical; }

/* ---------- Contact grid (form + card) ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 980px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ---------- Contact info card ---------- */

.contact-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.contact-card h3 { font-size: 22px; margin: 0 0 20px; }
.contact-card__row { padding: 16px 0; border-top: 1px solid var(--line); }
.contact-card__row:first-of-type { border-top: 0; }
.contact-card__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 4px;
}
.contact-card__value { font-size: 17px; font-weight: 500; margin: 0; }
.contact-card__value a { border-bottom: 1px solid var(--line); }
.contact-card__value a:hover { border-bottom-color: var(--ink); }

/* ---------- Stats bar ---------- */

.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(48px, 6vw, 80px) 0;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.stats__item { text-align: left; }
.stats__num {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: block;
  margin-bottom: 10px;
}
.stats__num em {
  font-style: italic;
  background: linear-gradient(180deg, transparent 60%, var(--accent-soft) 60%);
  padding: 0 4px;
}
.stats__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
@media (max-width: 720px) {
  .stats__grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}

/* ---------- Before / After (case study) ---------- */

.ba {
  margin: 40px 0 0;
  padding: 32px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.ba__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.ba__head h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.ba__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ba__cell {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg-soft);
}
.ba__cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ba__tag {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 999px;
  box-shadow: 0 4px 12px -4px rgba(0,0,0,.2);
}
.ba__tag--after { background: var(--ink); color: var(--bg); }
.ba__tag .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-muted);
}
.ba__tag--after .dot { background: var(--accent); }
@media (max-width: 720px) {
  .ba { padding: 20px; }
  .ba__grid { grid-template-columns: 1fr; }
}

/* ---------- 404 page ---------- */

.page-404 {
  min-height: calc(100vh - 76px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px var(--gutter);
  position: relative;
  overflow: hidden;
}
.page-404 .container { position: relative; z-index: 1; max-width: 640px; }
.page-404__num {
  font-family: var(--serif);
  font-size: clamp(120px, 22vw, 220px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin: 0;
  font-variation-settings: "opsz" 144;
}
.page-404__num em {
  font-style: italic;
  color: var(--accent-deep);
}
.page-404 h1 {
  font-size: clamp(28px, 3.4vw, 40px);
  margin: 16px 0 18px;
}
.page-404 p { color: var(--ink-muted); margin: 0 auto 32px; max-width: 48ch; }
.page-404 .actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Cookie consent banner ---------- */

.cookie {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 80;
  padding: 18px var(--gutter);
  background: var(--ink);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 14px;
  flex-wrap: wrap;
  transform: translateY(110%);
  transition: transform 420ms cubic-bezier(.2,.7,.3,1);
  box-shadow: 0 -16px 40px -10px rgba(0,0,0,.35);
}
.cookie.is-visible { transform: translateY(0); }
.cookie__text {
  flex: 1 1 320px;
  line-height: 1.5;
  margin: 0;
  color: rgba(250,250,247,.85);
}
.cookie__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cookie__btn {
  padding: 10px 20px;
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid rgba(250,250,247,.35);
  background: transparent;
  color: var(--bg);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
}
.cookie__btn:hover { background: rgba(250,250,247,.08); }
.cookie__btn--accept {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}
.cookie__btn--accept:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}
@media (max-width: 600px) {
  .cookie { padding: 14px 16px; gap: 14px; }
  .cookie__actions { width: 100%; }
  .cookie__btn { flex: 1; }
}

/* ---------- Cascade reveal ---------- */

.reveal.cascade > * {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 700ms cubic-bezier(.2,.7,.3,1),
    transform 700ms cubic-bezier(.2,.7,.3,1);
}
.reveal.cascade.is-visible > * { opacity: 1; transform: none; }
.reveal.cascade.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal.cascade.is-visible > *:nth-child(2) { transition-delay: 70ms; }
.reveal.cascade.is-visible > *:nth-child(3) { transition-delay: 140ms; }
.reveal.cascade.is-visible > *:nth-child(4) { transition-delay: 210ms; }
.reveal.cascade.is-visible > *:nth-child(5) { transition-delay: 280ms; }
.reveal.cascade.is-visible > *:nth-child(6) { transition-delay: 350ms; }
.reveal.cascade.is-visible > *:nth-child(7) { transition-delay: 420ms; }
.reveal.cascade.is-visible > *:nth-child(8) { transition-delay: 490ms; }
.reveal.cascade.is-visible > *:nth-child(9) { transition-delay: 560ms; }
.reveal.cascade.is-visible > *:nth-child(n+10) { transition-delay: 630ms; }
@media (prefers-reduced-motion: reduce) {
  .reveal.cascade > * { transition: none; transform: none; opacity: 1; }
}

/* ---------- Stats counter helper ---------- */

.stats__num__value {
  font-variant-numeric: tabular-nums;
  display: inline-block;
  min-width: 1ch;
}

/* ---------- Services page: TOC + content layout ---------- */

.svc-page {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  align-items: start;
}
.svc-toc {
  position: sticky;
  top: 100px;
}
.svc-toc__heading {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 16px;
}
.svc-toc__list { list-style: none; padding: 0; margin: 0; }
.svc-toc__item a {
  display: block;
  padding: 9px 0 9px 16px;
  border-left: 2px solid var(--line);
  font-size: 14px;
  color: var(--ink-muted);
  font-weight: 500;
  transition: color var(--t-fast), border-color var(--t-fast), padding-left var(--t-fast);
}
.svc-toc__item a:hover {
  color: var(--ink);
  padding-left: 20px;
}
.svc-toc__item.is-active a {
  color: var(--ink);
  border-left-color: var(--accent);
  font-weight: 600;
}
@media (max-width: 980px) {
  .svc-page { grid-template-columns: 1fr; gap: 0; }
  .svc-toc { display: none; }
}

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(.2,.7,.3,1), transform 700ms cubic-bezier(.2,.7,.3,1);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__media { aspect-ratio: 4/3; }
  .section-head { grid-template-columns: 1fr; gap: 16px; }
  .split { grid-template-columns: 1fr; }
  .cta-block { grid-template-columns: 1fr; }
  .case-head { grid-template-columns: 1fr; gap: 32px; padding: 56px 0 32px; }
  .svc-list { grid-template-columns: 1fr; }
  .svc-list__item:nth-child(even) { padding-left: 0; border-left: 0; }
  .svc-list__item:nth-child(odd) { padding-right: 0; }
  .projects-grid { grid-template-columns: repeat(6, 1fr); }
  .project, .project--wide { grid-column: span 6; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .gallery { columns: 2; }
  .form__row { grid-template-columns: 1fr; }
  .trust__grid { grid-template-columns: 1fr 1fr; gap: 20px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .nav, .lang { display: none; }
  body.nav-open { overflow: hidden; }
  body.nav-open .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  body.nav-open .nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    padding: 8px var(--gutter) 24px;
    z-index: 50;
    overflow-y: auto;
    gap: 0;
  }
  body.nav-open .nav__link {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  body.nav-open .nav__link.is-active::after { display: none; }
  body.nav-open .lang {
    display: flex;
    position: static;
    margin: 0;
    padding: 16px 0;
    border-left: 0;
    background: transparent;
  }
  .site-footer__grid { grid-template-columns: 1fr; gap: 32px; }
}
