/* =========================================================
   DOLPILAB — Independent web studio
   Tokens first. Contrast checked for WCAG 2.2 AA.
   ========================================================= */
:root {
  --paper: #F3F0E8;      /* warm off-white */
  --ink: #141414;        /* 16.4:1 on paper */
  --grey: #57534C;       /* 6.7:1 on paper — safe for small text */
  --rule: #D8D2C6;       /* decorative lines only */
  --accent: #FF5A1F;     /* international orange — always paired with ink text (5.9:1) */

  --wrap: 1360px;
  --gutter: clamp(20px, 4.5vw, 64px);
  --col-gap: clamp(16px, 2vw, 32px);
  --header-h: 72px;
  --ease: cubic-bezier(.2, .75, .15, 1);

  --sans: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.035em; line-height: 1; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--ink); }

:focus { outline: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 12px; top: 12px; z-index: 200; padding: 14px 20px;
  background: var(--ink); color: var(--paper); font-weight: 500; text-decoration: none;
  transform: translateY(-160%); transition: transform .2s;
}
.skip:focus { transform: none; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }

.i { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Labels ---------- */
.label {
  display: flex; gap: 12px; align-items: baseline;
  font-family: var(--mono); font-size: .8125rem; letter-spacing: .04em; text-transform: uppercase; color: var(--grey);
}
.label__num { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; padding: 0 28px;
  font: 500 1rem/1.2 var(--sans); letter-spacing: -.005em; text-decoration: none; text-align: center;
  border: 2px solid var(--ink); border-radius: 0;
  cursor: pointer; transition: background .25s, color .25s, transform .25s var(--ease);
}
.btn .i { transition: transform .35s var(--ease); }
.btn:hover .i { transform: translateX(4px); }
.btn:active { transform: translateY(1px); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--accent); color: var(--ink); }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: .9375rem; }
.btn--lg { min-height: 64px; padding: 0 36px; font-size: 1.125rem; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: var(--paper); border-bottom: 1px solid transparent; transition: border-color .3s;
}
.header.is-scrolled { border-bottom-color: var(--ink); }
.header__inner { height: 100%; display: flex; align-items: center; gap: 28px; }

.logo {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px;
  font-weight: 700; font-size: 1.125rem; letter-spacing: -.01em; text-decoration: none;
}
.logo__mark { width: .5em; height: .5em; background: var(--accent); margin-left: 2px; }

.folio { display: none; align-items: baseline; gap: 10px; font-family: var(--mono); font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; color: var(--grey); white-space: nowrap; }
.folio__num { color: var(--ink); }
.folio { transition: opacity .3s; }
.folio[data-at="00"] { opacity: 0; }
.folio__text { transition: opacity .25s; }
.folio.is-changing .folio__text { opacity: 0; }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-size: .9375rem; font-weight: 500; text-decoration: none;
}
.nav a::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 8px; height: 2px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); }
.nav a[aria-current="true"]::after { transform: scaleX(1); background: var(--accent); height: 3px; }

.header__end { display: flex; align-items: center; gap: 12px; }

.lang { display: inline-flex; flex-wrap: wrap; align-items: center; padding: 1.5px 0 0 1.5px; }
.lang__link {
  margin: -1.5px 0 0 -1.5px; border: 1.5px solid var(--ink);
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 40px; padding: 0 6px;
  font-family: var(--mono); font-size: .8125rem; font-weight: 500; text-decoration: none;
  transition: background .2s, color .2s;
}
.lang__link:hover { background: var(--accent); }
.lang__link[aria-current="page"] { background: var(--ink); color: var(--paper); }

/* Header language picker (dropdown) */
.langpick { position: relative; }
.langpick__btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px 0 12px;
  border: 1.5px solid var(--ink); font-family: var(--mono); font-size: .8125rem; font-weight: 500;
  list-style: none; cursor: pointer; user-select: none; transition: background .2s;
}
.langpick__btn::-webkit-details-marker { display: none; }
.langpick__btn:hover { background: var(--accent); }
.langpick__btn .i { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.langpick[open] .langpick__btn { background: var(--ink); color: var(--paper); }
.langpick[open] .langpick__btn .i { transform: rotate(180deg); }
.langpick__list {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 120; min-width: 200px;
  display: flex; flex-direction: column; background: var(--paper); border: 1.5px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}
.langpick__list a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px;
  font-size: .9375rem; text-decoration: none; transition: background .2s;
}
.langpick__list a + a { border-top: 1px solid var(--rule); }
.langpick__list a:hover { background: var(--accent); }
.langpick__list a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.langpick__code { min-width: 2ch; font-family: var(--mono); font-size: .75rem; color: inherit; opacity: .7; }

.menu-btn {
  display: none; align-items: center; gap: 10px; min-height: 44px; min-width: 44px; padding: 0 6px;
  background: none; border: 0; color: var(--ink); font: 500 .9375rem var(--sans); cursor: pointer;
}
.menu-btn__icon { position: relative; width: 22px; height: 12px; }
.menu-btn__icon i { position: absolute; left: 0; right: 0; height: 2px; background: currentColor; transition: transform .3s var(--ease), top .3s var(--ease); }
.menu-btn__icon i:first-child { top: 0; }
.menu-btn__icon i:last-child { top: 10px; }
.menu-btn[aria-expanded="true"] i:first-child { top: 5px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] i:last-child { top: 5px; transform: rotate(-45deg); }

/* ---------- Mobile menu ---------- */
.menu {
  position: fixed; inset: var(--header-h) 0 0; z-index: 90; background: var(--paper);
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 8px 0 max(24px, env(safe-area-inset-bottom)); overflow-y: auto;
  opacity: 0; transition: opacity .25s;
}
.menu.is-open { opacity: 1; }
.menu[hidden] { display: none; } /* closed menu must not cover the page and swallow clicks */
.menu__nav { display: flex; flex-direction: column; }
.menu__nav a {
  display: flex; align-items: baseline; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--ink);
  font-size: clamp(2rem, 9vw, 3rem); font-weight: 600; letter-spacing: -.04em; line-height: 1; text-decoration: none;
}
.menu__nav a:first-child { border-top: 1px solid var(--ink); }
.menu__num { font-family: var(--mono); font-size: .8125rem; font-weight: 400; letter-spacing: 0; color: var(--grey); }
.menu__foot .lang { display: none; }
.menu__foot { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100svh - var(--header-h));
  display: flex; align-items: stretch;
  padding: clamp(28px, 5svh, 64px) 0 clamp(32px, 6svh, 72px);
}
.hero .grid { row-gap: clamp(24px, 4svh, 48px); align-content: space-between; }
.hero__eyebrow { grid-column: 1 / -1; }
.hero__title {
  grid-column: 1 / -1;
  font-size: clamp(2.75rem, min(7.4vw, 13svh), 9.25rem);
  font-weight: 600; letter-spacing: -.05em; line-height: .94; text-wrap: initial;
}
.nowrap { white-space: nowrap; }
.strike { position: relative; display: inline-block; color: var(--grey); }
.strike::after {
  content: ''; position: absolute; left: -2%; right: -2%; top: 54%; height: .085em; background: var(--accent);
  transform: scaleX(1); transform-origin: left;
}
.js .strike::after { transform: scaleX(0); transition: transform .9s var(--ease) .9s; }
.js .is-visible .strike::after { transform: scaleX(1); }

.hero__body { grid-column: 1 / span 6; display: flex; flex-direction: column; gap: 28px; align-self: end; }
.hero__sub { font-size: clamp(1.125rem, 1.45vw, 1.375rem); line-height: 1.45; max-width: 36ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Manifesto ---------- */
.manifesto { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); overflow: hidden; }
.manifesto__line {
  padding: clamp(8px, 1.4vw, 20px) var(--gutter);
  font-size: clamp(2.5rem, 6.6vw, 8.25rem); font-weight: 600; letter-spacing: -.055em; line-height: .95;
  white-space: nowrap;
}
.manifesto__line + .manifesto__line { border-top: 1px solid var(--ink); }
.manifesto__line:nth-child(2) { text-align: right; }
.manifesto__line > span { display: inline-block; transform: translateX(var(--x, 0)); will-change: transform; }
.manifesto__line--accent { background: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: clamp(88px, 11vw, 168px) 0; }
.section--rule { border-top: 1px solid var(--ink); }
.section__aside { grid-column: 1 / span 3; padding-top: .55em; }
.section__title {
  grid-column: 4 / -1;
  font-size: clamp(2.25rem, 5.6vw, 6.25rem); letter-spacing: -.05em; line-height: .95;
  margin-bottom: clamp(48px, 6vw, 96px);
}

/* ---------- Services ---------- */
.services { display: flex; flex-direction: column; }
.service {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 12px;
  align-items: baseline; padding: clamp(24px, 2.6vw, 40px) 0; border-top: 1px solid var(--ink);
  position: relative; isolation: isolate;
}
.service:last-child { border-bottom: 1px solid var(--ink); }
.service::before {
  content: ''; position: absolute; inset: 0 calc(-1 * var(--gutter)); background: var(--accent); z-index: -1;
  transform: scaleY(0); transform-origin: bottom; transition: transform .45s var(--ease);
}
.service__num { grid-column: 1 / span 3; font-family: var(--mono); font-size: .8125rem; }
.service__title { grid-column: 4 / span 5; font-size: clamp(1.875rem, 3.8vw, 3.75rem); letter-spacing: -.045em; }
.service__text { grid-column: 9 / -1; max-width: 32ch; }
@media (hover: hover) and (pointer: fine) {
  .service:hover::before { transform: scaleY(1); }
}

/* ---------- Compare ---------- */
.compare { width: calc(75% + var(--col-gap) * .25); margin-left: auto; border-collapse: collapse; }
.compare th {
  text-align: left; padding: 0 0 16px; width: 50%;
  font-family: var(--mono); font-size: .8125rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--grey);
}
.compare th + th { color: var(--ink); }
.compare td { padding: clamp(16px, 1.6vw, 24px) 0; border-top: 1px solid var(--ink); vertical-align: baseline; }
.compare tr:last-child td { border-bottom: 1px solid var(--ink); }
.compare__them { color: var(--grey); font-size: 1.125rem; padding-right: var(--col-gap) !important; }
.compare__x { text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.compare__us { font-size: clamp(1.25rem, 1.9vw, 1.75rem); font-weight: 500; letter-spacing: -.02em; line-height: 1.2; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 48px; }
.step { grid-column: span 3; display: flex; flex-direction: column; gap: 12px; border-top: 2px solid var(--ink); padding-top: 20px; }
.step:first-child { grid-column: 4 / span 3; }
.step__num { font-size: clamp(4rem, 8vw, 8rem); font-weight: 600; letter-spacing: -.06em; line-height: .85; margin-bottom: 16px; }
.step:nth-child(2) .step__num { color: var(--accent); -webkit-text-stroke: 0; }
.step__title { font-size: clamp(1.5rem, 2vw, 1.875rem); letter-spacing: -.03em; }
.step__text { max-width: 30ch; }

/* ---------- Contact ---------- */
.cta { padding: 0; }
.cta__panel {
  background: var(--accent); color: var(--ink);
  padding: clamp(88px, 11vw, 168px) 0;
  clip-path: inset(var(--clip, 0px) var(--clip-x, 0px) 0 var(--clip-x, 0px));
}
.cta__grid { row-gap: 24px; }
.cta .label { color: var(--ink); }
.cta__main { grid-column: 4 / -1; display: flex; flex-direction: column; gap: 24px; }
.cta__kicker { font-size: clamp(1.25rem, 2vw, 1.75rem); font-weight: 500; letter-spacing: -.02em; }
.cta__title { font-size: clamp(3rem, 9.4vw, 10.5rem); letter-spacing: -.06em; line-height: .9; }
.cta__sub { font-size: clamp(1.0625rem, 1.4vw, 1.25rem); max-width: 40ch; }
.cta__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 16px; }
.cta__email {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--mono); font-size: 1rem; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px;
}
.cta__email:hover { text-decoration-thickness: 3px; }

/* ---------- Footer ---------- */
.footer { padding: clamp(64px, 8vw, 112px) 0 24px; }
.footer__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 40px; }
.footer__brand { grid-column: 1 / span 5; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer__brand p { color: var(--grey); max-width: 30ch; }
.footer__col { grid-column: span 2; display: flex; flex-direction: column; align-items: flex-start; }
.footer__col:nth-child(2) { grid-column: 7 / span 2; }
.footer__col:last-child { grid-column: 11 / span 2; }
.footer__col:nth-child(3) { grid-column: 9 / span 2; }
.footer__title { font-family: var(--mono); font-size: .8125rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--grey); margin-bottom: 8px; }
.footer__col a { display: inline-flex; align-items: center; min-height: 40px; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 85% / 0 1.5px no-repeat; transition: background-size .35s var(--ease); }
.footer__col a:hover { background-size: 100% 1.5px; }
.footer__mark {
  margin-top: clamp(48px, 7vw, 96px);
  font-size: clamp(4rem, 19.5vw, 19rem); font-weight: 700; letter-spacing: -.075em; line-height: .78;
  white-space: nowrap; overflow: hidden;
}
.footer__bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--ink);
  font-size: .875rem; color: var(--grey);
}
.footer__top { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); font-weight: 500; text-decoration: none; }
.footer__top:hover .i { transform: translateY(-3px); }
.footer__top .i { transition: transform .3s var(--ease); }

/* ---------- Motion: reveal (only with JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .hero__body { transition-delay: .2s; }

/* =========================================================
   Responsive
   ========================================================= */

/* Large desktop: show the running section folio */
@media (min-width: 1360px) {
  .folio { display: inline-flex; }
}

/* Laptops (1024–1359): tighter header, same composition */
@media (max-width: 1359px) {
  .header__inner { gap: 20px; }
  .nav a { padding: 0 10px; }
}

/* Short laptop screens (e.g. 1280×720 / 1366×768) */
@media (min-width: 1024px) and (max-height: 820px) {
  .hero { min-height: calc(100svh - var(--header-h)); }
  .hero__title { font-size: clamp(2.75rem, min(6.8vw, 12svh), 8rem); }
  .hero__sub { font-size: 1.125rem; }
}

/* Tablet */
@media (max-width: 1023px) {
  .nav, .header__cta { display: none; }
  .menu-btn { display: inline-flex; }
  .header__end { margin-left: auto; }
  .hero { min-height: auto; }
  .hero__body { grid-column: 1 / span 9; }
  .section__aside { grid-column: 1 / -1; padding: 0 0 20px; }
  .section__title { grid-column: 1 / -1; }
  .service__num { grid-column: 1 / span 2; }
  .service__title { grid-column: 3 / span 10; }
  .service__text { grid-column: 3 / -1; }
  .compare { width: 100%; }
  .step, .step:first-child { grid-column: span 4; }
  .cta__main { grid-column: 1 / -1; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__col, .footer__col:nth-child(2), .footer__col:nth-child(3), .footer__col:last-child { grid-column: span 4; }
}

/* Phone */
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  body { font-size: 1rem; }
  .header__inner { gap: 12px; }
  .lang__link { min-width: 40px; }
  .hero { padding-top: 32px; }
  .hero__title { font-size: clamp(2.5rem, 12.4vw, 4rem); line-height: .96; }
  .hero__body { grid-column: 1 / -1; }
  .hero__actions .btn { width: 100%; }
  .manifesto__line { white-space: normal; font-size: clamp(2.25rem, 11.5vw, 3.5rem); }
  .manifesto__line:nth-child(2) { text-align: left; }
  .service { row-gap: 8px; }
  .service__num { grid-column: 1 / -1; }
  .service__title, .service__text { grid-column: 1 / -1; }

  /* Comparison table becomes stacked cards, labels shown inline */
  .compare, .compare tbody, .compare tr, .compare td { display: block; width: 100%; }
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare tr { padding: 20px 0; border-top: 1px solid var(--ink); }
  .compare tr:last-child { border-bottom: 1px solid var(--ink); }
  .compare td, .compare tr:last-child td { padding: 0 !important; border: 0; }
  .compare__them { margin-bottom: 6px; }
  .compare td::before {
    content: attr(data-label); display: block; margin-bottom: 4px;
    font-family: var(--mono); font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; color: var(--grey);
  }
  .compare__us::before { color: var(--ink); }

  .steps { row-gap: 40px; }
  .step, .step:first-child { grid-column: 1 / -1; }
  .step__num { font-size: 4.5rem; }
  .cta__actions .btn { width: 100%; }
  .footer__col, .footer__col:nth-child(2), .footer__col:nth-child(3), .footer__col:last-child { grid-column: span 6; }
  .footer__col:last-child { grid-column: 1 / -1; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 359px) {
  .langpick { display: none; }
  .menu__foot .lang { display: inline-flex; }
}

/* ---------- Preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .manifesto__line > span { transform: none !important; }
  .cta__panel { clip-path: none !important; }
}
@media (forced-colors: active) {
  .btn, .lang__link, .langpick__btn, .langpick__list { border: 2px solid ButtonText; }
  .manifesto__line--accent, .cta__panel { forced-color-adjust: auto; }
  .strike::after { background: CanvasText; }
}

/* Sections receive focus from in-page links; no outline box around whole sections */
section[tabindex="-1"]:focus, main[tabindex="-1"]:focus { outline: none; }
