/* ═══════════════════════════════════════════════════════════
   INSPIRA RANCH · POLISH LAYER (Nov 2026)
   Loaded last on every page. Small finishing details only:
   scrolling, motion, focus, edges, type rhythm, readability.
   No layout changes to existing components.
   ═══════════════════════════════════════════════════════════ */

/* ── Scrolling ─────────────────────────────────────────── */
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
@media (max-width: 1024px) { html { scroll-padding-top: 76px; } }
html, body { overflow-x: clip; }
html { scrollbar-color: #8C7B62 #EFE7DA; }
[id] { scroll-margin-top: 96px; }

/* ── Type rhythm and readability ───────────────────────── */
body { text-rendering: optimizeLegibility; font-kerning: normal; }
h1, h2, h3 { text-wrap: balance; }
p, li, dd, blockquote { text-wrap: pretty; }
main p, article p, section p { hyphens: manual; }
::selection { background: #E8D9B8; color: #2E2620; }

/* Long-form pages (policies, posts, about): comfortable line length */
.legal-content p, .legal-content li, .policy-content p, .policy-content li,
.post-content p, .post-content li, .post-body p, .post-body li, article.post p, article.post li {
  max-width: 72ch; line-height: 1.8;
}
.legal-content h2, .policy-content h2, .post-content h2, .post-body h2 { margin-top: 2.2em; }

/* ── Focus: visible, on-brand, never removed ───────────── */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid #C9A45C !important; outline-offset: 3px !important; box-shadow: none !important;
}
.v2-hero a:focus-visible, .v2-celebrate a:focus-visible, #explore a:focus-visible,
.v2-reviews a:focus-visible, .v2-brochure a:focus-visible, .v2-final a:focus-visible, .v2-contact-info a:focus-visible {
  outline-color: #F6F1E8 !important;
}

/* ── Edges: one consistent, crisp finish ───────────────── */
img { border-radius: 0; }
.v2-story-photo, .v2-svc-img, .v2-explore-img, .v2-stay-img, .v2-celebrate-photo, .v2-conf-photos img,
.gal-item, .svc-card, .acc-card, .blog-card, .offer-tile picture {
  box-shadow: 0 1px 0 rgba(46,38,32,.04), 0 18px 40px -28px rgba(46,38,32,.35);
}
.v2-explore-img, .v2-celebrate-photo { box-shadow: 0 24px 50px -30px rgba(0,0,0,.6); }
hr { border: 0; height: 1px; background: rgba(46,38,32,.16); }

/* ── Interaction: calm, consistent transitions ─────────── */
a, button, .v2-btn, .btn-primary, .btn-outline, .gallery-tab, .nav-links a {
  transition: color .25s ease, background-color .25s ease, border-color .25s ease, transform .25s ease, opacity .25s ease;
}
.v2-btn:active, .btn-primary:active, .btn-outline:active, button:active { transform: translateY(1px); }
.v2-textlink { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s ease, color .25s ease; }
.v2-textlink:hover { background-size: 100% 1px; }
a:not([class]) { text-underline-offset: .18em; text-decoration-thickness: 1px; }

/* Image hover: slow, subtle drift */
.v2-svc-img img, .v2-explore-img img, .v2-stay-img img, .v2-story-photo img, .gal-item img {
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1);
}
.v2-stay-row:hover .v2-stay-img img, .v2-story-photo:hover img, .gal-item:hover img { transform: scale(1.03); }

/* ── Reveal on scroll: gentle rise with an ease-out curve ─ */
.fade-in { transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1) !important; }
.fade-in:not(.visible) { transform: translateY(18px); }
.fade-in.visible { transform: none; }

/* Photo frames uncover softly the first time they enter view (polish.js adds .is-in) */
.js-polish .v2-reveal-img { clip-path: inset(0 0 12% 0); opacity: .001; transition: clip-path 1.1s cubic-bezier(.2,.7,.2,1), opacity .8s ease; }
.js-polish .v2-reveal-img.is-in { clip-path: inset(0 0 0 0); opacity: 1; }

/* ── Navigation: tighter, quieter once the page moves ──── */
#mainNav { transition: padding .3s ease, box-shadow .3s ease, background-color .3s ease !important; }
#mainNav.scrolled { box-shadow: 0 1px 0 rgba(46,38,32,.08), 0 10px 30px -20px rgba(46,38,32,.35) !important; }

/* Hero photo: room for a slow parallax drift without showing edges */
.v2-hero-img { will-change: transform; transform: scale(1.06); transform-origin: 50% 40%; }

/* ── Reduced motion: everything still, nothing hidden ──── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .fade-in, .fade-in:not(.visible) { opacity: 1 !important; transform: none !important; }
  .js-polish .v2-reveal-img { clip-path: none; opacity: 1; }
  .v2-hero-img { transform: none !important; }
}

/* ── Print: clean, ink-friendly ────────────────────────── */
@media print {
  #mainNav, .gal-nav-rail, #cookie-banner, #a11y-toggle-btn, .v2-hero-shade { display: none !important; }
  .v2-hero { min-height: 0 !important; color: #000; }
  .fade-in { opacity: 1 !important; transform: none !important; }
}

/* ── One heading voice across every page (footer keeps its own) ── */
section h1, section h2, section h3, article h1, article h2, article h3, main h1, main h2, main h3,
.page-hero h1, .hou-hero h1, .post-hero h1, .legal-hero h1 { font-family: var(--font-heading) !important; font-style: normal; }
.legal-hero h1 { font-style: italic; }

/* ── Policy and legal pages: calm, readable document rhythm ── */
.legal-body { max-width: 860px; margin-left: auto; margin-right: auto; }
.legal-body h2 { font-size: clamp(1.7rem, 2.4vw, 2.2rem) !important; line-height: 1.15 !important; margin: 2.2em 0 .6em !important; color: var(--espresso) !important; }
.legal-body h3 { font-size: clamp(1.25rem, 1.6vw, 1.45rem) !important; margin: 1.6em 0 .4em !important; }
.legal-body p, .legal-body li { max-width: 72ch; line-height: 1.8; color: var(--ink); }
.legal-updated { font-family: var(--font-display); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted) !important; }
.legal-contact-block { border-left: 3px solid #C9A45C; padding-left: 20px; }

/* ── Chatbot and WhatsApp in the earth palette (overrides chat.js inline styles) ── */
#alza-chat-btn { background: #2F3826 !important; border-color: #C9A45C !important; box-shadow: 0 10px 28px -12px rgba(46,38,32,.55) !important; }
#alza-chat-btn:hover, #alza-chat-btn:focus-visible { background: #3E4A33 !important; }
#alza-whatsapp-btn { border-color: #F6F1E8 !important; box-shadow: 0 10px 28px -12px rgba(46,38,32,.45) !important; }
#alza-chat-panel { background: #F6F1E8 !important; border: 1px solid rgba(46,38,32,.14) !important; border-radius: 6px !important; box-shadow: 0 30px 70px -30px rgba(46,38,32,.55) !important; }
#alza-chat-header { background: #2E2620 !important; border-bottom: 1px solid rgba(201,164,92,.35) !important; }
#alza-chat-header-title { color: #F6F1E8 !important; font-family: 'Instrument Serif', Georgia, serif !important; font-size: 21px !important; font-weight: 400 !important; letter-spacing: .01em; }
#alza-chat-header-sub { color: #E8D9B8 !important; font-family: 'IBM Plex Mono', ui-monospace, monospace !important; letter-spacing: .14em !important; }
#alza-close-btn { color: #E8D9B8 !important; }
#alza-close-btn:hover { color: #FFFFFF !important; }
.alza-msg { border-radius: 10px !important; }
.alza-msg-bot { background: #E9E1D3 !important; color: #2E2620 !important; border-bottom-left-radius: 2px !important; }
.alza-msg-user { background: #2F3826 !important; color: #F6F1E8 !important; border-bottom-right-radius: 2px !important; }
#alza-typing { background: #E9E1D3 !important; }
#alza-typing span, #alza-typing i, #alza-typing div { background: #7A5A22 !important; }
#alza-input-bar { background: #F6F1E8 !important; border-top: 1px solid rgba(46,38,32,.12) !important; }
#alza-input { border-color: rgba(46,38,32,.22) !important; color: #2E2620 !important; border-radius: 4px !important; }
#alza-input:focus { border-color: #C9A45C !important; box-shadow: 0 0 0 3px rgba(201,164,92,.25) !important; }
#alza-send-btn { background: #C9A45C !important; color: #2E2620 !important; border-radius: 4px !important; }
#alza-send-btn svg { stroke: #2E2620 !important; color: #2E2620 !important; }
#alza-send-btn:hover { background: #D8B66E !important; }

/* ── Cookie banner sits above the floating chat and WhatsApp buttons while it is open ── */
#cookie-banner.visible { z-index: 10001 !important; }
