/* ==========================================================
   DINGO DUO — alt.css
   The carousel cut: one section per slide, heading centred up
   top, the work shown whole in the middle, copy underneath.
   Sits on top of main.css (tokens, type, buttons, nav, grain).
   html.alt-carousel  = one slide at a time (desktop, tablet landscape)
   html.alt-stack     = a normal scrolling page (phones, short windows)
   ========================================================== */

body.alt { background: var(--ink); }

/* nav: always readable over the frames */
body.alt .nav { background: linear-gradient(180deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.45) 70%, transparent 100%); }
body.alt .nav__links a.is-current:not(.btn) { color: var(--orange); opacity: 1; }

/* ambient dust: above the frames, under the nav and film grain */
#dustCanvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 50; pointer-events: none; }

/* ---------- Slide anatomy ---------- */
.slide { position: relative; overflow: hidden; }
.slide > * { position: relative; z-index: 1; }

/* a soft, dark bloom of the slide's own image fills the screen behind the frame */
.slide__bg {
  position: absolute !important; inset: -10%; z-index: 0 !important;
  background-size: cover; background-position: center;
  filter: blur(46px) saturate(1.35) brightness(.34);
  transform: scale(1.08);
}
.slide__bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 55%, transparent 30%, rgba(14,8,4,.7) 100%); }

.slide__head { text-align: center; width: 100%; max-width: 62rem; margin: 0 auto; }
.slide__head .scene-label, .slide__head .eyebrow { margin-bottom: .55rem; }
.slide__head h2 { font-size: clamp(1.9rem, 3.7vw, 3.5rem); margin-bottom: .5rem; }
.slide__title { font-size: clamp(2.2rem, 5vw, 4.9rem); line-height: .98; margin-bottom: 0; }
.slide__title span { display: block; }
.slide__title i { font-style: normal; }
@media (max-width: 700px) { .slide__title i { display: block; } }
.slide__lead { max-width: 46rem; margin: 0 auto; font-size: clamp(.95rem, 1.2vw, 1.08rem); line-height: 1.5; color: var(--bone); }

.slide__media { width: 100%; display: flex; align-items: center; justify-content: center; }
.frame { position: relative; margin: 0; aspect-ratio: var(--ar); background: #000; box-shadow: 0 28px 80px rgba(0,0,0,.65), 0 0 0 1px rgba(237,227,211,.08); }
.frame img, .frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.frame--badge { background: none; box-shadow: none; }
.frame--badge img { object-fit: contain; filter: drop-shadow(0 0 40px rgba(241,90,36,.35)); }

.slide__foot { width: 100%; max-width: 64rem; margin: 0 auto; text-align: center; }
.slide__ctas { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }
.slide__foot > .slide__ctas:first-child { margin-top: 0; }
.slide--hero .slide__lead { max-width: 52rem; }

/* what we make: two offers */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 54rem; margin: 0 auto; text-align: left; }
.tile {
  display: flex; flex-direction: column; gap: .3rem;
  padding: 1rem 1.25rem; border-radius: 6px;
  background: rgba(0,0,0,.55); border: 1px solid rgba(237,227,211,.2);
  color: var(--bone); text-decoration: none; font-size: .9rem; line-height: 1.45;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.tile:hover { border-color: var(--orange); background: rgba(241,90,36,.14); }
.tile--primary { box-shadow: inset 0 3px 0 var(--orange); }
.tile b { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 1.1rem; color: var(--white); }
.tile__tag { color: var(--orange); font-size: .68rem; }

/* founders: two compact bios */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 3vw, 2.6rem); text-align: left; }
.duo__one { display: flex; gap: 1rem; align-items: flex-start; }
.duo__one img { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 6px; object-fit: cover; filter: grayscale(1) contrast(1.2); }
.duo__one h3 { font-size: 1.2rem; margin-bottom: .3rem; }
.duo__one p { font-size: .88rem; line-height: 1.45; }
.duo__role { color: var(--orange); font-size: .64rem !important; margin-bottom: .25rem; }

.credits-line { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.2rem; margin-top: 1rem; color: rgba(237,227,211,.5); font-size: .7rem; }
.credits-line a { color: rgba(237,227,211,.75); text-decoration: none; }
.credits-line a:hover { color: var(--orange); }

/* ---------- Sound button: the only thing at the bottom ---------- */
.alt-sound {
  position: fixed; right: clamp(1rem, 3vw, 2.4rem); bottom: 1.1rem; z-index: 100;
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .05em; text-transform: uppercase;
}
.alt-sound .hud__sound { background: rgba(0,0,0,.55); border-radius: 6px; }

/* ==========================================================
   CAROUSEL MODE
   ========================================================== */
html.alt-carousel, html.alt-carousel body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.alt-carousel { scroll-behavior: auto; }

html.alt-carousel .slides { position: fixed; inset: 0; }
html.alt-carousel .slide {
  position: absolute; inset: 0;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  row-gap: clamp(.8rem, 2.2vh, 1.7rem);
  padding: calc(4.4rem + 1vh) clamp(4.8rem, 7vw, 7rem) 4.4rem;
  opacity: 0; visibility: hidden;
  transition: opacity .7s var(--ease), visibility 0s linear .9s;
}
html.alt-carousel .slide.is-active { opacity: 1; visibility: visible; transition: opacity .7s var(--ease), visibility 0s; }

/* the frame fills whatever height is left, whole and uncropped */
html.alt-carousel .slide__media { height: 100%; min-height: 0; container-type: size; }
html.alt-carousel .frame { width: min(100cqw, 100cqh * var(--ar)); }

/* carousel motion: frames slide in from the side they come from */
html.alt-carousel .frame { transition: transform 1s var(--snap), opacity .8s var(--ease); }
html.alt-carousel .slide.is-before .frame { transform: translateX(-14vw) scale(.9); opacity: 0; }
html.alt-carousel .slide.is-after .frame { transform: translateX(14vw) scale(.9); opacity: 0; }
html.alt-carousel .slide__head, html.alt-carousel .slide__foot { transition: transform .8s var(--snap), opacity .6s var(--ease); }
html.alt-carousel .slide:not(.is-active) .slide__head { transform: translateY(-18px); opacity: 0; }
html.alt-carousel .slide:not(.is-active) .slide__foot { transform: translateY(18px); opacity: 0; }
html.alt-carousel .slide.is-active .slide__head { transition-delay: .2s; }
html.alt-carousel .slide.is-active .slide__foot { transition-delay: .35s; }
html.alt-carousel .slide.is-active .slide__bg { animation: bgDrift 16s ease-in-out infinite alternate; }
@keyframes bgDrift { from { transform: scale(1.08) translateX(-1.5%); } to { transform: scale(1.16) translateX(1.5%); } }

/* arrows */
.arrow, .dots { display: none; }
html.alt-carousel .arrow {
  display: block; position: fixed; top: 50%; z-index: 60;
  width: 50px; height: 50px; margin-top: -25px; border-radius: 6px;
  background: rgba(0,0,0,.45); border: 1px solid rgba(237,227,211,.35);
  cursor: pointer; transition: border-color .2s, background .2s, opacity .3s;
}
html.alt-carousel .arrow::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px;
  border-right: 2px solid var(--bone); border-bottom: 2px solid var(--bone);
}
.arrow--prev { left: clamp(1rem, 2vw, 2rem); }
.arrow--next { right: clamp(1rem, 2vw, 2rem); }
.arrow--prev::before { transform: translate(-30%, -50%) rotate(135deg); }
.arrow--next::before { transform: translate(-70%, -50%) rotate(-45deg); }
html.alt-carousel .arrow:hover { border-color: var(--orange); background: rgba(241,90,36,.18); }
html.alt-carousel .arrow:hover::before { border-color: var(--orange); }
html.alt-carousel .arrow[disabled] { opacity: 0; pointer-events: none; }
/* first visit: the next arrow glows until it's used */
html.alt-carousel .arrow.is-hint { border-color: var(--orange); animation: scrollGlow 1.8s ease-out infinite; }
html.alt-carousel .arrow.is-hint::before { border-color: var(--orange); }

/* section dots: bars, no labels */
html.alt-carousel .dots { display: flex; position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 60; gap: 6px; }
.dots button { width: 34px; height: 22px; background: none; border: 0; padding: 0; cursor: pointer; position: relative; }
.dots button::before { content: ""; position: absolute; left: 4px; right: 4px; top: 10px; height: 3px; border-radius: 2px; background: rgba(237,227,211,.35); transition: background .3s, left .3s var(--ease), right .3s var(--ease); }
.dots button:hover::before { background: var(--bone); }
.dots button[aria-current="true"]::before { background: var(--orange); left: 0; right: 0; }

/* short laptop screens: tighten so the frame keeps its size */
@media (max-height: 760px) {
  html.alt-carousel .slide { padding-top: 4.2rem; padding-bottom: 3.8rem; row-gap: .7rem; }
  .slide__head h2 { font-size: clamp(1.6rem, 3vw, 2.6rem); margin-bottom: .3rem; }
  .slide__title { font-size: clamp(2rem, 4.2vw, 3.6rem); }
  .slide__lead { font-size: .92rem; }
  .duo__one p, .tile { font-size: .82rem; }
  .duo__one img { width: 56px; height: 56px; }
}

/* ==========================================================
   STACK MODE — phones and short windows: a normal page
   ========================================================== */
html.alt-stack .slide {
  display: flex; flex-direction: column; align-items: center; gap: 1.4rem;
  padding: 6rem 1.2rem 3.6rem;
  border-top: 1px solid rgba(241,90,36,.3);
}
html.alt-stack .slide--hero { border-top: 0; padding-top: 6.5rem; }
html.alt-stack .frame { width: 100%; }
html.alt-stack .slide--lara .frame { width: min(100%, 380px); }
html.alt-stack .frame--badge { width: min(80%, 320px); }
html.alt-stack .slide--contact { padding-bottom: 5rem; }

@media (max-width: 700px) {
  .tiles, .duo { grid-template-columns: 1fr; }
  .slide__ctas .btn { justify-content: center; }
  .slide--hero .slide__ctas .btn { width: 100%; }
  .slide--contact .btn--lg { font-size: .76rem; padding: 1rem 1.1rem; }
  body.alt .nav__brand span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html.alt-carousel .slide, html.alt-carousel .frame,
  html.alt-carousel .slide__head, html.alt-carousel .slide__foot { transition: none !important; }
  .slide__bg { animation: none !important; }
}

/* founders: names and titles only, headshots in black and white */
.duo--names { max-width: 46rem; margin: 0 auto; }
.duo--names .duo__one { margin: 0; align-items: center; }
.duo--names .duo__one img { width: 88px; height: 88px; border-radius: 8px; filter: grayscale(1); }
.duo--names h3 { font-size: 1.35rem; margin-bottom: .35rem; }
.duo--names .duo__role { font-size: .7rem !important; line-height: 1.4; }
@media (max-height: 760px) { .duo--names .duo__one img { width: 64px; height: 64px; } }

/* phones: the coloured half of each heading drops to its own line */
@media (max-width: 700px) {
  .slide__head h2 > span { display: block; }
}

/* paragraph break inside a single lead */
.para { display: block; margin-top: .7em; }

/* end card: the logo sits smaller, well inside its row */
html.alt-carousel .slide--contact .frame--badge { width: min(100cqw, 81cqh, 600px); }
html.alt-stack .slide--contact .frame--badge { width: min(71%, 290px); }

/* green AI in the hero title */
.slide__title em { font-style: normal; }
.slide__title .c-teal { color: var(--teal-hi); }
.slide__title .c-sand { color: var(--sand); }

/* trailer playing: grain, vignette, dust and the drifting blur all stand down
   so nothing composites over the video each frame */
html.is-playing .grain, html.is-playing .vignette, html.is-playing #dustCanvas { display: none; }
html.is-playing .slide__bg { animation: none !important; }
html.is-playing .slide--film .slide__bg { display: none; }
.frame--video video { transform: translateZ(0); }

/* big centred play button on the trailer */
.frame--video { position: relative; }
.playbig {
  position: absolute; left: 50%; top: 50%; z-index: 3;
  width: clamp(72px, 9vw, 116px); height: clamp(72px, 9vw, 116px);
  transform: translate(-50%, -50%) scale(.85); border-radius: 50%;
  background: var(--orange); border: 0; cursor: pointer;
  box-shadow: 0 0 0 10px rgba(241,90,36,.25), 0 18px 50px rgba(0,0,0,.55);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease), background .2s;
}
.playbig span {
  position: absolute; left: 54%; top: 50%; transform: translate(-50%, -50%);
  width: 0; height: 0; border-style: solid;
  border-width: clamp(14px, 1.7vw, 22px) 0 clamp(14px, 1.7vw, 22px) clamp(22px, 2.7vw, 36px);
  border-color: transparent transparent transparent #000;
}
.frame--video.is-idle .playbig { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); animation: playPulse 2.2s ease-out infinite; }
.playbig:hover { background: var(--white); }
@keyframes playPulse { 0% { box-shadow: 0 0 0 0 rgba(241,90,36,.55), 0 18px 50px rgba(0,0,0,.55); } 100% { box-shadow: 0 0 0 24px rgba(241,90,36,0), 0 18px 50px rgba(0,0,0,.55); } }

/* never let anything push the page sideways on phones */
html, body.alt { overflow-x: clip; }
