/* Root */
:root {
  --bg: #EEF4F9;
  --surface: #FFFFFF;
  --text: #0B1B2B;
  --muted: #3F5468;
  --accent: #005E9C;
  --accent-text: #FFFFFF;
  --plate-bg: #0B1B2B;
  --plate-text: #EEF4F9;
  --line: #C7D6E2;
  --font-body: 'Avenir Next', Avenir, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --shadow-soft: 0 1px 2px rgb(11 27 43 / 0.06), 0 12px 32px rgb(11 27 43 / 0.08);
  --shadow-lift: 0 2px 4px rgb(11 27 43 / 0.08), 0 20px 44px rgb(11 27 43 / 0.14);
  --radius-card: 0px;
  --radius-btn: 10px;
  --pad-side: clamp(16px, 4vw, 40px);
}

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

html { scroll-behavior: smooth; overflow-x: hidden; max-width: 100vw; }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; object-fit: cover; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 9vw, 3.6rem); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 2.6vw + 0.8rem, 2.6rem); line-height: 1.15; max-width: 100%; hyphens: auto; }
h3 { font-size: clamp(1.2rem, 1vw + 0.9rem, 1.5rem); }

p { margin: 0 0 1em; max-width: 68ch; }

/* Background layer */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 12%, rgb(255 255 255 / 0.9), transparent 42%),
    linear-gradient(160deg, var(--bg) 0%, var(--surface) 62%, #E2ECF4 100%);
}

/* Layout */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--pad-side);
}

.wrap-narrow { max-width: 760px; }

.block {
  padding: clamp(48px, 6vw, 96px) 0;
  position: relative;
}

.block h2 { margin-bottom: 12px; }
.block > .wrap > p:not(.tile-note):not(.tile-price) { margin-bottom: clamp(24px, 3vw, 40px); }

/* Skip link */
.skip-path {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--plate-bg);
  color: var(--plate-text);
  padding: 12px 20px;
  border-radius: var(--radius-btn);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-path:focus { top: 12px; }

/* Header */
.top-bar {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1120px, calc(100% - 32px));
  z-index: 70;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  padding: 10px 14px;
}

.top-bar-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  max-width: none;
  padding: 0;
}

.brand {
  justify-self: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.top-bar .btn { justify-self: end; }

/* Menu button */
.menu-btn {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  cursor: pointer;
}

.menu-btn::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--text);
  box-shadow: 0 -6px 0 var(--text), 0 6px 0 var(--text);
}

.menu-btn:hover { border-color: var(--accent); color: var(--accent); }
.menu-btn:hover::before { background: var(--accent); box-shadow: 0 -6px 0 var(--accent), 0 6px 0 var(--accent); }

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

.menu-btn:active { transform: translateY(1px); }

/* Menu overlay */
.menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--plate-bg);
  color: var(--plate-text);
  display: grid;
  align-items: center;
  padding: 96px var(--pad-side) 48px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow-y: auto;
}

.menu.is-open { opacity: 1; visibility: visible; }

.menu-inner {
  display: grid;
  gap: 40px;
  max-width: 1200px;
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.menu-item {
  display: inline-block;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 700;
  color: var(--plate-text);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
}

.menu-item::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--plate-text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.menu-item:hover::after,
.menu-item[aria-current="page"]::after { transform: scaleX(1); }

.menu-item:focus-visible { outline: 3px solid var(--plate-text); outline-offset: 4px; }

.menu-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.menu-side span {
  display: inline-block;
  min-width: 90px;
  font-size: 0.9rem;
  color: var(--line);
}

.menu-side a { color: var(--plate-text); font-weight: 600; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent-text);
  text-decoration: none;
  border: none;
  border-radius: var(--radius-btn);
  background-image: linear-gradient(135deg, #006FB8 0%, var(--accent) 60%, #00497B 100%);
  background-size: 160% 160%;
  background-position: 0% 50%;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: background-position 0.35s ease, box-shadow 0.25s ease, transform 0.15s ease;
}

.btn:hover { background-position: 100% 50%; box-shadow: var(--shadow-lift); }

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px #7A2E00;
}

.btn:active { box-shadow: none; transform: translateY(1px); }

.btn-quiet {
  color: var(--text);
  background-image: none;
  background-color: transparent;
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn-quiet:hover { border-color: var(--accent); color: var(--accent); background-color: var(--surface); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: clamp(24px, 5vw, 56px);
  align-items: stretch;
  padding-top: clamp(96px, 14vw, 160px);
  min-height: auto;
}

.hero-copy p { font-size: clamp(1.05rem, 0.6vw + 0.9rem, 1.25rem); color: var(--muted); }

.hero-photo {
  display: flex;
  align-self: stretch;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--line);
}

.lead-word {
  display: inline-block;
  font-size: clamp(2.6rem, 5.2vw + 1rem, 5.4rem);
  line-height: 1;
  color: var(--accent);
}

/* Cards */
.tile-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 1fr;
  gap: 24px;
}

.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: clamp(24px, 3vw, 32px);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tile:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }

.tile h3 { margin-bottom: 8px; }
.tile p { margin-bottom: 0; }
.tile a { color: var(--accent); }

.tiles-three { align-items: stretch; }
.tiles-three .tile { gap: 12px; }
.tiles-three .tile .btn { margin-top: auto; align-self: flex-start; }

.tile.is-featured {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-soft);
}

.tile-note {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
  min-width: 28ch;
}

.tile-price {
  font-weight: 700;
  margin: 0;
  margin-top: auto;
}

/* Dark plate */
.dark-plate {
  background: var(--plate-bg);
  color: var(--plate-text);
  padding: clamp(28px, 4vw, 48px);
}

.dark-plate a { color: #BFE0F5; }
.dark-plate p:last-child { margin-bottom: 0; }

/* Steps */
.step-list {
  list-style: none;
  counter-reset: step;
  margin: 0 0 clamp(24px, 3vw, 40px);
  padding: 0;
  display: grid;
  gap: 16px;
}

.step-list li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: clamp(20px, 3vw, 32px);
  position: relative;
  padding-left: clamp(56px, 6vw, 76px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-list li:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

.step-list li::before {
  content: counter(step);
  position: absolute;
  left: clamp(16px, 2.5vw, 24px);
  top: clamp(20px, 3vw, 30px);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--accent);
}

.step-photo img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
}

.tile-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  margin-top: clamp(16px, 2vw, 24px);
}

/* FAQ */
.q-list { display: grid; gap: 12px; }

.q-list details {
  background: var(--surface);
  border: 1px solid var(--line);
  transition: box-shadow 0.3s ease;
}

.q-list details[open] { box-shadow: var(--shadow-soft); }

.q-list summary {
  cursor: pointer;
  font-weight: 600;
  padding: 18px 24px;
  list-style-position: inside;
  color: var(--text);
}

.q-list summary:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

.q-list details p { padding: 0 24px 20px; margin: 0; }

/* Form */
.lead-form {
  display: grid;
  gap: 20px;
  max-width: 640px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: clamp(24px, 3.5vw, 40px);
}

.form-row { display: grid; gap: 6px; }

.field-name { font-weight: 600; font-size: 0.95rem; }

.field-box, .field-area {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  padding: 12px 16px;
  min-height: 48px;
}

.field-area { min-height: 120px; resize: vertical; }

.field-box::placeholder, .field-area::placeholder { color: var(--muted); opacity: 1; }

.field-box:focus-visible, .field-area:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(0 94 156 / 0.25);
}

.is-invalid { border-color: #A32000; box-shadow: 0 0 0 3px rgb(163 32 0 / 0.2); }

.field-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  font-size: 0.95rem;
  color: var(--muted);
}

.field-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }
.field-check a { color: var(--accent); }

.form-hint { font-size: 0.9rem; color: var(--muted); margin: 0; }

.form-send { justify-self: start; }

.lead-form.is-busy .form-send { opacity: 0.7; pointer-events: none; }

/* Prose */
.read { max-width: 760px; }
.read h2 { margin-top: 1.6em; }
.read h3 { margin-top: 1.4em; }
.read ul, .read ol { padding-left: 1.4em; margin: 0 0 1em; }
.read li { margin-bottom: 0.4em; }
.read table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5em;
  font-size: 0.95rem;
}
.read th, .read td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); }
.read th { background: var(--surface); font-weight: 700; }

/* Inner page head */
.page-head { padding-top: clamp(120px, 16vw, 180px); }
.page-head p { color: var(--muted); font-size: clamp(1.05rem, 0.6vw + 0.9rem, 1.2rem); }

/* Mobile sticky bar */
.form-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgb(11 27 43 / 0.1);
  padding: 10px 0;
}

.form-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: none;
}

.form-bar-note { margin: 0; font-size: 0.95rem; font-weight: 600; }
.form-bar .btn { min-height: 44px; padding: 0 20px; }

/* Footer */
.bottom {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: clamp(48px, 6vw, 80px) 0 24px;
  margin-top: clamp(48px, 6vw, 80px);
}

.bottom-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: none;
}

.bottom-owner address { font-style: normal; }
.bottom-owner p { margin: 0 0 8px; max-width: 40ch; }

.bottom-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bottom-list a { color: var(--text); text-decoration: none; }
.bottom-list a:hover { color: var(--accent); text-decoration: underline; }
.bottom-list span { color: var(--muted); }

.bottom-note {
  margin-top: 32px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  max-width: none;
}

.bottom-note p { margin: 0; font-size: 0.9rem; color: var(--muted); }

/* Contact block */
.contact-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.contact-box span { display: inline-block; min-width: 84px; color: var(--muted); font-size: 0.9rem; }

/* Thanks & 404 */
.thanks-box, .lost-box {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: clamp(28px, 4vw, 48px);
  max-width: 760px;
}

.link-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

/* Reveal */
html.has-js .fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

html.has-js .fade-in.is-shown {
  opacity: 1;
  transform: none;
}

/* Breakpoints */
@media (max-width: 479px) {
  .brand { font-size: 0.92rem; max-width: 42vw; white-space: normal; line-height: 1.2; text-wrap: balance; }
  .hero { display: block; padding-top: 104px; }
  .hero-copy { margin-bottom: 24px; }
  .hero-photo img { width: 100%; height: auto; }
  .top-bar .btn { padding: 0 16px; font-size: 0.9rem; min-height: 44px; }
  .form-bar-note { display: none; }
  .form-bar-inner { justify-content: center; }
  .form-bar .btn { width: 100%; }
  main { padding-bottom: 76px; }
  body { padding-bottom: 0; }
}

@media (min-width: 480px) {
  .form-bar { display: none; }
}

@media (min-width: 640px) {
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
  .step-list { grid-template-columns: repeat(2, 1fr); }
  .bottom-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .hero-photo img { max-height: none; }
  .menu-inner { grid-template-columns: 2fr 1fr; align-items: end; }
}

@media (min-width: 1024px) {
  .tiles-three { grid-template-columns: repeat(3, 1fr); }
  .bottom-grid { grid-template-columns: 2fr 1fr 1fr 1.2fr; }
  .menu-side { justify-self: end; }
}

@media (min-width: 1280px) {
  .wrap { padding: 0 40px; }
  .block > .wrap { position: relative; }
  .block > .wrap > h2,
  .block > .wrap > .read,
  .block > .wrap > p {
    max-width: 72%;
  }
}

@media (max-height: 600px) {
  .top-bar { top: 8px; }
  .hero { padding-top: 96px; min-height: auto; }
  .menu { padding-top: 80px; align-items: start; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html.has-js .fade-in { opacity: 1; transform: none; }
}

/* Card text measure */
.tile p, .step-list p { min-width: 28ch; max-width: 60ch; }

@media (min-width: 640px) {
  h1 { font-size: clamp(2.4rem, 4.6vw + 0.6rem, 4.6rem); }
  h2 { font-size: clamp(1.8rem, 2.6vw + 0.8rem, 3rem); }
}

@media (min-width: 640px) and (max-width: 767px) {
  .tile-photo img,
  .step-photo img { width: 100%; }
  .hero-copy p,
  .block > .wrap > p { max-width: 60ch; }
  .tile p,
  .step-list p { min-width: 0; }
}
