/* =========================================================
   CYBRIX world layer: Cy the guide, our story (sideways),
   reviews, and the scrolling story inside every project.
   ========================================================= */

/* ---------- The Earth: the opening, and the backdrop of the whole page ---------- */
.earth { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; }
.footer { position: relative; z-index: 1; }
.cursor { z-index: 400; }                                   /* stays visible above project stories */

.hero { display: block; height: 340vh; min-height: 0; padding: 0; overflow: visible; }
.hero__pin { position: sticky; top: 0; height: 100vh; display: flex; align-items: flex-end; padding: 120px 0 clamp(48px, 6vw, 80px); overflow: hidden; }
.hero__mark-wrap { display: none; }
/* the big title also listens to the screen's height, so on short screens it never runs under the menu */
.hero__title { font-size: clamp(40px, min(10vw, 17vh), 150px); }
@media (max-height: 720px) {
  .hero__pin { padding-top: 92px; padding-bottom: 30px; }
  .hero__title { font-size: clamp(36px, min(10vw, 13.5vh), 150px); margin: 12px 0 16px; }
  .hero__lead { font-size: 14.5px; }
  .hero__bottom { gap: 14px; }
}
.hero__glow { opacity: .5; }
.hero__content { opacity: var(--h1, 1); transform: translateY(calc((1 - var(--h1, 1)) * -46px)); }
.hero__beat { position: absolute; left: 0; right: 0; top: 50%; z-index: 2; display: grid; gap: 18px; justify-items: start; opacity: var(--o, 0); transform: translateY(calc(-50% + (1 - var(--o, 0)) * 40px)); visibility: hidden; }
.hero__beat.is-on { visibility: visible; }
.hero__beat h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 3.9vw, 60px); line-height: 1.08; letter-spacing: -.01em; max-width: 11ch; text-shadow: 0 2px 30px rgba(29, 29, 29, .9); }
.hero__beat h2 em { font-style: normal; color: var(--sand); }
.hero__beat p { color: rgba(244, 241, 236, .82); font-size: clamp(16px, 1.35vw, 19px); max-width: 38ch; }
.hero__legend { display: flex; flex-wrap: wrap; gap: 8px; max-width: 520px; }
.hero__legend span { display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px; border-radius: 100px; border: 1px solid var(--line); background: rgba(29, 29, 29, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 13px; color: var(--muted); transition: color .6s var(--ease), border-color .6s var(--ease); }
.hero__legend span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); transition: background .6s var(--ease), box-shadow .6s var(--ease); }
.hero__legend span.is-on { color: var(--ivory); border-color: var(--line-2); }
.hero__legend span.is-on::before { background: var(--sand-2); box-shadow: 0 0 0 5px rgba(230, 220, 203, .16); }
.hero.is-static { height: auto; }
.hero.is-static .hero__pin { position: relative; height: auto; min-height: 100svh; }
.hero.is-static .hero__beat { display: none; }
.no-earth .hero__pin { background: url("assets/earth-still.jpg") 78% center / cover no-repeat; }
.no-earth .hero__pin::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(29, 29, 29, .92) 0%, rgba(29, 29, 29, .55) 46%, rgba(29, 29, 29, .1) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 26%); }
@media (max-width: 900px) {
  .hero { height: 300vh; }
  .hero__pin { height: 100svh; }                            /* the buttons stay above the phone's own toolbar */
  .hero__beat { top: auto; bottom: clamp(48px, 9vh, 90px); transform: translateY(calc((1 - var(--o, 0)) * 40px)); gap: 14px; }
  .hero__beat h2 { font-size: clamp(30px, 9vw, 46px); }
  .hero__legend span { padding: 6px 11px; font-size: 12px; }
}

/* ---------- Our story: full-screen scenes that change as you scroll ---------- */
.origin { position: relative; height: 560vh; }
.origin__pin { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; align-items: center; background: var(--bg); }
.origin__scenes, .origin__shade { position: absolute; inset: 0; }
.os { position: absolute; inset: 0; margin: 0; opacity: var(--o, 0); overflow: hidden; }
.os > img { position: absolute; inset: -4%; width: 108%; height: 108%; object-fit: cover; transform: translate3d(calc(var(--px, 0) * -14px), calc(var(--py, 0) * -10px), 0) scale(calc(1.12 - var(--t, 0) * .1)); will-change: transform; }
.os--founder { display: grid; place-items: center; background: rgba(24, 24, 23, .78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.os__portrait { position: absolute; right: max(var(--pad), calc((100vw - 1320px) / 2 + var(--pad))); top: 50%; width: min(34vw, 52vh, 440px); aspect-ratio: 1; border-radius: 34px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 50px 120px -40px #000; transform: translateY(-50%) translate3d(calc(var(--px, 0) * 12px), calc(var(--py, 0) * 9px), 0) scale(calc(.9 + var(--o, 0) * .1)) rotate(calc((1 - var(--o, 0)) * 4deg)); }
.os__portrait img { width: 100%; height: 100%; object-fit: cover; }
.origin__shade { background: linear-gradient(90deg, rgba(20, 20, 19, .94) 0%, rgba(20, 20, 19, .8) 30%, rgba(20, 20, 19, .28) 62%, rgba(20, 20, 19, .1) 100%), linear-gradient(0deg, var(--bg) 0%, rgba(29, 29, 29, 0) 16%, rgba(29, 29, 29, 0) 84%, var(--bg) 100%); }
.origin__num { position: absolute; right: max(var(--pad), calc((100vw - 1320px) / 2 + var(--pad))); bottom: clamp(24px, 6vh, 64px); font-family: var(--f-display); font-size: clamp(70px, 13vw, 210px); line-height: .8; color: transparent; -webkit-text-stroke: 1px rgba(230, 220, 203, .38); pointer-events: none; }
.origin__body { position: relative; z-index: 2; display: grid; gap: clamp(18px, 4vh, 44px); }
.origin__title { font-family: var(--f-wide); font-weight: 400; font-size: clamp(15px, 1.3vw, 19px); letter-spacing: .02em; color: rgba(244, 241, 236, .78); }
.origin__title em { font-style: normal; color: var(--sand); }
.origin__kicker .section__label { margin-bottom: 10px; }
.origin__chapters { display: grid; }
.och { grid-area: 1 / 1; display: grid; gap: 14px; justify-items: start; align-content: center; max-width: 620px; opacity: var(--o, 0); transform: translateY(calc((1 - var(--o, 0)) * 34px)); visibility: hidden; }
.och.is-on { visibility: visible; }
.och__img { display: none; }
.och__when { font-family: var(--f-wide); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--sand); padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 100px; background: rgba(20, 20, 19, .5); }
.och h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 4.3vw, 66px); line-height: 1.06; letter-spacing: -.01em; max-width: 12ch; text-shadow: 0 2px 34px rgba(0, 0, 0, .7); }
.och p { font-size: clamp(16px, 1.35vw, 19.5px); color: rgba(244, 241, 236, .84); max-width: 42ch; text-shadow: 0 1px 18px rgba(0, 0, 0, .8); }
.och .socials { margin-top: 6px; }
.origin.is-static { height: auto; padding: clamp(56px, 7vw, 96px) 0; }
.origin.is-static .origin__pin { position: static; height: auto; overflow: visible; background: none; display: block; }
.origin.is-static .origin__scenes, .origin.is-static .origin__shade, .origin.is-static .origin__num, .origin.is-static .origin__foot { display: none; }
.origin.is-static .origin__chapters { gap: 40px; }
.origin.is-static .och { grid-area: auto; --o: 1; visibility: visible; }
.origin.is-static .och__img { display: block; width: 100%; max-width: 620px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 22px; border: 1px solid var(--line); }
.origin.is-static .och__img--face { max-width: 220px; aspect-ratio: 1; }
@media (max-width: 900px) {
  .origin__pin { align-items: flex-end; padding-bottom: clamp(70px, 12vh, 110px); }
  .origin__shade { background: linear-gradient(0deg, rgba(20, 20, 19, .97) 0%, rgba(20, 20, 19, .86) 38%, rgba(20, 20, 19, .2) 70%, rgba(20, 20, 19, .45) 100%); }
  .origin__pin { padding-bottom: calc(100lvh - 100svh + clamp(48px, 9svh, 96px)); }   /* stays clear of the phone's own toolbar */
  .origin__num { bottom: auto; top: 88px; font-size: min(84px, 19vw); }
  .origin__kicker { position: absolute; left: var(--pad); top: 96px; z-index: 2; }
  .origin__kicker .origin__title { display: none; }
  .origin__body { position: static; gap: 18px; }
  .origin__chapters, .origin__foot { position: relative; z-index: 2; }
  .och { align-content: end; gap: 12px; }
  .och h3 { font-size: clamp(26px, 8.4vw, 42px); }
  /* the founder: the photo sits in line above the name, sized to the room that is left, so it can never cover the text */
  .os__portrait { display: none; }
  .origin:not(.is-static) .och--founder .och__img--face { display: block; height: clamp(84px, calc(100svh - 500px), 240px); width: auto; aspect-ratio: 1; object-fit: cover; border-radius: 24px; border: 1px solid var(--line-2); box-shadow: 0 30px 70px -30px #000; }
  .och--founder h3 { font-size: min(7.3vw, 36px); max-width: none; white-space: nowrap; }
}
/* unpinned layout: the label sits in line above the first chapter */
.origin.is-static .origin__pin { padding-bottom: 0; }
.origin.is-static .origin__body { gap: 28px; }
.origin.is-static .origin__kicker { position: static; }
.origin.is-static .origin__kicker .origin__title { display: block; }
.origin__track { display: none; }
.oc { position: relative; flex: none; width: min(470px, 80vw); min-height: min(44vh, 370px); padding: clamp(22px, 2.4vw, 34px); border-radius: 26px; border: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; overflow: hidden; isolation: isolate; transition: border-color .5s var(--ease), transform .7s var(--ease); }
.oc:hover { border-color: var(--line-2); transform: translateY(-6px); }
.oc__year { position: absolute; right: 22px; top: 10px; font-family: var(--f-display); font-size: clamp(64px, 7vw, 104px); line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--line-2); transition: -webkit-text-stroke-color .5s var(--ease); }
.oc:hover .oc__year { -webkit-text-stroke-color: var(--sand); }
.oc__when { font-family: var(--f-wide); font-size: 11.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--sand); }
.oc h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(19px, 1.9vw, 27px); line-height: 1.2; max-width: 17ch; }
.oc p { color: var(--muted); font-size: 15.5px; max-width: 40ch; }
.oc__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.oc__chips span { padding: 6px 12px; border-radius: 100px; border: 1px solid var(--line-2); font-size: 12.5px; color: var(--sand-2); }
.oc--founder { background: linear-gradient(150deg, #2e2c29, var(--bg-2)); border-color: var(--line-2); }
.oc__avatar { width: 112px; height: 112px; border-radius: 50%; margin-bottom: 8px; overflow: hidden; border: 2px solid var(--sand); box-shadow: 0 0 0 6px rgba(198, 185, 165, .12); transition: transform .7s var(--ease); }
.oc__avatar img { width: 100%; height: 100%; object-fit: cover; }
.oc--founder:hover .oc__avatar { transform: scale(1.06); }
.origin__foot { display: flex; align-items: center; gap: 16px; font-family: var(--f-wide); font-size: 11px; letter-spacing: .3em; color: var(--muted); }
.origin__foot i { display: block; flex: none; width: min(260px, 40vw); height: 1px; background: var(--line-2); position: relative; overflow: hidden; }
.origin__foot i::after { content: ""; position: absolute; inset: 0; background: var(--sand); transform-origin: left; transform: scaleX(var(--p, 0)); }
.origin.is-static { height: auto; padding: clamp(56px, 7vw, 96px) 0; }
.origin.is-static .origin__pin { position: static; height: auto; overflow: visible; }
.origin.is-static .origin__view { overflow-x: auto; padding-bottom: 12px; }
.origin.is-static .origin__track { transform: none; }
.origin.is-static .origin__foot { display: none; }
@media (max-width: 700px) { .oc { min-height: 300px; } }

/* ---------- What clients say: cards stack as you scroll ---------- */
.voices__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 6vw, 90px); align-items: start; }
.voices__head { position: sticky; top: 110px; }
.voices__stack { display: grid; gap: clamp(60px, 16vh, 150px); padding-bottom: 6vh; }
.voice { position: sticky; top: calc(13vh + var(--i, 0) * 16px); padding: clamp(24px, 3vw, 42px); border-radius: 28px; border: 1px solid var(--line-2); background: linear-gradient(160deg, #2b2a28, #222221); display: grid; gap: 18px; overflow: hidden; isolation: isolate; transform-origin: 50% 0; transform: scale(calc(1 - var(--cover, 0) * .06)); box-shadow: 0 -18px 50px -30px rgba(0, 0, 0, .9); }
.voice::after { content: ""; position: absolute; inset: 0; background: var(--bg); opacity: calc(var(--cover, 0) * .55); pointer-events: none; }
.voice__stars { display: flex; gap: 4px; color: var(--sand); font-size: 17px; letter-spacing: 2px; }
.voice blockquote { font-weight: 500; font-size: clamp(18px, 1.75vw, 25px); line-height: 1.42; letter-spacing: -.012em; color: var(--ivory); }
.voice blockquote::before { content: "\201C"; display: block; font-family: var(--f-display); font-size: 54px; line-height: .7; color: var(--sand); margin-bottom: 6px; }
.voice__who { display: flex; align-items: center; gap: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.voice__av { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--sand); color: var(--bg); font-family: var(--f-wide); font-weight: 600; font-size: 13px; letter-spacing: .04em; }
.voice__who b { display: block; font-family: var(--f-wide); font-weight: 500; font-size: 15.5px; }
.voice__who small { display: block; color: var(--muted); font-size: 13.5px; }
.voice__tag { margin-left: auto; padding: 6px 12px; border-radius: 100px; border: 1px solid var(--line-2); font-size: 12px; color: var(--sand-2); white-space: nowrap; }
@media (max-width: 900px) {
  .voices__grid { grid-template-columns: 1fr; }
  .voices__head { position: static; }
  .voice { top: calc(84px + var(--i, 0) * 12px); }
  .voice__tag { display: none; }
}
@media (prefers-reduced-motion: reduce) { .voice { position: relative; top: auto; } .voices__stack { gap: 18px; } }

/* ---------- The story inside a project ---------- */
.ps { position: fixed; inset: 0; z-index: 250; background: var(--bg); --accent: var(--sand); clip-path: circle(0% at var(--cx, 50%) var(--cyy, 50%)); transition: clip-path .95s var(--ease-in-out); }
.ps[hidden] { display: none; }
.ps.is-open { clip-path: circle(150% at var(--cx, 50%) var(--cyy, 50%)); }
.ps__scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; }
.ps__scroll::-webkit-scrollbar { display: none; }
.ps__close { position: absolute; right: var(--pad); top: 18px; z-index: 5; width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(29, 29, 29, .75); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: background .4s var(--ease), border-color .4s var(--ease), transform .6s var(--ease); }
.ps__close:hover { background: var(--sand); border-color: var(--sand); transform: rotate(90deg); }
.ps__close span { position: absolute; left: 17px; right: 17px; top: 26px; height: 1px; background: var(--ivory); transform: rotate(45deg); transition: background .4s var(--ease); }
.ps__close span:last-child { transform: rotate(-45deg); }
.ps__close:hover span { background: var(--bg); }
.ps__cover { position: relative; min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 16px; padding: 90px var(--pad) 70px; background: radial-gradient(58% 58% at 50% 42%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 72%); }
.ps__icon { width: 96px; height: 96px; border-radius: 26px; overflow: hidden; display: grid; place-items: center; background: var(--accent); color: #111; font-family: var(--f-display); font-size: 38px; box-shadow: 0 24px 60px -20px color-mix(in srgb, var(--accent) 70%, transparent); }
.ps__icon img { width: 100%; height: 100%; object-fit: cover; }
.ps__cat { font-family: var(--f-wide); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--sand-2); }
.ps__name { font-family: var(--f-display); font-weight: 400; font-size: clamp(34px, 8.4vw, 124px); line-height: 1; letter-spacing: -.01em; max-width: 12ch; }
.ps__cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: grid; justify-items: center; gap: 8px; font-family: var(--f-wide); font-size: 10px; letter-spacing: .34em; text-transform: uppercase; color: var(--muted); }
.ps__cue i { width: 1px; height: 34px; background: linear-gradient(var(--sand), transparent); transform-origin: top; animation: cue 2.6s var(--ease-in-out) -1s infinite; }
.ps__track { position: relative; height: 340vh; }
.ps__pin { position: sticky; top: 0; height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: clamp(24px, 5vw, 80px); padding: 0 max(var(--pad), calc((100vw - 1320px) / 2 + var(--pad))); overflow: hidden; }
.ps__text { display: grid; }
.ps__ch { grid-area: 1 / 1; display: grid; gap: 18px; justify-items: start; align-content: center; opacity: var(--o, 0); transform: translateY(calc((1 - var(--o, 0)) * 26px)); visibility: hidden; }
.ps__ch.is-on { visibility: visible; }
.ps__label { font-family: var(--f-wide); font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--accent); filter: brightness(1.25); }
.ps__ch p { font-weight: 500; font-size: clamp(19px, 2.1vw, 31px); line-height: 1.32; letter-spacing: -.015em; max-width: 24ch; }
.ps__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ps__chips span { padding: 8px 14px; border-radius: 100px; border: 1px solid var(--line-2); font-size: 13.5px; }
.ps__stage { position: relative; height: min(76vh, 680px); display: grid; place-items: center; }
.ps-phone { position: absolute; height: 100%; border-radius: 34px; padding: 8px; background: #111; border: 1px solid var(--line-2); box-shadow: 0 40px 80px -40px #000; transform: translateX(calc(var(--d, 0) * 52%)) rotate(calc(var(--d, 0) * 7deg)) scale(calc(1 - var(--ad, 0) * .16)); opacity: calc(1 - var(--ad, 0) * .5); will-change: transform; }
.ps-phone img { height: 100%; width: auto; max-width: none; border-radius: 27px; }
.ps-browser { width: 100%; max-width: 780px; border-radius: 18px; border: 1px solid var(--line-2); background: #151515; overflow: hidden; box-shadow: 0 40px 90px -50px #000; }
.ps-browser__bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.ps-browser__bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a3a39; }
.ps-browser__bar span { margin-left: 10px; padding: 4px 12px; border-radius: 8px; background: rgba(255, 255, 255, .05); }
.ps-browser__view { height: min(60vh, 540px); overflow: hidden; }
.ps-browser__view img { width: 100%; height: auto; transform: translate3d(0, calc(var(--sy, 0) * -1px), 0); will-change: transform; }
.ps-cover { width: 100%; max-width: 780px; aspect-ratio: 16 / 10; border-radius: 22px; border: 1px solid var(--line-2); display: grid; place-content: center; text-align: center; gap: 10px; background: radial-gradient(70% 90% at 30% 20%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 70%), var(--bg-2); }
.ps-cover b { font-family: var(--f-display); font-weight: 400; font-size: clamp(22px, 3.4vw, 46px); letter-spacing: .04em; }
.ps-cover small { font-family: var(--f-wide); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--sand-2); }
.ps__dots { position: absolute; left: 50%; bottom: 26px; display: flex; gap: 8px; transform: translateX(-50%); }
.ps__dots i { width: 26px; height: 2px; border-radius: 2px; background: var(--line-2); transition: background .5s var(--ease); }
.ps__dots i.is-on { background: var(--accent); }
.ps__end { min-height: 72vh; display: grid; place-content: center; justify-items: center; gap: 26px; text-align: center; padding: var(--pad); border-top: 1px solid var(--line); }
.ps__end h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(26px, 4.4vw, 58px); line-height: 1.1; max-width: 14ch; }
.ps__end-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.ps-open, .ps-open body { overflow: hidden; }
@media (max-width: 900px) {
  .ps__pin { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 14px; padding-top: 84px; padding-bottom: 60px; align-items: start; }
  .ps__stage { order: -1; height: 48svh; }
  .ps__ch { gap: 12px; align-content: start; }
  .ps__ch p { font-size: 18px; }
  .ps-browser__view { height: 36svh; }
  .ps-phone { border-radius: 26px; padding: 6px; }
  .ps-phone img { border-radius: 21px; }
}
.ps__cue { transition: opacity .5s var(--ease); }
.ps.is-scrolled .ps__cue { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .ps { transition: none; }
}
