/* ============================================================================
   const.bg — warm earthy design
   Palette: cream paper · deep earth ink · terracotta accent · sage · dusty rose
   Type: Cormorant Garamond display · Inter body · Caveat hand accents
   ============================================================================ */

:root {
  --paper:        #F5EFE5;       /* page background — warm cream */
  --paper-2:      #EBE3D2;       /* off-section, soft sand */
  --paper-3:      #FBF8F2;       /* card background, paler */

  --ink:          #2B1F14;       /* deep walnut ink */
  --ink-soft:     #4A3A2A;
  --ink-mute:     #8B7E6E;
  --ink-dim:      #B3A899;

  --terracotta:   #A86B4C;       /* primary accent */
  --terracotta-d: #8B5238;
  --terracotta-l: #D9A574;       /* light wash for backgrounds */

  --sage:         #8FA88C;       /* secondary accent */
  --sage-soft:    #C9D6BB;
  --rose:         #C49B92;       /* tertiary accent — dusty rose */

  --hair:         rgba(43, 31, 20, 0.10);
  --hair-2:       rgba(43, 31, 20, 0.18);

  --max:          1280px;
  --gutter:       40px;
}

/* Reset / base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
html { background: var(--paper); scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
}

/* Subtle paper texture overlay (gentle, not noisy) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.17 0 0 0 0 0.12 0 0 0 0 0.08 0 0 0 0.10 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.55;
  mix-blend-mode: multiply;
}

a { color: var(--ink); text-decoration: none; transition: color 200ms ease; }
a:hover { color: var(--terracotta); }
img, svg { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }
::selection { background: var(--terracotta); color: var(--paper-3); }

/* ============== HEADER ============== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245, 239, 229, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair);
}
/* When the mobile nav sheet is open the header has to sit above it */
body.nav-open .site-header {
  z-index: 110;
  background: var(--paper);
}
.site-header__inner {
  max-width: var(--max); margin: 0 auto;
  padding: 18px var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 24px;
  align-items: center;
}
.brand {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand__mark {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--hair-2);
  background: var(--paper-3);
  border-radius: 50%;
  padding: 7px;
  flex: 0 0 auto;
}
.brand__text {
  display: flex; flex-direction: column; line-height: 1.15;
  white-space: nowrap;
}
.brand__name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500; font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.brand__sub {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 2px;
}

.site-nav { justify-self: center; }
.site-nav ul {
  display: flex; gap: 4px;
  list-style: none;
}
.site-nav a {
  display: block;
  padding: 12px 14px;
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  position: relative;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); }
.site-nav .is-active a { color: var(--ink); }
.site-nav .is-active a::after {
  content: ""; position: absolute;
  left: 14px; right: 14px; bottom: -19px;
  height: 2px;
  background: var(--terracotta);
}

.phone-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  background: var(--terracotta);
  color: var(--paper-3) !important;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 200ms ease, transform 200ms ease;
  white-space: nowrap;
}
.phone-cta:hover { background: var(--terracotta-d); transform: translateY(-1px); }
.phone-cta svg { width: 15px; height: 15px; }

.hamburger {
  display: none;
  width: 44px; height: 44px;
  padding: 12px 10px;
  background: transparent;
  border: 1px solid var(--hair-2);
}
.hamburger span {
  display: block; width: 100%; height: 1px;
  margin: 5px 0; background: var(--ink);
  transition: transform 200ms ease, opacity 200ms ease;
}
body.nav-open .hamburger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .hamburger span:nth-child(2) { opacity: 0; }
body.nav-open .hamburger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============== TYPOGRAPHY ============== */
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 500;
  margin: 0 0 18px;
}
.eyebrow::before { content: "· "; color: var(--terracotta); }

.h1, .h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.018em;
  color: var(--ink);
  text-wrap: balance;
  margin: 0;
}
.h1 { font-size: clamp(40px, 5.6vw, 76px); line-height: 1.02; }
.h2 { font-size: clamp(30px, 4vw, 52px); line-height: 1.08; }
.h1 em, .h2 em { font-style: italic; font-weight: 500; }
.h1 .accent, .h2 .accent { color: var(--terracotta); font-style: italic; }

.lede {
  font-size: 19px; line-height: 1.65;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0;
}

.prose { max-width: 720px; }
.prose p {
  font-size: 17px; line-height: 1.78;
  color: var(--ink-soft);
  margin: 0 0 1em;
}
.prose strong { color: var(--ink); font-weight: 600; }
.prose h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500; font-size: 28px;
  line-height: 1.2; letter-spacing: -0.01em;
  color: var(--ink);
  margin: 56px 0 18px;
}
.prose ul { list-style: none; padding: 0; margin: 24px 0 32px; }
.prose ul li {
  position: relative;
  padding: 14px 0 14px 28px;
  border-bottom: 1px solid var(--hair);
  color: var(--ink-soft);
  font-size: 16px;
}
.prose ul li::before {
  content: ""; position: absolute;
  left: 0; top: 23px;
  width: 14px; height: 1px;
  background: var(--terracotta);
}

/* Hand-written annotations */
.hand {
  font-family: 'Caveat', 'Brush Script MT', cursive;
  font-weight: 500;
  color: var(--terracotta);
  font-style: normal;
}

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 30px;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  border: 0;
  transition: background 200ms ease, color 200ms ease, transform 200ms ease, border-color 200ms ease;
  text-decoration: none;
}
.btn--solid {
  background: var(--terracotta);
  color: var(--paper-3) !important;
}
.btn--solid:hover { background: var(--terracotta-d); transform: translateY(-1px); }
.btn--ink {
  background: var(--ink);
  color: var(--paper-3) !important;
}
.btn--ink:hover { background: var(--terracotta); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--ink) !important;
  border: 1px solid var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper-3) !important; }
.btn--ghost-light {
  background: transparent;
  color: var(--paper-3) !important;
  border: 1px solid rgba(251, 248, 242, 0.4);
}
.btn--ghost-light:hover { background: var(--paper-3); color: var(--ink) !important; }
.btn svg { width: 15px; height: 15px; }

/* ============== SECTIONS / LAYOUT ============== */
.section {
  max-width: var(--max); margin: 0 auto;
  padding: 96px var(--gutter);
}
.section--xl { padding: 128px var(--gutter); }
.section--sm { padding: 56px var(--gutter); }
.section--off {
  background: var(--paper-2);
  margin: 0; max-width: none;
}
.section--off .inner {
  max-width: var(--max); margin: 0 auto;
  padding: 0;
}

/* ============== HOMEPAGE HERO ============== */
.hero {
  padding: 80px var(--gutter) 96px;
  max-width: var(--max); margin: 0 auto;
  position: relative;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: clamp(40px, 5.8vw, 80px);
  line-height: 1.02; letter-spacing: -0.02em;
  margin: 0 0 28px;
}
.hero h1 em {
  font-style: italic;
  color: var(--terracotta);
  position: relative;
}
.hero h1 em::after {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 10px;
  background: var(--terracotta-l);
  opacity: 0.32;
  z-index: -1;
}
.hero p.lede {
  margin: 0 0 36px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__quote {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--terracotta-d);
  margin-top: 36px;
  display: flex; align-items: center; gap: 14px;
}
.hero__quote::before {
  content: ""; width: 32px; height: 1px; background: var(--terracotta);
}

.hero__visual {
  position: relative;
  aspect-ratio: 4/5;
  background: var(--paper-2);
}
.hero__visual::before {
  /* Top-left earth accent square */
  content: ""; position: absolute;
  top: -16px; left: -16px;
  width: 24px; height: 24px;
  background: var(--terracotta);
  z-index: 2;
}
.hero__visual-art {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.hero__visual-art svg { width: 85%; height: 85%; }
.hero__visual-quote {
  position: absolute;
  bottom: 24px; left: 24px; right: 24px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--paper-3);
  padding: 18px 22px;
  border-left: 3px solid var(--terracotta);
}

/* ============== STAT STRIP / VALUE PROPS ============== */
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.value {
  padding: 48px var(--gutter);
  border-right: 1px solid var(--hair);
}
.value:last-child { border-right: 0; }
.value__num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px; font-weight: 500;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 12px;
}
.value h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400; font-size: 28px;
  line-height: 1.15; letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: var(--ink);
}
.value p {
  font-size: 15px; line-height: 1.6;
  color: var(--ink-mute);
  margin: 0;
}

/* ============== SPLIT TWO-UP ============== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.split--image-left { grid-template-columns: 1fr 1.2fr; }
.split--image-right { grid-template-columns: 1.2fr 1fr; }
.split__media {
  aspect-ratio: 4 / 5;
  background: var(--paper-2);
  position: relative;
  overflow: hidden;
}
.split__media::before {
  content: ""; position: absolute;
  top: 16px; left: 16px;
  width: 12px; height: 12px;
  background: var(--terracotta);
  z-index: 2;
}
.split__media-art {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 12%;
}
.split__media-art svg { width: 100%; height: 100%; }

/* ============== TILES (services / categories) ============== */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hair);
  margin: 0;
}
.tile {
  background: var(--paper);
  padding: 56px 44px;
  display: flex; flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  min-height: 360px;
  transition: background 250ms ease;
  position: relative;
}
.tile:hover { background: var(--paper-3); }
.tile__num {
  font-family: 'Inter', sans-serif;
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 48px;
}
.tile h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 32px; letter-spacing: -0.01em;
  margin: 0 0 16px;
  color: var(--ink);
}
.tile p {
  font-size: 15px; line-height: 1.6;
  color: var(--ink-mute);
  margin: 0; flex: 1;
}
.tile__arrow {
  margin-top: 28px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
  transition: color 200ms ease, transform 200ms ease;
}
.tile:hover .tile__arrow { color: var(--terracotta); transform: translateX(4px); }

/* ============== TESTIMONIALS ============== */
.testimonials {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
}
.testimonial {
  background: var(--paper);
  padding: 48px 44px;
  position: relative;
}
.testimonial::before {
  content: "";
  position: absolute;
  top: 32px; left: 44px;
  width: 24px; height: 1px;
  background: var(--terracotta);
}
.testimonial blockquote {
  margin: 0 0 24px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 22px; line-height: 1.4;
  color: var(--ink);
  letter-spacing: -0.005em;
  padding-top: 40px;
}
.testimonial cite {
  font-style: normal;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-mute);
  display: block;
}

/* ============== FAQ ============== */
.faq {
  border-top: 1px solid var(--hair);
}
.faq__item {
  border-bottom: 1px solid var(--hair);
}
.faq__q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 28px 0;
  background: transparent;
  border: 0;
  text-align: left;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.005em;
  color: var(--ink);
  cursor: pointer;
  transition: color 200ms ease;
}
.faq__q:hover { color: var(--terracotta); }
.faq__q-icon {
  width: 24px; height: 24px;
  flex: 0 0 auto;
  position: relative;
  transition: transform 300ms ease;
}
.faq__q-icon::before, .faq__q-icon::after {
  content: ""; position: absolute;
  background: var(--terracotta);
}
.faq__q-icon::before {
  left: 0; right: 0; top: 50%; height: 1px; margin-top: -0.5px;
}
.faq__q-icon::after {
  top: 0; bottom: 0; left: 50%; width: 1px; margin-left: -0.5px;
  transition: transform 300ms ease;
}
.faq__item[open] .faq__q-icon::after { transform: scaleY(0); }
.faq__a {
  padding: 0 0 28px;
  font-size: 16px; line-height: 1.7;
  color: var(--ink-soft);
  max-width: 760px;
}

/* ============== PAGE HEAD (internal pages) ============== */
.page-head {
  padding: 88px var(--gutter) 64px;
  border-bottom: 1px solid var(--hair);
}
.page-head__inner {
  max-width: var(--max); margin: 0 auto;
}
.page-head h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.02; letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 24px;
  max-width: 880px;
  text-wrap: balance;
}
.page-head h1 em { font-style: italic; }
.page-head h1 em.accent { color: var(--terracotta); }
.page-head__lede {
  font-size: 19px; line-height: 1.65;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0;
}

/* ============== CONTACT ============== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
}
.contact-info {
  display: grid;
  grid-template-columns: 120px 1fr;
  border-top: 1px solid var(--hair);
}
.contact-info > * {
  padding: 18px 0;
  border-bottom: 1px solid var(--hair);
}
.contact-info .label {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
.contact-info .value { font-size: 15px; color: var(--ink); }
.contact-info .value a { color: var(--terracotta); }
.contact-info .value a:hover { color: var(--ink); }

/* ============== FORMS ============== */
.lz-form { max-width: 720px; margin: 0; }
.lz-form label {
  display: block; margin: 0 0 22px;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-mute);
}
.lz-form input, .lz-form select, .lz-form textarea {
  display: block; width: 100%;
  margin-top: 8px; padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--hair-2);
  background: transparent;
  font: 400 16px/1.5 'Inter', sans-serif;
  color: var(--ink);
}
.lz-form input:focus, .lz-form select:focus, .lz-form textarea:focus {
  outline: none; border-bottom-color: var(--terracotta);
}
.lz-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.lz-form button[type="submit"] {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 16px;
  padding: 16px 32px;
  background: var(--ink); color: var(--paper-3);
  border: 0;
  font: 600 13px/1 'Inter', sans-serif;
  letter-spacing: 0.1em; text-transform: uppercase;
  transition: background 200ms ease, transform 200ms ease, opacity 200ms ease;
  cursor: pointer;
  position: relative;
}
.lz-form button[type="submit"]:hover { background: var(--terracotta); transform: translateY(-1px); }
.lz-form button[type="submit"]:disabled,
.lz-form button[type="submit"].is-busy {
  cursor: not-allowed;
  opacity: 0.75;
  transform: none !important;
  background: var(--ink);
}

/* Spinner shown next to the label while the request is in flight */
.lz-submit-spinner {
  display: none;
  width: 14px; height: 14px;
  border: 1.6px solid rgba(251, 248, 242, 0.32);
  border-top-color: var(--paper-3);
  border-radius: 50%;
  animation: spinForm 800ms linear infinite;
}
.lz-form button.is-busy .lz-submit-spinner { display: inline-block; }
@keyframes spinForm { to { transform: rotate(360deg); } }

.lz-alert {
  padding: 18px 22px;
  margin: 0 0 32px;
  font-size: 14px; line-height: 1.5;
  border-left: 3px solid;
}
.lz-alert-success { background: var(--paper-2); color: var(--ink); border-left-color: var(--terracotta); }
.lz-alert-error   { background: #F5E6E1; color: var(--terracotta-d); border-left-color: var(--terracotta-d); }
.form-error {
  display: block; margin-top: 6px;
  color: var(--terracotta-d);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 400;
}

/* ============== STRIP CTA before footer ============== */
.strip-cta {
  background: var(--ink);
  color: var(--paper-3);
  padding: 96px var(--gutter);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.strip-cta__inner { max-width: 760px; margin: 0 auto; }
.strip-cta::before {
  content: ""; position: absolute;
  top: 32px; left: 50%; transform: translateX(-50%);
  width: 60px; height: 1px;
  background: var(--terracotta);
}
.strip-cta .eyebrow { color: var(--terracotta-l); }
.strip-cta .eyebrow::before { color: var(--terracotta-l); }
.strip-cta h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(32px, 4.6vw, 60px);
  line-height: 1.08; letter-spacing: -0.01em;
  color: var(--paper-3);
  margin: 0 0 24px;
  text-wrap: balance;
}
.strip-cta h2 em { font-style: italic; color: var(--terracotta-l); }
.strip-cta .lede {
  color: rgba(251, 248, 242, 0.75);
  margin: 0 auto 36px;
  font-size: 17px;
}
.strip-cta .actions {
  display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center;
}

/* ============== FOOTER ============== */
.site-footer {
  background: var(--paper-2);
  border-top: 1px solid var(--hair);
}
.site-footer__inner {
  max-width: var(--max); margin: 0 auto;
  padding: 80px var(--gutter) 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
}
.footer-col h4 {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 16px;
}
.footer-col p {
  font-size: 15px; line-height: 1.7;
  color: var(--ink-soft);
  margin: 0;
}
.footer-col a { color: var(--terracotta); }
.footer-col a:hover { color: var(--ink); }
.footer-links { list-style: none; }
.footer-links li { padding: 4px 0; font-size: 15px; }
.site-footer__bar {
  max-width: var(--max); margin: 0 auto;
  padding: 28px var(--gutter);
  border-top: 1px solid var(--hair);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-size: 12px;
  color: var(--ink-mute);
}
.site-footer__bar .copy {
  letter-spacing: 0.12em; text-transform: uppercase;
}

/* ============== MOTION ============== */

/* Slow background drift — gentle parallax of the noise layer */
@keyframes paperDrift {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-24px, 18px); }
}
body::before { animation: paperDrift 40s ease-in-out infinite; }

/* Reveal entrances */
.reveal {
  opacity: 0;
  transform: translateY(14px);
}
.reveal.is-in {
  animation: rise 900ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* Stagger reveal direct-children inside .reveal-stagger */
.reveal-stagger > * { opacity: 0; transform: translateY(12px); }
.reveal-stagger.is-in > * {
  animation: rise 850ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.reveal-stagger.is-in > *:nth-child(1) { animation-delay:   0ms; }
.reveal-stagger.is-in > *:nth-child(2) { animation-delay: 120ms; }
.reveal-stagger.is-in > *:nth-child(3) { animation-delay: 240ms; }
.reveal-stagger.is-in > *:nth-child(4) { animation-delay: 360ms; }
.reveal-stagger.is-in > *:nth-child(5) { animation-delay: 480ms; }
.reveal-stagger.is-in > *:nth-child(6) { animation-delay: 600ms; }

/* Hand-drawn underline that draws itself when the hero comes into view */
.hero h1 em::after {
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 1100ms cubic-bezier(0.2, 0.8, 0.2, 1) 400ms;
}
.hero.is-in h1 em::after { transform: scaleX(1); }

/* Soft float on the hero visual */
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.hero__visual { animation: floatY 9s ease-in-out infinite; }

/* Constellation diagram slowly twinkles */
@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}
.hero__visual-art svg circle:nth-child(odd)  { animation: twinkle 4.5s ease-in-out infinite; }
.hero__visual-art svg circle:nth-child(even) { animation: twinkle 6s   ease-in-out 1.2s infinite; }

/* Buttons get a tiny lift + an ink line that grows under the label on hover */
.btn { position: relative; }
.btn--ghost::after, .btn--solid::after {
  content: ""; position: absolute;
  left: 30px; right: 30px; bottom: 10px;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.4);
  transform-origin: left center;
  transition: opacity 280ms ease, transform 420ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.btn--ghost:hover::after, .btn--solid:hover::after {
  opacity: 0.6;
  transform: scaleX(1);
}

/* Phone CTA: pulse the ring once every long pause to draw the eye */
@keyframes phonePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(168, 107, 76, 0); }
  10%      { box-shadow: 0 0 0 0 rgba(168, 107, 76, 0.45); }
  40%      { box-shadow: 0 0 0 14px rgba(168, 107, 76, 0); }
}
.phone-cta {
  animation: phonePulse 6s ease-in-out infinite;
}

/* Tile hover: small terracotta corner indicator slides in */
.tile {
  position: relative;
  overflow: hidden;
  transition: background 280ms ease;
}
.tile::before {
  content: ""; position: absolute;
  top: 0; left: 0;
  width: 0; height: 3px;
  background: var(--terracotta);
  transition: width 420ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tile:hover::before { width: 100%; }
.tile h3 { transition: transform 380ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.tile:hover h3 { transform: translateX(4px); }

/* Service split images: subtle drift inside the frame on scroll */
.split__media {
  overflow: hidden;
  transition: transform 600ms ease;
}
.split__media-art {
  transition: transform 1200ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.split:hover .split__media-art,
.split.is-in .split__media-art {
  transform: scale(1.02);
}

/* Testimonial cards: rise on hover with a side accent */
.testimonial {
  transition: background 280ms ease;
  position: relative;
}
.testimonial:hover { background: var(--paper-3); }
.testimonial::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--terracotta);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 380ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.testimonial:hover::after { transform: scaleY(1); }

/* FAQ open animation - smooth height transition via grid trick */
.faq__item .faq__a {
  display: grid;
  grid-template-rows: 1fr;
  overflow: hidden;
  transition: grid-template-rows 350ms ease, opacity 250ms ease;
}
/* Native <details> doesn't allow CSS transitions on its content, so we
   animate the icon and a small slide on the question instead. */
.faq__q { transition: color 200ms ease, padding-left 280ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.faq__item[open] .faq__q { color: var(--terracotta); padding-left: 10px; }

/* Eyebrow lines animate their pseudo-content in on reveal */
.eyebrow::before {
  display: inline-block;
  transform: translateX(-4px);
  opacity: 0;
  animation: slideRight 600ms ease forwards 200ms;
}
@keyframes slideRight {
  to { transform: none; opacity: 1; }
}

/* Footer link hover: terracotta wipe underline */
.footer-links a {
  position: relative;
  display: inline-block;
  padding: 2px 0;
}
.footer-links a::after {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--terracotta);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 320ms ease;
}
.footer-links a:hover::after { transform: scaleX(1); }

/* Strip CTA: top hairline draws in on enter */
.strip-cta::before {
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 800ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.strip-cta.is-in::before { transform: translateX(-50%) scaleX(1); }

/* Smooth scroll for anchor links (services.php#individual, etc.) */
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
  .hero h1 em::after { transform: scaleX(1) !important; }
}

/* ============== RESPONSIVE ============== */
@media (max-width: 1080px) {
  .site-nav { display: none !important; }
  .hamburger { display: block !important; position: relative; z-index: 110; }

  /* Mobile nav opens as a full-viewport sheet. Use !important throughout
     because the desktop .site-nav rules (display, layout) are written above
     this media query and we want to be unambiguous. */
  body.nav-open {
    overflow: hidden !important;
    /* On iOS Safari, just `overflow:hidden` on body isn't enough - position
       fixed below scrolls; this width pin prevents layout jump. */
  }
  body.nav-open .site-nav {
    display: block !important;
    position: fixed !important;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    background: var(--paper) !important;
    z-index: 105 !important;
    padding: 84px 0 40px !important;
    margin: 0 !important;
    justify-self: auto !important;
    overflow-y: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    animation: navSlide 260ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  @keyframes navSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: none; }
  }
  body.nav-open .site-nav ul {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--hair);
  }
  body.nav-open .site-nav li {
    width: 100%;
    border-bottom: 1px solid var(--hair);
    float: none !important;
  }
  body.nav-open .site-nav a {
    display: block !important;
    padding: 22px 24px !important;
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 22px !important;
    font-weight: 400 !important;
    letter-spacing: -0.005em !important;
    color: var(--ink) !important;
    text-transform: none !important;
  }
  body.nav-open .site-nav .is-active a::after { display: none !important; }
  body.nav-open .site-nav .is-active a {
    color: var(--terracotta) !important;
    font-style: italic;
  }
}

@media (max-width: 900px) {
  :root { --gutter: 22px; }

  /* ----- Header ----- */
  .site-header__inner { grid-template-columns: 1fr auto auto; gap: 10px; padding: 14px var(--gutter); }
  .brand__sub { display: none; }
  .brand__name { font-size: 17px; }
  .brand__mark { width: 40px; height: 40px; padding: 6px; }
  .phone-cta span { display: none; }
  .phone-cta { padding: 10px 13px; }
  .phone-cta svg { width: 16px; height: 16px; }

  /* ----- Sections ----- */
  .section, .section--xl, .section--sm { padding: 60px var(--gutter); }
  .section--xl { padding: 80px var(--gutter); }

  /* ----- Hero: stack vertically, visual BELOW text, no absolute overlays ----- */
  .hero { padding: 40px var(--gutter) 60px; }
  .hero__grid { grid-template-columns: 1fr !important; gap: 36px; }
  .hero h1 { font-size: clamp(34px, 9vw, 48px); margin-bottom: 22px; }
  .hero p.lede { font-size: 17px; margin-bottom: 28px; }
  .hero__quote { font-size: 19px; margin-top: 28px; }
  .hero__actions { gap: 10px; }
  .hero__actions .btn { padding: 14px 22px; font-size: 12px; }

  .hero__visual {
    aspect-ratio: auto !important;
    max-width: none; margin: 0;
    background: var(--paper-2);
    padding: 28px 22px 0;
  }
  .hero__visual::before { display: none; }
  .hero__visual-art {
    position: static !important;
    inset: auto;
    width: 100%;
    height: 240px;
    padding: 0;
  }
  .hero__visual-art svg { width: 200px; height: 200px; margin: 0 auto; }
  .hero__visual-quote {
    position: static !important;
    inset: auto;
    margin: 24px 0 0;
    padding: 16px 18px;
    font-size: 15px;
  }

  /* ----- Values ----- */
  .values { grid-template-columns: 1fr; }
  .value { border-right: 0; border-bottom: 1px solid var(--hair); padding: 36px var(--gutter); }
  .value:last-child { border-bottom: 0; }
  .value h3 { font-size: 24px; }

  /* ----- Split sections ----- */
  .split, .split--image-left, .split--image-right { grid-template-columns: 1fr !important; gap: 36px; }
  .split__media {
    max-width: 100%;
    width: 100%;
    margin: 0;
    aspect-ratio: 5/4;
  }
  .split__media-art { padding: 8%; }

  /* ----- Tiles ----- */
  .tiles { grid-template-columns: 1fr; }
  .tile { min-height: auto; padding: 36px 24px; }
  .tile h3 { font-size: 26px; }
  .tile__num { margin-bottom: 24px; }

  /* ----- Testimonials ----- */
  .testimonials { grid-template-columns: 1fr; }
  .testimonial { padding: 36px 24px; }
  .testimonial blockquote { font-size: 19px; padding-top: 28px; }
  .testimonial::before { left: 24px; top: 28px; }

  /* ----- Forms / contact ----- */
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .lz-form .row { grid-template-columns: 1fr; gap: 0; }
  .contact-info { grid-template-columns: 100px 1fr; }

  /* ----- Page heads ----- */
  .page-head { padding: 48px var(--gutter) 36px; }
  .page-head h1 { font-size: clamp(32px, 8vw, 48px); }
  .page-head__lede { font-size: 17px; }

  /* ----- Strip CTA ----- */
  .strip-cta { padding: 60px var(--gutter); }
  .strip-cta h2 { font-size: clamp(28px, 7vw, 40px); }
  .strip-cta .actions { width: 100%; flex-direction: column; }
  .strip-cta .actions .btn { width: 100%; justify-content: center; }

  /* ----- Footer ----- */
  .site-footer__inner { grid-template-columns: 1fr 1fr; gap: 28px; padding: 48px var(--gutter) 32px; }
  .site-footer__bar { flex-direction: column; align-items: flex-start; padding: 18px var(--gutter); font-size: 11px; }

  /* ----- FAQ ----- */
  .faq__q { font-size: 19px; padding: 22px 0; gap: 14px; }
  .faq__a { font-size: 15px; padding-bottom: 22px; }
}

@media (max-width: 480px) {
  :root { --gutter: 18px; }
  .brand__name { font-size: 15px; }
  .brand__mark { width: 36px; height: 36px; }
  .phone-cta { padding: 9px 11px; }
  .hamburger { width: 40px; height: 40px; padding: 11px 9px; }

  .hero h1 { font-size: clamp(28px, 9vw, 36px); }
  .hero__visual-art { height: 200px; }
  .hero__visual-art svg { width: 160px; height: 160px; }
  .hero__quote { font-size: 17px; }

  .h2 { font-size: clamp(26px, 7vw, 32px); }
  .lede { font-size: 16px; }

  .tile { padding: 30px 20px; }
  .tile h3 { font-size: 22px; }
  .testimonial { padding: 30px 20px; }
  .testimonial blockquote { font-size: 17px; }

  .site-footer__inner { grid-template-columns: 1fr; gap: 24px; }
  .contact-info { grid-template-columns: 90px 1fr; }
  .contact-info > * { padding: 14px 0; }
}

@media (max-width: 480px) {
  .h1 { font-size: clamp(28px, 9vw, 40px); }
  .hero h1 { font-size: clamp(30px, 9vw, 44px); }
  .brand__mark { width: 38px; height: 38px; padding: 6px; }
  .brand__name { font-size: 16px; }
  .phone-cta { padding: 10px 12px; font-size: 12px; }
  .site-footer__inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================================
   PHOTO MEDIA inside split sections
   ============================================================================ */
.split__media--photo {
  overflow: hidden;
  background: var(--paper-2);
}
.split__media--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.95) contrast(1.02);
  transition: transform 800ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 500ms ease;
}
.split:hover .split__media--photo img,
.split.is-in .split__media--photo img {
  transform: scale(1.03);
}
.split__media--photo:hover img {
  filter: saturate(1.05) contrast(1.05);
}

/* ============================================================================
   PROCESS SECTION (Index page, "Как работи")
   ============================================================================ */
.process {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
  counter-reset: process-step;
}
.process__step {
  display: grid;
  grid-template-columns: 80px 1fr 96px;
  align-items: center;
  gap: 36px;
  padding: 32px 0;
  border-top: 1px solid var(--hair);
  position: relative;
}
.process__step:last-child { border-bottom: 1px solid var(--hair); }

.process__num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 38px;
  font-style: italic;
  font-weight: 500;
  color: var(--terracotta);
  line-height: 1;
}
.process__body h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 26px;
  color: var(--ink);
  margin: 0 0 8px;
  letter-spacing: -0.005em;
  line-height: 1.2;
}
.process__body p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0;
  max-width: 580px;
}
.process__art {
  width: 96px;
  height: 96px;
  border: 1px solid var(--hair-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  justify-self: end;
  transition: border-color 280ms ease, transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.process__step:hover .process__art {
  border-color: var(--terracotta);
  transform: rotate(-3deg);
}
.process__art svg {
  width: 60%;
  height: 60%;
}

@media (max-width: 720px) {
  .process__step {
    grid-template-columns: 56px 1fr;
    gap: 18px;
    padding: 24px 0;
  }
  .process__num { font-size: 28px; }
  .process__body h3 { font-size: 22px; }
  .process__body p { font-size: 15px; }
  .process__art {
    grid-column: 1 / -1;
    width: 64px; height: 64px;
    justify-self: start;
    margin-top: -8px;
  }
}

/* ============================================================================
   DYNAMIC PHOTO GALLERY (masonry-style with hover)
   ============================================================================ */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 10px;
  margin: 32px 0 0;
}
.photo-gallery__item {
  overflow: hidden;
  position: relative;
  background: var(--paper-2);
  cursor: pointer;
  transition: transform 400ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.photo-gallery__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92) contrast(1.02);
  transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 500ms ease;
}
.photo-gallery__item::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(43, 31, 20, 0.55) 100%);
  z-index: 1;
  opacity: 0;
  transition: opacity 400ms ease;
}
.photo-gallery__item:hover { transform: translateY(-3px); }
.photo-gallery__item:hover img {
  transform: scale(1.06);
  filter: saturate(1.05) contrast(1.06);
}
.photo-gallery__item:hover::before { opacity: 1; }
.photo-gallery__caption {
  position: absolute;
  bottom: 14px; left: 16px; right: 16px;
  z-index: 2;
  color: var(--paper-3);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 17px;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 400ms ease 100ms, transform 400ms ease 100ms;
}
.photo-gallery__item:hover .photo-gallery__caption {
  opacity: 1;
  transform: translateY(0);
}

/* Masonry-like sizes: feature items take 2x in a 4-col grid */
.photo-gallery__item--w2 { grid-column: span 2; }
.photo-gallery__item--h2 { grid-row: span 2; }
.photo-gallery__item--w2h2 { grid-column: span 2; grid-row: span 2; }

/* Stagger reveal for gallery */
.photo-gallery.reveal-stagger.is-in > * {
  animation: rise 850ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.photo-gallery.reveal-stagger.is-in > *:nth-child(1) { animation-delay:   0ms; }
.photo-gallery.reveal-stagger.is-in > *:nth-child(2) { animation-delay:  80ms; }
.photo-gallery.reveal-stagger.is-in > *:nth-child(3) { animation-delay: 160ms; }
.photo-gallery.reveal-stagger.is-in > *:nth-child(4) { animation-delay: 240ms; }
.photo-gallery.reveal-stagger.is-in > *:nth-child(5) { animation-delay: 320ms; }
.photo-gallery.reveal-stagger.is-in > *:nth-child(6) { animation-delay: 400ms; }
.photo-gallery.reveal-stagger.is-in > *:nth-child(7) { animation-delay: 480ms; }

@media (max-width: 900px) {
  .photo-gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }
  .photo-gallery__item--w2,
  .photo-gallery__item--w2h2 { grid-column: span 2; }
  .photo-gallery__item--h2 { grid-row: auto; }
  .photo-gallery__item--w2h2 { grid-row: span 2; }
}
@media (max-width: 540px) {
  .photo-gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }
  .photo-gallery__item,
  .photo-gallery__item--w2,
  .photo-gallery__item--h2,
  .photo-gallery__item--w2h2 {
    grid-column: auto;
    grid-row: auto;
  }
}
