/* ─── Hero ───────────────────────────────────────────── */
.hero { position: relative; height: 112vh; min-height: 680px; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg,
    rgba(21,19,16,.2) 0%,
    rgba(21,19,16,.25) 30%,
    rgba(21,19,16,.35) 60%,
    rgba(21,19,16,.18) 100%
  );
}
.hero::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 240px; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(250,247,242,0) 0%, rgba(250,247,242,.5) 60%, var(--cream) 100%);
}
.hero-slideshow { position: absolute; inset: 0; overflow: hidden; background: var(--sand); }
.hero-slideshow .slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; filter: grayscale(15%) contrast(1.05) brightness(.97) saturate(1.05);
  animation: kenburns 32s infinite;
  animation-timing-function: cubic-bezier(.45,0,.55,1);
}
/* animation-duration and animation-delay are set per-slide in homepage.js,
   staggered evenly across however many .slide elements exist */
@keyframes kenburns {
  0%   { opacity: 0; transform: scale(1.0); }
  6%   { opacity: 1; }
  38%  { opacity: 1; }
  44%  { opacity: 0; transform: scale(1.13); }
  100% { opacity: 0; }
}
.hero-content {
  position: absolute; left: 0; right: 0; bottom: 35vh; z-index: 2; display: flex; flex-direction: column; align-items: flex-start;
  padding: 0 5%; color: var(--white);
  text-shadow: 0 2px 16px rgba(10,9,7,.5);
  opacity: 0; transform: translateY(28px); animation: rise 1.4s .3s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
.hero-text-panel { display: inline-block; width: fit-content; max-width: 520px; background: rgba(15,13,11,.4); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 42px 46px; border-radius: 2px; }
.hero h1 { color: var(--white); font-size: clamp(30px,4.6vw,52px); font-weight: 400; line-height: 1.2; max-width: 22ch; margin-bottom: 4px; }
.hero h1 em { font-style: italic; color: var(--blush-light); }
.hero p { max-width: 38ch; font-size: 14.5px; margin: 12px 0 20px; color: var(--sand); }
.hero-cta { width: 100%; text-align: center; }
@media (max-height: 760px) {
  .hero h1 { font-size: clamp(26px,4.4vw,40px); }
  .hero p { font-size: 13px; margin: 8px 0 14px; }
  .hero-content { bottom: 26vh; }
  .hero-text-panel { padding: 24px 28px; }
}
@media (max-width: 640px) {
  .hero-text-panel { padding: 26px 24px; max-width: 100%; }
}

/* ─── Overlap card / info strip ──────────────────────── */
.overlap-card {
  position: relative; z-index: 3; background: var(--white); max-width: 920px; margin: -70px auto 0;
  padding: 38px 40px; box-shadow: 0 30px 60px -30px rgba(21,19,16,.25);
}
.info-strip { display: grid; grid-template-columns: repeat(4,1fr); }
.info-strip .item { padding: 0 24px; text-align: center; border-left: 1px solid rgba(21,19,16,.12); }
.info-strip .item:first-child { border-left: none; }
.info-strip .label { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--stone-text); margin-bottom: 10px; }
.info-strip .value { font-family: var(--serif); font-size: 17px; color: var(--black); line-height: 1.4; }
.info-strip .value a { transition: color .3s ease; }
.info-strip .value a:hover { color: var(--blush-text); }

section { padding: 96px 5%; }
.benefit-row.reveal:nth-child(2) { transition-delay: .08s; }
.benefit-row.reveal:nth-child(3) { transition-delay: .16s; }
.benefit-row.reveal:nth-child(4) { transition-delay: .24s; }

/* ─── Why Alpenglow (philosophy) ─────────────────────── */
.philosophy { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; padding-top: 40px; }
.philosophy h2 { font-size: clamp(30px,3.2vw,46px); line-height: 1.2; margin: 16px 0 22px; }
.philosophy p { color: var(--stone-text); font-size: 15px; max-width: 46ch; margin-bottom: 30px; }

/* ─── Services ────────────────────────────────────────── */
#services { padding: 88px 5% 90px; background: var(--white); position: relative; overflow: hidden; }
#services::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 130px; z-index: 0;
  background: linear-gradient(180deg, var(--cream) 0%, rgba(250,247,242,0) 100%); pointer-events: none;
}
#services > * { position: relative; z-index: 1; }
.services-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.services-head h2 { font-size: clamp(24px,2.4vw,32px); margin-top: 14px; }

/* ─── Why choose ──────────────────────────────────────── */
.why { background: var(--sand); position: relative; padding: 110px 5% 100px; overflow: hidden; }
.why::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 130px; z-index: 0;
  background: linear-gradient(180deg, var(--white) 0%, rgba(231,222,208,0) 100%); pointer-events: none;
}
.why > * { position: relative; z-index: 1; }
.benefits { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: repeat(4,1fr); gap: 44px; }
.benefit-row {
  text-align: left; padding: 22px; margin: -22px; border-radius: 2px;
  transition: transform .5s cubic-bezier(.16,1,.3,1), box-shadow .5s ease, background-color .5s ease;
}
.benefit-row:hover { transform: translateY(-6px); box-shadow: 0 22px 44px -24px rgba(21,19,16,.25); background-color: var(--white); }
.benefit-row .roman { display: block; font-family: var(--serif); font-style: italic; font-size: 26px; color: #C48D95; margin-bottom: 12px; }
.benefit-row h3 { font-size: 16px; margin-bottom: 8px; }
.benefit-row p { font-size: 14px; color: var(--stone-text); }

/* ─── Services tabs ───────────────────────────────────── */
.tab-nav { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; border-bottom: 1px solid rgba(21,19,16,.12); }
.tab-nav.reveal { transition-delay: .1s; }
.services-cta.reveal { transition-delay: .05s; }
.tab-btn { font-family: var(--sans); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--stone-text); background: none; border: none; padding: 16px 22px; cursor: pointer; position: relative; transition: color .5s ease, transform .3s ease; transform: scale(1); }
.tab-btn::after { content: ""; position: absolute; left: 22px; right: 22px; bottom: -1px; height: 2px; background: var(--blush-deep); transform: scaleX(0); transition: transform .5s cubic-bezier(.16,1,.3,1); }
.tab-btn.active { color: var(--black); }
.tab-btn.active::after { transform: scaleX(1); }
.tab-btn:active { transform: scale(.96); }
.tab-panels { position: relative; }
.tab-panel { position: absolute; top: 0; left: 0; width: 100%; grid-template-columns: 0.85fr 1.15fr; gap: 60px; align-items: center; display: grid; opacity: 0; pointer-events: none; transition: opacity .5s ease; }
.tab-panel.active { position: relative; opacity: 1; pointer-events: auto; transition: opacity .5s ease .12s; }
.tab-panel .photo { height: 460px; }
.tab-panel h3 { font-size: clamp(21px,2.1vw,26px); margin: 10px 0 14px; }
.tab-panel p.lead { color: var(--stone-text); font-size: 14.5px; max-width: 44ch; margin-bottom: 30px; }
.treat-list { list-style: none; }
.treat-list li { border-bottom: 1px solid rgba(21,19,16,.1); }
.treat-list a { display: flex; align-items: center; justify-content: space-between; padding: 16px 2px; font-size: 15px; transition: padding-left .5s cubic-bezier(.16,1,.3,1), color .5s ease; }
.treat-list a:hover { padding-left: 10px; color: var(--blush-text); }
.treat-list a .arrow { font-size: 13px; opacity: .5; transition: transform .5s cubic-bezier(.16,1,.3,1), opacity .5s ease; }
.treat-list a:hover .arrow { opacity: 1; transform: translateX(4px); }
.services-cta { text-align: center; margin-top: 64px; padding-top: 48px; border-top: 1px solid rgba(21,19,16,.1); }
.services-cta p { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--stone-text); margin-bottom: 22px; }

/* ─── About / team teaser strip ──────────────────────── */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: stretch; padding: 0; }
.about > .photo { height: 100%; min-height: 340px; }
.about-copy { background: var(--black); color: var(--white); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 36px 8%; }
.about-copy h2 { color: var(--white); font-size: clamp(20px,2vw,26px); margin: 10px 0 14px; }
.about-copy p { color: var(--sand); font-size: 14.5px; max-width: 42ch; margin-bottom: 20px; }

/* ─── Credentials strip ──────────────────────────────── */
.credentials { padding: 40px 5%; background: var(--white); border-top: 1px solid rgba(21,19,16,.08); border-bottom: 1px solid rgba(21,19,16,.08); }
.cred-strip { max-width: 1100px; margin: 0 auto; display: flex; justify-content: center; flex-wrap: nowrap; overflow-x: auto; }
.cred-strip span { font-size: 10.5px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--stone-text); padding: 0 20px; border-left: 1px solid rgba(21,19,16,.12); white-space: nowrap; }
.cred-strip span:first-child { border-left: none; }

/* ─── Testimonials ────────────────────────────────────── */
.testimonials { text-align: center; background: var(--blush-light); position: relative; padding: 118px 5% 100px; overflow: hidden; }
.testimonials::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 110px; z-index: 0;
  background: linear-gradient(180deg, var(--white) 0%, rgba(241,220,211,0) 100%); pointer-events: none;
}
.testimonials > * { position: relative; z-index: 1; }
.stars { color: var(--blush-text); letter-spacing: 3px; font-size: 14px; margin-bottom: 20px; }
.quote-wrap { max-width: 680px; margin: 0 auto; min-height: 150px; position: relative; }
.quote { font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.5; position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.quote.active { opacity: 1; position: relative; }
.quote .name { display: block; font-family: var(--sans); font-style: normal; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--stone-text); margin-top: 18px; }
.dots { display: flex; gap: 10px; justify-content: center; margin-top: 28px; }
.dots button {
  position: relative; width: 30px; height: 24px; padding: 0; border: none; background: none; cursor: pointer;
}
.dots button::before {
  content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 3px; transform: translateY(-50%);
  background: rgba(139,94,70,.18); border-radius: 2px; transition: background .3s ease;
}
.dots button::after {
  content: ""; position: absolute; top: 50%; left: 0; width: 0%; height: 3px; transform: translateY(-50%);
  background: var(--blush-text); border-radius: 2px; overflow: hidden;
}
.dots button.active::after { animation: dotFill 5s linear forwards; }
@keyframes dotFill { from { width: 0%; } to { width: 100%; } }

/* ─── Gallery ─────────────────────────────────────────── */
.gallery { padding-top: 70px; padding-bottom: 80px; }
.gallery-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 32px; }
.gallery-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 14px; }
.gallery-grid .photo { height: 150px; transition: transform .6s cubic-bezier(.16,1,.3,1), box-shadow .6s ease; }
.gallery-grid .photo:nth-child(3n+1) { height: 210px; margin-top: -30px; }
.gallery-grid .photo:hover { transform: translateY(-6px); box-shadow: 0 26px 48px -22px rgba(21,19,16,.35); z-index: 2; }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 1200px) and (min-width: 901px) {
  .tab-panel .photo { height: 380px; }
  .cred-strip span { padding: 0 10px; font-size: 10.5px; }
  .gallery-grid {
    display: flex; overflow-x: auto; overflow-y: hidden; gap: 14px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 8px;
  }
  .gallery-grid .photo { flex: 0 0 auto; width: 200px; height: 190px; margin-top: 0; scroll-snap-align: start; }
  .gallery-grid .photo:nth-child(3n+1) { height: 190px; margin-top: 0; }
}

@media (max-width: 900px) {
  .philosophy, .about { grid-template-columns: 1fr; }
  .philosophy-cta { width: 100%; text-align: center; }
  .layered-photos { height: 380px; margin-bottom: 20px; }
  .gallery-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .gallery-head .btn { font-size: 11px; padding: 12px 22px; }
  .services-cta { border-top: none; }
  .gallery-grid {
    display: flex; overflow-x: auto; overflow-y: hidden; gap: 12px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 8px;
  }
  .gallery-grid .photo { flex: 0 0 auto; width: 140px; height: 160px; margin-top: 0; scroll-snap-align: start; }
  .gallery-grid .photo:nth-child(3n+1) { height: 160px; margin-top: 0; }
  .about-copy { align-items: center; text-align: center; }
  .about-copy p { margin-left: auto; margin-right: auto; }
  .tab-panel { grid-template-columns: 1fr; gap: 26px; }
  .tab-panel .photo { height: 280px; }
  .tab-nav { gap: 2px; }
  .overlap-card { padding: 28px 24px; }
  .info-strip { grid-template-columns: 1fr 1fr; row-gap: 24px; }
  .info-strip .item { border-left: none; padding: 0 10px; }
  .tab-btn { padding: 12px 12px; font-size: 11px; }
  .benefits { grid-template-columns: 1fr 1fr; gap: 28px; }
  .cred-strip { flex-direction: column; align-items: center; gap: 14px; }
  .cred-strip span { border-left: none; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slideshow .slide { opacity: 0; transform: none !important; }
  .hero-slideshow .slide:first-child { opacity: 1; }
}
