/* Homepage-specific refinements. Global layout lives in style.css. */

/* ---- Hero: full-bleed photo slideshow with overlaid content ---- */
.hero {
  position: relative; overflow: hidden; background: var(--ink);
  padding: 7.5rem 0 0; min-height: max(680px, 92vh); height: auto; display: flex; align-items: flex-end;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; border-radius: 0;
  animation: hero-slide-fade 18s infinite;
  display: flex; align-items: flex-end;
}
.hero-slide .media-placeholder-label { background: rgba(31,29,27,0.55); color: var(--text-on-dark-muted); }
.hero-slide-img { width: 100%; height: 100%; object-fit: cover; display: block; transform-origin: 60% 50%; animation: hero-zoom 18s linear infinite; }
.hero-slide--2 .hero-slide-img { animation-delay: 6s; }
.hero-slide--3 .hero-slide-img { animation-delay: 12s; }
/* slow Ken Burns push-in while each slide is on screen */
@keyframes hero-zoom { 0% { transform: scale(1); } 34% { transform: scale(1.12); } 100% { transform: scale(1.12); } }
.hero-slide--1 { animation-delay: 0s; }
.hero-slide--2 { animation-delay: 6s; }
.hero-slide--3 { animation-delay: 12s; }
@keyframes hero-slide-fade {
  0% { opacity: 0; } 4% { opacity: 1; } 29% { opacity: 1; } 34% { opacity: 0; } 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { animation: none; opacity: 0; }
  .hero-slide--1 { opacity: 1; }
  .hero-slide-img { animation: none; }
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(31,29,27,0.82) 0%, rgba(31,29,27,0.5) 48%, rgba(31,29,27,0.14) 82%),
    linear-gradient(0deg, rgba(31,29,27,0.6) 0%, rgba(31,29,27,0) 42%),
    linear-gradient(180deg, rgba(31,29,27,0.55) 0%, rgba(31,29,27,0) 24%);
}
.hero .hero-inner {
  position: relative; z-index: 2; width: 100%; grid-template-columns: 1fr;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.hero .hero-copy { max-width: 660px; }
.hero .hero-eyebrow { color: var(--gold-fleck-light); }
.hero .hero-headline { color: var(--text-on-dark); text-shadow: 0 2px 30px rgba(0,0,0,0.25); font-size: clamp(2.4rem, 4.6vw, 3.9rem); max-width: 17ch; }
.hero .hero-sub { color: rgba(243,234,224,0.8); }
.hero .hero-trust { border-top: 1px solid var(--line-on-dark); padding-top: 1.5rem; }
.hero .stat-number { color: var(--gold-fleck-light); }
.hero .stat-label { color: rgba(243,234,224,0.65); }
.hero .btn-whatsapp { }
.hero-visual { display: none; }

@media (max-width: 900px) {
  .hero { height: auto; min-height: 0; padding: 0; }
  .hero .hero-inner { padding: 6.5rem 1.5rem 3rem; }
}

.hero-copy > * {
  opacity: 0;
  animation: hero-rise 0.7s ease forwards;
}
.hero-eyebrow { animation-delay: 0.05s; }
.hero-headline { animation-delay: 0.15s; }
.hero-sub { animation-delay: 0.25s; }
.hero-actions { animation-delay: 0.35s; }
.hero-trust { animation-delay: 0.45s; }

.hero-visual {
  opacity: 0;
  animation: hero-fade 0.9s ease 0.3s forwards;
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hero-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .hero-visual { animation: none; opacity: 1; }
}


/* ---- Hero: slide progress bars + scroll cue ---- */
.hero-progress { position: absolute; right: max(1.5rem, calc((100vw - var(--container)) / 2 + 1.5rem)); bottom: clamp(2.5rem, 5vw, 4rem); z-index: 3; display: flex; gap: 8px; }
.hero-progress span { display: block; width: 44px; height: 2px; background: rgba(243,234,224,0.3); position: relative; overflow: hidden; }
.hero-progress span::after { content: ""; position: absolute; inset: 0; background: var(--gold-fleck-light); transform: scaleX(0); transform-origin: left; animation: hero-progress 18s linear infinite; }
.hero-progress span:nth-child(2)::after { animation-delay: 6s; }
.hero-progress span:nth-child(3)::after { animation-delay: 12s; }
@keyframes hero-progress { 0% { transform: scaleX(0); } 33.3% { transform: scaleX(1); } 33.4%, 100% { transform: scaleX(0); } }
@media (max-width: 900px) { .hero-progress { display: none; } }
@media (prefers-reduced-motion: reduce) { .hero-progress span::after { animation: none; } }

/* ---- Transparent header over the hero (home page only) ----
   Only applies when JS is running (html.js), so without JS the normal solid
   header is used. motion.js adds .is-scrolled after the first 40px of scroll. */
html.js body.page-home .site-header {
  position: fixed; left: 0; right: 0; top: 0; width: 100%;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
html.js body.page-home .site-header:not(.is-scrolled):not(.is-menu-open) {
  background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
}
html.js body.page-home .site-header:not(.is-scrolled):not(.is-menu-open) .nav-link,
html.js body.page-home .site-header:not(.is-scrolled):not(.is-menu-open) .menu-toggle { color: #fff; }
html.js body.page-home .site-header:not(.is-scrolled):not(.is-menu-open) .nav-link:hover { color: var(--gold-fleck-light); }
html.js body.page-home .site-header:not(.is-scrolled):not(.is-menu-open) .nav-link[aria-current="page"] { color: var(--gold-fleck-light); }
html.js body.page-home .site-header:not(.is-scrolled):not(.is-menu-open) .icon-link:not(.icon-link--wa) { color: #fff; border-color: rgba(255,255,255,0.4); }
html.js body.page-home .site-header:not(.is-scrolled):not(.is-menu-open) .icon-link:not(.icon-link--wa):hover { background: rgba(255,255,255,0.14); }
html.js body.page-home .site-header:not(.is-scrolled):not(.is-menu-open) .brand-logo--on-light { display: none; }
html.js body.page-home .site-header:not(.is-scrolled):not(.is-menu-open) .brand-logo--on-dark { display: block; }

/* ============================================================
   SECTION BACKGROUND PHOTOS (low-opacity image behind content)
   Used by the calculator + "How we work" sections. Swap the photo
   by uploading a new file with the same name in assets/images/backgrounds/
   ============================================================ */
.calculator-hook, .process-journey { position: relative; overflow: hidden; isolation: isolate; }
.section-bg { position: absolute; inset: -10% 0; z-index: -1; pointer-events: none; will-change: transform; }
.section-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Calculator (dark): photo at ~22% under a dark wash so text stays crisp */
.calculator-hook .section-bg img { opacity: 0.55; filter: saturate(0.95); }
.calculator-hook .section-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(31,29,27,0.86) 0%, rgba(31,29,27,0.62) 45%, rgba(31,29,27,0.42) 100%),
    linear-gradient(180deg, rgba(31,29,27,0.65) 0%, rgba(31,29,27,0) 22%, rgba(31,29,27,0) 78%, rgba(31,29,27,0.65) 100%);
}
.calculator-hook .calc-preview-card { background: rgba(31,29,27,0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-color: rgba(243,234,224,0.22); }

/* ============================================================
   "HOW WE WORK" — animated journey timeline
   A rail draws itself across the page, lighting each stage in turn.
   Horizontal on desktop, vertical on tablet/phone.
   ============================================================ */
.process-journey { background: var(--stone); }
.process-journey .section-bg img { opacity: 0.26; mix-blend-mode: multiply; filter: grayscale(0.35); }
.process-journey .section-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, var(--stone) 0%, rgba(232,223,209,0) 22%, rgba(232,223,209,0) 78%, var(--stone) 100%),
    linear-gradient(90deg, rgba(232,223,209,0.9) 0%, rgba(232,223,209,0.35) 60%, rgba(232,223,209,0.75) 100%);
}
.eyebrow {
  display: flex; align-items: center; gap: 0.9rem; margin: 0 0 1.2rem; max-width: none;
  color: var(--aventurine); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 44px; height: 1px; background: var(--gold-fleck); }
.process-journey .section-head h2::before { display: none; }
.process-journey .section-head { max-width: 640px; margin-bottom: 4rem; }
.process-journey h2 em { font-style: italic; font-weight: 500; color: var(--aventurine); }

.journey { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); padding-top: 2.6rem; }
/* rail: faint track + progress line */
.journey::before, .journey::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; }
.journey::before { background: var(--line); }
.journey::after {
  background: linear-gradient(90deg, var(--aventurine), var(--gold-fleck));
  height: 2px; top: -0.5px; transform: scaleX(0); transform-origin: left; transition: transform 2.8s cubic-bezier(0.5, 0, 0.2, 1) 0.2s;
}
.journey.is-inview::after { transform: scaleX(1); }

.journey-step {
  position: relative; padding: 1.4rem 1rem 1.4rem 1rem; border-left: 1px solid rgba(203,190,172,0.7);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease), background-color 0.5s var(--ease);
}
.journey-step:first-child { padding-left: 0; border-left: 0; }
/* node on the rail */
.journey-step::before {
  content: ""; position: absolute; top: -2.6rem; left: 1rem; width: 13px; height: 13px; margin-top: -6px; border-radius: 50%;
  background: var(--stone); border: 1.5px solid var(--gold-fleck); box-sizing: border-box; z-index: 2;
  transition: background-color 0.5s var(--ease) calc(0.25s + var(--i) * 0.55s), border-color 0.5s var(--ease) calc(0.25s + var(--i) * 0.55s), box-shadow 0.6s var(--ease) calc(0.25s + var(--i) * 0.55s), transform 0.5s var(--ease) calc(0.25s + var(--i) * 0.55s);
}
.journey-step:first-child::before { left: 0; }
.journey.is-inview .journey-step::before {
  background: var(--aventurine); border-color: var(--aventurine); transform: scale(1.15);
  box-shadow: 0 0 0 5px rgba(136,94,67,0.14);
}
/* the node above the rail is positioned relative to the list's top padding */
.journey-step { margin-top: 0; }

.journey-num {
  display: block; font-family: var(--font-display); font-size: clamp(2.6rem, 3.6vw, 3.6rem); line-height: 1; font-weight: 500;
  color: transparent; -webkit-text-stroke: 1px var(--gold-fleck); letter-spacing: -0.02em; margin-bottom: 1.4rem;
  transition: color 0.5s var(--ease), -webkit-text-stroke-color 0.5s var(--ease), transform 0.6s var(--ease);
}
.journey-icon { width: 30px; height: 30px; color: var(--aventurine); margin-bottom: 1rem; transition: transform 0.6s var(--ease); }
.journey-step h3 { font-size: 1.28rem; line-height: 1.2; margin-bottom: 0.6rem; }
.journey-step p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 1.1rem; }
.journey-duration {
  display: inline-block; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500;
  color: var(--aventurine); border: 1px solid var(--gold-fleck); border-radius: 999px; padding: 0.4em 0.9em;
}

/* entrance: steps rise in one after another, in step with the rail */
html.js .journey:not(.is-inview) .journey-step { opacity: 0; transform: translateY(26px); }
html.js .journey.is-inview .journey-step { transition-delay: calc(0.15s + var(--i) * 0.5s), calc(0.15s + var(--i) * 0.5s), 0s; }

html.js .journey.is-settled .journey-step, html.js .journey.is-settled .journey-step::before { transition-delay: 0s !important; }

/* hover / keyboard focus: spotlight one stage, dim the rest */
@media (hover: hover) {
  .journey:hover .journey-step:not(:hover) { opacity: 0.45; }
  .journey-step:hover { background: rgba(247,243,238,0.7); }
  .journey-step:hover .journey-num { color: var(--aventurine); -webkit-text-stroke-color: var(--aventurine); transform: translateY(-4px); }
  .journey-step:hover .journey-icon { transform: translateY(-3px) scale(1.12); }
  .journey-step:hover::before { box-shadow: 0 0 0 8px rgba(136,94,67,0.18); }
}

/* tablet / phone: vertical timeline */
@media (max-width: 1100px) {
  .journey { grid-template-columns: 1fr; padding: 0 0 0 2.4rem; }
  .journey::before, .journey::after { top: 0; bottom: 0; left: 6px; right: auto; width: 1px; height: auto; }
  .journey::after { width: 2px; left: 5.5px; transform: scaleY(0); transform-origin: top; background: linear-gradient(180deg, var(--aventurine), var(--gold-fleck)); transition-duration: 3.4s; }
  .journey.is-inview::after { transform: scaleY(1); }
  .journey-step, .journey-step:first-child { padding: 0 0 2.6rem 0; border-left: 0; }
  .journey-step:last-child { padding-bottom: 0; }
  .journey-step::before, .journey-step:first-child::before { top: 1.4rem; left: -2.4rem; margin-top: 0; margin-left: 0; }
  .journey-num { font-size: 3.2rem; margin-bottom: 0.8rem; }
  .journey-step p { max-width: 46ch; }
  .process-journey .section-head { margin-bottom: 2.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  html.js .journey:not(.is-inview) .journey-step { opacity: 1; transform: none; }
  .journey::after { transform: none; transition: none; }
  .journey-step::before { transition: none; background: var(--aventurine); border-color: var(--aventurine); }
}


/* ---- hero headline accent ---- */
.hero-headline em { font-style: italic; font-weight: 500; color: var(--gold-fleck-light); }

/* ---- three service groups (Commercial / Residential / Execution) ---- */

/* ---- why clients trust us: numbered cards + "backed by" strip ---- */
.why-card { position: relative; }
.why-num { display: block; font-family: var(--font-display); font-size: 2.2rem; line-height: 1; color: var(--gold-fleck); margin-bottom: 0.9rem; transition: color 0.4s var(--ease), transform 0.5s var(--ease); }
.why-card:hover .why-num { color: var(--aventurine); transform: translateX(3px); }
.why-section h2 em { font-style: italic; color: var(--aventurine); font-weight: 500; }
.why-section .section-head h2::before { display: none; }
.eyebrow + h2::before { display: none; }
