/* ==========================================================================
   EZDesign — IMMERSIVE staging layer  (web-build: taste-skill + ui-ux-pro-max)
   Loads AFTER styles.css. Ground-up formatting pass: full (uncropped) photos,
   immersive hero, interactive lightbox gallery + before/after slider.
   Text content is unchanged from the live copy; only layout/formatting differs.
   Live production (main) is not affected.
   ========================================================================== */

/* --- Tokens / a11y ------------------------------------------------------- */
:root {
  --muted: #5c544a;                 /* AA-safe on light */
  --hairline: rgba(47, 47, 43, 0.12);
  --ink: #2F2F2B;
  --wash: #F1ECE4;                  /* soft matte backdrop for whole-photo frames */
  --edge: 18px;                     /* unified radius */
  --shadow-lg: 0 30px 70px rgba(47, 47, 43, 0.16);
}
body { font-size: 16px; }
h3 { font-size: 20px; }

/* Photos are never cropped anywhere on this site */
.work-figure img, .lightbox img, .ba-pane img { object-fit: contain; }

/* ========================================================================
   HERO — immersive, whole photo edge to edge, copy overlaid on a scrim
   ======================================================================== */
.hero-immersive {
  position: relative;
  width: 100%;
  background: #2b2620;
  overflow: hidden;
  isolation: isolate;
}
.hero-immersive .hero-media { display: block; width: 100%; }
.hero-immersive .hero-media img {
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  margin-inline: auto;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(23, 20, 17, 0.72) 0%, rgba(23, 20, 17, 0.28) 34%, rgba(23, 20, 17, 0) 60%);
  z-index: 1;
  pointer-events: none;
}
.hero-inner {
  position: absolute;
  z-index: 2;
  left: 0; right: 0; bottom: 0;
  padding: clamp(24px, 5vw, 64px);
}
.hero-inner .container { width: min(calc(100% - 56px), var(--max)); }
.hero-immersive .eyebrow { color: #E9DFD1; }
.hero-immersive h1 {
  color: #fff;
  font-size: clamp(34px, 5.4vw, 68px);
  max-width: 16ch;
  margin-bottom: 16px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.28);
}
.hero-immersive .hero-text {
  color: rgba(255, 255, 255, 0.92);
  max-width: 60ch;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.3);
}
.hero-immersive .hero-actions { margin-top: 26px; }
.hero-immersive .button.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
}
.hero-immersive .button.secondary:hover { background: rgba(255, 255, 255, 0.18); }

@media (max-width: 720px) {
  /* On phones the 16:9 hero is short; give the copy a solid stage below it */
  .hero-immersive .hero-media img { max-height: 52vh; }
  .hero-scrim { background: linear-gradient(to top, rgba(23,20,17,0.85) 0%, rgba(23,20,17,0.5) 45%, rgba(23,20,17,0.15) 75%); }
}

/* ========================================================================
   SECTION RHYTHM
   ======================================================================== */
.section-xl { padding: clamp(64px, 9vw, 128px) 0; }
.work-section { background: var(--main-bg); }
.work-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); display: grid; gap: 12px; }
.work-head h2 { font-size: clamp(30px, 4vw, 52px); }
.work-head p:not(.eyebrow) { color: var(--muted); font-size: 17px; }

/* ========================================================================
   GALLERY — masonry, whole photos, hover lift, click -> lightbox
   ======================================================================== */
.gallery {
  columns: 3 320px;
  column-gap: 18px;
}
.work-figure {
  position: relative;
  break-inside: avoid;
  margin: 0 0 18px;
  border-radius: var(--edge);
  overflow: hidden;
  background: var(--wash);
  box-shadow: var(--soft-shadow);
  cursor: zoom-in;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), box-shadow 0.4s ease;
}
.work-figure:hover, .work-figure:focus-within { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.work-figure img { width: 100%; height: auto; display: block; }
.work-figure figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 32px 16px 14px;
  color: #fff;
  background: linear-gradient(to top, rgba(30,26,22,0.78), rgba(30,26,22,0));
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.work-figure:hover figcaption, .work-figure:focus-within figcaption { opacity: 1; transform: translateY(0); }
.work-figure figcaption strong { font-weight: 700; font-size: 15px; }
.work-figure figcaption span { font-size: 12px; opacity: 0.85; }
.work-figure .zoom-hint {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.86); color: var(--dark-accent);
  font-size: 15px; opacity: 0; transition: opacity 0.3s ease;
}
.work-figure:hover .zoom-hint { opacity: 1; }
.gallery-note { margin-top: 14px; color: var(--muted); font-size: 13px; }

@media (max-width: 700px) { .gallery { columns: 1; } }

/* ========================================================================
   LIGHTBOX — full-screen, whole photo (contain), keyboard + arrows
   ======================================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(20, 17, 14, 0.94);
  padding: 3vw;
  opacity: 0; transition: opacity 0.3s ease;
}
.lightbox.open { display: flex; opacity: 1; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: grid; gap: 12px; justify-items: center; }
.lightbox img {
  max-width: 92vw; max-height: 82vh; width: auto; height: auto;
  border-radius: 10px; box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}
.lightbox figcaption { color: rgba(255,255,255,0.9); font-size: 14px; text-align: center; }
.lightbox figcaption .lb-tag { color: rgba(255,255,255,0.6); margin-left: 8px; font-size: 12px; }
.lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.08);
  color: #fff; font-size: 22px; cursor: pointer; backdrop-filter: blur(6px);
  display: grid; place-items: center; transition: background 0.2s ease;
}
.lb-btn:hover { background: rgba(255,255,255,0.2); }
.lb-prev { left: 3vw; }
.lb-next { right: 3vw; }
.lb-close { top: 3vh; right: 3vw; transform: none; width: 46px; height: 46px; font-size: 20px; }
.lb-count { position: absolute; bottom: 3vh; left: 0; right: 0; text-align: center; color: rgba(255,255,255,0.66); font-size: 13px; letter-spacing: 0.08em; }
@media (max-width: 700px) {
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
  .lb-btn { width: 44px; height: 44px; }
  .lightbox img { max-height: 74vh; }
}

/* ========================================================================
   BEFORE / AFTER — interactive drag slider (whole halves, no crop)
   ======================================================================== */
.ba-section { background: var(--paper); }
.ba-layout { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
.ba-copy .eyebrow { margin-bottom: 12px; }
.ba-copy p:not(.eyebrow) { color: var(--muted); font-size: 17px; }
.ba-copy .button { margin-top: 22px; }

.ba-slider {
  position: relative;
  width: 100%;
  border-radius: var(--edge);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--wash);
  user-select: none;
  touch-action: pan-y;
  aspect-ratio: 800 / 1024;
  max-height: 78vh;
  margin-inline: auto;
}
.ba-pane { position: absolute; inset: 0; }
.ba-pane img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* both halves share identical framing so the wipe lines up; cover is fine here
   because both panes are the SAME crop of the room (true before/after) */
.ba-after { z-index: 1; }
.ba-before { z-index: 2; clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); z-index: 3;
  width: 44px; transform: translateX(-50%);
  display: grid; place-items: center; cursor: ew-resize;
}
.ba-handle::before { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,0.9); }
.ba-knob {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.96); color: var(--dark-accent);
  display: grid; place-items: center; font-size: 16px; font-weight: 800;
  box-shadow: 0 6px 20px rgba(0,0,0,0.28);
}
.ba-tag {
  position: absolute; top: 14px; z-index: 4;
  padding: 5px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  background: rgba(23,20,17,0.62); color: #fff; backdrop-filter: blur(4px);
}
.ba-tag-before { left: 14px; }
.ba-tag-after { right: 14px; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; z-index: 5; margin: 0; }
.ba-range:focus-visible + .ba-handle .ba-knob { outline: 3px solid var(--accent); outline-offset: 3px; }

@media (max-width: 920px) { .ba-layout { grid-template-columns: 1fr; } }

/* ========================================================================
   SHARED COMPONENTS for the /abroad page (kept in sync with the homepage)
   ======================================================================== */
.hero-immersive .hero-trust {
  margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px 22px;
  color: rgba(255,255,255,0.9); font-size: 14px; font-weight: 600;
}
.hero-immersive .hero-trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero-immersive .hero-trust span::before { content: "\2713"; color: var(--accent); font-weight: 900; }

/* Reassurance grid */
.pain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pain-card { padding: 28px 24px; border-radius: var(--edge); background: var(--paper); border: 1px solid var(--hairline); box-shadow: var(--soft-shadow); }
.pain-card h3 { font-size: 18px; margin-bottom: 10px; }
.pain-card p { color: var(--muted); margin: 0; font-size: 15px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { padding: 28px 22px; border-radius: var(--edge); background: var(--main-bg); border: 1px solid var(--hairline); box-shadow: var(--soft-shadow); }
.step .eyebrow-num { color: var(--accent); font-size: 30px; display: block; margin-bottom: 14px; font-family: "Libre Baskerville", Georgia, serif; }
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { color: var(--muted); margin: 0; font-size: 14.5px; }

/* Home-type tracks */
.tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.track { padding: 36px 32px; border-radius: var(--edge); border: 1px solid var(--hairline); background: var(--main-bg); box-shadow: var(--soft-shadow); }
.track.dark { background: var(--dark-accent); color: var(--paper); }
.track h3 { font-size: 22px; margin-bottom: 8px; }
.track .track-for { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; color: var(--accent); margin-bottom: 16px; }
.track.dark .track-for { color: var(--secondary-bg); }
.track ul { list-style: none; padding: 0; margin: 16px 0 0; }
.track li { position: relative; padding-left: 22px; margin-bottom: 11px; color: var(--muted); font-size: 15px; }
.track.dark li { color: rgba(255,255,255,0.82); }
.track li::before { content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* Bridge / what I handle */
.bridge { background: var(--secondary-bg); }
.bridge-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px,5vw,54px); align-items: center; }
.handle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.handle { padding: 18px 20px; border-radius: 14px; background: rgba(255,255,255,0.66); border: 1px solid rgba(47,47,43,0.08); font-weight: 700; font-size: 15px; }
.handle span { display: block; color: var(--muted); font-weight: 500; font-size: 13.5px; margin-top: 3px; }

/* Credentials + FAQ */
.cred-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 4px; }
.cred { padding: 10px 16px; border-radius: 999px; background: var(--main-bg); border: 1px solid var(--hairline); font-weight: 800; font-size: 13.5px; color: var(--dark-accent); }
.faq { display: grid; gap: 12px; max-width: 860px; margin: 0 auto; }
details.faq-item { border: 1px solid var(--hairline); border-radius: 14px; background: var(--paper); padding: 4px 22px; box-shadow: var(--soft-shadow); }
details.faq-item summary { cursor: pointer; font-weight: 800; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: "+"; color: var(--accent); font-size: 22px; font-weight: 800; }
details.faq-item[open] summary::after { content: "\2013"; }
details.faq-item p { color: var(--muted); padding-bottom: 18px; margin: 0; }

@media (max-width: 1000px) {
  .pain-grid, .steps { grid-template-columns: 1fr 1fr; }
  .tracks, .bridge-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .pain-grid, .steps, .handle-grid { grid-template-columns: 1fr; }
}

/* ========================================================================
   MOTION — "photos come to life" + guided flow (vanilla, no deps)
   Restraint: 1-2 motions per view, media layers only, reduced-motion honored.
   ======================================================================== */

/* Guided-flow: slim scroll-progress bar at the very top */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--dark-accent));
  z-index: 200; transition: width 0.1s linear;
}

/* Hero: bring the photo to life — gentle parallax + slow light drift */
.hero-immersive .hero-media img { will-change: transform; }
.hero-immersive::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(60% 50% at 30% 30%, rgba(255,255,255,0.10), transparent 70%);
  mix-blend-mode: soft-light;
  animation: hero-drift 14s ease-in-out infinite alternate;
}
@keyframes hero-drift {
  from { transform: translate3d(-4%, -2%, 0) scale(1.02); opacity: 0.5; }
  to   { transform: translate3d(6%, 3%, 0) scale(1.06); opacity: 0.9; }
}
/* Hero copy: choreographed fade-up on load */
.hero-inner .container > * { opacity: 0; animation: hero-rise 0.8s cubic-bezier(0.16,1,0.3,1) forwards; }
.hero-inner .container > .eyebrow { animation-delay: 0.05s; }
.hero-inner .container > h1 { animation-delay: 0.16s; }
.hero-inner .container > .hero-text { animation-delay: 0.28s; }
.hero-inner .container > .hero-actions { animation-delay: 0.40s; }
.hero-inner .container > .hero-trust { animation-delay: 0.52s; }
@keyframes hero-rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* Before/after: one-time nudge to invite interaction (guidance cue) */
.ba-slider.nudge .ba-handle { animation: ba-nudge 1.1s ease-in-out 2; }
@keyframes ba-nudge {
  0%,100% { transform: translateX(-50%); }
  30% { transform: translateX(calc(-50% - 14px)); }
  60% { transform: translateX(calc(-50% + 14px)); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-immersive::after { animation: none; opacity: 0.4; }
  .hero-inner .container > * { opacity: 1; animation: none; }
  .hero-immersive .hero-media img { will-change: auto; transform: none !important; }
  .ba-slider.nudge .ba-handle { animation: none; }
  .scroll-progress { transition: none; }
}

/* ========================================================================
   SCROLL-TO-DISCOVER — photos tilt & revolve as they cross the viewport
   Progressive enhancement: JS adds .scene-on to <html> only on large,
   pointer (non-touch) screens. The scroll engine owns each figure's
   `transform`; hover stays a shadow so the two never fight. Fully off
   for reduced-motion and on phones (clean grid preserved).
   ======================================================================== */
.gallery { perspective: 1600px; perspective-origin: 50% 45%; }

.scene-on .work-figure {
  will-change: transform;
  backface-visibility: hidden;
  transition: box-shadow 0.4s ease; /* transform is driven per-frame by JS */
}
/* When the scene is live, lift on hover via shadow only (JS owns transform) */
.scene-on .work-figure:hover,
.scene-on .work-figure:focus-within { box-shadow: var(--shadow-lg); }

/* Hero: "scroll to discover" cue */
.scroll-cue {
  position: absolute; z-index: 3; left: 50%; bottom: 20px;
  transform: translateX(-50%);
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 700;
  pointer-events: none; transition: opacity 0.4s ease;
}
.scroll-cue .cue-arrow {
  width: 16px; height: 16px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: cue-bounce 1.9s ease-in-out infinite;
}
@keyframes cue-bounce {
  0%, 100% { transform: rotate(45deg) translate(-3px, -3px); opacity: 0.45; }
  50%      { transform: rotate(45deg) translate(3px, 3px);   opacity: 1; }
}
@media (max-width: 700px) { .scroll-cue { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .scene-on .work-figure { transform: none !important; will-change: auto; }
  .scroll-cue .cue-arrow { animation: none; }
}

/* ========================================================================
   Reveal + reduced motion
   ======================================================================== */
@media (prefers-reduced-motion: reduce) {
  .work-figure, .work-figure figcaption, .lightbox, .hero-immersive * { transition: none !important; }
  .work-figure:hover { transform: none; }
}

/* ========================================================================
   SCROLL JOURNEY — scroll scrubs a "camera" through the REAL photos.
   Real-photo adaptation of the scroll-world technique (see web-build skill,
   references/scroll-world). Base state below is a clean stacked gallery that
   needs no JS; staging.js adds .journey-live to enhance it into a pinned,
   scroll-scrubbed cinematic flight. It never hijacks the scroll wheel, and it
   stays the plain stacked gallery on phones/touch and for reduced-motion.
   ======================================================================== */
.journey { position: relative; background: var(--main-bg); }
.journey-intro {
  max-width: 760px; display: grid; gap: 12px;
  padding: clamp(64px, 9vw, 128px) 0 clamp(18px, 3vw, 30px);
}
.journey-intro h2 { font-size: clamp(30px, 4vw, 52px); }
.journey-intro p:not(.eyebrow) { color: var(--muted); font-size: 17px; }

/* --- Base (no-JS / fallback): a clean stacked gallery of whole photos --- */
.journey-scenes { width: min(92vw, 1120px); margin-inline: auto; display: grid; gap: 16px; }
.j-scene {
  position: relative; margin: 0;
  border-radius: var(--edge); overflow: hidden;
  background: var(--wash); box-shadow: var(--soft-shadow); cursor: zoom-in;
}
.j-scene img { width: 100%; height: auto; display: block; object-fit: contain; background: var(--wash); }
.j-scene figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 44px 22px 18px; color: #fff;
  background: linear-gradient(to top, rgba(30,26,22,0.82), rgba(30,26,22,0));
}
.j-scene figcaption strong { font-weight: 700; font-size: 16px; }
.j-scene figcaption span { font-size: 12px; opacity: 0.85; }
.journey .gallery-note { margin-top: 16px; }

/* --- Live (JS-enhanced): FULL-BLEED cinematic stage, GSAP pins + scrubs --- */
.journey-live .journey-track { position: relative; }
.journey-live .journey-stage {
  position: relative; height: 100vh;      /* GSAP ScrollTrigger pins this */
  display: block; overflow: hidden;
  background: #17130f;                     /* filmic dark surround */
}
.journey-live .journey-scenes {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block; gap: 0;
}
.journey-live .j-scene {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  border-radius: 0; box-shadow: none; background: #17130f;
  opacity: 0; will-change: opacity, transform;
}
.journey-live .j-scene img {
  width: 100%; height: 100%; object-fit: contain;   /* whole photo, never cropped, on the dark stage */
}
/* Cinematic lower-third caption */
.journey-live .j-scene figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: block; text-align: left;
  padding: clamp(28px, 8vh, 90px) clamp(24px, 6vw, 104px);
  background: linear-gradient(to top, rgba(12,10,8,0.78) 0%, rgba(12,10,8,0.28) 42%, transparent 72%);
}
.journey-live .j-scene figcaption strong {
  display: block; font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(26px, 4.4vw, 56px); font-weight: 700; line-height: 1.08;
  margin-bottom: 8px; color: #fff; text-shadow: 0 2px 26px rgba(0,0,0,0.45);
}
.journey-live .j-scene figcaption span {
  font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 800;
  color: var(--secondary-bg); opacity: 0.95;
}
/* Counter/dots move to the top on the dark stage so they clear the caption */
.journey-live .journey-hud { top: 22px; bottom: auto; }

/* HUD (injected by JS): counter + dots + hint, pinned inside the stage */
.journey-hud {
  display: none; position: absolute; z-index: 4; left: 50%; bottom: 18px;
  transform: translateX(-50%);
  align-items: center; gap: 14px; padding: 8px 16px; border-radius: 999px;
  background: rgba(248,246,242,0.86); border: 1px solid var(--hairline);
  box-shadow: var(--soft-shadow); backdrop-filter: blur(8px);
  font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: var(--dark-accent);
  pointer-events: none;
}
.journey-live .journey-hud { display: flex; }
.journey-hud .j-dots { display: inline-flex; gap: 7px; }
.journey-hud .j-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(47,47,43,0.22); transition: background 0.3s ease, transform 0.3s ease; }
.journey-hud .j-dot.on { background: var(--accent); transform: scale(1.35); }
.journey-hud .j-hint { text-transform: uppercase; opacity: 0.7; }

@media (prefers-reduced-motion: reduce) { .j-scene { will-change: auto; } }
