/* professional-services — Dieter Rams functionalist.
   Strict 8px spacing scale. Monochrome greys + one functional accent.
   Borders, not shadows. Motion only where it informs. */

:root {
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 40px; --s6: 48px; --s8: 64px; --s10: 80px; --s12: 96px;
  --font-sans: "Archivo", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --max: 1080px;
}

/* ---------- preset palettes + structural variables ---------- */

/* Preset 1 — "Functional Orange": paper grey, ruled rows, square corners */
.preset-1 {
  --bg: #f4f4f2;
  --bg-alt: #ececea;
  --surface: #f4f4f2;
  --ink: #1a1a1a;
  --muted: #5c5c58;
  --border: #cfcfca;
  --accent: #b84508;
  --accent-ink: #ffffff;
  --radius: 2px;
  --h-weight: 500;
  --hero-weight: 500;
}

/* Preset 2 — "Systematic Blue": white, light hero type, bordered card grid */
.preset-2 {
  --bg: #ffffff;
  --bg-alt: #f5f6f7;
  --surface: #ffffff;
  --ink: #16191c;
  --muted: #5b6168;
  --border: #d9dce0;
  --accent: #0b5fb0;
  --accent-ink: #ffffff;
  --radius: 6px;
  --h-weight: 400;
  --hero-weight: 300;
}

/* Preset 3 — "Charcoal Phosphor": dark instrument panel, hairline dividers */
.preset-3 {
  --bg: #161719;
  --bg-alt: #1d1f21;
  --surface: #1d1f21;
  --ink: #ececeb;
  --muted: #9b9e9a;
  --border: #303234;
  --accent: #a8d208;
  --accent-ink: #14150f;
  --radius: 0px;
  --h-weight: 500;
  --hero-weight: 600;
}

/* Preset 4 — "Warm Grey Amber": warm stone, framed hero, heavy headings */
.preset-4 {
  --bg: #efede8;
  --bg-alt: #e6e3dc;
  --surface: #efede8;
  --ink: #26231f;
  --muted: #645f57;
  --border: #c9c4ba;
  --accent: #8a5a0c;
  --accent-ink: #ffffff;
  --radius: 4px;
  --h-weight: 700;
  --hero-weight: 700;
}

/* ---------- base ---------- */

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

html { scroll-behavior: auto; }

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

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--s3); }

h1, h2, h3 { font-weight: var(--h-weight); line-height: 1.15; letter-spacing: -0.01em; }

h2 { font-size: 28px; }
h3 { font-size: 18px; font-weight: 600; }

a { color: var(--ink); text-decoration: none; }
p a, .map-link { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent); }
p a:hover, .map-link:hover { color: var(--accent); }

.kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s1);
}

.section-head { margin-bottom: var(--s4); }

section { padding: var(--s8) 0; border-top: 1px solid var(--border); }
.hero { border-top: none; }

/* ---------- buttons (44px+ targets) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  min-height: 48px;
  padding: 0 var(--s3);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-header { min-height: 44px; padding: 0 var(--s2); background: transparent; }
.btn-header:hover { background: var(--ink); color: var(--bg); }
.icon { width: 16px; height: 16px; fill: currentColor; }

/* ---------- header ---------- */

.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: var(--s2);
}
.brand { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }

/* ---------- hero ---------- */

.hero { padding: var(--s10) 0; }
.hero-name { font-size: 40px; font-weight: var(--hero-weight); letter-spacing: -0.02em; }
.tagline { font-size: 18px; color: var(--muted); margin-top: var(--s2); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }

/* ---------- services ---------- */

.service-list { list-style: none; counter-reset: svc; }
.service {
  counter-increment: svc;
  padding: var(--s3) 0;
  border-top: 1px solid var(--border);
}
.service:last-child { border-bottom: 1px solid var(--border); }
.service h3::before {
  content: counter(svc, decimal-leading-zero);
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 13px;
  color: var(--accent);
  display: block;
  margin-bottom: var(--s1);
}
.service p { color: var(--muted); margin-top: var(--s1); max-width: 44em; }

/* ---------- about ---------- */

.about { background: var(--bg-alt); }
.about-text { font-size: 19px; line-height: 1.65; max-width: 38em; }
.distinctives { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: var(--s4); }
.distinctives li {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: var(--s1) var(--s2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
}

/* ---------- visit ---------- */

.visit-grid { display: grid; grid-template-columns: 1fr; gap: var(--s3); }
.visit-block { border-left: 2px solid var(--accent); padding-left: var(--s2); }
.visit-block h3 { margin-bottom: var(--s1); }
.visit-block p { color: var(--muted); }

/* ---------- contact ---------- */

.contact-lede { color: var(--muted); max-width: 38em; margin-bottom: var(--s4); }
.contact-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.social-list { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s4); }
.social-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--accent);
}
.social-list a:hover { color: var(--accent); }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--border); padding: var(--s4) 0; }
.footer-row { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); justify-content: space-between; }
.site-footer p { font-size: 14px; color: var(--muted); }

/* ---------- preset structural overrides ---------- */

/* Preset 2: centered hero, services as bordered card grid, alternating bands */
.preset-2 .hero { text-align: center; padding: var(--s12) 0; }
.preset-2 .hero-actions { justify-content: center; }
.preset-2 .tagline { margin-left: auto; margin-right: auto; }
.preset-2 .hero-name { font-size: 44px; }
.preset-2 .service-list { display: grid; grid-template-columns: 1fr; gap: var(--s2); }
.preset-2 .service,
.preset-2 .service:last-child {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s3);
  background: var(--surface);
}
.preset-2 .services { background: var(--bg-alt); }
.preset-2 .about { background: var(--bg); }
.preset-2 .visit { background: var(--bg-alt); }

/* Preset 3: dark panel — mono brand, accent-ruled hero, two-col services */
.preset-3 .brand { font-family: var(--font-mono); font-weight: 500; }
.preset-3 .hero-frame { border-left: 3px solid var(--accent); padding-left: var(--s3); }
.preset-3 .hero-name { text-transform: uppercase; letter-spacing: 0.01em; }
.preset-3 .service { border-color: var(--border); }
.preset-3 .about { background: var(--bg-alt); }
.preset-3 .btn { border-color: var(--muted); }
.preset-3 .btn-primary { border-color: var(--accent); }
.preset-3 .btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* Preset 4: framed hero box, oversized counters, no section tint */
.preset-4 .hero { padding: var(--s8) 0; }
.preset-4 .hero-frame { border: 1px solid var(--ink); padding: var(--s5) var(--s4); }
.preset-4 .hero-name { font-size: 38px; }
.preset-4 .service h3::before { font-size: 22px; }
.preset-4 .about { background: var(--bg-alt); }
.preset-4 h2 { text-transform: uppercase; font-size: 24px; letter-spacing: 0.02em; }

/* ---------- larger screens ---------- */

@media (min-width: 640px) {
  .hero-name { font-size: 56px; }
  .preset-2 .hero-name { font-size: 64px; }
  .preset-4 .hero-name { font-size: 52px; }
  h2 { font-size: 32px; }
  .visit-grid { grid-template-columns: repeat(3, 1fr); }
  .preset-2 .service-list { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  section { padding: var(--s12) 0; }
  .hero { padding: var(--s12) 0; }
  .hero-name { font-size: 72px; }
  .preset-2 .hero-name { font-size: 80px; }
  .preset-4 .hero-name { font-size: 64px; }
  .service { display: grid; grid-template-columns: 320px 1fr; gap: var(--s4); }
  .service h3::before { margin-bottom: var(--s1); }
  .service p { margin-top: 0; }
  .preset-2 .service { display: block; }
  .preset-3 .service-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s6); }
  .preset-3 .service { display: block; }
  .preset-4 .hero-frame { padding: var(--s8) var(--s6); }
}

/* ---------- v2: image slots (enhance only — layout complete without them) ---------- */

.media { margin: 0; border: 1px solid var(--border); padding: var(--s1); background: var(--surface); }
.media img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.media-hero { margin-top: var(--s5); }
.media-about { margin-top: var(--s4); max-width: 640px; }

/* ---------- v2: FAQ accordion ---------- */

.faq-list { max-width: 760px; }
.faq-item { border-top: 1px solid var(--border); }
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  min-height: 56px;
  padding: var(--s2) 0;
  font-weight: 600;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-chev { width: 16px; height: 16px; flex: none; color: var(--accent); }
.faq-a { color: var(--muted); padding: 0 0 var(--s3); max-width: 44em; }

/* ---------- v2: consultation request form ---------- */

.req-form {
  display: grid;
  gap: var(--s2);
  max-width: 480px;
  margin-top: var(--s6);
  padding-top: var(--s4);
  border-top: 1px solid var(--border);
}
.form-title { font-size: 18px; }
.form-lede { color: var(--muted); font-size: 15px; margin-top: calc(-1 * var(--s1)); }
.form-hint { color: var(--muted); font-size: 13px; font-family: var(--font-mono); }
.req-form label {
  display: grid;
  gap: var(--s1);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.req-form input, .req-form select, .req-form textarea {
  font: 16px/1.5 var(--font-sans);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 48px;
  padding: var(--s1) var(--s2);
  width: 100%;
}
.req-form textarea { resize: vertical; min-height: 96px; }
.req-form input:hover, .req-form select:hover, .req-form textarea:hover { border-color: var(--muted); }
.req-form input:focus-visible, .req-form select:focus-visible, .req-form textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.req-form .btn { justify-self: start; }

/* ---------- v2: focus states (not motion-gated) ---------- */

a:focus-visible, .btn:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- motion (opt-in only) ---------- */

@media (prefers-reduced-motion: no-preference) {
  body.motion-ok .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .5s ease, transform .5s ease;
  }
  body.motion-ok .reveal.in { opacity: 1; transform: none; }

  .hero-frame { animation: hero-in .6s ease both; }
  @keyframes hero-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }

  /* v2 micro-interactions — transform/opacity only */
  .btn { transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease; }
  .btn:hover { transform: translateY(-1px); }
  .btn:active { transform: translateY(0); }
  .faq-chev { transition: transform .25s ease; }
  .faq-item[open] .faq-chev { transform: rotate(45deg); }
  /* signature motion: service index slides on hover */
  .service h3::before { transition: transform .25s ease; }
  .service:hover h3::before { transform: translateX(8px); }
}

/* ============ 2026 trends layer — ADDITIVE ONLY (this file also serves live demos) ============ */

/* better rag, zero cost */
h1, h2, h3, .form-title { text-wrap: balance; }
p { text-wrap: pretty; }

/* fluid type ramp — same endpoints as the old breakpoint jumps, smooth between */
.hero-name { font-size: clamp(40px, 19.5px + 5.47vw, 72px); }
.preset-2 .hero-name { font-size: clamp(44px, 20.9px + 6.15vw, 80px); }
.preset-4 .hero-name { font-size: clamp(38px, 21.3px + 4.44vw, 64px); }
h2 { font-size: clamp(28px, 22.3px + 1.51vw, 32px); }

/* label discipline — one tracked kicker recipe */
.kicker { font-size: 12px; font-weight: 500; letter-spacing: 0.14em; }

/* gradient border shell on the consultation card (new wrapper markup only) */
.req-form-shell {
  max-width: 482px;
  margin-top: var(--s6);
  padding: 1px;
  border-radius: calc(var(--radius) + 1px);
  background: linear-gradient(145deg, var(--accent) 0%, var(--border) 45%, transparent 90%);
}
.req-form-shell .req-form {
  margin-top: 0;
  border-top: none;
  padding: var(--s4) var(--s3);
  background: var(--bg);
  border-radius: var(--radius);
}

/* bento services — only applies to new markup carrying .bento; old demos keep ruled rows.
   Featured first cell breaks the uniform rhythm (= this template's deliberate grid-break). */
.service-list.bento { display: grid; grid-template-columns: 1fr; gap: var(--s2); }
.service-list.bento .service,
.service-list.bento .service:last-child {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: var(--s3);
}
.service-list.bento .service p { margin-top: var(--s1); }
.service-list.bento .service:first-child { border-color: var(--accent); }
.service-list.bento .service:first-child h3 { font-size: 22px; }
@media (min-width: 640px) {
  .service-list.bento { grid-template-columns: repeat(2, 1fr); }
  .service-list.bento .service:first-child { grid-column: span 2; }
}
@media (min-width: 960px) {
  .service-list.bento { grid-template-columns: repeat(3, 1fr); }
  .service-list.bento .service { padding: var(--s4); }
  .service-list.bento .service:first-child { grid-column: span 2; }
}

/* scroll-driven reveals where supported — IO fallback above still covers older browsers */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    body.motion-ok .reveal {
      opacity: 1;
      transform: none;
      transition: none;
      animation: trend-rise both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
    @keyframes trend-rise {
      from { opacity: 0; transform: translateY(12px); }
      to   { opacity: 1; transform: none; }
    }
  }
}
