/* ==========================================================================
   United Signature — Redmond kitchen remodeling theme.
   Section background/text/accent colors come from the engine's per-scheme
   inline <style> (bc_render_scheme_css), driven by bc_theme_palette() +
   Settings. This file handles layout, typography and chrome (header/footer).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@300;400;500;600&display=swap');

:root {
  --max: 1240px;
  --gutter: clamp(18px, 4vw, 56px);
  --accent: #5E7A2E;       /* chrome accent (header/footer); sections use scheme accent */
  --ink: #1F2616;
  --muted: #646B58;
  --paper: #ffffff;
  --rule: #E5E8DD;
  --sans: 'Archivo', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: 'Archivo', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* --- Layout containers --- */
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding-inline: var(--gutter); }
main section { padding-block: clamp(48px, 8vw, 110px); }

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.1; letter-spacing: -.015em; margin: 0 0 .4em; }
.display { font-size: clamp(40px, 7vw, 72px); font-weight: 400; }
.section-title { font-size: clamp(30px, 4.5vw, 48px); font-weight: 400; }
.section-title em, .display em { font-style: italic; color: var(--accent); }
p { margin: 0 0 1em; }
.lede { font-size: clamp(18px, 2.2vw, 23px); color: var(--muted); max-width: 60ch; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); }

/* --- Buttons --- */
.btn {
  display: inline-block; padding: 13px 24px; border: 1px solid var(--accent);
  color: var(--accent); background: transparent; text-decoration: none;
  font-size: 14px; letter-spacing: .04em; border-radius: 3px;
  transition: background .15s ease, color .15s ease;
}
.btn:hover { background: var(--accent); color: #fff; }
/* Solid button = brand lime with dark text. !important overrides the engine's
   per-scheme `.scheme .btn{color:accent}` rule (which would otherwise make the
   label the same green as the fill → invisible text). */
.btn-primary { background: #95B949 !important; color: #1A220C !important; border-color: #95B949 !important; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; }

/* --- Header (dark, like unitedsignature.com) --- */
.site-header { background: #1A220C; border-bottom: 1px solid #2f3d1d; position: sticky; top: 0; z-index: 50; }
.site-header__inner { display: flex; align-items: center; gap: 28px; min-height: 70px; }
.brand { text-decoration: none; font-family: var(--serif); font-size: 22px; font-weight: 600; color: #fff; }
.brand__text { color: #fff; }
.brand__text em { font-style: italic; color: #95B949; }
.brand__logo { max-height: 40px; width: auto; }
.nav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.nav a { text-decoration: none; font-size: 15px; color: #E9EEDD; opacity: .9; }
.nav a:hover { opacity: 1; color: #95B949; }
.site-header__cta { margin-left: 8px; }

/* --- Hero --- */
.hero .lede { margin-top: 20px; }
.hero__ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }

/* --- Features --- */
.features { display: grid; gap: 28px; margin-top: 44px; }
.feature .num { font-family: var(--serif); font-size: 28px; color: var(--accent); margin-bottom: 10px; }
.feature__title { font-size: 20px; margin: 0 0 .3em; }
.feature__desc { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .features { grid-template-columns: 1fr !important; } }

/* --- Prose --- */
.prose .wrap-narrow > * { margin-bottom: 1em; }
.prose h2 { font-size: clamp(26px, 3.5vw, 40px); margin-top: 1.2em; }
.prose h3 { font-size: 22px; margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose blockquote { margin: 1.4em 0; padding-left: 20px; border-left: 3px solid var(--accent); color: var(--muted); font-style: italic; }
.prose a { color: var(--accent); }

/* --- CTA band --- */
.cta-band .lede { margin: 18px auto 30px; }

/* --- Footer (dark, four columns — matches source) --- */
.site-footer { background: #222B17; color: #a9b598; padding: 60px 0 36px; margin-top: 0; }
.site-footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 42px; border-bottom: 1px solid #38462a; }
.site-footer__logo { height: 50px; width: auto; display: block; margin-bottom: 18px; }
.site-footer .muted { color: #a9b598; font-size: 14px; line-height: 1.65; max-width: 300px; }
.site-footer__phone { display: inline-block; margin-top: 14px; font-size: 23px; color: #fff; text-decoration: none; }
.site-footer__h { color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 18px; }
.site-footer__col { display: flex; flex-direction: column; gap: 11px; }
.site-footer__col a { text-decoration: none; color: #a9b598; font-size: 14px; }
.site-footer__col a:hover { color: #fff; }
.site-footer__news { display: flex; gap: 8px; margin-top: 14px; max-width: 300px; }
.site-footer__news input { flex: 1; min-width: 0; background: transparent; border: 1px solid #3c4a2c; color: #fff; padding: 11px 12px; font: inherit; font-size: 13px; outline: none; }
.site-footer__news .btn-primary { padding: 11px 18px; font-size: 13px; }

/* --- Editable image backgrounds (bc_edit_image / data-edit-bg) --- */
.bc-bg-host { position: relative; }
.page-head__bg { position: absolute; inset: 0; background-position: center center; background-size: cover; background-repeat: no-repeat; z-index: 0; }
.page-head__overlay { position: absolute; inset: 0; background: rgba(20,26,12,var(--bg-overlay,0)); z-index: 1; pointer-events: none; }

/* Native <details> accordions used by the FAQ block (matches source) */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* Interior content section (prosewide) — 1:1 typography from source */
.prosewide > h2 { font-weight: 400; font-size: 32px; letter-spacing: -.01em; margin: 0 0 16px; color: #1F2616; }
.prosewide > h3 { font-weight: 400; font-size: 24px; margin: 0 0 12px; color: #1F2616; }
.prosewide p { font-size: 16.5px; line-height: 1.72; color: #3c4433; margin: 0 0 16px; }
.prosewide ul, .prosewide ol { font-size: 16.5px; line-height: 1.72; color: #3c4433; padding-left: 1.3em; margin: 0 0 16px; }
.prosewide a { color: #5E7A2E; }
.prosewide > :last-child { margin-bottom: 0; }

/* Home: keep the fixed 1440 design centered, and clip any horizontal overflow
   at the viewport so the page never scrolls sideways (which would push the
   admin block "+" inserter off-center). overflow-x:clip is per-axis (no vertical
   scroll side effects) and lives on main, away from the sticky header. */
.home-canvas { width: 1440px; max-width: 100%; margin: 0 auto; }
main { overflow-x: clip; }

/* Admin editing view only (body has data-document-slug): the home sections sit
   flush, so the engine's block "+" inserter (which straddles the boundary) would
   overlap tight content. Give it a real, clean gap so "+" is centered in empty
   space between blocks. Guests have no data-document-slug → 1:1 layout untouched. */
body[data-document-slug] .home-canvas > .bc-block-inserter { margin: 0; height: 46px; }
.site-footer__bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; font-size: 13px; color: #7e8c6c; }
.muted { color: var(--muted); }
@media (max-width: 860px) { .site-footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .nav { display: none; } }
@media (max-width: 600px) { .site-footer__top { grid-template-columns: 1fr; } }

/* --- Hero with side image --- */
.hero--split .hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 56px); align-items: center; }
.hero__media { overflow: hidden; }
.hero__media img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; display: block; }
@media (max-width: 860px) { .hero--split .hero__inner { grid-template-columns: 1fr; } .hero__media img { max-height: 360px; } }

/* --- Feature cards with images --- */
.feature--media { background: var(--paper); border: 1px solid var(--rule); }
.feature--media .feature__media { aspect-ratio: 4 / 3; overflow: hidden; }
.feature--media .feature__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature--media .feature__title { font-size: 19px; margin: 16px 20px 6px; }
.feature--media .feature__desc { margin: 0 20px 20px; font-size: 14px; }

/* --- Standalone image block --- */
.image-block .wrap { max-width: var(--max); }
.image-block__fig { margin: 0; }
.image-block__fig img { width: 100%; max-height: 460px; object-fit: cover; display: block; }
.image-block__fig figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }
.image-block__placeholder { padding: 40px; border: 1px dashed var(--rule); text-align: center; color: var(--muted); }

/* --- Top announcement bar --- */
.promo-bar { background: #222B17; color: #E9EEDD; font-size: 13px; text-align: center; padding: 11px 24px; letter-spacing: .01em; }
.promo-bar a { color: #E9EEDD; }
.promo-bar__hl { color: #95B949; font-weight: 600; }
@media (max-width: 600px) { .promo-bar { font-size: 12px; } }

/* --- Breadcrumb (aligned with section content inside the page canvas) --- */
.breadcrumb { padding: 18px 56px 0; font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 8px; }

/* Tighten hero top so it sits closer under the header/breadcrumb (matches source) */
.hero { padding-top: clamp(22px, 3vw, 40px); }

/* ====================================================================
   RESPONSIVE. The source was a fixed 1440px canvas (no mobile), so the
   block inline-styles are adapted here via !important overrides.
   ==================================================================== */

/* ---- Header: wrap + keep nav visible on small screens ---- */
@media (max-width: 860px) {
  .site-header__inner { flex-wrap: wrap; gap: 10px 18px; min-height: 0; padding-block: 12px; }
  .brand { margin-right: auto; }
  .site-header__cta { margin-left: 0; }
  .nav { display: flex !important; order: 3; width: 100%; gap: 8px 16px; margin-left: 0; font-size: 14px; }
  .nav a { opacity: 1; }
}

/* ---- Tablet / large phone ---- */
@media (max-width: 1000px) {
  /* section side padding */
  main section { padding-left: clamp(16px, 4.5vw, 44px) !important; padding-right: clamp(16px, 4.5vw, 44px) !important; }
  /* inner full-bleed bands (lime CTA / process soft card) */
  main section > div[style*="padding:60px 56px"] { padding: 38px 26px !important; }
  main section > div[style*="padding:54px 48px"] { padding: 40px 24px !important; }
  /* two-column hero / split layouts → stack */
  main [style*="grid-template-columns:1.02fr"],
  main [style*="grid-template-columns:1.05fr"],
  main [style*="grid-template-columns:1.4fr"],
  main [style*="grid-template-columns:1fr 1fr"][style*="gap:60px"] { grid-template-columns: 1fr !important; gap: 32px !important; }
  /* right-aligned intro text → left */
  main [style*="text-align:right"] { text-align: left !important; }
  /* space-between header rows / bands → stack (divs only — keep FAQ <summary> as a row) */
  main section div[style*="justify-content:space-between"] { flex-direction: column !important; align-items: flex-start !important; gap: 22px !important; }
  /* card grids → 2 columns */
  main [style*="repeat(4,1fr)"],
  main [style*="repeat(5,1fr)"],
  main [style*="repeat(3,1fr)"] { grid-template-columns: 1fr 1fr !important; gap: 16px !important; }
  /* photos shorter */
  .bc-bg-host[style*="height:520px"], .bc-bg-host[style*="height:480px"] { height: 360px !important; }
  .bc-bg-host[style*="min-height:420px"] { min-height: 300px !important; }
  /* hero floating "free session" card → flow under the photo */
  main [style*="position:absolute"][style*="width:258px"] { position: static !important; left: auto !important; bottom: auto !important; width: auto !important; margin-top: 14px !important; box-shadow: 0 14px 34px -20px rgba(31,38,22,.4) !important; }
}

/* ---- Phone ---- */
@media (max-width: 600px) {
  main h1[style] { font-size: clamp(30px, 8.5vw, 46px) !important; line-height: 1.1 !important; }
  main h2[style] { font-size: clamp(23px, 7vw, 34px) !important; }
  /* everything single column */
  main [style*="repeat(4,1fr)"],
  main [style*="repeat(5,1fr)"],
  main [style*="repeat(3,1fr)"],
  main [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  /* hero stats strip: reduce the left padding on cols 2-3 */
  main [style*="border-top:1px solid var(--line,#E5E8DD); border-bottom"] > div { padding-left: 16px !important; }
  /* photos */
  .bc-bg-host[style*="height:520px"], .bc-bg-host[style*="height:480px"] { height: 240px !important; }
  .bc-bg-host[style*="height:360px"] { height: 200px !important; }
  .bc-bg-host[style*="min-height:420px"], .bc-bg-host[style*="min-height:201px"] { min-height: 190px !important; }
  /* CTA buttons full width */
  main section > div[style*="padding:60px 56px"] a { width: 100%; text-align: center; box-sizing: border-box; justify-content: center; }
  /* prosewide / faq comfortable */
  .prosewide { padding-top: 22px !important; padding-bottom: 22px !important; }
}

/* ===== Media backgrounds: slow-zoom / video / slide (ported from core blocks.css) ===== */
/* Slow zoom-loop эффект — медленное «дыхание» статичной hero-картинки.
 * Cinema-style luxury feel: 20s полный цикл, zoom от 1.0 до 1.08, infinite,
 * ease-in-out (плавно в обе стороны). Активируется через media.zoom_loop=true. */
@keyframes bc-bg-zoom-loop {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
.page-head__bg--zoom {
  animation: bc-bg-zoom-loop 20s ease-in-out infinite;
  transform-origin: center;
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .page-head__bg--zoom { animation: none; }
}

/* Video background — одно видео в фоне (autoplay+muted+loop+playsinline) */
.page-head__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #0a0a0c;
  pointer-events: none; /* чтобы admin-controls и links на странице кликались поверх */
}

/* Slide-track background — одно/несколько фоновых картинок с fade-cycling */
.page-head__slide-track {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.page-head__slide-item {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity .8s ease-in-out;
}
.page-head__slide-item.is-active {
  opacity: 1;
}

/* Все слайды hero — <picture>+<img> (не CSS background) чтобы webp подбирался надёжно
   через <source srcset>. <picture> сам по себе не имеет layout — используем display:contents
   чтобы он "исчез" и <img> позиционировался как direct child slide-item.
   Img растягивается на весь slide-item с object-fit:cover (как был background-size:cover). */
.page-head__slide-item picture { display: contents; }
.page-head__slide-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Transition: fade-through-black — старый кадр fade-out до 0, новый fade-in.
 * Реализуется через более длинную transition с задержкой при появлении нового.
 * Crossfade (default) — оба item'а transitionятся одновременно, пересекаясь. */
.page-head__slide-track[data-transition="fade-through"] .page-head__slide-item {
  transition: opacity 1.2s ease-in-out;
}
.page-head__slide-track[data-transition="fade-through"] .page-head__slide-item.is-active {
  /* Новый кадр ждёт пока старый угаснет, потом плавно появляется */
  transition: opacity 1.2s ease-in-out 0.7s;
}

/* Motion: slow zoom (Ken Burns) для активного слайда.
 *
 * Используем transition (не animation) — это даёт плавный возврат transform'а
 * к initial state ВО ВРЕМЯ fade-out старого слайда. С animation на .is-active
 * transform сбрасывался мгновенно при removal класса, и юзер видел "прыжок"
 * до того как opacity полностью угаснет.
 *
 * Длительность 12s — заведомо длиннее интервала. Reverse-transform во время
 * 0.8s opacity-fadeout проходит ~7% обратно (~0.007 scale-разницы) — глазу
 * незаметно, но визуально transform всегда "стабилен", без скачков. */
.page-head__slide-track[data-motion]:not([data-motion="none"]) .page-head__slide-item {
  transition: opacity .8s ease-in-out, transform 12s ease-out;
  will-change: transform;
}
.page-head__slide-track[data-transition="fade-through"][data-motion]:not([data-motion="none"]) .page-head__slide-item {
  transition: opacity 1.2s ease-in-out, transform 12s ease-out;
}
.page-head__slide-track[data-transition="fade-through"][data-motion]:not([data-motion="none"]) .page-head__slide-item.is-active {
  transition: opacity 1.2s ease-in-out 0.7s, transform 12s ease-out;
}

/* Zoom in — все слайды одинаково от 1.00 → 1.10, transform-origin центр */
.page-head__slide-track[data-motion="zoom-in"] .page-head__slide-item {
  transform: scale(1.00);
}
.page-head__slide-track[data-motion="zoom-in"] .page-head__slide-item.is-active {
  transform: scale(1.10);
}

/* Zoom out — от 1.10 → 1.00, transform-origin центр */
.page-head__slide-track[data-motion="zoom-out"] .page-head__slide-item {
  transform: scale(1.10);
}
.page-head__slide-track[data-motion="zoom-out"] .page-head__slide-item.is-active {
  transform: scale(1.00);
}

/* Mixed (Ken Burns) — чередуем zoom-in / zoom-out с разными origin'ами:
 *   1: zoom-in   от центра
 *   2: zoom-out  от верх-лево
 *   3: zoom-in   от верх-право
 *   4: zoom-out  от низ-право
 * Состояние БЕЗ .is-active = "from"-кадр, состояние С .is-active = "to"-кадр.
 * Transform 12s → плавный переход между ними; transition уже задан выше. */

/* 1: zoom-in от центра */
.page-head__slide-track[data-motion="mixed"] .page-head__slide-item:nth-child(4n+1) {
  transform: scale(1.00);
  transform-origin: center center;
}
.page-head__slide-track[data-motion="mixed"] .page-head__slide-item:nth-child(4n+1).is-active {
  transform: scale(1.12);
}

/* 2: zoom-out от верх-лево */
.page-head__slide-track[data-motion="mixed"] .page-head__slide-item:nth-child(4n+2) {
  transform: scale(1.12);
  transform-origin: 20% 20%;
}
.page-head__slide-track[data-motion="mixed"] .page-head__slide-item:nth-child(4n+2).is-active {
  transform: scale(1.00);
}

/* 3: zoom-in от верх-право */
.page-head__slide-track[data-motion="mixed"] .page-head__slide-item:nth-child(4n+3) {
  transform: scale(1.00);
  transform-origin: 80% 20%;
}
.page-head__slide-track[data-motion="mixed"] .page-head__slide-item:nth-child(4n+3).is-active {
  transform: scale(1.12);
}

/* 4: zoom-out от низ-право */
.page-head__slide-track[data-motion="mixed"] .page-head__slide-item:nth-child(4n+4) {
  transform: scale(1.12);
  transform-origin: 80% 80%;
}
.page-head__slide-track[data-motion="mixed"] .page-head__slide-item:nth-child(4n+4).is-active {
  transform: scale(1.00);
}

/* Reduced motion — отключаем transition для transform */
@media (prefers-reduced-motion: reduce) {
  .page-head__slide-track[data-motion]:not([data-motion="none"]) .page-head__slide-item {
    transform: none !important;
    transition: opacity .8s ease-in-out;
  }
}

/* ============================================================
   Mobile nav: header hamburger + footer accordion
   ============================================================ */

/* --- base (desktop): hidden controls, links wrapper --- */
.site-footer__links { display: flex; flex-direction: column; gap: 11px; }
.site-footer__col { gap: 0; }

.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 40px; padding: 0; margin: 0;
  background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px; margin: 0 auto; background: #E9EEDD;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav { display: none; flex-direction: column; padding: 6px 0 14px; }
.mobile-nav a { color: #E9EEDD; text-decoration: none; font-size: 16px; padding: 13px 2px; border-bottom: 1px solid rgba(255,255,255,.07); }
.mobile-nav a:hover { color: #95B949; }
.mobile-nav a.btn { padding: 13px 18px; border-bottom: 0; }
.mobile-nav__phone { font-size: 21px !important; color: #fff !important; font-weight: 500; border-bottom: 0 !important; }
.mobile-nav__cta { margin-top: 14px; text-align: center; }

/* --- mobile (<=860): swap desktop nav for hamburger --- */
@media (max-width: 860px) {
  .nav { display: none !important; }
  .site-header__cta { display: none !important; }
  .nav-toggle { display: flex; margin-left: auto; }
  .mobile-nav { order: 5; width: 100%; }
  .mobile-nav.is-open { display: flex; }
}

/* --- footer accordion (<=600): tap heading to expand --- */
@media (max-width: 600px) {
  .site-footer__col, .site-footer__visit { border-top: 1px solid #38462a; }
  .site-footer__h[data-accordion] {
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; user-select: none; margin-bottom: 0; padding: 16px 0;
  }
  .site-footer__h[data-accordion]::after { content: '+'; font-size: 21px; font-weight: 400; line-height: 1; color: #a9b598; }
  .site-footer__h[data-accordion].is-open::after { content: '\2013'; }
  .site-footer__links { display: none; padding-bottom: 16px; }
  .site-footer__h[data-accordion].is-open + .site-footer__links { display: flex; }
}
