/* grau.agency — single stylesheet. No framework, no external CSS except the logo font. */

:root {
  --bg:            #F2F4F7;
  --surface:       #D7DDE4;
  --border:        #AAB3BF;
  --text-2:        #6B7480;
  --text:          #2F343B;
  --white:         #FFFFFF;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur: 200ms;

  --wrap: 1080px;
  --header-h: 64px;

  --ui: "Segoe UI", Inter, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --logo: "Onest", "Segoe UI", Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

@media (min-width: 860px) {
  :root { --header-h: 72px; }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

h1, h2, h3 { line-height: 1.1; margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(16px, 5vw, 32px);
}

.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; }

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

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 500;
  line-height: 1.2;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn-sm { padding: 9px 15px; font-size: 15px; }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: #23282e; }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--text); }
.btn-secondary:hover { background: rgba(47, 52, 59, 0.06); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
/* Desktop only: the blur here is safe because the nav is inline, not a fixed
   overlay. On mobile, backdrop-filter would make the header the containing
   block for the fixed nav overlay and collapse it — so it stays off there. */
@media (min-width: 860px) {
  .site-header {
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: saturate(1.05) blur(6px);
  }
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-family: var(--logo);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0;
  color: var(--text);
  text-decoration: none;
}

.site-nav { display: flex; align-items: center; gap: 28px; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a {
  text-decoration: none;
  color: var(--text);
  font-size: 15.5px;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.nav-list a:hover, .nav-list a[aria-current="page"] { border-bottom-color: var(--text); }

.lang-switch { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); }
.lang-switch a { text-decoration: none; color: var(--text-2); padding: 2px 2px; }
.lang-switch a.is-active { color: var(--text); font-weight: 600; }

.menu-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.menu-bar { width: 18px; height: 1.5px; background: var(--text); transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
body.nav-open .menu-toggle .menu-bar:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
body.nav-open .menu-toggle .menu-bar:nth-child(2) { opacity: 0; }
body.nav-open .menu-toggle .menu-bar:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 859px) {
  .menu-toggle { display: inline-flex; }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 12px clamp(16px, 5vw, 32px) 32px;
    transform: translateY(-6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
    overflow-y: auto;
  }
  body.nav-open .site-nav { opacity: 1; transform: none; pointer-events: auto; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .nav-list li { border-bottom: 1px solid var(--border); }
  .nav-list a { display: block; padding: 16px 2px; font-size: 18px; border-bottom: none; }
  .lang-switch { margin-top: 20px; font-size: 16px; }
}

/* ----------------------------------------------------------------- main */
.site-main { display: block; }
.section { padding-block: clamp(40px, 7vw, 72px); }
.section.alt { background: var(--surface); }
.section-head { margin-bottom: clamp(20px, 3vw, 32px); position: relative; }
.section-head h2 { font-size: clamp(22px, 3vw, 28px); margin-top: 10px; }
.section-link {
  position: static;
  display: inline-block;
  margin-top: 12px;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--text);
}
@media (min-width: 720px) {
  .section-link { position: absolute; right: 0; bottom: 4px; margin-top: 0; }
}

/* ------------------------------------------------------------------ hero */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 40px);
  padding-block: clamp(44px, 8vw, 88px);
  align-items: start;
}
@media (min-width: 860px) { .hero { grid-template-columns: 1.5fr 1fr; align-items: center; } }
.hero-text h1 { font-size: 34px; }
@media (min-width: 860px) { .hero-text h1 { font-size: 56px; } }
.hero-text .lead {
  margin-top: 18px;
  font-size: 17px;
  color: var(--text);
  max-width: 46ch;
}
.hero-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero-scope {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 20px 22px;
}
.hero-scope .eyebrow { margin-bottom: 10px; }
.hero-scope ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.hero-scope li { padding-left: 16px; position: relative; font-size: 15.5px; }
.hero-scope li::before { content: ""; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; background: var(--text); border-radius: 50%; }

/* ----------------------------------------------------------- scope strip */
.scope-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border-block: 1px solid var(--border);
}
@media (min-width: 560px) { .scope-strip { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .scope-strip { grid-template-columns: repeat(4, 1fr); } }
.scope-item {
  background: var(--bg);
  padding: 22px clamp(16px, 3vw, 24px);
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 16px;
}
.scope-index { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- process */
.process {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (min-width: 860px) { .process { grid-template-columns: repeat(5, 1fr); } }
.process-step { background: var(--bg); padding: 20px 22px; }
.process-index { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.process-step h3 { font-size: 17px; margin-top: 8px; }
.process-step p { margin-top: 8px; font-size: 15px; color: var(--text); }

/* ---------------------------------------------------------------- matrix */
.matrix { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; }
@media (min-width: 560px) { .matrix { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .matrix { grid-template-columns: repeat(4, 1fr); } }
.matrix-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.matrix-item:hover { border-color: var(--text); background: var(--surface); }
.matrix-title { font-weight: 600; font-size: 16px; }
.matrix-desc { font-size: 14.5px; color: var(--text-2); }

/* ----------------------------------------------------------- kb preview */
.kb-preview { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.kb-preview a { display: grid; gap: 6px; padding: 18px 20px; background: var(--bg); text-decoration: none; color: var(--text); transition: background var(--dur) var(--ease); }
.kb-preview a:hover { background: var(--surface); }
.kb-preview-title { font-weight: 600; }
.kb-preview-summary { font-size: 15px; color: var(--text-2); }

/* --------------------------------------------------------------- cta band */
.cta-band { padding-block: clamp(44px, 7vw, 80px); }
.cta-inner {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: clamp(28px, 5vw, 48px);
  text-align: left;
}
.cta-inner h2 { font-size: clamp(24px, 3.5vw, 32px); }
.cta-inner p { margin-top: 12px; color: var(--text); max-width: 52ch; }
.cta-inner .btn { margin-top: 24px; }

/* ------------------------------------------------------------- page head */
.page-head { padding-block: clamp(36px, 6vw, 64px) clamp(8px, 2vw, 16px); }
.page-head h1 { font-size: 28px; margin-top: 12px; }
@media (min-width: 860px) { .page-head h1 { font-size: 40px; } }
.page-head .lead { margin-top: 16px; font-size: 17px; max-width: 60ch; color: var(--text); }

/* ----------------------------------------------------------- service page */
.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  padding-block: clamp(20px, 4vw, 40px);
}
@media (min-width: 640px) { .service-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }
.service-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.service-card h2 { font-size: 20px; }
.service-desc { font-size: 15.5px; }
.mini-label { display: block; font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); margin-bottom: 8px; }
.service-outside { font-size: 14.5px; color: var(--text); }
.service-outside .mini-label { display: inline; margin-right: 4px; }
.service-card .btn { align-self: flex-start; margin-top: auto; }

.list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.list li { position: relative; padding-left: 18px; font-size: 15.5px; }
.list li::before { content: ""; position: absolute; left: 0; top: 10px; width: 6px; height: 1.5px; background: var(--text); }

.notice-block { padding-block: clamp(24px, 4vw, 40px) clamp(40px, 7vw, 72px); }
.notice-block h2 { font-size: 22px; margin-bottom: 12px; }
.notice-block p { max-width: 70ch; }
.fineprint { margin-top: 14px; font-size: 14px; color: var(--text-2); }
.fineprint a { color: var(--text); }

/* --------------------------------------------------------------------- kb */
.kb { padding-block: clamp(16px, 3vw, 28px) clamp(48px, 8vw, 80px); }
.kb-controls { display: grid; gap: 14px; margin-bottom: 22px; }
.kb-search-label { font-size: 13px; color: var(--text-2); }
.kb-search {
  width: 100%;
  max-width: 420px;
  padding: 11px 14px;
  font: inherit;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--text);
}
.kb-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit;
  font-size: 14px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.chip:hover { border-color: var(--text); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }

.kb-list-view { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.kb-entry {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.kb-entry[hidden] { display: none; }
.kb-entry details > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  display: grid;
  gap: 6px;
}
.kb-entry details > summary::-webkit-details-marker { display: none; }
.kb-entry-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kb-entry-title { font-weight: 600; font-size: 16.5px; }
.kb-entry-cat { font-size: 12.5px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.kb-entry-summary { font-size: 15px; color: var(--text-2); }
.kb-entry[open], .kb-entry:has(details[open]) { border-color: var(--text); }
.kb-entry-body { padding: 0 20px 20px; display: grid; gap: 12px; }
.kb-entry-body p { font-size: 15.5px; }
.kb-empty { margin-top: 20px; color: var(--text-2); }

/* ------------------------------------------------------------------ about */
.about {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 40px);
  padding-block: clamp(20px, 4vw, 40px) clamp(48px, 8vw, 80px);
  align-items: start;
}
@media (min-width: 820px) { .about { grid-template-columns: 1.6fr 1fr; } }
.about-text p { font-size: 17px; max-width: 62ch; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.timeline li { display: flex; align-items: center; gap: 12px; }
.timeline-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text); flex: none; }
.timeline-label { font-size: 15.5px; }

/* ---------------------------------------------------------------- contact */
.contact { padding-block: clamp(16px, 3vw, 28px) clamp(48px, 8vw, 80px); }
.contact-form { display: grid; gap: 22px; max-width: 760px; }
.field-group { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin: 0; display: grid; gap: 16px; }
.field-group[hidden] { display: none; }
.field-group > legend { padding: 0 8px; font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-2); }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 7px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 14.5px; font-weight: 500; }
.req { color: var(--text); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 16px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--text);
  width: 100%;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--text); outline-offset: 1px; border-color: var(--text); }
.field.error input, .field.error select, .field.error textarea { border-color: #9a2b2b; }
.field-error { font-size: 13.5px; color: #9a2b2b; }
.helper { font-size: 13.5px; color: var(--text-2); }

.consent .checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; cursor: pointer; }
.consent .checkbox input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.consent a { color: var(--text); }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.submit-hint { font-size: 13.5px; color: var(--text-2); }
.submit-hint a { color: var(--text); }

.form-state {
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 15px;
  background: var(--surface);
}
.form-state[data-status="success"] { border-left-color: #2f6b3a; }
.form-state[data-status="error"] { border-left-color: #9a2b2b; }
.form-state[data-status="rate_limit"] { border-left-color: #8a6d1f; }

/* honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --------------------------------------------------------------- notfound */
.notfound { padding-block: clamp(60px, 12vw, 140px); display: grid; gap: 16px; justify-items: start; }
.notfound h1 { font-size: 30px; }

/* ----------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: clamp(20px, 4vw, 40px); }
.footer-inner { padding-block: clamp(32px, 5vw, 52px); display: grid; gap: 22px; }
.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-brand .brand { font-size: 20px; }
.footer-brand a { color: var(--text); text-decoration: none; font-size: 15px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-nav a { color: var(--text); text-decoration: none; font-size: 15px; }
.footer-nav a:hover { text-decoration: underline; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 12px 18px; }
.footer-legal a { color: var(--text-2); text-decoration: none; font-size: 13.5px; }
.footer-legal a:hover { color: var(--text); }
.footer-meta { font-size: 13.5px; color: var(--text-2); }

/* ------------------------------------------------------------------ modal */
.modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(29, 33, 38, 0.42); opacity: 0; transition: opacity var(--dur) var(--ease); }
.modal-card {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  transform: translateY(8px);
  opacity: 0;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.modal.is-open .modal-backdrop { opacity: 1; }
.modal.is-open .modal-card { transform: none; opacity: 1; }
.modal-head {
  position: sticky;
  top: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 { font-size: 19px; }
.modal-close {
  font-size: 26px;
  line-height: 1;
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  flex: none;
}
.modal-close:hover { background: var(--surface); }
.modal-body { padding: 20px 22px 26px; display: grid; gap: 14px; }
.modal-body p { font-size: 15px; }
.modal-body .list li { font-size: 15px; }

/* ----------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------ no-JS fallback */
