/* Homepage: pinned, scroll-driven scenes. Every scene is a 100svh stage pinned by
   GSAP ScrollTrigger (js/home.js); without the script the scenes still read top to bottom. */
body[data-page="home"] { background: linear-gradient(180deg, #F4EFE6 0%, #F2EEE6 40%, #EFE7DD 72%, #F2EDE4 100%); }
.home .hl { color: var(--brand); font-style: normal; }
.js .h-call, .js .o-copy, .js .s-p1, .js .s-eco, .js .s-p2, .js .s-word, .js .a-copy { opacity: 0; }

/* ------------------------------------------------------------ 1. hero */
.h-stage { position: relative; height: 100svh; min-height: 560px; overflow: hidden; }
/* a phone held sideways: the hero is measured (home.js), so it can be as short as the screen */
@media (max-height: 560px) { .h-stage { min-height: 0; } }
.h-title { position: absolute; z-index: 4; left: 50%; width: max-content; max-width: 94vw; transform: translate(-50%, 0);
  /* top-anchored, never under the menu; sized by the width AND the height, so a wide but short window does not
     get a headline too big for the watch below it (home.js fits the watch into what is left) */
  top: max(calc(var(--nav-h) + 26px), calc(30% - 1.47em));
  text-align: center; font-size: clamp(36px, min(6.6vw, 10.2vh), 112px); font-size: clamp(36px, min(6.6vw, 10.2svh), 112px);
  line-height: .98; letter-spacing: -.035em; color: var(--ink); will-change: transform, opacity; }
.h-line { display: block; white-space: nowrap; }
.h-watch { position: absolute; z-index: 2; inset: 0; pointer-events: none; will-change: transform; }
.h-turn { position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 9%, #000 24%, #000 76%, transparent 91%); mask-image: linear-gradient(to bottom, transparent 9%, #000 24%, #000 76%, transparent 91%); }
/* the listening light: the talk button's own ring lit red (Cole, 2026-10-15: a drawn circle looked cheap), a photo
   patch of the first frame's button made with its ring glowing, laid over that frame by home.js and breathing while James listens */
.h-light { position: absolute; left: 0; top: 0; width: 0; height: auto; max-width: none; opacity: 0; pointer-events: none; transition: opacity .4s; }
.h-light.on { opacity: 1; animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 0%, 100% { opacity: .5; } 45%, 60% { opacity: 1; } }
@keyframes listen { 0%, 100% { opacity: .3; } 45%, 60% { opacity: 1; } }
/* sized in em: home.js sets its font-size against the watch's scale, so it reads at about 13px at rest */
.h-tag { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: .55em; padding: .48em .95em .48em .75em; border-radius: 999px; white-space: nowrap;
  font-size: 22px; font-weight: 500; color: var(--ink); background: rgba(251, 248, 242, .92); border: 1px solid rgba(255, 255, 255, .8); box-shadow: 0 14px 30px -18px rgba(40, 30, 20, .6);
  opacity: 0; transform: translate(1.4em, -50%); transition: opacity .5s; }
.h-tag i { width: .6em; height: .6em; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 0 .2em rgba(226, 63, 47, .18); animation: listen 1.5s ease-in-out infinite; }
.h-tag::before { content: ""; position: absolute; right: 100%; top: 50%; width: 1.55em; height: max(1px, .09em); background: rgba(36, 39, 42, .35); }
.h-tag.on { opacity: 1; }
/* the scroll pill, as natura.inc's (Cole, 2026-10-15: "show a scroll indicator"): bottom left beside the watch,
   centred under it on phones */
.h-hint { position: absolute; z-index: 5; left: clamp(20px, 3vw, 44px); bottom: clamp(22px, 4vh, 44px); display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 18px 0 14px;
  border: 1px solid var(--line-2); border-radius: 999px; background: rgba(251, 248, 242, .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 11px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--ink-2); pointer-events: none; }
.h-hint svg { width: 13px; height: 13px; transform: rotate(90deg); animation: hint 2.2s var(--ease) infinite; }
@keyframes hint { 0%, 100% { translate: 0 -2px; } 50% { translate: 0 3px; } }
.h-call { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
.h-call h2 { position: absolute; left: clamp(20px, 5vw, 90px); top: 50%; transform: translateY(-50%); font-size: clamp(38px, 4.2vw, 68px); line-height: 1; letter-spacing: -.035em; }
.h-call p { position: absolute; right: clamp(20px, 5vw, 90px); top: 50%; transform: translateY(-50%); width: min(330px, 26vw); font-size: 15.5px; color: var(--ink-2); line-height: 1.55; }

/* --------------------------------------------- 2. portal: one watch, orbit */
.p-stage { position: relative; height: 100svh; min-height: 560px; overflow: hidden; }
.p-words { position: absolute; z-index: 1; inset: 0; pointer-events: none; font-family: var(--serif); font-weight: 300; font-size: clamp(52px, 8.2vw, 148px); line-height: .95; letter-spacing: -.045em; }
.p-line { position: absolute; left: 0; right: 0; text-align: center; white-space: nowrap; }
.p-top { top: 7%; }
.p-bottom { bottom: 7%; }
.p-watch { position: absolute; z-index: 2; left: 50%; top: 50%; height: 56svh; width: auto; transform: translate(-50%, -50%); transform-origin: 46.5% 50%; will-change: transform; filter: drop-shadow(0 40px 50px rgba(40, 30, 20, .22)); }
.p-orbit { position: absolute; z-index: 3; inset: 0; background: linear-gradient(180deg, #F4EFE6, #EEE5DB); clip-path: circle(0% at 50% 50%); }
.no-js .p-orbit { clip-path: none; }
/* The ring of agents sits round the man the way natura.inc's sits round the woman: home.js (fitOrbit) centres it on
   his raised wrist, makes it as big as the captions beside it allow, scales him with it and puts the laptop and the
   phone in its middle. The icons pass in front of him and behind the devices. These sizes are for a page without
   the script. .o-scene holds the ring, the man and the devices, so they leave together when the gallery comes in. */
.o-scene { position: absolute; inset: 0; will-change: transform; }
.o-ring { position: absolute; z-index: 2; left: 50%; top: 50%; width: min(66svh, 600px); height: min(66svh, 600px); --r: min(33svh, 300px); transform: translate(-50%, -50%); }
.o-spin { position: absolute; inset: 0; animation: spin 80s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.o-app { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  transform: rotate(calc(var(--i) * 360deg / var(--n, 12))) translateY(calc(var(--r) * -1)) rotate(calc(var(--i) * -360deg / var(--n, 12))); }
.o-spin { --n: 12; }
.o-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(36, 39, 42, .1); }
/* James's own tile is the app icon itself; the last tile is "your own agent" */
.app.brand { background: #fff; overflow: hidden; box-shadow: 0 10px 24px -14px rgba(30, 24, 16, .45), 0 0 0 1px rgba(36, 39, 42, .1); }
.app.brand img { width: 100%; height: 100%; border-radius: inherit; }
.app.add { background: rgba(251, 248, 242, .7); box-shadow: inset 0 0 0 1.5px rgba(36, 39, 42, .28); color: var(--ink-2); }
.app.add svg { width: 40%; height: 40%; }
.o-unspin { display: block; width: 100%; height: 100%; animation: spin 80s linear infinite reverse; }
/* the picture fades out its own cut torso at the left edge (img/cut-man.webp), so no mask here */
.o-man { position: absolute; z-index: 1; left: 50%; bottom: 0; height: 80svh; width: auto; max-width: none; transform: translateX(-50%); }
/* under the captions (tablets, phones) he floats in the middle of the room, so his cut torso fades out */
.o-man.float { -webkit-mask-image: linear-gradient(to bottom, #000 66%, transparent 97%); mask-image: linear-gradient(to bottom, #000 66%, transparent 97%); }
.o-device { position: absolute; z-index: 3; left: 50%; top: 52%; opacity: 0; }
.o-mac { width: min(560px, 44vw); transform: translate(-50%, -50%); }
.o-mac-screen { border-radius: 14px 14px 0 0; overflow: hidden; background: #FBF9F5; border: 10px solid #1b1d1f; border-bottom-width: 14px; box-shadow: 0 40px 70px -40px rgba(30, 20, 10, .6); }
.o-mac-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.o-mac-body > b { font-family: var(--serif); font-weight: 300; font-size: 24px; margin-bottom: 4px; }
.o-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; }
.o-row img { width: 20px; height: 20px; object-fit: contain; }
.o-row img.brand-icon { border-radius: 5px; box-shadow: none; }
.o-row span b { font-weight: 600; margin-right: 7px; }
.o-mac-base { height: 12px; margin: 0 -7%; border-radius: 0 0 14px 14px; background: linear-gradient(#cfd2d4, #a9adb0); }
.o-phone { zoom: .86; }
.o-copy { position: absolute; z-index: 4; inset: 0; pointer-events: none; }
.o-copy h2 { position: absolute; left: clamp(20px, 5vw, 90px); top: 46%; transform: translateY(-50%); font-size: clamp(34px, 3.2vw, 56px); line-height: 1; letter-spacing: -.035em; }
.o-copy p { position: absolute; right: clamp(20px, 5vw, 90px); top: 46%; transform: translateY(-50%); width: min(300px, 22vw); font-size: 15.5px; color: var(--ink-2); }

/* ------------------------------------------------ 3. gallery, sideways */
.g-stage { position: relative; height: 100svh; min-height: 560px; overflow: hidden; display: flex; align-items: center; perspective: 1400px; }
/* inside the agents' stage: home.js slides the track in from the right as the ring leaves */
.p-gallery { position: absolute; z-index: 5; inset: 0; height: auto; min-height: 0; pointer-events: none; }
.js .p-gallery { visibility: hidden; }
.js .p-gallery .g-track { transform: translateX(115vw); }
.g-track { display: flex; gap: clamp(18px, 2.4vw, 40px); padding: 0 12vw; will-change: transform; transform-style: preserve-3d; }
/* the photo keeps the rounded corners; the agent's tile and the note sit over its edges, as natura.inc's do */
.g-card { position: relative; flex: none; width: min(64vw, 900px); aspect-ratio: 16 / 10.4; margin: 0; transform-origin: center; will-change: transform; }
.g-photo { position: absolute; inset: 0; border-radius: 28px; overflow: hidden; background: #2b2723; box-shadow: 0 40px 80px -50px rgba(30, 20, 10, .7); }
.g-photo > img { width: 100%; height: 100%; object-fit: cover; animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.09) translate(-1.2%, -0.8%); } }
.g-agent { position: absolute; z-index: 2; top: -22px; right: -22px; width: 64px; height: 64px; box-shadow: 0 18px 34px -16px rgba(30, 24, 16, .55), inset 0 0 0 1px rgba(0, 0, 0, .05); }
.g-ui { position: absolute; z-index: 2; left: -26px; bottom: -26px; width: min(380px, calc(100% - 20px)); display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center;
  padding: 16px; border-radius: 20px; background: rgba(251, 249, 245, .9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 24px 50px -28px rgba(0, 0, 0, .55); }
.g-app { width: 44px; height: 44px; display: grid; place-items: center; }
.g-app .brand-icon { width: 44px; height: 44px; border-radius: 11px; box-shadow: none; }
.g-ui b { display: block; font-size: 14px; font-weight: 600; }
/* the text's own spans only: the icon tile is a span too, and this rule made it a plain block, so its logo sat in the corner */
.g-ui > div > span { display: block; font-family: var(--serif); font-size: 19px; line-height: 1.2; margin-top: 4px; }
.g-ui small { display: block; font-size: 12px; color: var(--ink-2); margin-top: 6px; }
/* the app icon sits level with the middle of the text (Cole, 2026-10-15); the status pill stays up by the title */
.g-ui em { font-style: normal; align-self: start; }

/* -------------------------------------------- 4. the apps fold into James OS */
.s-stage { position: relative; height: 100svh; min-height: 560px; overflow: hidden; }
.s-word { position: absolute; z-index: 1; inset: 0; display: grid; grid-template-columns: 1fr clamp(190px, 19vw, 300px) 1fr; align-items: center; pointer-events: none;
  font-family: var(--serif); font-weight: 300; font-size: clamp(90px, 15vw, 270px); letter-spacing: -.05em; line-height: 1; }
.s-left { grid-column: 1; justify-self: end; }
.s-right { grid-column: 3; justify-self: start; }
.s-gather { position: absolute; z-index: 2; left: 50%; top: 50%; width: 0; height: 0; }
.s-ic { position: absolute; width: 96px; height: 96px; margin: -48px 0 0 -48px; }
.s-icon { position: absolute; z-index: 3; left: 50%; top: 50%; width: clamp(140px, 14vw, 210px); height: auto; transform: translate(-50%, -50%) scale(.2); opacity: 0; border-radius: 22%; box-shadow: 0 40px 70px -34px rgba(10, 12, 14, .6); }
.s-p1 { position: absolute; z-index: 4; left: clamp(20px, 5vw, 90px); bottom: clamp(30px, 9vh, 96px); width: min(380px, 80vw); font-size: 15.5px; color: var(--ink-2); }
.s-eco { position: absolute; z-index: 4; left: clamp(20px, 5vw, 90px); top: 50%; transform: translateY(-50%); max-width: 30vw; }
.s-eco h2 { font-size: clamp(30px, 3vw, 50px); line-height: 1.04; margin-top: 16px; }
.s-p2 { position: absolute; z-index: 4; right: clamp(20px, 5vw, 90px); top: 50%; transform: translateY(-50%); width: min(300px, 24vw); font-size: 15.5px; color: var(--ink-2); }

/* ----------------------------------------------- 5. sentence revealed */
.r-reveal { padding: clamp(100px, 18vh, 220px) 0; }
.r-text { font-family: var(--serif); font-weight: 300; font-size: clamp(34px, 5vw, 80px); line-height: 1.1; letter-spacing: -.03em; text-align: center; max-width: 1180px; margin: 0 auto; text-wrap: balance; }
.js .r-text .rw { opacity: .14; transition: opacity .25s linear; }
.js .r-text .rw.on { opacity: 1; }

/* ------------------------------------------- 7. every app into James OS */
.a-stage { position: relative; height: 100svh; min-height: 560px; overflow: hidden; }
.a-field { position: absolute; inset: 8% 4%; }
.a-ic { position: absolute; left: var(--l); top: var(--t); width: 64px; height: 64px; margin: -32px 0 0 -32px; will-change: transform; }
.a-icon { position: absolute; z-index: 3; left: 50%; top: 50%; width: clamp(130px, 12vw, 190px); height: auto; transform: translate(-50%, -50%) scale(.4); opacity: 0; border-radius: 22%; box-shadow: 0 40px 70px -34px rgba(10, 12, 14, .6); }
.a-copy { position: absolute; z-index: 4; left: clamp(20px, 5vw, 90px); bottom: clamp(30px, 10vh, 110px); max-width: 520px; }
.a-copy h3 { font-size: clamp(38px, 4vw, 64px); line-height: 1; letter-spacing: -.035em; }
.a-copy p { margin-top: 18px; color: var(--ink-2); font-size: 15.5px; max-width: 460px; }

/* ------------------------------------------------------------ 8. answer */
.ans-title { font-size: clamp(44px, 5.8vw, 92px); letter-spacing: -.04em; max-width: 900px; }

/* --------------------------------------------------------------- tablet */
@media (max-width: 1100px) {
  .h-call p { width: min(280px, 30vw); }
  .o-copy p { width: min(240px, 24vw); }
  .s-eco { max-width: 34vw; }
}

/* ------------------------------------------------- portrait tablets (iPad) */
/* Tall screens leave no room beside the picture, so the captions go above and below it. */
@media (min-width: 701px) and (max-aspect-ratio: 1/1) {
  .h-title { top: max(calc(var(--nav-h) + 40px), calc(26% - 1.47em)); }
  .h-call h2, .o-copy h2 { left: 48px; top: calc(var(--nav-h) + 56px); transform: none; font-size: clamp(44px, 6vw, 64px); }
  .h-call p { left: 48px; right: 48px; top: auto; bottom: 120px; transform: none; width: auto; max-width: 600px; font-size: 17px; }
  .o-copy p { left: 48px; right: 48px; top: calc(var(--nav-h) + 56px + 2.3 * clamp(44px, 6vw, 64px)); transform: none; width: auto; max-width: 600px; font-size: 17px; }
  .o-ring { width: 56vw; height: 56vw; top: 56%; --r: 28vw; }
  .o-man { height: 58svh; }
  .o-mac { width: 70vw; }
  .p-watch { height: 46svh; }
  .s-eco { left: 48px; right: 48px; top: calc(var(--nav-h) + 56px); transform: none; max-width: none; }
  .s-eco h2 { font-size: clamp(44px, 6vw, 64px); }
  .s-p2 { left: 48px; right: 48px; top: auto; bottom: 120px; transform: none; width: auto; max-width: 600px; font-size: 17px; }
  .a-copy { left: 48px; right: 48px; bottom: 120px; }
  .a-copy h3 { font-size: clamp(44px, 6vw, 64px); }
  .a-copy p { font-size: 17px; }
}

/* ------------------------------------------------------------ phone */
@media (max-width: 700px) and (max-height: 720px) { .p-orbit .o-phone { zoom: .6; --oz: .6; } }
@media (max-width: 700px) {
  .h-title { font-size: clamp(30px, min(9.4vw, 6.4vh), 58px); font-size: clamp(30px, min(9.4vw, 6.4svh), 58px); top: max(calc(var(--nav-h) + 30px), calc(24% - 2em)); }   /* 9.4vw: "and your technology." clear of the edges */
  .h-line { white-space: normal; }
  .h-call h2 { left: 20px; top: calc(var(--nav-h) + 40px); transform: none; font-size: 38px; }
  .h-call p { left: 20px; right: 20px; top: auto; bottom: 110px; transform: none; width: auto; font-size: 15px; }
  .h-hint { left: 50%; bottom: max(26px, 4svh); transform: translateX(-50%); }
  .p-words { font-size: 13.4vw; }
  .p-top { top: calc(var(--nav-h) + 30px); }
  .p-bottom { bottom: 110px; }
  .p-watch { height: 46svh; }
  .o-ring { width: 84vw; height: 84vw; --r: 42vw; }
  .o-app { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  .o-man { height: 54svh; }
  .o-copy h2 { left: 20px; top: calc(var(--nav-h) + 34px); transform: none; font-size: 36px; }
  .o-copy p { left: 20px; right: 20px; top: calc(var(--nav-h) + 124px); bottom: auto; transform: none; width: auto; font-size: 14.5px; }
  .o-mac { width: 86vw; }
  .o-phone { zoom: .7; --oz: .7; }
  /* the ring and the devices sit below the caption (up to four lines), never under it; zoom scales the
     phone's px and vw lengths (not its percentages), so its offset is divided by its zoom */
  .o-ring, .o-device { top: max(52%, calc(var(--nav-h) + 248px + 46vw)); }
  .o-phone { top: max(52%, calc((var(--nav-h) + 248px + 46vw) / var(--oz))); }
  .o-copy .ag-strip { display: none; }
  .g-track { padding: 0 6vw; }
  .g-card { width: 84vw; aspect-ratio: 3 / 4.4; }
  .g-ui { left: 12px; right: 12px; bottom: 12px; width: auto; }
  .g-agent { top: -14px; right: -10px; width: 50px; height: 50px; }
  .s-word { grid-template-columns: 1fr; grid-template-rows: 1fr 46vw 1fr; justify-items: center; font-size: 22vw; }
  .s-left { grid-column: 1; grid-row: 1; align-self: end; justify-self: center; }
  .s-right { grid-column: 1; grid-row: 3; align-self: start; justify-self: center; }
  .s-icon { width: 38vw; }
  .s-ic { width: 70px; height: 70px; margin: -35px 0 0 -35px; }
  .s-p1 { left: 20px; right: 20px; width: auto; bottom: 108px; }
  .s-eco { left: 20px; right: 20px; top: calc(var(--nav-h) + 30px); transform: none; max-width: none; }
  .s-eco h2 { font-size: 36px; }
  .s-p2 { left: 20px; right: 20px; top: auto; bottom: 108px; transform: none; width: auto; }
  .a-ic { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
  .a-copy { left: 20px; right: 20px; bottom: 104px; }
  .a-copy h3 { font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .o-spin, .o-unspin, .h-hint svg, .h-light.on, .h-tag i, .g-photo > img { animation: none !important; }
}
