/* Vars */
:root {
  --bg: #F5F5F2;
  --surface: #FFFFFF;
  --text: #1C1C1A;
  --muted: #55554F;
  --accent: #3D6B1F;
  --accent-text: #FFFFFF;
  --plate-bg: #1C1C1A;
  --plate-text: #F5F5F2;
  --line: #E3E3DD;
  --radius: 18px;
  --btn-radius: 999px;
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 12px 32px rgb(0 0 0 / .08);
  --font-head: 'Gill Sans', 'Gill Sans MT', Calibri, 'Segoe UI', sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --pad: clamp(16px, 4vw, 40px);
  --fs-hero: clamp(3.25rem, 4vw + 1.6rem, 4rem);
  --fs-h2: clamp(2rem, 1.6vw + 1.4rem, 2.4rem);
  --fs-h3: 1.35rem;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  min-width: 0;
  background-color: var(--bg);
  background-image:
    repeating-radial-gradient(circle at 18% 12%, rgb(28 28 26 / .016) 0 1px, transparent 1px 7px),
    repeating-radial-gradient(circle at 78% 64%, rgb(28 28 26 / .013) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, #FAFAF7 0%, var(--bg) 38%, #EDEDE7 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 650; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: var(--fs-hero); line-height: 1.08; overflow-wrap: break-word; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { max-width: 68ch; }
a { color: var(--accent); }
a:hover { text-decoration: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: var(--pad); }
.wrap-narrow { max-width: 760px; }
.sec-note { color: var(--muted); margin-top: -6px; }
.skip-line {
  position: absolute; left: -9999px; top: 0;
  background: var(--plate-bg); color: var(--plate-text);
  padding: 10px 20px; border-radius: 0 0 var(--btn-radius) 0; z-index: 60;
}
.skip-line:focus { left: 0; }

/* Header */
.top-bar {
  background: rgb(255 255 255 / .88);
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 20;
  backdrop-filter: blur(6px);
}
.top-row { border-bottom: 1px solid var(--line); }
.top-contacts {
  max-width: 1200px; margin: 0 auto; padding: 6px var(--pad);
  font-size: .875rem; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: flex-end;
}
.top-contacts a { color: var(--muted); text-decoration: none; }
.top-contacts a:hover { color: var(--accent); }
.top-main {
  max-width: 1200px; margin: 0 auto; padding: 16px var(--pad);
  display: flex; align-items: center; justify-content: flex-end; gap: 20px; flex-wrap: wrap;
}
.brand-mark {
  font-family: var(--font-head); font-weight: 650; font-size: 1.45rem;
  color: var(--text); text-decoration: none; letter-spacing: -0.01em;
}
.menu { margin-right: auto; }
.menu-btn {
  display: none; min-height: 38px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: var(--btn-radius);
  background: var(--surface); color: var(--text);
  font: 600 .95rem var(--font-body); cursor: pointer;
}
.menu-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.menu-pill {
  display: inline-block; padding: 7px 18px; border-radius: var(--btn-radius);
  border: 1px solid var(--line); color: var(--text);
  font-size: 1rem; font-weight: 500; text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.menu-pill:hover { background: #E9EFE3; border-color: #CBDCBB; }
.menu-pill[aria-current="page"], .menu-pill.is-active {
  background: var(--accent); border-color: var(--accent); color: var(--accent-text);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px; border-radius: var(--btn-radius);
  border: 2px solid var(--text); background: transparent; color: var(--text);
  font: 600 1rem var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color .18s ease, color .18s ease, transform .12s ease, box-shadow .18s ease;
}
.btn:hover { background: var(--text); color: var(--bg); transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn:active { transform: scale(.96); }
.btn-solid { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-solid:hover { background: #2E5317; border-color: #2E5317; color: var(--accent-text); }

/* Panels */
.panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 1200px; margin: clamp(20px, 4vw, 44px) auto;
  padding: clamp(32px, 5vw, 56px) var(--pad);
  width: calc(100% - 2 * var(--pad));
}
.panel > .wrap { padding-inline: 0; max-width: none; }
.panel h2, .panel h3 { margin-top: 0; }
main { padding: clamp(16px, 3vw, 32px) 0; }

/* Reveal */
html.has-js .rise {
  opacity: 0; transform: translateY(24px);
  transition: opacity .55s ease, transform .55s ease;
}
html.has-js .rise.is-shown { opacity: 1; transform: none; }

/* Hero */
.hero { min-height: auto; padding: clamp(20px, 4vw, 44px) 0 0; }
.hero-grid {
  display: grid; grid-template-columns: 0.95fr 1.35fr; gap: 0;
  align-items: stretch;
}
.ink-plate {
  background: var(--plate-bg); color: var(--plate-text);
  border-radius: var(--radius); padding: clamp(28px, 4vw, 56px);
  box-shadow: var(--shadow);
  max-width: 640px;
}
.hero-copy { z-index: 2; margin-right: clamp(-40px, -5vw, -80px); align-self: center; }
.hero-copy h1 { margin: 0 0 16px; max-width: 14ch; text-wrap: balance; }
.hero-copy .btn { margin-top: 8px; border-color: var(--plate-text); color: var(--plate-text); }
.hero-copy .btn:hover { background: var(--plate-text); color: var(--plate-bg); }
.hero-lead { font-size: clamp(1.05rem, 1.4vw + .7rem, 1.35rem); color: #DDDDD6; max-width: 46ch; }
.hero-photo {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  padding: 10px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.hero-photo img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; border-radius: 10px; }

/* Manifest */
.lead-word {
  font-family: var(--font-head); font-weight: 650;
  font-size: clamp(1.6rem, 2.8vw + .8rem, 3rem);
  line-height: 1.2; color: var(--accent);
  max-width: 24ch; margin: 0 0 20px;
}
.rich-text a { text-overflow: wrap; }

/* Tiles */
.tile-grid {
  display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 32px;
}
.tile {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 24px 24px;
  display: flex; flex-direction: column;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.tile:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.tile h3 { margin: 18px 0 8px; }
.tile p { flex: 1; color: var(--muted); margin-bottom: 20px; }
.tile .btn { align-self: flex-start; }
.tile-photo {
  margin: 0; padding: 8px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px;
}
.tile-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }

/* Form */
.order-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start;
}
.order-box {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(20px, 3vw, 36px);
  display: grid; gap: 16px;
}
.row { display: grid; gap: 6px; }
.row-name { font-weight: 600; font-size: .95rem; }
.row-input {
  font: inherit; color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; background: var(--surface); width: 100%;
}
.row-input::placeholder { color: #6E6E66; }
.row-area { resize: vertical; min-height: 110px; }
.row-input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.is-wrong .row-input, .row-input.is-wrong { border-color: #A3321F; }
.row-check { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; line-height: 1.5; }
.row-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.row-check label { cursor: pointer; }
.order-note { font-size: .875rem; color: var(--muted); margin: 0; }
.order-send.is-busy { opacity: .6; pointer-events: none; }

/* Prices */
.price-list { list-style: none; margin: 28px 0 0; padding: 0; }
.price-row {
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
  padding: 14px 4px; border-bottom: 1px solid var(--line);
}
.price-row:first-child { border-top: 1px solid var(--line); }
.price-val { color: var(--muted); font-weight: 600; white-space: nowrap; }

/* FAQ */
.qa-block { display: grid; gap: 12px; margin-top: 28px; }
.qa-block details {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 14px; padding: 4px 18px;
}
.qa-block summary {
  cursor: pointer; font-weight: 600; font-family: var(--font-head);
  font-size: 1.1rem; padding: 12px 0; list-style-position: outside;
}
.qa-block summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.qa-block p { color: var(--muted); margin: 4px 0 16px; }

/* Scope tabs */
.scope-grid { display: block; }
.scope-text { max-width: 100%; }
.scope-photo { margin: 32px 0 0; padding: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.scope-photo img { border-radius: 8px; aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.scope-tabs { display: inline-flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 20px; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--btn-radius); }
.tab-btn {
  min-height: 44px; padding: 0 22px; border-radius: var(--btn-radius);
  border: 0; background: transparent; color: var(--text);
  font: 600 .95rem var(--font-body); cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.tab-btn:hover { background: #E9EFE3; }
.tab-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tab-btn.is-active { background: var(--accent); color: var(--accent-text); }
.scope-list { margin: 0; padding-left: 20px; color: var(--muted); }
.scope-list li { margin: 8px 0; }
.scope-list li::marker { color: var(--accent); }

/* Call fab */
.call-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  min-height: 52px; padding: 0 24px; border-radius: var(--btn-radius);
  background: var(--accent); color: var(--accent-text);
  display: inline-flex; align-items: center;
  font: 600 1rem var(--font-body); text-decoration: none;
  box-shadow: 0 10px 26px rgb(0 0 0 / .22);
  transition: background-color .18s ease, transform .12s ease;
}
.call-fab:hover { background: #2E5317; transform: translateY(-1px); }
.call-fab:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.call-fab:active { transform: scale(.95); }

/* Footer */
.foot { background: #ECECE6; border-top: 1px solid var(--line); margin-top: clamp(40px, 7vw, 96px); padding: clamp(40px, 6vw, 72px) 0 24px; }
.foot-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
.foot-title { font-size: 1.05rem; margin: 0 0 12px; }
.foot-links { list-style: none; margin: 0; padding: 0; }
.foot-links li { margin: 6px 0; }
.foot-links a { color: var(--text); text-decoration: none; }
.foot-links a:hover { color: var(--accent); text-decoration: underline; }
.foot-owner address { font-style: normal; color: var(--muted); }
.foot-owner address p { margin: 0 0 8px; max-width: none; }
.foot-contact ul { list-style: none; margin: 0; padding: 0; color: var(--muted); }
.foot-contact ul li { margin: 6px 0; }
.foot-contact ul span { color: var(--text); font-weight: 600; }
.foot-contact ul a { color: var(--text); }
.foot-bottom { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; }
.foot-copy { color: var(--muted); font-size: .875rem; margin: 0; }

/* Inner pages */
.page-head {
  background: var(--plate-bg); color: var(--plate-text);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(32px, 6vw, 72px) var(--pad);
  max-width: 1200px; margin: clamp(20px, 4vw, 44px) auto;
  width: calc(100% - 2 * var(--pad));
}
.page-head h1 { margin: 0 0 14px; }
.page-head p { color: #DDDDD6; font-size: 1.1rem; margin: 0; }
.rich-text h2 { margin-top: 40px; }
.rich-text h3 { margin-top: 28px; }
.rich-text ul, .rich-text ol { color: var(--muted); padding-left: 22px; }
.rich-text li { margin: 6px 0; }
.rich-text table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .95rem; }
.rich-text th, .rich-text td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.rich-text th { background: var(--bg); font-family: var(--font-head); }
.rich-text p { color: inherit; }

/* Contact block */
.contact-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 24px; margin: 16px 0;
}
.contact-card ul { list-style: none; margin: 0; padding: 0; color: var(--muted); }
.contact-card ul li { margin: 8px 0; }
.contact-card ul span { color: var(--text); font-weight: 600; }
.contact-card ul a { color: var(--text); }

/* Done / 404 */
.status-box { text-align: center; }
.status-box .lead-word { max-width: none; margin-inline: auto; }
.status-box .btn { margin: 8px 12px 0; }

/* Breakpoints */
@media (max-width: 1280px) {
  .hero-photo img { min-height: 300px; }
}
@media (max-width: 1024px) {
  .order-grid { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { margin-right: 0; }
  .hero-photo { margin-top: -36px; margin-left: clamp(16px, 5vw, 64px); position: relative; z-index: 1; }
}
@media (max-width: 900px) {
  .top-main { justify-content: space-between; }
  .top-contacts { justify-content: center; gap: 8px 12px; }
  .menu { order: 0; }
  .menu { order: 2; width: 100%; }
  .menu-btn { display: inline-flex; align-items: center; }
  .menu-list {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 16px var(--pad); flex-direction: column;
    box-shadow: 0 16px 32px rgb(0 0 0 / .1); z-index: 30;
  }
  .menu.is-open .menu-list { display: flex; }
  .menu-pill { display: block; padding: 12px 18px; }
}
@media (min-width: 640px) {
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .tile-grid { grid-template-columns: repeat(3, 1fr); }
  .foot-grid { grid-template-columns: repeat(4, 1fr); }
  .scope-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
  .scope-photo { margin: 8px 0 0; position: sticky; top: 100px; }
}
@media (max-width: 480px) {
  .hero-photo { margin-left: 12px; margin-top: -24px; }
  .top-contacts { justify-content: center; }
  .tile-grid { gap: 20px; }
  .ink-plate { padding: 24px; }
  .price-row { flex-direction: column; gap: 2px; }
  .call-fab { right: 12px; bottom: 12px; }
}

/* Motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
  html.has-js .rise { opacity: 1; transform: none; }
}

/* Manifest layout */
@media (min-width: 1024px) {
  #manifest .rich-text { max-width: 1100px; margin-inline: auto; }
}
.order-lead p:last-child { margin-bottom: 0; }
.order-lead .btn { margin-top: 20px; }
.tile .btn { margin-top: auto; }
.qa-block summary { font-size: 1.05rem; }
.page-head h1 { max-width: none; text-wrap: balance; overflow-wrap: break-word; }
.order-note { font-size: .875rem; }
.row-check label { line-height: 1.5; }
.row-check input { margin-top: 3px; }
.hero-photo img { min-height: 300px; }
@media (min-width: 1280px) {
  .hero-photo img { min-height: 380px; }
}

@media (max-width: 480px) {
  .page-head h1 { font-size: 2rem; }
  .hero-copy h1 { font-size: 2.1rem; }
  .lead-word { font-size: 1.5rem; hyphens: auto; }
  h1, h2, h3 { overflow-wrap: break-word; }
}
