/* CLUQUA — site styles. One motif: the knob from the logo (a disc with a pointer).
   Tokens first; everything below references them. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ink: #0f0f0f;
  --ink-2: #1d1d1d;
  --paper: #f1f1f0;
  --tone: #e2e2e0;
  --red: #ee1c25;
  --soft: #505050;          /* secondary text on paper */
  --soft-on-ink: #b4b4b2;   /* secondary text on ink */

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(20px, 4.2vw, 64px);
  --section: clamp(72px, 9vw, 132px);
  --measure: 38rem;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 160ms;
  --t-base: 420ms;
  --t-slow: 900ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .22em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--red); color: var(--ink); }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.field-ink :focus-visible, .field-red :focus-visible { outline-color: var(--paper); }

.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 50; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 999px; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- type ---------- */
.display, h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 108%;
  font-weight: 760;
  letter-spacing: -.02em;
  line-height: .98;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 6.4vw, 6.4rem); }
h2 { font-size: clamp(2rem, 4.8vw, 4.4rem); }
h3 { font-size: clamp(1.6rem, 2.8vw, 2.5rem); line-height: 1.02; }
h4 { font: 600 1.125rem/1.35 var(--text); }
.lede { font-size: clamp(1.1875rem, 1.6vw, 1.5rem); line-height: 1.5; max-width: var(--measure); }
.soft { color: var(--soft); }
.field-ink .soft { color: var(--soft-on-ink); }
.field-red .soft { color: var(--ink); }

/* ---------- fields (full-bleed colour sections) ---------- */
.section { padding-block: var(--section); position: relative; }
.field-ink { background: var(--ink); color: var(--paper); --tick: var(--paper); }
.field-red { background: var(--red); color: var(--ink); }
.field-paper { --tick: var(--ink); }

/* ---------- the knob ---------- */
.knob { width: 100%; height: auto; overflow: visible; }
.knob .disc { fill: var(--red); }
.knob .tick { fill: var(--tick, var(--ink)); transform-origin: 100px 100px; transform: rotate(var(--a, 45deg)); transition: transform var(--t-slow) var(--ease); }
.field-red .knob .disc { fill: var(--ink); }
.field-red .knob .tick { fill: var(--red); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .7em;
  min-height: 56px; padding: 0 1.7rem 0 1.5rem;
  border: 0; border-radius: 999px; cursor: pointer;
  font: 600 1.0625rem/1 var(--text); text-decoration: none;
  background: var(--red); color: var(--ink);
  transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.btn::before { content: ""; width: .8em; height: .8em; border-radius: 50%; background: var(--ink); flex: none; transition: transform var(--t-base) var(--ease); }
.btn:hover::before { transform: scale(1.35); }
.btn:active { transform: scale(.97); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink::before { background: var(--red); }
.btn-quiet { background: transparent; color: inherit; padding: 0 .4rem; min-height: 48px; text-decoration: underline; text-decoration-thickness: .1em; text-underline-offset: .3em; }
.btn-quiet::before { display: none; }
.btn-quiet:hover { color: var(--red); }
.field-red .btn-quiet:hover { color: var(--paper); }
.btn[disabled] { opacity: .55; cursor: progress; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { display: block; width: 148px; flex: none; }
.brand svg { width: 100%; height: auto; }
.brand .wm { fill: var(--ink); }
.nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); }
.nav a:not(.btn) { text-decoration: none; font-weight: 500; padding: 10px 2px; transition: color var(--t-fast); }
.nav a:not(.btn):hover { color: var(--red); }
.nav .btn { min-height: 48px; font-size: 1rem; }
.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; min-height: min(calc(100svh - 76px), 940px); display: flex; align-items: center; background: var(--paper); }
.hero .wrap { position: relative; z-index: 2; padding-block: clamp(48px, 7vw, 96px); }
.hero h1 { max-width: none; }
.hero .lede { margin-top: clamp(24px, 3vw, 40px); max-width: 33rem; }
.hero-actions { margin-top: clamp(28px, 3.4vw, 44px); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.hero-disc {
  position: absolute; z-index: 1;
  --d: min(118vh, 76vw);
  width: var(--d); right: calc(var(--d) * -.24); top: 50%;
  translate: 0 -50%;
}
.hero-disc .knob { --tick: var(--paper); }
.hero-disc .tick { transition: none; }

/* ---------- services: the dial ---------- */
.services-head { max-width: 46rem; }
.services-head .lede { margin-top: 24px; color: var(--soft-on-ink); }
.svc { margin-top: clamp(40px, 5vw, 72px); display: grid; grid-template-columns: minmax(300px, 5fr) 7fr; gap: clamp(32px, 5vw, 88px); align-items: start; }
.dial { position: sticky; top: 108px; display: grid; place-items: center; aspect-ratio: 1; width: min(100%, 520px); }
.dial .knob { position: absolute; inset: 21%; width: auto; height: auto; }
.dial legend { position: absolute; }
.dial fieldset { border: 0; padding: 0; margin: 0; position: absolute; inset: 0; }
.dial label {
  position: absolute; display: flex; align-items: center; gap: .5em;
  font: 760 clamp(1.25rem, 2.1vw, 1.75rem)/1 var(--display); font-stretch: 108%; letter-spacing: -.01em;
  color: var(--soft-on-ink); cursor: pointer; padding: 10px 0;
  transition: color var(--t-fast);
}
.dial label::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: currentColor; transform: scale(0); transition: transform var(--t-base) var(--ease); }
.dial label:hover { color: var(--paper); }
.dial label:has(input:checked) { color: var(--red); }
.dial label:has(input:checked)::before { transform: scale(1); }
.dial label:has(input:focus-visible) { outline: 3px solid var(--paper); outline-offset: 4px; border-radius: 6px; }
.dial input { position: absolute; opacity: 0; pointer-events: none; }
.dial .p-engineer { left: 0; top: 0; }
.dial .p-assemble { right: 0; top: 0; }
.dial .p-repair { right: 0; bottom: 0; }
.dial .p-source { left: 0; bottom: 0; }

.svc-panels { min-height: 34rem; }
.svc-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 17rem); gap: 20px clamp(24px, 3vw, 48px); align-content: start; }
.svc-panel + .svc-panel { margin-top: 72px; }
.svc-panel h3 { grid-column: 1; }
.svc-panel .lede { grid-column: 1; font-size: 1.25rem; color: var(--soft-on-ink); }
.svc-panel .loupe { grid-column: 2; grid-row: 1 / span 3; align-self: start; }
.svc-panel .cols { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 28px clamp(24px, 3vw, 48px); margin-top: 12px; }
.svc-panel .cols h4 { margin-bottom: 12px; color: var(--paper); }
.svc-panel .act { grid-column: 1 / -1; margin-top: 8px; }
.dots li { position: relative; padding: 5px 0 5px 1.5em; color: inherit; }
.dots li::before { content: ""; position: absolute; left: 0; top: .82em; width: .55em; height: .55em; border-radius: 50%; background: var(--red); }
.field-red .dots li::before { background: var(--ink); }
.field-ink .dots li { color: var(--soft-on-ink); }
.field-ink .dots li strong { color: var(--paper); }

.js .svc-panel[hidden] { display: none; }
.js .svc-panel + .svc-panel { margin-top: 0; }
.no-js-only { display: block; }
.js .no-js-only { display: none; }
.js-only { display: none; }
.js .js-only { display: grid; }

/* ---------- loupe: photo cropped by the motif ---------- */
.loupe { aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--tone); }
.loupe img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1400ms var(--ease); }
.loupe:hover img { transform: scale(1.12); }

/* ---------- process ---------- */
.process { display: grid; grid-template-columns: minmax(260px, 4fr) 7fr; gap: clamp(32px, 6vw, 112px); align-items: start; }
.process-dial { position: sticky; top: 120px; width: min(100%, 380px); }
.steps { counter-reset: none; display: grid; gap: clamp(28px, 4vw, 56px); }
.steps li { display: grid; gap: 8px; max-width: 34rem; }
.steps b { color: var(--ink); transition: color var(--t-base) var(--ease); }
.js .steps li:not(.on) b { color: #7b7b79; }
.steps b { font: 760 clamp(1.5rem, 2.6vw, 2.25rem)/1.05 var(--display); font-stretch: 108%; letter-spacing: -.015em; }
.steps span { color: var(--soft); }
.process-end { margin-top: clamp(40px, 5vw, 72px); max-width: 34rem; }
.process-end p { margin-bottom: 20px; }

/* ---------- work (red field) ---------- */
.work { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 6vw, 104px); align-items: start; }
.work h2 { max-width: 12ch; }
.work .lede { margin-top: 24px; }
.work-list { margin-top: clamp(32px, 4vw, 56px); display: grid; grid-template-columns: 1fr 1fr; gap: 28px clamp(24px, 3vw, 48px); }
.work-list h3 { font: 700 1.1875rem/1.3 var(--text); font-stretch: 100%; letter-spacing: 0; margin-bottom: 4px; text-wrap: pretty; }
.work-list p { font-size: 1.0625rem; line-height: 1.5; }
.work-note { margin-top: clamp(32px, 4vw, 48px); font-weight: 500; max-width: 34rem; }
.work-pics { position: relative; aspect-ratio: 4 / 5; }
.work-pics .loupe { position: absolute; }
.work-pics .a { width: 78%; left: 22%; top: 0; }
.work-pics .b { width: 52%; left: 0; bottom: 6%; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 6fr 5fr; gap: clamp(32px, 6vw, 112px); align-items: center; }
.about .loupe { width: min(100%, 640px); }
.about h2 { max-width: 14ch; }
.about-text { margin-top: 28px; display: grid; gap: 18px; max-width: 34rem; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 7fr 4fr; gap: clamp(32px, 6vw, 104px); align-items: start; }
.contact .lede { margin-top: 20px; color: var(--soft-on-ink); }
.f-group { border: 0; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.f-group legend { font: 600 1rem/1.3 var(--text); padding: 0; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips label {
  display: inline-flex; align-items: center; gap: .55em; min-height: 48px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  background: var(--ink-2); font: 500 1rem/1 var(--text); transition: background-color var(--t-fast), color var(--t-fast);
}
.chips label::before { content: ""; width: .6em; height: .6em; border-radius: 50%; background: var(--soft-on-ink); transition: background-color var(--t-fast), transform var(--t-base) var(--ease); }
.chips label:hover { background: #2a2a2a; }
.chips label:has(input:checked) { background: var(--red); color: var(--ink); }
.chips label:has(input:checked)::before { background: var(--ink); transform: scale(1.25); }
.chips label:has(input:focus-visible) { outline: 3px solid var(--paper); outline-offset: 3px; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.hint { margin-top: 18px; max-width: 34rem; font-size: 1rem; line-height: 1.5; color: var(--soft-on-ink); }
.hint strong { color: var(--paper); font-weight: 600; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 22px; }
.consent { margin-top: 22px; font-size: 1rem; line-height: 1.5; color: var(--soft-on-ink); max-width: 32rem; }
.consent a { color: var(--paper); }

.details { display: grid; gap: 28px; font-style: normal; padding-top: 6px; }
.details p { line-height: 1.5; }
.details .k { display: block; font-weight: 600; color: var(--paper); margin-bottom: 4px; }
.details a { color: var(--paper); }
.details .loupe { width: 70%; margin-top: 8px; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--soft-on-ink); padding-block: 40px 56px; font-size: 1rem; line-height: 1.55; }
.site-footer .wrap { display: grid; grid-template-columns: 1fr auto auto; gap: 24px 48px; align-items: end; }
.site-footer a { color: var(--paper); }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer .lang { display: flex; gap: 6px; }
.site-footer .lang a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 999px; text-decoration: none; font-weight: 600; color: var(--soft-on-ink); transition: color var(--t-fast), background-color var(--t-fast); }
.site-footer .lang a:hover { color: var(--paper); }
.site-footer .lang a[aria-current] { background: var(--ink-2); color: var(--paper); }
.site-footer .fine { grid-column: 1 / -1; max-width: 60rem; }

/* ---------- legal pages ---------- */
.legal { padding-block: clamp(48px, 7vw, 96px); }
.legal h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); max-width: 16ch; }
.legal .prose { margin-top: 40px; max-width: 44rem; display: grid; gap: 18px; }
.legal h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-top: 28px; line-height: 1.05; }
.legal ul { display: grid; gap: 6px; }
.legal .dots li { padding-block: 2px; }

/* ---------- motion ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal].in, .js.reveal-all [data-reveal] { opacity: 1; transform: none; }
.hero-disc .tick { animation: settle 1500ms var(--ease) both; }
@keyframes settle { from { transform: rotate(-135deg); } to { transform: rotate(var(--a, 45deg)); } }
.hero-disc { animation: arrive 1300ms var(--ease) both; }
@keyframes arrive { from { opacity: 0; translate: 12% -50%; } to { opacity: 1; translate: 0 -50%; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero-disc, .hero-disc .tick { animation: none; }
  .knob .tick, .loupe img, .btn, .btn::before { transition: none; }
}

/* ---------- tablet ---------- */
@media (max-width: 1024px) {
  .svc { grid-template-columns: 1fr; }
  .dial { position: relative; top: 0; width: min(100%, 420px); margin-inline: auto; }
  .svc-panels { min-height: 0; }
  .process { grid-template-columns: 1fr; }
  .process-dial { position: relative; top: 0; width: 220px; }
  .work, .about, .contact { grid-template-columns: 1fr; }
  .work-pics { max-width: 520px; width: 100%; }
  .about .loupe { max-width: 460px; }
}

/* ---------- phone ---------- */
@media (max-width: 720px) {
  body { font-size: 1.0625rem; }
  .brand { width: 124px; }
  .js .nav-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--ink); color: var(--paper); font: 600 1rem var(--text); cursor: pointer; }
  .js .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); padding: 8px var(--gutter) 28px; flex-direction: column; align-items: stretch; gap: 0; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity var(--t-fast), transform var(--t-fast), visibility 0s linear var(--t-fast); }
  .js .nav.open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .js .nav a:not(.btn) { padding: 16px 0; font-size: 1.25rem; }
  .js .nav .btn { margin-top: 12px; justify-content: center; }
  html:not(.js) .site-header .wrap { flex-wrap: wrap; padding-block: 12px; }
  html:not(.js) .nav { flex-wrap: wrap; gap: 4px 18px; }

  h1 { font-size: 8vw; }
  .hero { min-height: 0; align-items: flex-start; }
  .hero h1 br { display: none; }
  .hero .wrap { padding-bottom: 82vw; }
  .hero-disc { --d: 118vw; right: -34vw; top: auto; bottom: -50vw; translate: 0 0; }
  @keyframes arrive { from { opacity: 0; translate: 8% 0; } to { opacity: 1; translate: 0 0; } }

  .svc-panel { grid-template-columns: 1fr; }
  .svc-panel .loupe { grid-column: 1; grid-row: auto; width: 62%; }
  .svc-panel .cols { grid-template-columns: 1fr; }
  .dial label { font-size: 1.1875rem; }
  .work-list { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
}
