/* CPJ Construction Ltd: site styles, built on base.css
   Direction: cobalt blueprint bands, redline accent, drafted floor plan motif. */

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

:root {
  /* Brand palette */
  --primary:      #1f35c4;   /* cobalt, the blueprint */
  --primary-mid:  #3a50d9;
  --primary-dark: #14248f;
  --accent:       #d02e17;   /* redline, the revision pen */
  --accent-mid:   #a8220f;

  /* Neutrals */
  --bg:         #f3f4f8;
  --surface:    #ffffff;
  --border:     #c9cde0;
  --text:       #10153a;
  --text-soft:  #3d4366;
  --text-muted: #5c6282;
  --on-primary:      #ffffff;
  --on-primary-soft: #d5dbff;
  --ink:        #10153a;

  /* Typography */
  --font-display: 'Archivo Black', system-ui, sans-serif;
  --font-body:    'Work Sans', system-ui, sans-serif;

  /* Spacing */
  --section-pad: clamp(60px, 8vw, 120px);
  --container:   1200px;
  --radius:      2px;
  --radius-lg:   4px;

  /* Drawing */
  --wall: 6px;
  --door: 3.5rem;

  /* base.css hooks */
  --color-bg: var(--bg);
  --color-surface: var(--surface);
  --color-text: var(--text);
  --color-muted: var(--text-soft);
  --color-accent: var(--accent);
  --color-accent-text: #ffffff;
  --color-line: var(--border);
  --focus: var(--primary);
}

body { font-family: var(--font-body); line-height: 1.65; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.18; letter-spacing: 0; text-wrap: balance; }
h4 { font-family: var(--font-body); font-weight: 600; }
strong { font-weight: 600; }

.email-link { max-width: 100%; overflow-wrap: normal; word-break: normal; display: inline-block; }

/* ---------- Buttons ---------- */
.btn { border-radius: var(--radius); font-weight: 600; border-width: 2px; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-mid); border-color: var(--accent-mid); }
.btn-light { background: #fff; color: var(--primary-dark); border-color: #fff; }
.btn-light:hover { background: var(--on-primary-soft); border-color: var(--on-primary-soft); }
.btn-line-light { background: transparent; color: #fff; border-color: #fff; }
.btn-line-light:hover { background: #fff; color: var(--primary-dark); }
.btn-line { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-line:hover { background: var(--primary); color: #fff; }
.btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 3px solid var(--primary);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; position: relative; }

.logo { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); }
.logo-mark {
  font-family: var(--font-display); font-size: 1.15rem; line-height: 1;
  background: var(--primary); color: #fff;
  padding: 0.5rem 0.55rem 0.45rem;
  box-shadow: inset 0 0 0 2px var(--primary), inset 0 0 0 4px #fff;
}
.logo-text { font-weight: 600; font-size: 1rem; line-height: 1.2; }
.logo:hover .logo-text { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 0.6rem;
  min-height: 48px; padding: 0 0.9rem;
  background: var(--surface); color: var(--text);
  border: 2px solid var(--primary); border-radius: var(--radius);
  font-weight: 600; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.nav-toggle:hover { background: var(--primary); color: #fff; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  display: block; width: 1.2rem; height: 2px; background: currentColor; position: relative;
  transition: transform 0.2s, background 0.2s;
}
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

.nav-links { list-style: none; }
.nav-links a {
  display: block; text-decoration: none; color: var(--text); font-weight: 600;
  padding: 0.85rem 0; position: relative;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a[aria-current="page"] { color: var(--primary); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; bottom: 0.45rem; width: 100%; height: 3px; background: var(--accent);
}

/* Mobile menu panel (visibility is controlled at the end of this file) */
@media (max-width: 767.98px) {
  .nav-links {
    position: absolute; top: 100%; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter));
    flex-direction: column;
    background: var(--bg);
    border-bottom: 3px solid var(--primary);
    padding: 0.5rem var(--gutter) 1rem;
    margin-top: 3px;
  }
  .nav-links li + li { border-top: 1px solid var(--border); }
  .nav-links a[aria-current="page"]::after { width: 2.5rem; bottom: 0.4rem; }
}

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .site-header .nav-links { display: flex; align-items: center; gap: 2rem; }
  .logo-text { font-size: 1.05rem; }
}

/* ---------- Hero: blueprint band with drafted plan ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--primary); color: var(--on-primary);
  padding-block: clamp(3.25rem, 6vw, 5rem) calc(var(--door) + clamp(2.5rem, 5vw, 4rem));
}
.hero::before, .hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
}
/* horizontal grid lines */
.hero::before {
  background-image:
    linear-gradient(rgba(255,255,255,0.17) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 100% 120px, 100% 24px;
}
/* vertical grid lines */
.hero::after {
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.17) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 120px 100%, 24px 100%;
}

.plan { position: relative; display: grid; margin-top: 1.5rem; }
.wall { position: absolute; background: #fff; display: block; }
.wall-t { top: 0; left: 0; right: 0; height: var(--wall); }
.wall-b {
  bottom: 0; left: 0; right: 0; height: var(--wall);
  background: linear-gradient(90deg, #fff calc(100% - 2.5rem - var(--door)), transparent 0 calc(100% - 2.5rem), #fff 0);
}
.wall-l { top: 0; bottom: 0; left: 0; width: var(--wall); }
.wall-r { top: 0; bottom: 0; right: 0; width: var(--wall); }
.plan-window {
  position: absolute; top: 0; left: clamp(4rem, 34%, 18rem); width: clamp(4.5rem, 16vw, 9rem); height: var(--wall);
  background: linear-gradient(#fff, #fff) center / 100% 1px no-repeat, var(--primary);
  border-block: 1.5px solid #fff;
}
.plan-door { position: absolute; top: calc(100% - 1px); right: 2.5rem; width: var(--door); height: var(--door); overflow: visible; }
.plan-door .leaf { stroke: #fff; stroke-width: 3; }
.plan-door .swing { stroke: var(--on-primary-soft); stroke-width: 1.25; stroke-dasharray: 4 4; fill: none; }

.dim { position: absolute; color: var(--on-primary-soft); font-size: var(--step--1); font-weight: 500; line-height: 1.2; pointer-events: none; }
.dim-top {
  left: 0; right: 0; bottom: calc(100% + 0.55rem); height: 0.9rem;
  display: flex; align-items: center; gap: 0.6rem;
  border-inline: 1px solid currentColor;
}
.dim-top::before, .dim-top::after { content: ""; flex: 1; height: 1px; background: currentColor; }
.dim-side { display: none; }

.plan-main { padding: clamp(1.6rem, 4.5vw, 3.75rem) clamp(1.35rem, 4.5vw, 3.75rem); position: relative; }
.plan-main h1 { font-size: clamp(2.2rem, 1.45rem + 3.6vw, 4.5rem); color: #fff; max-width: 14ch; }
.hero--page .plan-main h1 { font-size: clamp(2rem, 1.4rem + 2.8vw, 3.6rem); max-width: 18ch; }
.plan-main .lede { margin-top: 1.25rem; color: var(--on-primary-soft); font-size: var(--step-1); line-height: 1.6; max-width: 44ch; }
.plan-main .lede strong { color: #fff; }
.hero-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.85rem; }

.plan-rooms { position: relative; display: grid; }
.plan-rooms::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: #fff; }
.room {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: 0.15rem;
  padding: 1.15rem clamp(1.35rem, 4.5vw, 2.25rem);
  color: #fff; text-decoration: none;
  transition: background 0.2s;
}
.room + .room::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: #fff; }
a.room:hover { background: var(--primary-dark); }
a.room:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.room-name { font-family: var(--font-display); font-size: var(--step-1); line-height: 1.25; color: #fff; }
.room-note { color: var(--on-primary-soft); font-size: var(--step--1); line-height: 1.5; }
.room-note.email-link, .room .email-link { color: #fff; font-weight: 600; font-size: var(--step-0); }
.room-value { color: #fff; font-weight: 600; font-size: var(--step-0); }
a.room:hover .room-name, a.room:hover .room-value { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 0.2em; }

.hero { --focus: #ffffff; }
.hero :focus-visible { outline-color: #fff; }
[id] { scroll-margin-top: 5.5rem; }

@media (min-width: 1024px) {
  .plan { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); margin-right: 1.75rem; }
  .plan.plan--single { grid-template-columns: minmax(0, 1fr); margin-right: 0; }
  .plan--single .plan-main { padding-block: 3.25rem; }
  .hero--page .plan { min-height: 26rem; }
  .hero--page .plan-main { align-self: center; }
  .hero--page .plan-rooms { align-content: stretch; }
  .plan-rooms::before { top: 0; bottom: 0; left: 0; right: auto; width: 3px; height: auto; }
  .plan-main { padding-block: 4.25rem; }
  .dim-side {
    display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
    top: 0; bottom: 0; left: calc(100% + 0.75rem); width: 0.9rem;
    border-block: 1px solid currentColor;
  }
  .dim-side::before, .dim-side::after { content: ""; flex: 1; width: 1px; background: currentColor; }
  .dim-side span { writing-mode: vertical-rl; white-space: nowrap; }
}

/* Entrance: only when motion is welcome (noscript block on each page switches it off without JS) */
@keyframes grid-x { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes grid-y { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: none; } }
@keyframes grow-y { from { transform: scaleY(0); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(1.1rem); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes trace { from { stroke-dashoffset: 120; } to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: grid-y 0.9s cubic-bezier(.55,0,.25,1) both; }
  .hero::after  { animation: grid-x 0.9s 0.05s cubic-bezier(.55,0,.25,1) both; }
  .wall-t { transform-origin: left center;   animation: grow-x 0.45s 0.15s cubic-bezier(.6,0,.3,1) both; }
  .wall-r { transform-origin: center top;    animation: grow-y 0.35s 0.55s cubic-bezier(.6,0,.3,1) both; }
  .wall-b { transform-origin: right center;  animation: grow-x 0.45s 0.85s cubic-bezier(.6,0,.3,1) both; }
  .wall-l { transform-origin: center bottom; animation: grow-y 0.35s 1.25s cubic-bezier(.6,0,.3,1) both; }
  .plan-window { animation: fade 0.3s 0.6s both; }
  .plan-door .leaf { stroke-dasharray: 120; animation: trace 0.4s 1.3s ease-out both; }
  .plan-door .swing { animation: fade 0.4s 1.5s both; }
  .plan-rooms::before { animation: grow-x 0.4s 0.95s cubic-bezier(.6,0,.3,1) both; transform-origin: left center; }
  .room + .room::before { animation: grow-x 0.35s 1.15s cubic-bezier(.6,0,.3,1) both; transform-origin: left center; }
  .room > * { animation: rise 0.45s 1.2s ease-out both; }
  .plan-main h1 { animation: rise 0.6s 0.3s cubic-bezier(.2,.7,.2,1) both; }
  .plan-main .lede { animation: rise 0.55s 0.6s cubic-bezier(.2,.7,.2,1) both; }
  .hero-actions { animation: rise 0.55s 0.85s cubic-bezier(.2,.7,.2,1) both; }
  .dim-top { transform-origin: center; animation: grow-x 0.5s 1.35s ease-out both; }
  .dim-side { transform-origin: center; animation: grow-y 0.5s 1.5s ease-out both; }
  @media (min-width: 1024px) {
    .plan-rooms::before { transform-origin: center top; animation-name: grow-y; }
  }
}

/* ---------- Dimension line (drawn as it scrolls into view, purely decorative) ---------- */
.dimline {
  display: block; height: 0.85rem; position: relative;
  border-inline: 2px solid var(--accent);
}
.dimline::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--accent); }
.dimline--light { border-color: #fff; }
.dimline--light::before { background: #fff; }

/* ---------- Bands ---------- */
.band { padding-block: var(--section-pad); position: relative; }
.band--tight { padding-block: clamp(48px, 6vw, 88px); }
.band--paper { background: var(--bg); color: var(--text); }
.band--white { background: var(--surface); color: var(--text); border-block: 1px solid var(--border); }
.band--blue {
  background: var(--primary); color: var(--on-primary); isolation: isolate; overflow: hidden;
  --focus: #ffffff;
}
.band--blue::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.09) 1px, transparent 1px);
  background-size: 48px 48px;
}
.band--blue h2, .band--blue h3, .band--blue h4 { color: #fff; }
.band--blue p, .band--blue li, .band--blue dt, .band--blue dd { color: var(--on-primary-soft); }
.band--blue a:not(.btn) { color: #fff; }
.band--blue strong { color: #fff; }

.band-head { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.band-head h2 { font-size: var(--step-4); max-width: 18ch; }
.band-head p { color: var(--text-soft); font-size: var(--step-1); line-height: 1.6; }
.band--blue .band-head p { color: var(--on-primary-soft); }
@media (min-width: 1024px) {
  .band-head { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: end; gap: 3rem; }
}

/* ---------- Home: jobs as big words ---------- */
.jobs { list-style: none; display: grid; gap: clamp(3rem, 7vw, 5.5rem); }
.job { display: grid; gap: 1.25rem; }
.job-figure { width: fit-content; max-width: 100%; }
.job-word {
  font-family: var(--font-display); color: var(--primary);
  font-size: clamp(2.6rem, 1.2rem + 8vw, 6rem); line-height: 1.15;
  max-width: none; white-space: nowrap;
}
@media (min-width: 900px) { .job-word { font-size: clamp(4rem, 6.8vw, 8.5rem); } }
.job-figure .dimline { margin-top: 0.35rem; }
.job-body h3 { font-size: var(--step-2); }
.job-body p { margin-top: 0.75rem; color: var(--text-soft); }
.job-link {
  display: inline-block; margin-top: 1rem; font-weight: 600; color: var(--primary);
  text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px;
  transition: color 0.2s;
}
.job-link:hover { color: var(--accent); text-decoration-thickness: 3px; }

@media (min-width: 900px) {
  .job { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: end; gap: 3rem; }
  .job:nth-child(even) .job-figure { order: 2; justify-self: end; }
  .job:nth-child(even) .job-body { order: 1; }
  .job:nth-child(2) { margin-inline: 4% 0; }
}

/* ---------- Home: fixed price ---------- */
.mega {
  font-family: var(--font-display); color: #fff;
  font-size: clamp(3.4rem, 1rem + 11vw, 10rem); line-height: 1.12;
}
.fixed .dimline { margin-top: 0.75rem; max-width: 100%; }
.fixed-cols { display: grid; gap: 2.25rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
.fixed-cols h3 { font-size: var(--step-2); }
.fixed-cols p { margin-top: 0.75rem; font-size: var(--step-0); }
@media (min-width: 768px) {
  .fixed-cols { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
}

/* ---------- Home: Building Regulations schedule ---------- */
.schedule {
  list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 3px solid var(--primary);
  background: var(--surface);
}
.schedule li {
  padding: 1.1rem 1rem 1.3rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 0.35rem;
}
.schedule .part { font-size: var(--step--1); font-weight: 600; color: var(--accent); }
.schedule .letter { font-family: var(--font-display); font-size: clamp(3rem, 2rem + 4vw, 5rem); line-height: 1.15; color: var(--primary); }
.schedule .what { font-weight: 500; color: var(--text); line-height: 1.45; }
.schedule li:nth-child(2n) { border-right: 0; }
.schedule li:nth-last-child(-n+2) { border-bottom: 0; }
@media (min-width: 768px) {
  .schedule { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .schedule li:nth-child(2n) { border-right: 1px solid var(--border); }
  .schedule li:nth-child(3n) { border-right: 0; }
  .schedule li:nth-last-child(-n+3) { border-bottom: 0; }
}
@media (min-width: 1100px) {
  .schedule { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .schedule li { border-bottom: 0; }
  .schedule li:nth-child(3n) { border-right: 1px solid var(--border); }
  .schedule li:last-child { border-right: 0; }
}
.schedule-note { margin-top: 1.25rem; color: var(--text-muted); font-size: var(--step--1); }

/* ---------- Home: area ---------- */
.area { display: grid; gap: 2rem; align-items: center; }
.area-mark {
  font-family: var(--font-display); color: var(--primary);
  font-size: clamp(7rem, 4rem + 18vw, 17rem); line-height: 1; max-width: none;
  position: relative; width: fit-content;
}
.area-mark::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.6rem; height: 6px; background: var(--accent);
}
.area h2 { font-size: var(--step-4); }
.area p { margin-top: 1rem; color: var(--text-soft); font-size: var(--step-1); }
.route { list-style: none; margin-top: 2rem; position: relative; display: grid; gap: 1.1rem; padding-left: 1.75rem; }
.route::before { content: ""; position: absolute; left: 0.45rem; top: 0.6rem; bottom: 0.6rem; width: 3px; background: var(--primary); }
.route li { position: relative; font-weight: 600; }
.route li::before {
  content: ""; position: absolute; left: -1.75rem; top: 0.35rem; width: 1.2rem; height: 1.2rem;
  background: var(--bg); border: 3px solid var(--primary);
}
.route li:first-child::before, .route li:last-child::before { background: var(--accent); border-color: var(--accent); }
.route li span { display: block; font-weight: 400; color: var(--text-muted); font-size: var(--step--1); }
@media (min-width: 900px) {
  .area { grid-template-columns: auto minmax(0, 1fr); gap: clamp(3rem, 6vw, 6rem); }
}

/* ---------- CTA band ---------- */
.cta { display: grid; gap: 2rem; }
.cta h2 { font-size: var(--step-5); max-width: 15ch; }
.cta p { margin-top: 1rem; font-size: var(--step-1); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; }
.cta-email { display: block; margin-top: 1.1rem; font-weight: 600; font-size: var(--step-0); }
@media (min-width: 900px) {
  .cta { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: end; gap: 4rem; }
  .cta-side { justify-self: end; }
}

/* ---------- Services page ---------- */
.service { display: grid; gap: clamp(2rem, 4vw, 3.5rem); }
.service-word {
  font-family: var(--font-display); color: var(--primary);
  font-size: clamp(2.6rem, 1.2rem + 8vw, 8.5rem); line-height: 1.15; white-space: nowrap; max-width: none;
}
.band--blue .service-word { color: #fff; }
.service-word-wrap { width: fit-content; max-width: 100%; }
.service-word-wrap .dimline { margin-top: 0.3rem; }
.service-copy h2 { font-size: var(--step-4); max-width: 16ch; }
.service-copy > p { margin-top: 1rem; color: var(--text-soft); }
.band--blue .service-copy > p { color: var(--on-primary-soft); }
.service-copy h3 { font-size: var(--step-1); margin-top: 2rem; }
.checks { list-style: none; margin-top: 1rem; display: grid; gap: 0.65rem; }
.checks li { position: relative; padding-left: 1.9rem; line-height: 1.55; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.3rem; width: 1rem; height: 1rem;
  border: 2px solid var(--accent);
  background: linear-gradient(var(--accent), var(--accent)) center / 2px 100% no-repeat;
}
.band--blue .checks li::before {
  border-color: #fff;
  background: linear-gradient(#fff, #fff) center / 2px 100% no-repeat;
}

.drawing {
  position: relative; background: var(--primary);
  background-image:
    linear-gradient(rgba(255,255,255,0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.14) 1px, transparent 1px);
  background-size: 24px 24px;
  border: 3px solid var(--primary);
  aspect-ratio: 4 / 3; max-height: 55vh; width: 100%;
  display: grid; place-items: center; padding: 1rem;
}
.drawing svg { width: 100%; height: 100%; }
.drawing--paper {
  background-color: var(--surface);
  background-image:
    linear-gradient(rgba(31,53,196,0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31,53,196,0.09) 1px, transparent 1px);
  border-color: #fff;
}

/* Photos sit inside a plan-wall outline with a dimension line beneath, as in the hero */
.frame { position: relative; margin: 0 0 1.9rem; }
.frame img { width: 100%; aspect-ratio: 4 / 3; max-height: 55vh; object-fit: cover; display: block; border: var(--wall) solid var(--primary); }
.frame::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1.6rem; height: 0.85rem; pointer-events: none;
  border-inline: 2px solid var(--accent);
  background: linear-gradient(var(--accent), var(--accent)) center / 100% 2px no-repeat;
}
.band--blue .frame img { border-color: #fff; }
.band--blue .frame::before { border-color: #fff; background-image: linear-gradient(#fff, #fff); }

/* Thin dimension-line strip at the top of every band that follows another section */
.hero + .band::after, .band + .band::after {
  content: ""; position: absolute; top: clamp(1.1rem, 2.5vw, 1.75rem); left: 50%; transform: translateX(-50%);
  width: min(var(--container), 100% - 2 * clamp(1rem, 5vw, 2rem)); height: 0.6rem; pointer-events: none;
  border-inline: 2px solid var(--accent);
  background: linear-gradient(var(--accent), var(--accent)) center / 100% 2px no-repeat;
}
.hero + .band.band--blue::after, .band + .band.band--blue::after { border-color: #fff; background-image: linear-gradient(#fff, #fff); }

@media (min-width: 900px) {
  .service { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; column-gap: clamp(3rem, 6vw, 5.5rem); }
  .service .service-word-wrap { grid-column: 1 / -1; }
  .service--flip .service-word-wrap { justify-self: end; }
  .service--flip .service-visual { order: 2; }
  .service-visual { position: sticky; top: 6.5rem; }
}

/* ---------- Contact page ---------- */
.contact-grid { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); }
.contact-intro h2 { font-size: var(--step-4); }
.contact-intro > p { margin-top: 1rem; color: var(--text-soft); }
.contact-intro .checks { margin-top: 1rem; }

.title-block { margin-top: 2.25rem; border: 3px solid var(--primary); background: var(--surface); }
.title-block div { padding: 0.9rem 1.1rem; border-top: 1px solid var(--border); }
.title-block div:first-child { border-top: 0; }
.title-block dt { font-size: var(--step--1); font-weight: 600; color: var(--accent); }
.title-block dd { font-weight: 600; color: var(--text); margin-top: 0.15rem; }
.title-block a { color: var(--primary); text-decoration-color: var(--accent); }
.title-block a:hover { color: var(--accent); }
@media (min-width: 768px) {
  .title-block div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1rem; align-items: baseline; }
  .title-block dd { margin-top: 0; }
}

.form-plan { position: relative; background: var(--surface); padding: clamp(1.5rem, 4vw, 2.75rem); border: var(--wall) solid var(--primary); }
.form-plan::before {
  content: ""; position: absolute; top: calc(-1 * var(--wall)); right: 2.5rem; width: clamp(4rem, 20%, 7rem); height: var(--wall);
  background: linear-gradient(var(--primary), var(--primary)) center / 100% 1.5px no-repeat, var(--surface);
  border-block: 1.5px solid var(--primary);
}
.form-plan h2 { font-size: var(--step-3); margin-bottom: 1.5rem; }
.field { margin-bottom: 1.25rem; }
.field label { color: var(--text); }
.field .hint { font-weight: 400; color: var(--text-muted); font-size: var(--step--1); }
.form-plan input, .form-plan textarea { border: 2px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); transition: border-color 0.2s, background 0.2s; }
.form-plan input:hover, .form-plan textarea:hover { border-color: var(--text-muted); }
.form-plan input:focus-visible, .form-plan textarea:focus-visible { outline: 3px solid var(--primary); outline-offset: 1px; border-color: var(--primary); background: #fff; }
.form-plan textarea { min-height: 9rem; }
.form-note { font-size: var(--step--1); color: var(--text-muted); margin-block: 0.25rem 1.5rem; }
.form-note a { color: var(--primary); }
.form-thanks { padding-block: 1rem; }
.form-thanks h2 { color: var(--primary); }
.form-thanks p { color: var(--text-soft); margin-top: 0.5rem; }
.form-thanks:focus { outline: none; }
[hidden] { display: none !important; }

@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; }
}

/* ---------- Privacy ---------- */
.prose { max-width: 70ch; }
.prose h2 { font-size: var(--step-2); margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { margin-top: 0.85rem; color: var(--text-soft); }
.prose ul { padding-left: 1.25rem; }
.prose a { color: var(--primary); text-decoration-color: var(--accent); }
.prose a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #e6e8f5; padding-block: clamp(3rem, 6vw, 4.5rem) 1.75rem; --focus: #ffffff; }
.site-footer p, .site-footer li, .site-footer a { color: #e6e8f5; }
.footer-grid { display: grid; gap: 2.25rem; }
.site-footer .logo { color: #fff; }
.site-footer .logo-mark { box-shadow: inset 0 0 0 2px var(--primary), inset 0 0 0 4px var(--ink); }
.footer-about { margin-top: 1rem; color: #b8bedf !important; max-width: 34ch; }
.footer-title { font-family: var(--font-body); font-size: var(--step--1); font-weight: 600; color: #b8bedf; margin-bottom: 0.6rem; }
.footer-links { list-style: none; display: grid; gap: 0.4rem; }
.footer-links a, .footer-contact a { text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s, color 0.2s; }
.footer-links a:hover, .footer-contact a:hover { border-color: var(--accent); color: #fff; }
.footer-contact { display: grid; gap: 0.4rem; }
.footer-base {
  margin-top: 2.75rem; padding-top: 1.25rem; border-top: 1px solid #343a66;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem;
  font-size: var(--step--1);
}
.footer-base p { color: #b8bedf; }
.footer-base a { color: #e6e8f5; }
.footer-base a:hover { color: #fff; }
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr; gap: 3rem; }
}

/* ---------- Phone polish ---------- */
@media (max-width: 767.98px) {
  .hero-actions .btn { width: 100%; text-align: center; }
  .plan-main { padding-top: 2rem; }
  .footer-links a { display: inline-block; padding-block: 0.2rem; }
  .footer-base { margin-top: 2rem; }
}

/* ---------- Mobile navigation visibility: keep last ---------- */
@media (max-width: 767.98px) {
  .site-header .nav-links { display: none; }
  .site-header .nav-links.open { display: flex; }
}
