/* ==========================================================================
   Apartamenty przy Wagonowej — architectural / editorial design
   Palette: limestone, deep green-black, brick. Type: system serif + sans.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --bg: #F1ECE4;
  --surface: #FAF7F2;
  --sand: #E2D8C8;
  --ink: #17211D;
  --ink-soft: #44524B;
  --deep: #121A17;
  --brick: #A8472A;
  --brick-dark: #8A3720;
  --brick-light: #E39A77;
  --sage: #7C8C7D;
  --glass: #C7D1C9;
  --line: rgba(23, 33, 29, .16);
  --line-strong: rgba(23, 33, 29, .42);

  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --container: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(80px, 10vw, 144px);
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body.nav-open { overflow: hidden; }

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

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

p, dl, dd, figure, address { margin: 0; }
address { font-style: normal; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; }

:focus-visible { outline: 2px solid var(--brick); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brick);
}
.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
}

.section { padding: var(--section-y) 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  font: 600 .95rem/1 var(--font-sans);
  letter-spacing: .02em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn .arrow { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary { background: var(--brick); color: #fff; }
.btn-primary:hover { background: var(--brick-dark); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.link-btn {
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn:hover { color: var(--brick); }

/* ---------- Brick texture (CSS-only image block) ---------- */
.brick-texture {
  background-color: var(--brick);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='48' viewBox='0 0 64 48'%3E%3Cpath d='M0 0H64M0 24H64M0 48H64M32 0V24M0 24V48M64 24V48' fill='none' stroke='rgba(255,255,255,.2)' stroke-width='2'/%3E%3C/svg%3E");
  background-size: 64px 48px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled {
  border-color: var(--line);
  box-shadow: 0 8px 24px -20px rgba(23, 33, 29, .6);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 24px;
}

.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.logo-mark { width: 40px; height: 40px; flex: none; }
.logo-mark .mk-bg { fill: var(--brick); }
.logo-mark .mk-fg { fill: var(--bg); }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text strong { font-family: var(--font-serif); font-size: 1.08rem; font-weight: 600; letter-spacing: -.01em; }
.logo-text small { margin-top: 3px; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }

.site-nav { display: flex; align-items: center; gap: 36px; }
.site-nav ul { display: flex; gap: 32px; }
.site-nav ul a {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
}
.site-nav ul a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 1px;
  background: var(--brick);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.site-nav ul a:hover::after,
.site-nav ul a.active::after { transform: scaleX(1); }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 6vw, 88px) 0 clamp(56px, 7vw, 96px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.hero h1 {
  margin: 24px 0 28px;
  font-size: clamp(2.7rem, 5.6vw, 5.2rem);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -.025em;
}
.hero h1 em { font-style: italic; color: var(--brick); }

.hero-lead {
  max-width: 54ch;
  font-size: clamp(1.08rem, 1.4vw, 1.24rem);
  color: var(--ink-soft);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }

.hero-note {
  max-width: 54ch;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: .94rem;
  color: var(--ink-soft);
}

.hero-art { position: relative; }
.hero-art svg {
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 680;
  border: 1px solid var(--line-strong);
}

.hero-panel {
  position: absolute;
  left: calc(-1 * clamp(16px, 3vw, 48px));
  bottom: clamp(24px, 4vw, 56px);
  width: min(270px, 70%);
  padding: 22px 24px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 24px 48px -28px rgba(18, 26, 23, .7);
}
.panel-label {
  display: block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brick-light);
}
.hero-panel strong { display: block; margin: 6px 0 8px; font-family: var(--font-serif); font-size: 1.7rem; font-weight: 500; }
.hero-panel p { font-size: .9rem; line-height: 1.5; color: rgba(241, 236, 228, .8); }

/* Illustration classes (hero) */
.art-bg { fill: var(--sand); }
.art-grid { fill: none; stroke: rgba(23, 33, 29, .09); stroke-width: 1; }
.art-ground { fill: #CFC3AF; }
.art-facade { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.art-base { fill: #E9E0D1; stroke: var(--ink); stroke-width: 1.5; }
.art-tower { fill: var(--brick); stroke: var(--ink); stroke-width: 2; }
.art-win { fill: var(--glass); stroke: var(--ink); stroke-width: 1.5; }
.art-bar { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.art-slit { fill: var(--glass); stroke: var(--ink); stroke-width: 1.2; }
.art-rail { fill: rgba(250, 247, 242, .6); stroke: var(--ink); stroke-width: 1.4; }
.art-slab { fill: var(--ink); }
.art-line { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .4; }
.art-tree { fill: var(--sage); stroke: var(--ink); stroke-width: 1.5; }
.art-dark { fill: var(--ink); }
.art-brickacc { fill: var(--brick); }
.art-label { font: 600 11px var(--font-sans); letter-spacing: .18em; fill: var(--ink); opacity: .7; }

/* ---------- Facts strip ---------- */
.facts { background: var(--surface); border-block: 1px solid var(--line); }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.facts-grid > div { padding: 28px 28px 28px 0; }
.facts-grid > div + div { padding-left: 28px; border-left: 1px solid var(--line); }
dt {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.facts-grid dd { margin-top: 6px; font-family: var(--font-serif); font-size: 1.22rem; line-height: 1.3; }
.facts-grid a { text-decoration: none; overflow-wrap: anywhere; }
.facts-grid a:hover { color: var(--brick); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: start;
}

.about-visual { position: sticky; top: calc(var(--header-h) + 32px); }

.plan-frame {
  padding: clamp(16px, 2vw, 28px);
  background: var(--surface);
  border: 1px solid var(--line-strong);
}
.plan-frame svg { width: 100%; height: auto; }
.plan-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.plan-floor { fill: var(--bg); }
.plan-wall-ext { fill: none; stroke: var(--ink); stroke-width: 10; stroke-linejoin: miter; }
.plan-wall-int { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: square; }
.plan-door { fill: none; stroke: var(--ink); stroke-width: 1.2; opacity: .55; }
.plan-win rect { fill: var(--glass); stroke: var(--ink); stroke-width: 1.5; }
.plan-furn rect, .plan-furn circle { fill: none; stroke: var(--ink); stroke-width: 1.2; opacity: .4; }
.plan-text text { font: 600 11px var(--font-sans); letter-spacing: .16em; fill: var(--ink-soft); }
.plan-dim { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .45; }

.about-badge {
  position: absolute;
  right: calc(-1 * clamp(12px, 2.4vw, 36px));
  bottom: calc(-1 * clamp(20px, 3vw, 40px));
  width: min(250px, 72%);
  padding: 20px 22px;
  background: var(--brick);
  color: #fff;
}
.about-badge strong { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 500; }
.about-badge p { margin-top: 6px; font-size: .9rem; line-height: 1.5; color: rgba(255, 255, 255, .9); }

.about-copy h2 { margin: 20px 0 28px; font-size: clamp(2rem, 3.6vw, 3.2rem); font-weight: 400; }
.about-copy .lead { font-family: var(--font-serif); font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.45; margin-bottom: 24px; }
.about-copy p + p { margin-top: 1.15em; }
.about-copy p:not(.lead):not(.eyebrow) { color: var(--ink-soft); }

.glance {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 40px;
  margin-top: 48px;
}
.glance > div { padding: 20px 0; border-top: 1px solid var(--line-strong); }
.glance dd { margin-top: 6px; font-size: .98rem; line-height: 1.5; overflow-wrap: anywhere; }
.glance a { text-decoration: underline; text-underline-offset: 3px; }
.glance a:hover { color: var(--brick); }

/* ---------- Services (ledger list) ---------- */
.services { background: var(--surface); border-block: 1px solid var(--line); }

.services-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: start;
}

.services-intro { position: sticky; top: calc(var(--header-h) + 40px); }
.services-intro h2 { margin: 20px 0 0; font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 400; }
.services-intro p:not(.eyebrow) { margin: 22px 0 32px; color: var(--ink-soft); }
.brick-block { height: 170px; margin-top: 44px; border: 1px solid var(--line-strong); }

.service-list { border-top: 1px solid var(--line-strong); }

.service {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: clamp(12px, 3vw, 40px);
  padding: clamp(28px, 3.4vw, 44px) 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left .35s var(--ease);
}
.service::before {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  width: 0; height: 2px;
  background: var(--brick);
  transition: width .5s var(--ease);
}
.service:hover { padding-left: 12px; }
.service:hover::before { width: 100%; }

.service-no { font-family: var(--font-serif); font-size: 1.6rem; font-style: italic; color: var(--brick); line-height: 1.2; }
.service h3 { margin-bottom: 12px; font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 500; }
.service p { max-width: 62ch; color: var(--ink-soft); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tags li {
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* ---------- Process (dark band) ---------- */
.process { background: var(--deep); color: #EDE7DC; }
.process .eyebrow { color: var(--brick-light); }

.process-head {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(24px, 6vw, 96px);
  align-items: end;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.process h2 { margin-top: 20px; font-size: clamp(2rem, 3.8vw, 3.4rem); font-weight: 400; }
.process-head > p { color: rgba(237, 231, 220, .72); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 clamp(20px, 3vw, 44px); }
.step { position: relative; padding: 36px 0 8px; border-top: 1px solid rgba(237, 231, 220, .3); }
.step::before {
  content: "";
  position: absolute;
  top: -5px; left: 0;
  width: 9px; height: 9px;
  background: var(--brick-light);
}
.step-no { display: block; margin-bottom: 14px; font-family: var(--font-serif); font-size: 2.6rem; font-style: italic; line-height: 1; color: var(--brick-light); }
.step h3 { margin-bottom: 12px; font-size: 1.45rem; font-weight: 500; }
.step p { font-size: .98rem; line-height: 1.65; color: rgba(237, 231, 220, .72); }

.brick-strip { height: clamp(48px, 6vw, 80px); margin-top: clamp(56px, 7vw, 96px); opacity: .92; }

/* ---------- Benefits (bento) ---------- */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 6vw, 96px);
  align-items: end;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.section-head h2 { margin-top: 20px; font-size: clamp(2rem, 3.8vw, 3.4rem); font-weight: 400; }
.section-head > p { color: var(--ink-soft); }

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }

.tile {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(26px, 3vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.tile:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 40px -30px rgba(23, 33, 29, .5);
}
.tile .icon { width: 44px; height: 44px; color: var(--brick); }
.tile h3 { font-size: 1.5rem; font-weight: 500; }
.tile p { color: var(--ink-soft); }

.tile-a { grid-column: 1 / 4; grid-row: 1 / 3; min-height: 440px; justify-content: flex-end; color: #fff; border-color: var(--brick-dark); position: relative; isolation: isolate; }
.tile-a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(138, 55, 32, 0) 0%, rgba(138, 55, 32, .88) 62%);
}
.tile-a .icon { color: #fff; margin-bottom: auto; }
.tile-a h3 { font-size: clamp(1.8rem, 2.8vw, 2.4rem); }
.tile-a p { color: rgba(255, 255, 255, .92); }
.tile-points { margin-top: 6px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .35); display: grid; gap: 8px; font-size: .95rem; }
.tile-points li { position: relative; padding-left: 22px; }
.tile-points li::before { content: ""; position: absolute; left: 0; top: .6em; width: 10px; height: 1px; background: #fff; }

.tile-b { grid-column: 4 / 7; }
.tile-c { grid-column: 4 / 7; background: var(--sand); }
.tile-d { grid-column: 1 / 4; }
.tile-e { grid-column: 4 / 7; background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tile-e .icon { color: var(--brick-light); }
.tile-e p { color: rgba(241, 236, 228, .78); }

/* ---------- Contact ---------- */
.contact { background: var(--surface); border-top: 1px solid var(--line); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  border: 1px solid var(--line-strong);
}

.contact-panel { padding: clamp(32px, 4.5vw, 64px); background: var(--deep); color: #EDE7DC; }
.contact-panel .eyebrow { color: var(--brick-light); }
.contact-panel h2 { margin: 20px 0; font-size: clamp(2rem, 3.2vw, 2.9rem); font-weight: 400; }
.contact-panel > p:not(.eyebrow) { color: rgba(237, 231, 220, .75); }

.contact-list { margin-top: 36px; }
.contact-list > div { padding: 18px 0; border-top: 1px solid rgba(237, 231, 220, .2); }
.contact-list dt { color: var(--brick-light); }
.contact-list dd { margin-top: 6px; font-size: 1.02rem; line-height: 1.55; overflow-wrap: anywhere; }
.contact-list a { text-decoration: underline; text-decoration-color: var(--brick-light); text-underline-offset: 4px; }
.contact-list a:hover { color: var(--brick-light); }

.contact-form-wrap { padding: clamp(32px, 4.5vw, 64px); background: var(--bg); }
.contact-form-wrap h3 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); font-weight: 500; }
.form-intro { margin-top: 8px; font-size: .92rem; color: var(--ink-soft); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 28px; margin-top: 32px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }

.field > label:not(.consent) {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field input:not([type="checkbox"]),
.field select,
.field textarea {
  width: 100%;
  padding: 10px 0 12px;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  transition: border-color .25s, box-shadow .25s;
}
.field select { cursor: pointer; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:not([type="checkbox"]):focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--brick);
  box-shadow: 0 1px 0 var(--brick);
}
.field.invalid input:not([type="checkbox"]),
.field.invalid select,
.field.invalid textarea { border-bottom-color: #A3231C; }

.error { min-height: 1.2em; font-size: .84rem; line-height: 1.4; color: #A3231C; }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; line-height: 1.55; color: var(--ink-soft); cursor: pointer; }
.consent input { flex: none; width: 20px; height: 20px; margin-top: 3px; accent-color: var(--brick); cursor: pointer; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 14px; }
.form-hint { flex: 1 1 240px; font-size: .82rem; line-height: 1.5; color: var(--ink-soft); }
.form-status { margin-top: 18px; font-size: .95rem; color: var(--ink); }
.form-status:not(:empty) { padding: 14px 18px; border-left: 3px solid var(--brick); background: var(--surface); }

/* ---------- Footer ---------- */
.site-footer { padding: clamp(56px, 7vw, 96px) 0 32px; background: var(--deep); color: #CFC8BB; }

.footer-statement {
  max-width: 14ch;
  margin-bottom: clamp(40px, 5vw, 72px);
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5.2vw, 4.4rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -.02em;
  color: #EDE7DC;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 64px);
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(237, 231, 220, .18);
  font-size: .95rem;
  line-height: 1.7;
}
.footer-top p + p { margin-top: 6px; }
.footer-brand .logo-text strong { color: #EDE7DC; }
.footer-brand .logo-text small { color: #9FA89F; }
.footer-brand > p { margin-top: 20px; max-width: 34ch; }
.footer-title {
  margin-bottom: 16px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brick-light);
}
.footer-top ul { display: grid; gap: 8px; }
.footer-top a { text-decoration: none; overflow-wrap: anywhere; }
.footer-top a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 28px;
  font-size: .86rem;
  color: #9FA89F;
}

/* ---------- Privacy dialog ---------- */
dialog {
  width: min(640px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
}
dialog::backdrop { background: rgba(18, 26, 23, .62); }
.dialog-inner { position: relative; padding: clamp(28px, 4vw, 44px); }
.dialog-inner h2 { margin-bottom: 20px; font-size: 2rem; font-weight: 500; }
.dialog-inner p { margin-bottom: 14px; font-size: .96rem; line-height: 1.65; color: var(--ink-soft); }
.dialog-inner p strong { color: var(--ink); }
.dialog-inner a { text-underline-offset: 3px; }
.dialog-inner .btn { margin-top: 10px; }
.dialog-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 40px; height: 40px;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--ink);
  background: none;
  border: 0;
  cursor: pointer;
}
.dialog-close:hover { color: var(--brick); }

/* ---------- Scroll reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(2, 1fr); gap: 48px clamp(20px, 3vw, 44px); }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  /* Mobile navigation */
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 46px; height: 46px;
    padding: 0 11px;
    background: none;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; background: var(--ink); transition: transform .3s var(--ease), opacity .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 28px;
    padding: 24px var(--gutter) 40px;
    overflow-y: auto;
    background: var(--bg);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s linear .3s;
  }
  .site-nav.open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 18px 0; font-family: var(--font-serif); font-size: 1.7rem; font-weight: 500; border-bottom: 1px solid var(--line); }
  .site-nav ul a::after { display: none; }
  .nav-cta { justify-content: space-between; padding: 20px 24px; }

  /* Layout collapses */
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 580px; }
  .hero-panel { left: 16px; }

  .about-grid { grid-template-columns: 1fr; }
  .about-visual { position: static; max-width: 560px; margin-bottom: 28px; }
  .about-badge { right: 12px; }

  .services-grid { grid-template-columns: 1fr; }
  .services-intro { position: static; }
  .brick-block { display: none; }

  .process-head, .section-head { grid-template-columns: 1fr; align-items: start; }

  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .facts-grid { grid-template-columns: 1fr 1fr; }
  .facts-grid > div,
  .facts-grid > div + div { padding: 22px 16px 22px 0; border-left: 0; }
  .facts-grid > div:nth-child(2n) { padding-left: 20px; border-left: 1px solid var(--line); }
  .facts-grid > div:nth-child(n + 3) { border-top: 1px solid var(--line); }

  .bento { grid-template-columns: 1fr; }
  .tile-a, .tile-b, .tile-c, .tile-d, .tile-e { grid-column: 1; grid-row: auto; }
  .tile-a { min-height: 380px; }
}

@media (max-width: 640px) {
  :root { --header-h: 68px; }
  .logo-text strong { font-size: .98rem; }
  .logo-text small { font-size: .62rem; letter-spacing: .1em; }
  .logo-mark { width: 36px; height: 36px; }

  .steps { grid-template-columns: 1fr; }
  .service { grid-template-columns: 44px minmax(0, 1fr); }
  .glance { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .btn { padding: 16px 22px; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: space-between; }
}

@media (max-width: 380px) {
  .logo-text small { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
