/* Our Story v3 Projection, round 5 header fade + Creative Studio round-4 loops (A17, native-scroll; coarse/touch steps are 150svh, set at load. Fine-pointer desktops stay at 100svh / A16). Header shows on entry, then fades up+blur as beat 1 engages; beat copy takes its place. Reappears when scrolling back above the story. Scoped to #our-story.
   Frameless: art floats on the page (radial mask + screen blend, or CS alpha when present).
   Beat change: opacity-only crossfade (no blur, no scale/transform on art). Subtle glow. No transition clips, no card, no scanlines.
   Copy: Creative Studio copy.json principal (brand-compliant / suavizada). */
#our-story{
  --font:var(--font-display,'League Spartan',ui-sans-serif,system-ui,sans-serif);
  --cur:var(--font-cursive,'Caveat',cursive);
  --mono:'Share Tech Mono',ui-monospace,monospace;
  --dim:#d2d2d2;--faint:#a8a8a8;--aqua:#5bc9dd;--gold:#d9c227;
  --edge:max(22px,5vw);--holo:91,201,221;--navh:99px;--step:100svh;--lead:1;
  --ease-enter:cubic-bezier(.22,1,.36,1);
  color:#fff;
  background:transparent;
}
/* --navh stays 99px: do not shrink it with nav.scrolled (that resized the pin mid-scroll and jumped on iOS) */
html[lang="es"] #our-story [data-l="en"],html:not([lang="es"]) #our-story [data-l="es"]{display:none!important}
#our-story.os3{position:relative;padding:0;border:0;background:transparent}
/* soft fade into the surrounding black canvas at the section edges */
#our-story.os3::before,#our-story.os3::after{content:"";position:absolute;left:0;right:0;height:clamp(56px,9vw,140px);pointer-events:none;z-index:8}
#our-story.os3::before{top:0;background:linear-gradient(to bottom,#000,rgba(0,0,0,.55) 40%,transparent)}
#our-story.os3::after{bottom:0;background:linear-gradient(to top,#000,rgba(0,0,0,.55) 40%,transparent)}
#our-story .skip-story{position:absolute;left:16px;top:12px;z-index:30;padding:8px 14px;background:#000;color:var(--aqua);font-family:var(--mono);font-size:12px;letter-spacing:.16em;text-transform:uppercase;text-decoration:none;border:1px solid var(--aqua);clip-path:inset(50%);width:1px;height:1px;overflow:hidden;white-space:nowrap}
#our-story .skip-story:focus,#our-story .skip-story:focus-visible{clip-path:none;width:auto;height:auto;overflow:visible;outline:2px solid var(--aqua);outline-offset:3px}
#our-story .osx-after:focus,#our-story .osx-after:focus-visible{outline:2px solid var(--aqua);outline-offset:4px}

/* A16: native scroll. One ~100svh step of intro (header) plus one step per beat. Heights use svh so the iOS address bar does not jump the layout. */
#our-story .os3-track{height:calc(100svh - var(--navh) + (var(--lead,1) + var(--N,5)) * var(--step))}
#our-story{scroll-margin-top:var(--navh)}
#our-story .os3-pin{position:sticky;top:var(--navh);height:calc(100svh - var(--navh));display:flex;align-items:center;
  -webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 28px,#000 calc(100% - 36px),transparent);
  mask-image:linear-gradient(to bottom,transparent 0,#000 28px,#000 calc(100% - 36px),transparent)}
#our-story .os3-grid{width:100%;max-width:1200px;margin:0 auto;padding:0 var(--edge);display:grid;grid-template-columns:minmax(0,4.2fr) minmax(0,6fr);gap:clamp(32px,4.5vw,72px);align-items:center}
#our-story .os3-text{position:relative;z-index:2;display:grid}
#our-story .os3-mhead,#our-story .os3-beats{grid-area:1/1;align-self:start}

/* A19: header opacity is scroll-tied inside the intro step (starts ~15%, gone by ~60%).
   JS sets --head-op; no 0.55s time fade so the finish point is stable across scroll speed. */
#our-story .os3-mhead{margin:0;z-index:2;max-width:440px;will-change:opacity,transform;
  opacity:var(--head-op,1)}
#our-story:not([data-intro]) .os3-mhead{opacity:0;transform:translateY(-12px);pointer-events:none}

#our-story .os3-eyebrow{font:400 12px/1 var(--mono);letter-spacing:.3em;text-transform:uppercase;color:var(--aqua);margin:0 0 12px}
#our-story .os3-mhead h2{font:800 clamp(28px,2.6vw,40px)/1 var(--font);letter-spacing:-.01em;text-transform:uppercase;margin:0;color:#fff}
#our-story .os3-mhead h2 .cur{font:700 1.18em/1 var(--cur);text-transform:none;letter-spacing:0;color:var(--aqua);margin-left:.08em}

#our-story .os3-beats{display:grid}
#our-story .os3-beat{grid-area:1/1;align-self:start;max-width:440px;pointer-events:none}
#our-story .os3-beat>*{opacity:0;transition:opacity .2s ease;will-change:opacity}
#our-story:not([data-intro]) .os3-beat.is-active{pointer-events:auto}
#our-story:not([data-intro]) .os3-beat.is-active>*{opacity:1;
  transition:opacity .6s var(--ease-enter)}
#our-story[data-intro] .os3-beat>*{opacity:0;pointer-events:none}
#our-story .os3-beat.is-active>:nth-child(1){transition-delay:.08s}
#our-story .os3-beat.is-active>:nth-child(2){transition-delay:.14s}
#our-story .os3-beat.is-active>:nth-child(3){transition-delay:.2s}
#our-story .os3-n{font:400 12px/1 var(--mono);letter-spacing:.24em;text-transform:uppercase;color:rgb(var(--holo));margin:0 0 14px;display:flex;align-items:center;gap:12px}
#our-story .os3-n::after{content:"";height:1px;width:40px;background:currentColor;opacity:.6}
#our-story .os3-beat h3{font:600 clamp(28px,2.5vw,40px)/1.06 var(--font);letter-spacing:-.01em;margin:0 0 14px;color:#fff}
#our-story .os3-beat h3 .ac{font:700 1.22em/1 var(--cur);color:var(--aqua);letter-spacing:0}
#our-story .os3-beat:last-child h3 .ac{color:var(--gold)}
#our-story .os3-beat .b{font-size:clamp(17px,1.25vw,18px);line-height:1.6;color:var(--dim);margin:0;max-width:40ch}

#our-story .os3-stage{position:relative}
#our-story .os3-sticky{--sh:min(calc(100svh - var(--navh) - 96px),600px);position:relative;display:flex;align-items:center;justify-content:center;gap:clamp(20px,2.5vw,36px)}
/* cap is only a layout box — no card, border, radius, scanlines or shadow */
#our-story .cap{position:relative;width:min(var(--sh),calc(100% - 76px));aspect-ratio:1;flex:none;background:transparent;border:0;box-shadow:none;border-radius:0;overflow:visible}
#our-story .cap .glow{position:absolute;inset:8%;z-index:0;pointer-events:none;border-radius:50%;
  background:radial-gradient(closest-side,rgba(var(--holo),.16),transparent 72%);opacity:0;mix-blend-mode:screen;transition:opacity .7s var(--ease-enter)}
#our-story .cap.pulse .glow{opacity:1;transition-duration:.35s}
#our-story .cap .art{position:absolute;inset:-24%;width:148%;height:148%;object-fit:contain;background:transparent;border:0;
  mix-blend-mode:screen;opacity:0;transition:opacity .75s var(--ease-enter);will-change:opacity;
  /* CS README belt-and-braces mask; the loop already feathers the outer 10% to luma 0. Size is a static box, no transform. */
  -webkit-mask-image:radial-gradient(circle at 50% 50%,#000 58%,transparent 76%);
  mask-image:radial-gradient(circle at 50% 50%,#000 58%,transparent 76%)}
#our-story .cap .art.off{opacity:0;transition:opacity .6s ease}
#our-story .cap .art.on{opacity:1;transition:opacity .75s var(--ease-enter)}
/* Creative Studio round-4 alpha loops/stills already have feathered edges — no screen blend, no CSS mask */
#our-story.has-alpha .cap .art,#our-story .cap .art.has-alpha{mix-blend-mode:normal;
  -webkit-mask-image:none;mask-image:none;inset:0;width:100%;height:100%}


/* A20: Puerto Rico main-island silhouette, beat 5 only. Sits behind the drop (the
   beat-5 art uses mix-blend screen, so the outline shows through the black). Wider
   than the diamond, no box. Crossfades with data-active=4; no scroll/timing change. */
#our-story .cap .pr-sil{position:absolute;left:50%;top:50%;width:118%;height:auto;aspect-ratio:1000/401.07;
  transform:translate(-50%,-50%);z-index:0;pointer-events:none;overflow:visible;opacity:0;
  color:var(--aqua);filter:drop-shadow(0 0 16px rgba(91,201,221,.2));
  transition:opacity .75s var(--ease-enter)}
#our-story .cap .pr-sil path{fill:rgba(91,201,221,.09);stroke:currentColor;stroke-width:2.6;stroke-linejoin:round;stroke-linecap:round}
#our-story[data-active="4"] .cap .pr-sil{opacity:1}

#our-story .idx{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:18px;font:400 12px/1 var(--mono);letter-spacing:.2em;flex:none;background:none;border:0}
#our-story .idx li{display:flex;align-items:center;gap:10px;color:var(--faint);transition:color .4s ease;background:none;border:0}
#our-story .idx li::before{content:"";width:18px;height:1px;background:currentColor;transition:width .5s var(--ease-enter)}
#our-story .idx li.on{color:rgb(var(--holo))}
#our-story .idx li.on::before{width:34px}

@media(max-width:899px){
  #our-story .os3-grid{display:flex;flex-direction:column;justify-content:center;gap:22px;padding:8px var(--edge)}
  #our-story .os3-mhead h2{font-size:26px}
  #our-story .os3-beat{max-width:none}
  #our-story .os3-beat h3{font-size:28px;margin-bottom:10px}
  #our-story .os3-n{margin-bottom:10px}
  #our-story .os3-sticky{--sh:min(calc(100vw - 2 * var(--edge)),38svh);flex-direction:column;gap:18px}
  #our-story .cap{width:var(--sh)}
  /* dots only, no container box */
  #our-story .idx{flex-direction:row;gap:12px;justify-content:center;padding:0;background:none;border:0;width:auto}
  #our-story .idx li{font-size:0;gap:0;width:8px;height:8px;border-radius:50%;border:0;background:rgba(255,255,255,.28);padding:0}
  #our-story .idx li::before{display:none}
  #our-story .idx li.on{background:rgb(var(--holo));transform:scale(1.15)}
}
@media(prefers-reduced-motion:reduce){
  #our-story *,#our-story *::before,#our-story *::after{transition:none!important;animation:none!important}
  #our-story .os3-beat>*,#our-story .cap .art,#our-story .os3-mhead{filter:none;transform:none}
  #our-story .cap .glow{display:none}
}


/* dissolve the footer hairline so the module eases into the next section on the same canvas */
footer#contact{border-top-color:transparent}
