/* Root */
:root {
  --mg_bg: #F3F2EB;
  --mg_surface: #FCFBF7;
  --mg_text: #23261F;
  --mg_muted: #5A5E53;
  --mg_accent: #56651E;
  --mg_accent_deep: #43511A;
  --mg_accent_text: #FCFBF7;
  --mg_plate_bg: #23261F;
  --mg_plate_text: #F3F2EB;
  --mg_line: rgba(90, 94, 83, 0.35);
  --mg_radius_card: 14px;
  --mg_radius_btn: 10px;
  --mg_shadow_soft: 0 1px 2px rgba(35, 38, 31, 0.06), 0 12px 32px rgba(35, 38, 31, 0.08);
  --mg_shadow_lift: 0 2px 4px rgba(35, 38, 31, 0.08), 0 20px 44px rgba(35, 38, 31, 0.14);
  --mg_font_head: 'Gill Sans', 'Gill Sans MT', Calibri, 'Segoe UI', sans-serif;
  --mg_font_body: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mg_pad_side: clamp(16px, 4vw, 40px);
  --mg_gap_block: clamp(64px, 9vw, 128px);
  --mg_grad: linear-gradient(135deg, #56651E 0%, #6B7C2A 100%);
}

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

body {
  margin: 0;
  background-color: var(--mg_bg);
  background-image:
    radial-gradient(120% 46% at 50% 0%, rgba(86, 101, 30, 0.14) 0%, rgba(86, 101, 30, 0) 62%),
    radial-gradient(140% 50% at 0% 100%, rgba(35, 38, 31, 0.08) 0%, rgba(35, 38, 31, 0) 55%);
  color: var(--mg_text);
  font-family: var(--mg_font_body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
}

h1, h2, h3, h4 {
  font-family: var(--mg_font_head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 4.6vw + 0.6rem, 4.6rem); line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 2.6vw + 0.8rem, 3rem); }
h3 { font-size: clamp(1.2rem, 1vw + 0.7rem, 1.5rem); }

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

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

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

ul, ol { padding-left: 1.2em; }
:focus-visible { outline: 2px solid var(--mg_accent); outline-offset: 3px; }

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

.mg_block { padding: calc(var(--mg_gap_block) / 2) 0; }
.mg_block > .mg_wrap { padding-top: calc(var(--mg_gap_block) / 4); padding-bottom: calc(var(--mg_gap_block) / 4); }
.mg_block:first-of-type { padding-top: 24px; }

/* Tinted wave background */
.mg_tinted {
  position: relative;
  background-color: var(--mg_surface);
}
.mg_tinted::before,
.mg_tinted::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 44px;
  background: var(--mg_surface);
  pointer-events: none;
}
.mg_tinted::before {
  top: -22px;
  border-radius: 0 0 60% 40% / 100% 0 100% 100%;
}
.mg_tinted::after {
  bottom: -22px;
  border-radius: 60% 40% 0 0 / 100% 0 100% 0;
}

/* Skip link */
.mg_skip_line {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 60;
  background: var(--mg_plate_bg);
  color: var(--mg_plate_text);
  padding: 10px 18px;
  border-radius: var(--mg_radius_btn);
  transition: top 0.2s ease;
}
.mg_skip_line:focus { top: 12px; color: var(--mg_plate_text); }

/* Header */
.mg_topbar {
  position: sticky;
  top: 12px;
  z-index: 80;
  margin: 12px var(--mg_pad_side) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 8px 20px;
  background: var(--mg_surface);
  border: 1px solid var(--mg_line);
  border-radius: 18px;
  box-shadow: var(--mg_shadow_soft);
}

.mg_mark {
  font-family: var(--mg_font_head);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--mg_text);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.mg_mark:hover { color: var(--mg_accent_deep); }

.mg_drawer_btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  font: 600 1rem var(--mg_font_body);
  color: var(--mg_text);
  background: transparent;
  border: 1px solid var(--mg_line);
  border-radius: var(--mg_radius_btn);
  cursor: pointer;
}
.mg_drawer_btn:hover { background: rgba(86, 101, 30, 0.08); }
.mg_drawer_icon {
  width: 20px;
  height: 2px;
  background: var(--mg_text);
  position: relative;
  border-radius: 2px;
}
.mg_drawer_icon::before, .mg_drawer_icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--mg_text);
  border-radius: 2px;
}
.mg_drawer_icon::before { top: -6px; }
.mg_drawer_icon::after { top: 6px; }

/* Drawer nav */
.mg_drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 70;
  width: min(340px, 86vw);
  padding: 104px 24px 24px;
  background: var(--mg_surface);
  border-right: 1px solid var(--mg_line);
  box-shadow: var(--mg_shadow_lift);
  transform: translateX(-102%);
  transition: transform 0.32s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  visibility: hidden;
}
.mg_drawer.is_pulled { transform: translateX(0); visibility: visible; }

.mg_drawer_list { list-style: none; margin: 8px 0 24px; padding: 0; }
.mg_drawer_link {
  position: relative;
  display: block;
  padding: 14px 6px;
  font-size: 1.05rem;
  color: var(--mg_text);
  text-decoration: none;
}
.mg_drawer_link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 8px;
  height: 2px;
  width: 0;
  background: var(--mg_accent);
  transition: width 0.28s ease;
}
.mg_drawer_link:hover, .mg_drawer_link:focus-visible { color: var(--mg_accent_deep); }
.mg_drawer_link:hover::after, .mg_drawer_link:focus-visible::after { width: 42px; }

.mg_drawer_veil {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(35, 38, 31, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
body.is_pulled .mg_drawer_veil,
.mg_drawer_veil.is_pulled { opacity: 1; visibility: visible; }

/* Buttons */
.mg_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  font: 600 1rem var(--mg_font_body);
  color: var(--mg_accent_text);
  background: var(--mg_grad);
  background-size: 180% 180%;
  background-position: 0% 50%;
  border: none;
  border-radius: var(--mg_radius_btn);
  box-shadow: var(--mg_shadow_soft);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background-position 0.35s ease, box-shadow 0.25s ease, transform 0.15s ease;
}
.mg_btn::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 0;
  background: rgba(252, 251, 247, 0.16);
  transition: height 0.3s ease;
}
.mg_btn:hover { background-position: 100% 50%; box-shadow: var(--mg_shadow_lift); }
.mg_btn:hover::before { height: 100%; }
.mg_btn:focus-visible {
  outline: 3px solid var(--mg_plate_bg);
  outline-offset: 3px;
}
.mg_btn:active { box-shadow: none; transform: translateY(1px); }

.mg_btn_ghost {
  background: transparent;
  color: var(--mg_accent_deep);
  border: 1px solid var(--mg_accent);
}
.mg_btn_ghost::before { display: none; }
.mg_btn_ghost:hover { background: rgba(86, 101, 30, 0.1); color: var(--mg_accent_deep); box-shadow: none; }

.mg_topbar_call { padding: 0 18px; font-size: 0.95rem; }
.mg_drawer_cta { width: 100%; }
.mg_drawer_foot { margin-top: auto; }

/* Hero */
.mg_hero { text-align: center; }
.mg_hero_title { max-width: 20ch; margin: 0 auto 0.4em; }
.mg_hero_text { margin: 0 auto 28px; max-width: 60ch; color: var(--mg_muted); }
.mg_hero .mg_btn { margin-bottom: 8px; }

.mg_lead_word {
  font-family: var(--mg_font_head);
  font-weight: 700;
  font-size: clamp(2.6rem, 5.4vw + 0.8rem, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--mg_accent_deep);
  white-space: nowrap;
}

/* Photos */
.mg_photo {
  margin: 32px 0 0;
  padding: 10px;
  background: var(--mg_surface);
  border: 1px solid var(--mg_line);
  border-radius: 18px;
  box-shadow: var(--mg_shadow_soft);
}
.mg_photo img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
}

/* Split layout */
.mg_split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px 48px;
  align-items: start;
}
.mg_split_side > h2 { margin-bottom: 0.4em; }
.mg_split_side { color: var(--mg_muted); }
.mg_split_side h2 { color: var(--mg_text); }
.mg_split_lead { margin-bottom: 20px; }
.mg_photo_side { margin: 24px 0 0; }

/* Filter */
.mg_filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.mg_filter_btn {
  min-height: 44px;
  padding: 0 18px;
  font: 600 0.95rem var(--mg_font_body);
  color: var(--mg_text);
  background: var(--mg_surface);
  border: 1px solid var(--mg_line);
  border-radius: var(--mg_radius_btn);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.mg_filter_btn:hover { border-color: var(--mg_accent); color: var(--mg_accent_deep); }
.mg_filter_btn:focus-visible { outline: 3px solid var(--mg_plate_bg); outline-offset: 2px; }
.mg_filter_btn.is_picked {
  background: var(--mg_plate_bg);
  color: var(--mg_plate_text);
  border-color: var(--mg_plate_bg);
}
.mg_service_item.is_hidden { display: none; }

/* Service list */
.mg_service_list { list-style: none; margin: 0; padding: 0; }
.mg_service_item {
  padding: 22px 4px;
  border-bottom: 1px solid var(--mg_line);
}
.mg_service_item:first-child { border-top: 1px solid var(--mg_line); }
.mg_service_item h3 { margin-bottom: 0.3em; }
.mg_service_item p { margin-bottom: 0.5em; color: var(--mg_muted); }

/* Cards */
.mg_card {
  background: var(--mg_surface);
  border: 1px solid var(--mg_line);
  border-radius: var(--mg_radius_card);
  padding: 26px 28px;
  box-shadow: var(--mg_shadow_soft);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.mg_card:hover, .mg_card:focus-within {
  transform: translateY(-6px);
  box-shadow: var(--mg_shadow_lift);
}
.mg_card h3 { margin-bottom: 0.35em; }
.mg_card p { color: var(--mg_muted); }

/* Prices */
.mg_price_grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.mg_price_tag {
  font-size: 0.95rem;
  color: var(--mg_accent_deep);
  font-weight: 600;
}
.mg_price_note { margin-top: 24px; }

/* Steps */
.mg_steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: mg_step;
  display: grid;
  gap: 16px;
}
.mg_steps .mg_card { position: relative; padding-left: 76px; counter-increment: mg_step; }
.mg_steps .mg_card::before {
  content: counter(mg_step, decimal-leading-zero);
  position: absolute;
  left: 24px;
  top: 24px;
  font-family: var(--mg_font_head);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--mg_accent_deep);
}

/* FAQ */
.mg_qa { max-width: 760px; }
.mg_qa details {
  background: var(--mg_surface);
  border: 1px solid var(--mg_line);
  border-radius: var(--mg_radius_card);
  padding: 4px 20px;
  margin-bottom: 12px;
  transition: box-shadow 0.25s ease;
}
.mg_qa details[open] { box-shadow: var(--mg_shadow_soft); }
.mg_qa summary {
  cursor: pointer;
  font-family: var(--mg_font_head);
  font-weight: 600;
  font-size: 1.1rem;
  padding: 16px 0;
  list-style-position: outside;
}
.mg_qa summary:focus-visible { outline: 2px solid var(--mg_accent); outline-offset: 2px; }
.mg_qa p { color: var(--mg_muted); padding-bottom: 16px; }

/* Dark plate */
.mg_dark_strip {
  background: var(--mg_plate_bg);
  color: var(--mg_plate_text);
  border-radius: var(--mg_radius_card);
  padding: 32px 34px;
  box-shadow: var(--mg_shadow_soft);
}
.mg_dark_strip h3 { color: var(--mg_plate_text); }
.mg_dark_strip a { color: #D8E3B8; }
.mg_dark_strip a:hover { color: #F3F2EB; }
.mg_rule_list { margin: 0; padding-left: 1.1em; }
.mg_rule_list li { margin-bottom: 10px; }
.mg_rule_list li:last-child { margin-bottom: 0; }

/* Inquiry form */
.mg_inquiry {
  background: var(--mg_surface);
  border: 1px solid var(--mg_line);
  border-radius: var(--mg_radius_card);
  padding: 28px;
  box-shadow: var(--mg_shadow_soft);
  display: grid;
  gap: 18px;
}
.mg_inquiry_row { display: grid; gap: 6px; }
.mg_inquiry_tag { font-weight: 600; font-size: 0.95rem; }
.mg_inquiry_box, .mg_inquiry_area {
  font: 400 1rem var(--mg_font_body);
  color: var(--mg_text);
  background: var(--mg_bg);
  border: 1px solid var(--mg_line);
  border-radius: var(--mg_radius_btn);
  padding: 12px 14px;
  width: 100%;
}
.mg_inquiry_box::placeholder, .mg_inquiry_area::placeholder { color: var(--mg_muted); opacity: 1; }
.mg_inquiry_box:focus, .mg_inquiry_area:focus { outline: 2px solid var(--mg_accent); outline-offset: 1px; }
.mg_inquiry_area { resize: vertical; min-height: 120px; }
.mg_inquiry_row.is_rejected .mg_inquiry_box,
.mg_inquiry_box.is_rejected { border-color: #8C2E1F; background: #FBEFEC; }
.mg_inquiry_agree { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.mg_inquiry_agree input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--mg_accent); flex: none; }
.mg_inquiry_hint { font-size: 0.9rem; color: var(--mg_muted); }
.mg_inquiry_send { justify-self: start; }
.mg_inquiry_send.is_locked { opacity: 0.6; pointer-events: none; }

/* Footer */
.mg_bottom {
  margin-top: var(--mg_gap_block);
  background: var(--mg_plate_bg);
  color: var(--mg_plate_text);
  padding: 56px 0 32px;
}
.mg_bottom_cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.mg_bottom_brand {
  font-family: var(--mg_font_head);
  font-weight: 700;
  font-size: 1.4rem;
  margin: 0 0 8px;
}
.mg_bottom_head {
  font-size: 1.05rem;
  margin-bottom: 12px;
  color: #F3F2EB;
}
.mg_bottom_note { font-size: 0.95rem; color: #C9CCC2; }
.mg_bottom address { font-style: normal; font-size: 0.95rem; }
.mg_bottom address p { color: #C9CCC2; margin-bottom: 8px; }
.mg_bottom_links { list-style: none; margin: 0; padding: 0; }
.mg_bottom_links li { margin-bottom: 8px; }
.mg_bottom_links a, .mg_bottom_col a { color: #D8E3B8; }
.mg_bottom_links a:hover, .mg_bottom_col a:hover { color: #F3F2EB; }
.mg_bottom ul span { color: #C9CCC2; }
.mg_bottom_copy {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(243, 242, 235, 0.2);
  font-size: 0.9rem;
  color: #C9CCC2;
}

/* Prose */
.mg_reading { max-width: 760px; }
.mg_reading h2 { font-size: clamp(1.5rem, 1.6vw + 0.8rem, 2.2rem); margin-top: 1.8em; }
.mg_reading h3 { font-size: 1.25rem; margin-top: 1.5em; }
.mg_reading ol, .mg_reading ul { margin-bottom: 1.2em; }
.mg_reading li { margin-bottom: 0.4em; }
.mg_reading table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: 0.95rem;
}
.mg_reading th, .mg_reading td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--mg_line);
}
.mg_reading th { font-family: var(--mg_font_head); font-weight: 600; }
.mg_reading a { color: var(--mg_accent_deep); }

/* Inner page head, thanks, 404 */
.mg_page_top { padding-top: 48px; }
.mg_page_top h1 { max-width: 22ch; }
.mg_page_top p { color: var(--mg_muted); font-size: 1.1rem; max-width: 60ch; }

.mg_confirm {
  background: var(--mg_surface);
  border: 1px solid var(--mg_line);
  border-radius: var(--mg_radius_card);
  box-shadow: var(--mg_shadow_soft);
  padding: 40px;
  max-width: 760px;
}
.mg_confirm_links { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }

.mg_missing { text-align: center; padding: var(--mg_gap_block) 0; }
.mg_missing h1 { font-size: clamp(3.5rem, 8vw, 6rem); }

/* Gallery */
.mg_shots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.mg_shots .mg_photo { margin: 0; }
.mg_shots .mg_photo img { aspect-ratio: 4 / 3; }
.mg_shots .mg_photo:nth-child(2n) img { aspect-ratio: 1 / 1; }

/* Reveal */
html.is_live .mg_fade {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
html.is_live .mg_fade.is_shown {
  opacity: 1;
  transform: none;
}

/* Contacts block */
.mg_contact_rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.mg_contact_rows li { padding: 12px 0; border-bottom: 1px solid var(--mg_line); }
.mg_contact_rows span { display: block; font-size: 0.9rem; color: var(--mg_muted); margin-bottom: 2px; }

/* Breakpoints */
@media (min-width: 480px) {
  .mg_price_grid { grid-template-columns: repeat(2, 1fr); }
  .mg_bottom_cols { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 640px) {
  .mg_split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
  .mg_split_side { position: sticky; top: 96px; }
  .mg_shots { grid-template-columns: repeat(2, 1fr); }
  .mg_price_grid { grid-template-columns: 1fr; }
  .mg_card { min-height: 100%; }
  .mg_price_grid, .mg_steps { align-items: stretch; }
}

@media (min-width: 768px) {
  .mg_confirm_links { grid-template-columns: repeat(2, 1fr); }
  .mg_bottom_cols { grid-template-columns: repeat(4, 1fr); }
  .mg_price_grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .mg_shots { grid-template-columns: repeat(3, 1fr); }
  .mg_hero .mg_photo { margin-top: 48px; }
}

@media (min-width: 1280px) {
  .mg_wrap { padding: 0 40px; }
  .mg_topbar { max-width: 1200px; margin-left: auto; margin-right: auto; }
  .mg_price_grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

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

/* Dark strip contact data */
.mg_dark_strip address { font-style: normal; }
.mg_dark_strip address p { color: var(--mg_plate_text); }
.mg_dark_strip address span { color: #C9CCC2; }

.mg_split_body { min-width: 0; }
.mg_split_side { min-width: 0; }

/* Overlay hit safety */
.mg_drawer_veil { pointer-events: none; }
body.is_pulled .mg_drawer_veil,
.mg_drawer_veil.is_pulled { pointer-events: auto; }

/* Drawer hit safety */
.mg_drawer { pointer-events: none; }
.mg_drawer.is_pulled { pointer-events: auto; }

/* Narrow bar fit */
@media (max-width: 479px) {
  .mg_topbar { margin-left: 8px; margin-right: 8px; padding: 8px 12px; gap: 8px; }
  .mg_drawer_btn { padding: 0 10px; }
  .mg_mark { font-size: 1.15rem; }
  .mg_topbar_call { padding: 0 12px; font-size: 0.9rem; }
}

/* Toggle above overlays */
.mg_drawer_btn { position: relative; z-index: 2; }
.mg_topbar { isolation: isolate; }

@media (max-height: 600px) {
  .mg_drawer { padding: 96px 24px 24px; }
}
