/* Ritesh's own brand font (RK Grid, from the wordmark): used for the big name on the home panel */
@font-face {
  font-family: "RK Grid"; src: url("/assets/fonts/RKGrid-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* =========================================================
   Design tokens — one theme for the whole site, taken from the home section:
   white grid background, near-black type, an orange-red accent and four glowing pill colours.
   ========================================================= */
:root {
  /* text & lines */
  --ink: #0B0B0C;
  --ink-soft: #5C5D63;          /* body text — 6.6:1 on white */
  --line: rgba(0, 0, 0, 0.09);
  --bg: #FFFFFF;
  --grid: rgba(0, 0, 0, 0.045);

  /* accent + pill colours (from the home section) */
  --accent: #F0531C;            /* orange-red highlight */
  --panel: #CF4D2B;             /* home panel + About photo background; white text on it: 4.3:1 */
  --cyan: #2BD3EE;   --cyan-ink: #053B44;
  --orange: #F45A22; --orange-ink: #0B0B0C;
  --yellow: #FFE83C; --yellow-ink: #5F5400;
  --pink: #F6AAF2;   --pink-ink: #7A3777;

  /* type — one family, one scale */
  /* the home section's colour names, available everywhere (buttons are used in every section) */
  --h-ink: var(--ink); --h-accent: var(--accent);
  --h-cyan: var(--cyan); --h-orange: var(--orange); --h-yellow: var(--yellow); --h-yellow-ink: #9C8A00; --h-pink: var(--pink); --h-pink-ink: #A2569F;

  --font-display: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: var(--font-display);
  --font-hero: var(--font-display);
  --fs-title: clamp(2.5rem, 10.5vw, 3.3rem);         /* every section title = the home headline */
  --fs-card: clamp(1.35rem, 1.15rem + 0.6vw, 1.7rem);  /* card / item titles */
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;


  /* portrait backgrounds: orange, blue and white blobs at uneven, random-looking spots */
  --photo-bg:
    radial-gradient(38% 34% at 80% 16%, #FF7A2F 0%, rgba(255, 122, 47, 0) 100%),
    radial-gradient(58% 52% at 8% 92%, #2F66FF 0%, rgba(47, 102, 255, 0) 100%),
    radial-gradient(34% 30% at 27% 24%, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(24% 30% at 97% 64%, #7DB0FF 0%, rgba(125, 176, 255, 0) 100%),
    radial-gradient(20% 16% at 58% 99%, #FFB07A 0%, rgba(255, 176, 122, 0) 100%),
    linear-gradient(155deg, #F7F9FF 0%, #E6EEFF 100%);
  --photo-bg-2:
    radial-gradient(44% 40% at 14% 12%, #FF7A2F 0%, rgba(255, 122, 47, 0) 100%),
    radial-gradient(50% 56% at 94% 84%, #2F66FF 0%, rgba(47, 102, 255, 0) 100%),
    radial-gradient(30% 26% at 72% 30%, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(22% 26% at 4% 66%, #7DB0FF 0%, rgba(125, 176, 255, 0) 100%),
    radial-gradient(18% 14% at 40% 97%, #FFB07A 0%, rgba(255, 176, 122, 0) 100%),
    linear-gradient(200deg, #F7F9FF 0%, #E6EEFF 100%);

  /* layout & motion */
  --container: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-y: clamp(80px, 10vw, 140px);
  --radius: 24px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --shadow: 0 24px 48px -36px rgba(0, 0, 0, 0.35);
}
@media (min-width: 900px) { :root { --fs-title: min(3.85vw, 3.85rem); } }

/* =========================================================
   Base — white page with the home section's faint grid everywhere
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink);
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 60px 60px; background-position: center top;
  font-family: var(--font-body); font-size: var(--fs-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 500; letter-spacing: -0.035em; line-height: 1.04; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { width: 1.25em; height: 1.25em; flex: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; text-decoration: none; }
.skip-link:focus { top: 16px; }
.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 90; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); }

/* section shell: one title size, one intro size */
.section { position: relative; padding-block: var(--section-y); }
.sec-head { display: grid; gap: 16px; margin-bottom: clamp(40px, 6vw, 72px); }
.sec-title { font-size: var(--fs-title); font-weight: 500; line-height: 1.04; letter-spacing: -0.035em; max-width: 18ch; }
.sec-intro { color: var(--ink-soft); max-width: 44ch; }

/* Soft colour washes for cards (services, steps): each card tinted in its icon's colour */
.tint--cyan { --tint: #E2F8FC; --edge: rgba(43, 211, 238, 0.45); }
.tint--orange { --tint: #FFEDE4; --edge: rgba(244, 90, 34, 0.3); }
.tint--pink { --tint: #FDEBFC; --edge: rgba(226, 120, 220, 0.4); }
.tint--yellow { --tint: #FFF8D2; --edge: rgba(230, 200, 0, 0.45); }

/* =========================================================
   Pills (the glowing chips from the home section) & buttons
   ========================================================= */
.pill {
  display: inline-flex; align-items: center; gap: 0.4em; padding: 0.45em 1em; border-radius: 999px;
  font-size: var(--fs-small); font-weight: 500; letter-spacing: -0.01em; line-height: 1; white-space: nowrap;
}
.pill--sm { font-size: 0.8125rem; padding: 0.42em 0.85em; }
.pill--cyan { background: var(--cyan); color: var(--cyan-ink); box-shadow: 0 0 18px rgba(43, 211, 238, 0.6); }
.pill--orange { background: var(--orange); color: var(--orange-ink); box-shadow: 0 0 18px rgba(244, 90, 34, 0.55); }
.pill--yellow { background: var(--yellow); color: var(--yellow-ink); box-shadow: 0 0 18px rgba(255, 232, 60, 0.75); }
.pill--pink { background: var(--pink); color: var(--pink-ink); box-shadow: 0 0 18px rgba(246, 170, 242, 0.8); }

.hbtn--sm { min-height: 42px; font-size: 0.9375rem; padding: 0 1.15em; }
.hbtn--block { width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 0.45em 1em; border-radius: 999px; font-size: var(--fs-small); font-weight: 500; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }

.round-btn {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  border: 0; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.25s var(--ease), background-color 0.25s, color 0.25s;
}
.round-btn:hover { transform: translateY(-2px); background: var(--ink); color: #fff; }
.round-btn:disabled { opacity: 0.35; cursor: default; transform: none; background: #fff; color: var(--ink); }

/* =========================================================
   Nav
   ========================================================= */
.nav { position: absolute; inset: 0 0 auto 0; z-index: 20; padding-top: 18px; transition: transform 0.35s var(--ease); }
/* after the hero the menu floats as a small pill: hides while scrolling down, returns when scrolling up */
.nav.is-floating { position: fixed; top: 12px; padding-top: 0; }
.nav.is-floating .nav-inner {
  width: min(100% - 24px, 900px); padding: 7px 7px 7px 20px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px var(--line), 0 14px 30px -20px rgba(0, 0, 0, 0.4);
}
.nav.is-floating.is-hidden { transform: translateY(calc(-100% - 20px)); }
.nav-inner { display: flex; align-items: center; gap: 24px; }
.nav-name { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1rem; letter-spacing: -0.02em; text-decoration: none; margin-right: auto; }
.nav-logo { width: 36.4px; height: 36.4px; /* 28px × 1.3 */ flex: none; transition: transform 0.5s var(--ease); }
.nav-name:hover .nav-logo { transform: translate(2px, -2px); } /* a small up-right nudge on hover (growth); the logo never rotates */
.nav-links { display: none; gap: 28px; font-weight: 500; font-size: var(--fs-small); }
.nav-links a { text-decoration: none; padding: 6px 0; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1.5px no-repeat; transition: background-size 0.25s var(--ease); }
.nav-links a:hover { background-size: 100% 1.5px; }
@media (min-width: 820px) { .nav-links { display: flex; } }

/* =========================================================
   Hero — an orange panel on the light grid (from the "Hi I'm RITESH" layout):
   greeting + huge name + role on the left, a cut-out portrait standing on the panel's bottom edge,
   Sizes inside the panel are in cqw of the panel.
   ========================================================= */
.hero {
  --h-ink: #0B0B0C;
  --h-accent: #F0531C;
  --h-cyan: #2BD3EE;
  --h-orange: #F45A22;
  --h-yellow: #FFE83C;
  --h-yellow-ink: #9C8A00;
  --h-pink: #F6AAF2;
  --h-pink-ink: #A2569F;
  position: relative; color: var(--h-ink);
  padding: 76px clamp(10px, 1.6vw, 24px) 0;
}
.hero-panel {
  position: relative; overflow: hidden; container-type: inline-size;
  display: grid; color: #fff;
  border-radius: clamp(24px, 3vw, 40px);
}
/* the orange panel look: shared by the home panel and the About photo */
.hero-panel, .about-photo {
  background-color: var(--panel);
  background-image:
    radial-gradient(60% 70% at 72% 40%, rgba(255, 140, 90, 0.55) 0%, rgba(255, 140, 90, 0) 100%),
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: auto, 60px 60px, 60px 60px;
  box-shadow: 0 40px 80px -50px rgba(120, 30, 0, 0.6);
}

/* copy */
/* Golden-ratio type and spacing (φ = 1.618; 1/φ = 0.618; 1/φ² = 0.382):
   --n  the name (RITESH)
   --t  "Hi, I am" and the role line   = name ÷ φ²
   --s  the headline                  = --t ÷ φ   (never below 1rem, for reading)
   Alignment is to the letters themselves, not their boxes: RK Grid puts a little space before the R
   (0.04em) and Inter Tight before the H (0.025em), so those lines are pulled left by that much.
   Gaps step the same way: lines inside the title = --s ÷ φ², title → headline → buttons = --s × φ. */
.hero-copy {
  --n: 15cqw; --t: calc(var(--n) * 0.382); --s: max(1rem, calc(var(--t) * 0.618));
  position: relative; z-index: 3; display: grid; justify-items: start; gap: 0; padding: 44px 24px 0;
}
.hero-title { display: grid; gap: calc(var(--s) * 0.382); font-family: var(--font-hero); color: #fff; letter-spacing: -0.02em; line-height: 1; }
.hero-hi, .hero-role { font-weight: 600; font-size: var(--t); line-height: 1; letter-spacing: -0.03em; }
.hero-name {
  font-family: "RK Grid", var(--font-hero); font-weight: 400; text-transform: uppercase;
  font-size: var(--n); line-height: 0.86; letter-spacing: 0.01em; margin-left: -0.032em;
}
.hero-hi { margin-left: -0.025em; }
.hero-sub { margin-top: calc(var(--s) * 1.618); font-weight: 500; font-size: var(--s); line-height: 1.4; letter-spacing: -0.015em; max-width: 38ch; text-wrap: balance; }
.hero-accent { color: var(--h-ink); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: calc(var(--s) * 0.618); margin-top: calc(var(--s) * 1.618); }
.hbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0 1.4em; border-radius: 999px; text-decoration: none;
  font: 500 1rem/1 var(--font-hero); letter-spacing: -0.01em;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.hbtn:hover { transform: translateY(-3px); }
.hbtn .icon { width: 1.1em; height: 1.1em; }
.hbtn--dark { background: var(--h-ink); color: #fff; box-shadow: 0 12px 24px -14px rgba(0, 0, 0, 0.6); }
.hbtn--light { background: #fff; color: var(--h-ink); box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.14); }
.hbtn:focus-visible { outline: 3px solid var(--h-accent); outline-offset: 3px; }
.hero .hbtn:focus-visible { outline-color: #fff; }

/* cut-out portrait standing on the panel's bottom edge */
/* The photo (1091×1100, nearly square) keeps its own framing. --h is its height: 125% of its box
   (cqh of .hero-visual), capped at 156% of the box width (cqw) on narrow windows.
   The top of the head is 18.5% down the photo; placing the photo so that point sits 8% below the box top
   gives bottom = 92cqh − 0.815 × --h. The extra hoodie runs off the bottom and the panel crops it
   (min(0px, …) keeps the photo standing on the bottom edge if the cap makes it shorter).
   The head sits 59% across the photo, so left: 50% + translateX(-59%) puts the face on the centre line of its half. */
.hero-visual { position: relative; container-type: size; height: min(118cqw, 560px); margin-top: 8px; }
.hero-photo {
  --h: min(125cqh, 156cqw);
  position: absolute; z-index: 1; left: 50%; transform: translateX(-59%) translateY(var(--py, 0px)); /* --py: scroll depth, set in main.js */
  height: var(--h); bottom: min(0px, calc(92cqh - 0.815 * var(--h)));
  width: auto; max-width: none;
}


@media (min-width: 900px) {
  .hero { padding-top: 84px; }
  .hero-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); /* text half | face half */ min-height: max(560px, min(calc(100svh - 84px - clamp(10px, 1.6vw, 24px)), 62vw)); } /* fills the screen, but never taller than a wide frame (tall tablets) */
  /* text half: left margin 7.3cqw (half ÷ φ⁴), right margin = left ÷ φ, so RITESH fills the rest of the half;
     the space below the text is φ × the space above it, which sits the block just above the middle */
  .hero-copy {
    --n: 6.6cqw; align-self: stretch; padding: 0 4.5cqw 0 7.3cqw;
    grid-template-rows: 1fr auto auto auto 1.618fr; /* empty space: 1 part above the text, φ parts below */
  }
  .hero-copy::before, .hero-copy::after { content: ""; }
  .hero .hbtn { font-size: max(0.95rem, calc(var(--s) * 0.618)); min-height: max(46px, calc(var(--s) * 2)); padding: 0 calc(var(--s) * 1.1); }
  .hero-visual { height: auto; margin: 0; }}


/* =========================================================
   My Work — a phone playing reels; scrolling swipes to the next one
   ========================================================= */
.work-title-band { padding-top: var(--section-y); }
.work-title-band .sec-head { margin-bottom: 0; }
.work { --step: 70svh; position: relative; } /* scroll distance per reel */
.js .work { height: calc(100svh + (var(--count) - 1) * var(--step)); }
.work-pin { position: relative; overflow: hidden; }
.js .work-pin { position: sticky; top: 0; height: 100svh; }

/* phone layout: text, then the phone, then the controls */
.work-inner {
  position: relative; height: 100%;
  display: grid; grid-template: "count" auto "text" auto "phone" minmax(0, 1fr) "controls" auto / minmax(0, 1fr);
  gap: clamp(10px, 1.8svh, 20px); padding-block: clamp(16px, 3svh, 40px);
}
.work-side { display: contents; }
.work-counter { grid-area: count; font-weight: 500; font-size: var(--fs-small); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.work-counter [data-current] { font-size: 1.6em; color: var(--ink); letter-spacing: -0.03em; }
.work-texts { grid-area: text; display: grid; grid-template: auto / minmax(0, 1fr); }
.work-item { grid-area: 1 / 1; display: grid; gap: 10px; justify-items: start; align-content: start; }
.js .work-item { opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0s 0.45s; }
.js .work-item.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity 0.45s var(--ease) 0.12s, transform 0.45s var(--ease) 0.12s, visibility 0s; }
.no-js .work-item:not(.is-active) { display: none; }
.work-title { font-size: var(--fs-card); max-width: 20ch; }
.work-blurb { color: var(--ink-soft); max-width: 44ch; }
.results { display: grid; gap: 6px; font-size: var(--fs-small); font-weight: 500; }
.results li { display: flex; gap: 8px; align-items: center; }
.results .icon { width: 1.05em; height: 1.05em; color: var(--accent); stroke-width: 2.5; }
@media (max-width: 899px) {
  .work-title { font-size: clamp(1.15rem, 5vw, 1.5rem); }
  .work-blurb { font-size: var(--fs-small); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .work-item .pill { display: none; }
  .results { display: none; }
}

/* ---------- the phone ---------- */
.phone-wrap { grid-area: phone; min-height: 0; display: grid; place-items: center; }
.no-js .phone-wrap { height: min(80svh, 720px); }
/* .phone sets the size; everything inside is measured in % of its width (cqw) */
.phone { container-type: inline-size; position: relative; height: 100%; max-height: 740px; aspect-ratio: 9 / 18.3; max-width: 100%; }
/* side buttons */
.phone::before, .phone::after { content: ""; position: absolute; width: 4px; border-radius: 2px; background: #2E2E33; }
.phone::before { left: -3px; top: 21%; height: 17%; background: linear-gradient(#2E2E33 0 44%, transparent 44% 56%, #2E2E33 56%); }
.phone::after { right: -3px; top: 29%; height: 13%; }

.phone-screen {
  position: relative; height: 100%; overflow: hidden; background: #000; color: #fff;
  border: 3.4cqw solid #0B0B0C; border-radius: 15cqw;
  box-shadow: 0 0 0 0.8cqw #3A3A40, 0 0 0 1.3cqw #18181B,
    0 40px 80px -36px rgba(11, 11, 12, 0.55), 0 18px 30px -24px rgba(11, 11, 12, 0.5);
  display: grid; grid-template-rows: 13cqw auto minmax(0, 1fr);
  font-family: var(--font-body); -webkit-font-smoothing: antialiased;
}
/* home indicator */
.phone-screen::after { content: ""; position: absolute; left: 50%; bottom: 2.4cqw; width: 34cqw; height: 1.3cqw; margin-left: -17cqw; border-radius: 1cqw; background: rgba(255, 255, 255, 0.85); }

.phone-status { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 1cqw 9cqw 0 10cqw; font: 600 4.2cqw/1 var(--font-body); letter-spacing: -0.01em; }
.phone-island { position: absolute; left: 50%; top: 2.6cqw; width: 29cqw; height: 8.4cqw; margin-left: -14.5cqw; border-radius: 99px; background: #000; box-shadow: 0 0 0 0.4cqw #161618; }
.phone-bars { display: flex; align-items: flex-end; gap: 0.8cqw; height: 3.4cqw; }
.phone-bars i { width: 1cqw; background: #fff; border-radius: 0.3cqw; }
.phone-bars i:nth-child(1) { height: 40%; } .phone-bars i:nth-child(2) { height: 70%; } .phone-bars i:nth-child(3) { height: 100%; }
.phone-bars b { width: 6.4cqw; height: 3.2cqw; margin-left: 1.4cqw; border-radius: 1cqw; background: #fff; box-shadow: 0 0 0 0.35cqw #000, 0 0 0 0.75cqw rgba(255, 255, 255, 0.5); }

/* the reels: stacked in a 9:16 window, the active one slides into place */
.reel-viewport { position: relative; aspect-ratio: 9 / 16; overflow: hidden; background: #000; }
.reel { position: absolute; inset: 0; transform: translateY(100%); transition: transform 0.7s cubic-bezier(0.22, 0.8, 0.2, 1); }
.reel.is-before { transform: translateY(-100%); }
.reel.is-active { transform: none; }
.reel.is-instant { transition: none; }
.reel-media, .media-video, .media-embed, .media-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.media-placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; background: #1A1A1C; }
.media-play { display: grid; place-items: center; width: 14cqw; height: 14cqw; border-radius: 50%; background: #fff; color: var(--ink); }
.media-play .icon { width: 40%; height: 40%; fill: currentColor; }
.media-placeholder-text { font-size: 3.8cqw; font-weight: 500; color: rgba(255, 255, 255, 0.7); }

/* Instagram-style overlay */
.reel-ui {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, 0.35), transparent 16%, transparent 58%, rgba(0, 0, 0, 0.6));
}
.reel-ui .icon { stroke-width: 2; }
.reel-top { position: absolute; top: 3.4cqw; left: 5cqw; right: 5cqw; display: flex; align-items: center; justify-content: space-between; font: 700 5.6cqw/1 var(--font-body); letter-spacing: -0.02em; }
.reel-top .icon { width: 6.4cqw; height: 6.4cqw; }
.reel-side { position: absolute; right: 3.4cqw; bottom: 8cqw; display: grid; gap: 5.4cqw; justify-items: center; }
.reel-side .icon { width: 7.2cqw; height: 7.2cqw; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35)); }
.reel-info { position: absolute; left: 4cqw; right: 17cqw; bottom: 7.5cqw; display: grid; gap: 2.2cqw; font-size: 3.7cqw; line-height: 1.3; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.reel-user { display: flex; align-items: center; gap: 2.4cqw; font-weight: 600; }
.reel-avatar { flex: none; width: 8cqw; height: 8cqw; border-radius: 50%; object-fit: cover; object-position: 50% 12%; background: linear-gradient(135deg, var(--accent), #2F6BFF); }
.reel-avatar--sq { display: block; width: 7cqw; height: 7cqw; border-radius: 1.8cqw; box-shadow: 0 0 0 0.6cqw #fff; }
.reel-follow { padding: 0.9cqw 2.6cqw; border: 1px solid rgba(255, 255, 255, 0.75); border-radius: 2cqw; font-size: 3.3cqw; font-weight: 600; }
.reel-caption { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reel-audio { display: flex; align-items: center; gap: 1.6cqw; font-size: 3.3cqw; opacity: 0.92; }
.reel-audio .icon { width: 3.4cqw; height: 3.4cqw; }

/* tap the video to turn sound on/off (also lets scrolling pass over the video) */
.reel-tap { position: absolute; inset: 0; z-index: 2; border: 0; padding: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.reel-tap:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
/* tap the video: two round buttons appear in the middle — sound, and pause/play */
.reel-ctrls {
  position: absolute; left: 50%; top: 44%; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 4cqw;
  transform: translate(-50%, -50%) scale(0.88); opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.3s var(--ease);
}
.reel-ctrls.is-open, .reel-ctrls:focus-within { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; }
.reel-ctrl {
  display: grid; place-items: center; width: 17cqw; height: 17cqw; min-width: 44px; min-height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.5); color: #fff; cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: transform 0.2s var(--ease), background-color 0.2s;
}
.reel-ctrl:hover { background: rgba(0, 0, 0, 0.68); }
.reel-ctrl:active { transform: scale(0.92); }
.reel-ctrl:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.reel-ctrl .icon { width: 7cqw; height: 7cqw; min-width: 18px; min-height: 18px; stroke-width: 2; }
.reel-ctrl .icon--fill { fill: currentColor; }
.reel-ctrl .c-on, .reel-ctrl[aria-pressed="true"] .c-off { display: none; }
.reel-ctrl[aria-pressed="true"] .c-on { display: grid; }
.reel-ctrl .c-off { display: grid; }

/* timeline: thin bar at the bottom of the video; drag it to go back or forward */
.reel-scrub-wrap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: grid; }
.reel-time {
  position: absolute; left: 50%; bottom: 78cqw; transform: translate(-50%, 4px);
  padding: 2.2cqw 4.4cqw; border-radius: 99px; background: rgba(0, 0, 0, 0.55); color: #fff;
  font: 600 5.6cqw/1 var(--font-body); font-variant-numeric: tabular-nums; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s var(--ease);
}
.reel-scrub-wrap.is-scrubbing .reel-time { opacity: 1; transform: translate(-50%, 0); }
.reel-scrub {
  --p: 0; -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 20px; margin: 0;
  background: transparent; cursor: pointer; touch-action: none;
}
.reel-scrub:focus { outline: none; }
.reel-scrub::-webkit-slider-runnable-track {
  height: 3px; margin-top: 14px; border: 0;
  background: linear-gradient(#fff, #fff) 0 0 / calc(var(--p) * 100%) 100% no-repeat, rgba(255, 255, 255, 0.32);
  transition: height 0.15s, margin 0.15s;
}
.reel-scrub::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 0; height: 0; margin-top: 1.5px; border: 0; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); transition: width 0.15s, height 0.15s, margin 0.15s;
}
.reel-scrub::-moz-range-track { height: 3px; border: 0; background: rgba(255, 255, 255, 0.32); }
.reel-scrub::-moz-range-progress { height: 3px; background: #fff; }
.reel-scrub::-moz-range-thumb { width: 0; height: 0; border: 0; border-radius: 50%; background: #fff; transition: width 0.15s, height 0.15s; }
/* bigger while hovering, dragging or focused with the keyboard */
.reel-scrub-wrap:hover .reel-scrub::-webkit-slider-runnable-track,
.reel-scrub-wrap.is-scrubbing .reel-scrub::-webkit-slider-runnable-track,
.reel-scrub:focus-visible::-webkit-slider-runnable-track { height: 5px; margin-top: 12px; }
.reel-scrub-wrap:hover .reel-scrub::-webkit-slider-thumb,
.reel-scrub-wrap.is-scrubbing .reel-scrub::-webkit-slider-thumb,
.reel-scrub:focus-visible::-webkit-slider-thumb { width: 14px; height: 14px; margin-top: -4.5px; }
.reel-scrub-wrap:hover .reel-scrub::-moz-range-thumb,
.reel-scrub-wrap.is-scrubbing .reel-scrub::-moz-range-thumb,
.reel-scrub:focus-visible::-moz-range-thumb { width: 14px; height: 14px; }
.reel-scrub:focus-visible { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6); }
.reel-scrub-wrap[hidden] { display: none; }

.phone-tabbar { display: flex; align-items: flex-start; justify-content: space-around; padding: 3.4cqw 3cqw 0; }
.phone-tabbar .icon { width: 6.6cqw; height: 6.6cqw; stroke-width: 1.9; opacity: 0.85; }
.phone-tabbar .is-on .icon { opacity: 1; stroke-width: 2.4; }
.phone-tabbar img, .phone-tabbar b { width: 6.6cqw; height: 6.6cqw; border-radius: 50%; object-fit: cover; object-position: 50% 12%; background: linear-gradient(135deg, var(--accent), #2F6BFF); box-shadow: 0 0 0 0.4cqw #fff; }

/* ---------- controls ---------- */
.work-controls { grid-area: controls; display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.work-nav { display: flex; gap: 8px; }
.work-dots { display: flex; }
@media (max-width: 420px) { .work-dots { display: none; } }
.work-dot { position: relative; width: 40px; height: 44px; border: 0; padding: 0; background: none; cursor: pointer; }
.work-dot::before {
  content: ""; position: absolute; inset: 0; margin: auto; width: 8px; height: 8px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.2); transition: width 0.3s var(--ease), background-color 0.3s;
}
.work-dot:hover::before { background: rgba(0, 0, 0, 0.45); }
.work-dot[aria-current="true"]::before { width: 26px; background: var(--ink); }
.sound-toggle {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border: 0; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink); font: 500 var(--fs-small)/1 var(--font-body); cursor: pointer; transition: transform 0.25s var(--ease);
}
.sound-toggle:hover { transform: translateY(-2px); }
.sound-toggle .sound-on, .sound-toggle[aria-pressed="true"] .sound-off { display: none; }
.sound-toggle[aria-pressed="true"] .sound-on { display: inline; }
.sound-toggle[hidden] { display: none; }

/* desktop: text and controls on the left, the phone on the right */
@media (min-width: 900px) {
  .work-inner { grid-template: "side phone" minmax(0, 1fr) / minmax(0, 1fr) auto; gap: clamp(40px, 6vw, 96px); align-items: center; padding-block: clamp(24px, 5svh, 56px); }
  .work-side { grid-area: side; display: grid; gap: 28px; align-content: center; max-width: 480px; }
  .work-texts, .work-counter, .work-controls { grid-area: auto; }
  .work-item { gap: 16px; }
  .work-controls { padding-top: 20px; border-top: 1px solid var(--line); }
  .phone-wrap { height: 100%; padding-right: clamp(0px, 4vw, 64px); }
}

/* =========================================================
   How I work — white cards on a thin line that fills with the accent colour
   ========================================================= */
.steps-wrap { --x: 7px; position: relative; }
.steps-line { position: absolute; top: 0; bottom: 0; left: var(--x); width: 1.5px; transform: translateX(-50%); background: var(--line); }
.steps-line-fill { position: absolute; inset: 0; background: var(--accent); clip-path: inset(0 0 calc(100% - var(--p, 0) * 100%) 0); }
.steps { position: relative; display: grid; gap: clamp(40px, 6vw, 64px); }
.step { position: relative; padding-left: 36px; }
.step::before { /* a dot on the line, like the home section */
  content: ""; position: absolute; left: var(--x); top: 28px; width: 12px; height: 12px; transform: translateX(-50%);
  border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 5px var(--bg);
}
.step-card {
  position: relative; display: grid; gap: 10px; max-width: 480px; padding: clamp(24px, 3vw, 32px);
  background-color: #fff;
  background-image: linear-gradient(160deg, var(--tint, #F5F5F6) 0%, var(--tint, #F5F5F6) 45%, #fff 100%);
  border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--edge, var(--line)), var(--shadow);
}
/* before the orange line reaches a step, its box stays white like its black & white icon; the colour fades in on arrival */
.step-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: #fff;
  box-shadow: inset 0 0 0 1px var(--line); opacity: 0; transition: opacity 0.5s var(--ease); pointer-events: none;
}
.step-card > * { position: relative; }
.js .step:not(.is-reached) .step-card::before { opacity: 1; }
/* minimal step box: glowing icon, number, title, one sentence */
.step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.step-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--ink); }
.step-icon .icon { width: 22px; height: 22px; stroke-width: 1.75; }
.step-icon--cyan { background: var(--cyan); box-shadow: 0 0 18px rgba(43, 211, 238, 0.6); }
.step-icon--orange { background: var(--orange); box-shadow: 0 0 18px rgba(244, 90, 34, 0.55); }
.step-icon--yellow { background: var(--yellow); box-shadow: 0 0 18px rgba(255, 232, 60, 0.75); }
.step-icon--pink { background: var(--pink); box-shadow: 0 0 18px rgba(246, 170, 242, 0.8); }
/* black & white until the orange line reaches the step's dot, then colour + glow (see main.js) */
.js .step:not(.is-reached) .step-icon { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.step-num { font-size: var(--fs-small); font-weight: 500; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.step-title { font-size: var(--fs-card); }
.step-card > p { color: var(--ink-soft); }
@media (min-width: 900px) {
  .steps-wrap { --x: 50%; }
  .step { padding-left: 0; display: grid; grid-template-columns: 1fr 1fr; }
  .step[data-side="left"] .step-card { grid-column: 1; justify-self: end; margin-right: 48px; width: 100%; }
  .step[data-side="right"] .step-card { grid-column: 2; margin-left: 48px; width: 100%; }
}

/* =========================================================
   Services — one clean card per service
   ========================================================= */
.services-grid { display: grid; gap: 20px; }
.service {
  display: flex; flex-direction: column; gap: 12px; padding: clamp(24px, 3vw, 32px);
  /* a soft wash of the card's colour, fading to white, so each card stands apart from the white page */
  background: linear-gradient(160deg, var(--tint, #F5F5F6) 0%, var(--tint, #F5F5F6) 45%, #fff 100%);
  border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--edge, var(--line)), var(--shadow);
  transition: transform 0.3s var(--ease);
}

.service:hover { transform: translateY(-4px); }
/* fine grain texture on every tinted box (steps + services): its own layer, above the colour, below the text */
.service { position: relative; isolation: isolate; }
.step-card { isolation: isolate; }
.service > *, .step-card > * { position: relative; z-index: 1; }
.step-card::after, .service::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background-image: url("/assets/img/grain.svg"); background-size: 140px;
  opacity: 0.16; mix-blend-mode: multiply; transition: opacity 0.5s var(--ease);
}
/* steps: no texture while the box is still white (before the line reaches it) */
.js .step:not(.is-reached) .step-card::after { opacity: 0; }
.service .step-icon { margin-bottom: 8px; }
.service-title { font-size: var(--fs-card); }
.service-text { color: var(--ink-soft); }
.service-points { display: grid; gap: 8px; margin: 4px 0 0; font-size: var(--fs-small); }
.service-points li { display: flex; gap: 10px; align-items: flex-start; }
.service-points .icon { width: 1.05em; height: 1.05em; margin-top: 0.25em; color: var(--accent); stroke-width: 2.5; }
.services-note { margin-top: 28px; color: var(--ink-soft); font-size: var(--fs-small); max-width: 60ch; }
@media (min-width: 900px) { .services-grid { grid-template-columns: repeat(var(--n, 3), 1fr); gap: 24px; } }

/* =========================================================
   FAQ — a quiet list; each question opens on tap
   ========================================================= */
.faq-inner { display: grid; gap: 8px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 2px; cursor: pointer; list-style: none;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.3;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-icon { position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); transition: transform 0.3s var(--ease), background-color 0.3s; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); }
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .faq-icon { transform: rotate(45deg); background: var(--ink); color: #fff; }
.faq-item p { padding: 0 2px 24px; color: var(--ink-soft); max-width: 60ch; }
.faq-item p { overflow: hidden; } /* main.js animates its height when a question opens or closes */
@media (min-width: 900px) {
  .faq-inner { grid-template-columns: 1fr 1.6fr; gap: 64px; align-items: start; }
  .faq .sec-head { position: sticky; top: 100px; }
}

/* =========================================================
   About — statement as the title, photo framed like the home portrait
   ========================================================= */
.about-inner { display: grid; gap: 48px; align-items: center; }
.about-body { display: grid; gap: 20px; justify-items: start; }
.about-body p { max-width: 52ch; color: var(--ink-soft); }
.about .chips { margin-top: 8px; }
.about-photo {
  margin: 0; justify-self: center; width: min(80vw, 400px); aspect-ratio: 1; border-radius: 13%; overflow: hidden;
}
.about-photo { position: relative; }
.about-photo .about-me { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) {
  .about-inner { grid-template-columns: 1.3fr 1fr; gap: 80px; }
  .about-photo { justify-self: end; }
  .about--no-photo .about-inner { grid-template-columns: 1fr; }
}

/* =========================================================
   Footer — white, the closing line at title size
   ========================================================= */
.footer { position: relative; padding: var(--section-y) 0 36px; }
.footer-inner { display: grid; gap: 28px; justify-items: start; }
.footer-line { max-width: 16ch; }
.footer-bottom {
  justify-self: stretch; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: clamp(48px, 8vw, 100px); padding-top: 22px; border-top: 1px solid var(--line);
}
.socials { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.socials a { display: inline-flex; gap: 4px; align-items: center; text-decoration: none; font-weight: 500; font-size: var(--fs-small); padding: 8px 0; }
.socials a:hover { color: var(--accent); }
.socials .icon { width: 1em; height: 1em; }
.copyright { color: var(--ink-soft); font-size: var(--fs-small); }

/* =========================================================
   Reveal on scroll
   ========================================================= */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease) var(--d, 0ms), transform 0.6s var(--ease) var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
/* icon pops in as its step enters the screen */
.js .step .step-icon { transform: scale(0.5); opacity: 0; transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s, opacity 0.3s 0.15s, background-color 0.45s var(--ease), box-shadow 0.45s var(--ease); }
.js .step.is-in .step-icon { transform: none; opacity: 1; }

/* =========================================================
   Motion — entrance, scroll and hover animations
   (all of it is switched off by the reduced-motion block below)
   ========================================================= */
/* hero entrance: panel settles, R-I-T-E-S-H rises letter by letter, then each line, the photo rises into place */
@keyframes in-rise { from { opacity: 0; transform: translateY(0.6em); } }
@keyframes in-letter { from { opacity: 0; transform: translateY(38%); } }
@keyframes in-panel { from { opacity: 0; transform: scale(0.965); } }
@keyframes in-photo { from { opacity: 0; transform: translateY(7%); } }
.hero-name .hn-l { display: inline-block; }
.js .hero-panel { animation: in-panel 0.9s var(--ease) both; }
.js .hero-hi { animation: in-rise 0.7s var(--ease) 0.25s both; }
.js .hero-name .hn-l { animation: in-letter 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) calc(0.35s + var(--i) * 0.06s) both; }
.js .hero-role { animation: in-rise 0.7s var(--ease) 0.8s both; }
.js .hero-sub { animation: in-rise 0.7s var(--ease) 0.92s both; }
.js .hero-ctas { animation: in-rise 0.7s var(--ease) 1.04s both; }
.js .hero-visual { animation: in-photo 1.1s var(--ease) 0.3s both; }

/* "See my work" arrow nudges down every few seconds, and on hover */
@keyframes nudge { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(4px); } 90% { transform: translateY(0); } }
.hero .hbtn--dark .icon { animation: nudge 3s ease-in-out 2.2s infinite; }
.hbtn--dark:hover .icon { animation: none; transform: translateY(3px); transition: transform 0.25s var(--ease); }
/* buttons press in when clicked */
.hbtn:active, .round-btn:active { transform: translateY(-1px) scale(0.97); transition-duration: 0.08s; }

/* section titles: words rise into view one after another (words are wrapped in main.js) */
.js .sec-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.08em 0 0.14em; margin: -0.08em 0 -0.14em; }
.js .sec-title .w > span { display: inline-block; transform: translateY(110%); transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--i, 0) * 55ms); }
.js .sec-title.words-in .w > span { transform: none; }

/* service cards: lift with a deeper shadow, icon pops */
.service { transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.service:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 1px var(--edge, var(--line)), 0 30px 50px -30px rgba(0, 0, 0, 0.35); }
.service .step-icon { transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.service:hover .step-icon { transform: scale(1.1) translateY(-2px); }

/* About photo: eases from a slight zoom as it appears */
.js .about-photo .about-me { transform: scale(1.08); transition: transform 1.2s var(--ease) 0.15s; }
.js .about-photo.is-in .about-me { transform: none; }

/* =========================================================
   Reduced motion: no animation, no pinning
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .step .step-icon { opacity: 1; transform: none; }
  .js .sec-title .w > span, .js .about-photo .about-me { transform: none; }
  .hero-photo { --py: 0px; }
  .js .work { height: auto; }
  .js .work-pin { position: relative; height: auto; min-height: 100svh; }
  .js .work-item { transform: none; }
  .hbtn:hover, .service:hover, .sound-toggle:hover, .round-btn:hover { transform: none; }
  .phone-wrap { height: min(80svh, 720px); }
}

/* reel controls: smaller sound button sits above the main pause/play button */
.reel-ctrl--sound { width: 12cqw; height: 12cqw; min-width: 36px; min-height: 36px; }
.reel-ctrl--sound .icon { width: 5cqw; height: 5cqw; min-width: 15px; min-height: 15px; }

/* profile icon instead of a photo; music-note tile for the audio */
.reel-avatar, .phone-tabbar b { display: grid; place-items: center; overflow: hidden; background: #DBDBDF; color: #8E8E95; }
.reel-avatar .icon, .phone-tabbar b .icon { width: 72%; height: 72%; margin-top: 18%; stroke-width: 2.2; fill: currentColor; }
.reel-avatar--sq { background: linear-gradient(135deg, #2A2A30, #4B4B55); color: #fff; }
.reel-avatar--sq .icon { width: 58%; height: 58%; margin-top: 0; fill: none; stroke-width: 2.2; }
.phone-tabbar b .icon { opacity: 1; }

/* =========================================================
   Smooth scroll (Lenis 1.3.27) — required base styles from lenis.css
   ========================================================= */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
  overflow: clip;
}

.lenis [data-lenis-prevent],
.lenis [data-lenis-prevent-wheel],
.lenis [data-lenis-prevent-touch],
.lenis [data-lenis-prevent-vertical],
.lenis [data-lenis-prevent-horizontal] {
  overscroll-behavior: contain;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

.lenis.lenis-autoToggle {
  transition-property: overflow;
  transition-duration: 1ms;
  transition-behavior: allow-discrete;
}
