/* GRAHAM motion page, cinematic cut. Static layout first; everything under html.m is the motion layer. */
.gm {
  --ink: #0A0A20; --off: #F7F7F7; --peach: #F7CEB5; --salmon: #F59B87; --orange: #F48143; --navy: #181A47;
  --pad: clamp(20px, 5vw, 72px);
  position: relative; font-family: Montserrat, system-ui, sans-serif; color: #fff; background: var(--ink);
  font-size: 17px; line-height: 1.55; overflow-x: clip;
}
html { scroll-behavior: smooth; }
body { margin: 0; background: #0A0A20; }
.gm *, .gm *::before, .gm *::after { box-sizing: border-box; }
:where(.gm) :where(h1, h2, h3, p, ul, ol, dl, dd, figure, address) { margin: 0; padding: 0; font-style: normal; }
:where(.gm) :where(ul, ol) { list-style: none; }
.gm :is(h1, h2, h3) { color: inherit; padding-bottom: 0; font-family: inherit; }
.gm a { color: inherit; }
.gm dd, .gm dt { margin: 0; }
.gm img { max-width: 100%; height: auto; display: block; }
.wrap { position: relative; z-index: 2; max-width: 1280px; margin: 0 auto; padding: 0 var(--pad); }
.gm section { position: relative; padding: clamp(90px, 15vh, 190px) 0; }
:where(.gm) h2 { font-size: clamp(1.9rem, 4.6vw, 4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.02; margin-bottom: clamp(28px, 5vh, 56px); max-width: 16ch; }
:where(.gm) h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }

/* Film grain over everything */
.gm::after { content: ""; position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: .09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* Buttons: white on the dark film, navy on the light ending */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 999px; background: #fff; color: var(--navy) !important; font-weight: 600; text-decoration: none !important; border: 2px solid #fff; transition: transform .2s ease-out, background-color .2s ease-out, color .2s ease-out; }
.btn:hover { transform: translateY(-2px); }
.btn-line { background: transparent; color: #fff !important; }
.btn-line:hover { background: #fff; color: var(--navy) !important; }
.btn-dark, .visit .btn { background: var(--navy); border-color: var(--navy); color: #fff !important; }
.visit .btn-line { background: transparent; color: var(--navy) !important; }
.visit .btn-line:hover { background: var(--navy); color: #fff !important; }
.btn-sm { min-height: 44px; padding: 0 22px; }
.btn:focus-visible, .gm a:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Top bar */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; gap: 28px; padding: 10px var(--pad); background: rgba(10, 10, 32, .72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.bar .logo { width: clamp(120px, 14vw, 170px); margin-right: auto; }
.bar nav { display: flex; gap: 28px; }
.bar nav a { font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; padding: 12px 0; }
.bar nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
.bars { display: none; }

/* Hero */
.gm .hero { padding: 0; }
.hero .pin { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 120px 0 clamp(56px, 9vh, 110px); }
.orb { position: absolute; right: 2vw; top: 50%; width: min(78vh, 50vw); aspect-ratio: 1; transform: translateY(-50%); -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); }
.orb img, .orb canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.orb canvas { opacity: 0; transition: opacity .4s ease-out; }
.orb.ready canvas { opacity: 1; }
.note { display: none; }
.ta { font-family: "Anek Tamil", sans-serif; font-weight: 500; font-size: 1.05rem; margin-bottom: 18px; opacity: .9; }
.gm h1 { font-size: clamp(2.7rem, 7.4vw, 7.2rem); font-weight: 800; letter-spacing: -0.045em; line-height: .94; max-width: 10ch; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.4rem); font-weight: 500; max-width: 30ch; margin-top: 24px; line-height: 1.35; }
.facts { display: flex; flex-wrap: wrap; gap: 14px 44px; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .25); }
.facts dt { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.facts dd { font-weight: 600; }
.hero .wrap { width: 100%; }
.hero-b { padding-top: clamp(90px, 15vh, 190px); padding-bottom: 40px; }

/* Statements */
.big { font-size: clamp(1.9rem, 4.8vw, 4.4rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.06; max-width: 19ch; }
.after { max-width: 44ch; margin-top: 36px; font-size: 1.1rem; opacity: .85; }

/* Three questions */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.cards article, .track article { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); border-radius: 24px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.cards article { padding: 28px; min-height: 230px; display: flex; flex-direction: column; }
.cards .num { font-size: .85rem; font-weight: 600; opacity: .6; }
.cards h3 { font-size: 1.55rem; margin: auto 0 10px; padding-top: 40px; }
.cards p { opacity: .85; }

/* Tests strip: a wrapped grid without motion, a pinned horizontal track with it */
.strip h2 { margin-left: auto; margin-right: auto; max-width: 1280px; width: 100%; }
.track { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 16px; padding: 0 var(--pad); }
.track article { flex: 1 1 300px; padding: 30px; display: flex; flex-direction: column; gap: 14px; min-height: 340px; }
.track .shot { flex: 1 1 100%; border-radius: 24px; overflow: hidden; }
.track .shot img { width: 100%; height: 100%; object-fit: cover; }
.track article img { width: 56px; height: 56px; filter: brightness(0) invert(1); }
.track h3 { font-size: clamp(1.7rem, 2.6vw, 2.5rem); font-weight: 800; text-transform: uppercase; letter-spacing: -0.03em; line-height: .98; margin-top: auto; display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; }
.track h3 span { font-size: 1rem; font-weight: 600; letter-spacing: 0; opacity: .6; }
.track p { opacity: .85; }
.track .dark { background: #fff; color: var(--navy); border-color: #fff; }
.track .dark img { filter: none; }
.track .btn { align-self: flex-start; }
.prog { display: none; }

/* Plan */
.steps { counter-reset: s; position: relative; max-width: 760px; }
.steps li { counter-increment: s; position: relative; padding: 22px 0 22px 76px; font-size: clamp(1.15rem, 2vw, 1.6rem); font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; border-top: 1px solid rgba(255, 255, 255, .16); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 16px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 1rem; font-weight: 700; background: #fff; color: var(--navy); transition: background-color .3s ease-out, color .3s ease-out, transform .3s ease-out; }

/* X-ray: the one lit panel in the dark */
.gm .xray { background: var(--navy); }
.xray .ic { width: 64px; margin-bottom: 20px; filter: brightness(0) invert(1); }
.xray h2 { margin-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 40px 0; max-width: 820px; }
.chips li { border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; padding: 9px 18px; font-weight: 500; transition: background-color .2s ease-out, color .2s ease-out; }
.chips li:hover { background: #fff; color: var(--navy); }
.rows { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; gap: 0 28px; max-width: 820px; }
.rows dt, .rows dd { padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, .25); }
.rows dt { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .8; padding-top: 22px; }

/* Visit: the film ends in daylight */
.gm .visit { background: var(--peach); color: var(--navy); }
.visit address { font-size: clamp(2rem, 5.6vw, 5rem); font-weight: 800; letter-spacing: -0.04em; line-height: .98; }
.visit .facts { border-top-color: rgba(24, 26, 71, .25); }
.visit .facts dd a { text-decoration: none; }
.hint { margin-top: 18px; font-weight: 600; }

/* Footer */
.foot { position: relative; z-index: 3; background: var(--ink); color: #fff; padding: 72px 0 110px; overflow: hidden; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 40px; }
.foot h2 { font-size: .75rem; font-weight: 500; letter-spacing: .1em; opacity: .6; margin-bottom: 10px; max-width: none; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; text-underline-offset: 5px; }
.foot .tel { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 600; letter-spacing: -0.02em; }
.foot li { font-size: 1.35rem; font-weight: 500; line-height: 1.5; }
.foot .word { width: calc(100% - 2 * var(--pad)); max-width: 1500px; margin: 72px auto 28px; }
.copy { font-size: .8rem; opacity: .7; }

/* Phone call bar */
.callbar { display: none; }
@media (max-width: 759px) {
  .callbar { display: block; position: fixed; inset: auto 0 0 0; z-index: 30; margin: 0; }
  .callbar a { display: flex; align-items: center; justify-content: center; min-height: 56px; padding-bottom: env(safe-area-inset-bottom); background: #fff; color: var(--navy); font-weight: 700; text-decoration: none; }
  .bar nav { display: none; }
  .rows { grid-template-columns: 1fr; }
  .rows dd { border-top: 0; padding-top: 0; }
  .orb { right: -30vw; top: 34%; width: 96vw; opacity: .45; }
  .foot { padding-bottom: 140px; }
}

/* ------------------------------ motion layer ------------------------------ */

/* Opening: letterbox bars pull away, the title comes up */
html.m .bars { display: block; }
html.m .bars i { position: fixed; left: 0; right: 0; height: 50vh; background: #000; z-index: 50; animation: open 1.3s cubic-bezier(.7, 0, .2, 1) .15s both; }
html.m .bars i:first-child { top: 0; transform-origin: top; }
html.m .bars i:last-child { bottom: 0; transform-origin: bottom; }
@keyframes open { from { transform: scaleY(1); } to { transform: scaleY(0); } }
html.m .hero-a > * { animation: rise .8s ease-out both; }
html.m .hero-a > :nth-child(1) { animation-delay: .9s; } html.m .hero-a > :nth-child(2) { animation-delay: 1s; }
html.m .hero-a > :nth-child(3) { animation-delay: 1.15s; } html.m .hero-a > :nth-child(4) { animation-delay: 1.3s; }
html.m .hero-a > :nth-child(5) { animation-delay: 1.45s; }
@keyframes rise { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: none; } }

/* Hero film: pinned for three screens. The drop turns with the scroll, pushes in and drifts to centre;
   the title leaves, the statement sharpens over the dimmed drop. --p runs 0 to 1 across the pin. */
html.m .hero { height: 320vh; --p: 0; }
html.m .hero .pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
html.m .orb {
  --c: clamp(0, calc((var(--p) - .22) * 3.2), 1);
  transform: translate(calc(var(--c) * var(--shift, -24vw)), -50%) scale(calc(1 + var(--p) * .55));
  opacity: calc(1 - var(--c) * .68); filter: blur(calc(var(--c) * 5px)); will-change: transform, opacity;
}
html.m .hero-a { opacity: clamp(0, calc(1 - var(--p) * 4), 1); transform: translateY(calc(var(--p) * -160px)); }
html.m .hero-b { position: absolute; inset: 0; margin: auto; padding: 0 var(--pad); display: grid; place-items: center; text-align: center; opacity: clamp(0, calc((var(--p) - .34) * 9), 1); pointer-events: none; }
html.m .note { display: block; position: absolute; font-size: .72rem; font-weight: 600; letter-spacing: .06em; white-space: nowrap; padding-bottom: 6px; border-bottom: 1px solid rgba(255, 255, 255, .7); opacity: clamp(0, calc(1 - var(--p) * 8), 1); }
.n1 { right: 78%; top: 24%; padding-right: 5vmin; }
.n2 { left: 80%; top: 62%; padding-left: 5vmin; }

/* The travelling drop takes over once the film drop has left */
.drop { display: none; --x: 88vw; --y: 20vh; --s: .42; --rot: 20deg; --o: 0; --blur: 0px; }
html.m .drop {
  display: block; position: fixed; left: 0; top: 0; z-index: 1; width: 34vmin; height: 34vmin; pointer-events: none;
  transform: translate3d(calc(var(--x) - 50%), calc(var(--y) - 50%), 0) scale(var(--s));
  opacity: var(--o); filter: blur(var(--blur));
  transition: transform .9s cubic-bezier(.65, 0, .35, 1), opacity .5s ease-in-out, filter .5s ease-in-out;
  will-change: transform;
}
.drop-s {
  position: absolute; inset: 0; border-radius: 0 50% 50% 50%; transform: rotate(var(--rot));
  background-color: var(--orange); border: 0 solid #fff;
  box-shadow: inset -14px -18px 44px rgba(150, 40, 0, .6), inset 12px 12px 34px rgba(255, 220, 190, .55), 0 0 90px rgba(244, 129, 67, .45);
  transition: transform .9s cubic-bezier(.65, 0, .35, 1), border-radius .7s ease-in-out, background-color .5s ease-in-out, box-shadow .5s ease-in-out, border-width .5s ease-in-out;
}
.drop-s::before { content: ""; position: absolute; left: 50%; top: 52%; width: 34%; height: 34%; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, rgba(255, 255, 255, 0) 70%); opacity: .75; transition: opacity .4s ease-in-out; }
.drop-s::after { content: ""; position: absolute; inset: 31%; border-radius: 50%; background: var(--peach); opacity: 0; transition: opacity .4s ease-in-out; }

[data-drop="ask"] .drop { --o: 1; --x: 90vw; --y: 22vh; --s: .42; --rot: 20deg; }
[data-drop="strip"] .drop { --o: 1; --x: 88vw; --y: 22vh; --s: .46; --rot: 0deg; }
[data-drop="strip"] .drop-s { border-radius: 50%; }
[data-drop="plan"] .drop { --o: 1; --x: 80vw; --y: 56vh; --s: .9; --rot: 45deg; }
[data-drop="xray"] .drop { --o: 1; --x: 78vw; --y: 50vh; --s: 1.25; --rot: 0deg; }
[data-drop="xray"] .drop-s { border-radius: 50%; background-color: transparent; border-width: 2px; box-shadow: inset 0 0 70px rgba(255, 255, 255, .16), 0 0 90px rgba(255, 255, 255, .14); }
[data-drop="xray"] .drop-s::before { opacity: 0; }
[data-drop="report"] .drop { --o: 1; --x: 84vw; --y: 30vh; --s: .26; --rot: 0deg; }
[data-drop="report"] .drop-s { border-radius: 50%; }
[data-drop="visit"] .drop, [data-drop="foot"] .drop { --o: 1; --x: 80vw; --y: 42vh; --s: .8; --rot: 225deg; }
[data-drop="visit"] .drop-s, [data-drop="foot"] .drop-s { box-shadow: inset -14px -18px 44px rgba(190, 70, 20, .45), inset 12px 12px 34px rgba(255, 255, 255, .5), 0 50px 90px -30px rgba(244, 129, 67, .6); }
[data-drop="visit"] .drop-s::after, [data-drop="foot"] .drop-s::after { opacity: 1; }
[data-drop="visit"] .drop-s::before, [data-drop="foot"] .drop-s::before { opacity: 0; }

/* Blur statements */
html.m .w { display: inline-block; will-change: opacity, filter; }

/* Pinned strip: the photograph leads, the cards follow */
html.m .strip { padding: 0; }
html.m .strip .pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
html.m .track { flex-wrap: nowrap; width: max-content; padding-right: 30vw; will-change: transform; }
html.m .track article { flex: 0 0 min(78vw, 420px); min-height: min(52vh, 430px); }
html.m .track .shot { flex: 0 0 min(86vw, 860px); height: min(52vh, 430px); }
html.m .track .shot img { transform: scale(calc(1.18 - var(--sp, 0) * .18)); transform-origin: 70% 50%; }
html.m .prog { display: block; position: absolute; left: var(--pad); right: var(--pad); bottom: 44px; height: 2px; background: rgba(255, 255, 255, .2); z-index: 2; }
html.m .prog i { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }

/* Plan line and steps */
html.m .steps::before { content: ""; position: absolute; left: 23px; top: 40px; bottom: 40px; width: 2px; background: var(--orange); transform-origin: top; transform: scaleY(var(--p, 0)); }
html.m .plan { --p: 0; }
html.m .steps li { opacity: .3; transition: opacity .35s ease-out; }
html.m .steps li.on { opacity: 1; }
html.m .steps li::before { background: var(--ink); color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
html.m .steps li.on::before { background: #fff; color: var(--navy); transform: scale(1.08); }

/* Entrances */
html.m .rv { opacity: 0; transform: translateY(28px); transition: opacity .45s ease-out, transform .45s ease-out; }
html.m .rv.in { opacity: 1; transform: none; }
html.m .cards .rv:nth-child(2) { transition-delay: .12s; }
html.m .cards .rv:nth-child(3) { transition-delay: .24s; }

@media (max-width: 1180px) { html.m .note { display: none; } }
@media (max-width: 759px) {
  html.m .drop { width: 46vmin; height: 46vmin; }
  html.m .orb { --shift: -28vw; opacity: calc(.45 - var(--c) * .15); }
  [data-drop="ask"] .drop, [data-drop="report"] .drop { --x: 88vw; --y: 14vh; --s: .34; }
  [data-drop="strip"] .drop { --x: 84vw; --y: 16vh; --s: .4; }
  [data-drop="plan"] .drop { --x: 92vw; --y: 20vh; --s: .5; }
  [data-drop="xray"] .drop { --x: 86vw; --y: 16vh; --s: .7; }
  [data-drop="visit"] .drop, [data-drop="foot"] .drop { --x: 82vw; --y: 16vh; --s: .5; }
}
