/* ============================================================
   Filipp — Personal Website
   "From the shadows": near-black, one soft pistachio accent,
   light serif display + clean sans + mono utility.
   ============================================================ */

:root {
  --bg:        #0A0A0B;
  --bg-2:      #0E0E10;
  --surface:   #141416;
  --surface-2: #1A1A1D;
  --text:      #EDECE8;
  --muted:     #8C8C84;
  --faint:     #56564F;
  --accent:    #73E53D;
  --accent-dim:#5CC42E;
  --on-accent: #0A1A05;
  --line:      rgba(255,255,255,0.08);
  --line-2:    rgba(255,255,255,0.14);

  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans:  'Instrument Sans', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, monospace;

  --container: 1400px;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* Lock the page to one axis. touch-action excludes pinch-zoom; overscroll-behavior
     kills the rubber-band drag past the edge.
     `clip`, NOT `hidden`: overflow-x:hidden turns the root into a scroll container,
     which silently kills `position: sticky` on descendants — that is what unpinned
     the hero canvas. `clip` blocks the sideways pan without creating one. */
  overflow-x: clip;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  width: 100%;
}
a { color: inherit; text-decoration: none; }
img, canvas { max-width: 100%; display: block; }
em { font-style: italic; }

/* ---------- Interaction guardrails ----------
   The site reads as a presentation, not a document: no stray text/element
   selection, and media can't be dragged out of the page. Purely about
   selection and dragging — hover, click, focus and the cursor FX are untouched.
   Form fields and the contact details stay selectable so people can still type
   and copy the address. */
body {
  -webkit-user-select: none;
          user-select: none;
  -webkit-touch-callout: none;      /* no long-press media menu on iOS */
}
input, textarea, select,
.footer-mail, .footer-tel {
  -webkit-user-select: text;
          user-select: text;
}
img, canvas, video, svg {
  -webkit-user-drag: none;
          user-drag: none;
}
::selection { background: rgba(115, 229, 61, 0.3); color: var(--text); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.container-narrow { max-width: 820px; }
.section { padding: clamp(64px, 9vw, 130px) 0; position: relative; }
.section-tight { padding: 40px 0; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 42px; gap: 20px;
}
.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  letter-spacing: -0.01em;
  line-height: 1;
}
.section-title sup {
  font-family: var(--font-mono);
  font-size: 0.62rem; color: var(--accent);
  vertical-align: super; margin-left: 6px; font-weight: 500;
}
.section-link {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em;
  transition: color 0.3s var(--ease);
}
.section-link:hover { color: var(--accent); }

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.loader-brand { font-family: var(--font-serif); font-size: 2rem; letter-spacing: 0.02em; }
.loader-track { width: 180px; height: 2px; background: var(--line-2); border-radius: 2px; overflow: hidden; }
#loader-bar { display: block; height: 100%; width: 0%; background: var(--accent); transition: width 0.2s linear; }
#loader-percent { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }

/* ---------- Cursor FX (green trail + click burst) ---------- */
#cursor-fx { position: fixed; inset: 0; pointer-events: none; z-index: 300; }
.cfx-trail {
  position: fixed; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); transform: translate(-50%, -50%);
  will-change: transform, opacity; animation: cfxTrail 0.55s ease-out forwards;
}
@keyframes cfxTrail {
  from { transform: translate(-50%, -50%) scale(1); opacity: 0.45; }
  to   { transform: translate(-50%, -50%) scale(0); opacity: 0; }
}
.cfx-ring {
  position: fixed; width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid var(--accent); transform: translate(-50%, -50%);
  will-change: transform, opacity; animation: cfxRing 0.8s ease-out forwards;
}
@keyframes cfxRing {
  from { transform: translate(-50%, -50%) scale(0); opacity: 0.8; }
  to   { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}
.cfx-spark {
  position: fixed; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); transform: translate(-50%, -50%);
  will-change: transform, opacity; animation: cfxSpark 0.6s ease-out forwards;
}
@keyframes cfxSpark {
  0%   { transform: translate(-50%, -50%) translate(0, 0) scale(0); opacity: 0.9; }
  20%  { transform: translate(-50%, -50%) translate(calc(var(--dx) * 0.25), calc(var(--dy) * 0.25)) scale(1); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

/* ---------- Nav ---------- */
.nav-wrap {
  position: fixed; top: 18px; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: center; padding: 0 20px;
}
.nav {
  display: flex; align-items: center; gap: 8px;
  background: rgba(20,20,22,0.72);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 7px 7px 7px 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}
.nav-brand {
  display: grid; place-items: center; width: 34px; height: 34px;
  color: var(--accent); border-radius: 50%;
  transition: transform 0.4s var(--ease);
}
.nav-brand:hover { transform: rotate(90deg); }
.nav-links { display: flex; list-style: none; gap: 4px; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 100px;
  font-size: 0.82rem; color: var(--muted);
  transition: color 0.25s, background 0.25s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-cta {
  padding: 8px 18px; border-radius: 100px; font-size: 0.82rem; font-weight: 500;
  background: var(--accent); color: var(--on-accent);
  transition: background 0.25s, transform 0.25s var(--ease), box-shadow 0.35s ease;
}
.nav-cta:hover { background: #8BEF5A; transform: translateY(-1px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 100px;
  font-size: 0.9rem; font-weight: 500; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.3s var(--ease), background 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.35s ease;
}
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: #8BEF5A; transform: translateY(-2px); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); transform: translateY(-2px); }

/* ---------- Burst + glow hover (Uiverse: zjssun bubbles + TCdesign glow, recolored) ----------
   Both play together on hover of any .btn-fx button. */
.btn-fx { position: relative; }
.btn-fx:hover {
  /* Effect 2 — even glow on all sides (0 0 offset = centered halo; raise alpha/spread to strengthen) */
  box-shadow: 0 0 30px 1px rgba(115, 229, 61, 0.45);
}
.btn-fx::before, .btn-fx::after {
  position: absolute; content: ""; width: 150%; left: 50%; height: 100%;
  transform: translateX(-50%); z-index: -1; background-repeat: no-repeat; pointer-events: none;
}
/* Effect 1 — particle burst, top */
.btn-fx:hover::before {
  top: -70%;
  background-image:
    radial-gradient(circle, var(--accent) 20%, transparent 20%),
    radial-gradient(circle, transparent 20%, var(--accent) 20%, transparent 30%),
    radial-gradient(circle, var(--accent) 20%, transparent 20%),
    radial-gradient(circle, var(--accent) 20%, transparent 20%),
    radial-gradient(circle, transparent 10%, var(--accent) 15%, transparent 20%),
    radial-gradient(circle, var(--accent) 20%, transparent 20%),
    radial-gradient(circle, var(--accent) 20%, transparent 20%),
    radial-gradient(circle, var(--accent) 20%, transparent 20%),
    radial-gradient(circle, var(--accent) 20%, transparent 20%);
  background-size: 10% 10%, 20% 20%, 15% 15%, 20% 20%, 18% 18%, 10% 10%, 15% 15%, 10% 10%, 18% 18%;
  background-position: 50% 120%;
  animation: fxTopBubbles 0.6s ease;
}
@keyframes fxTopBubbles {
  0%   { background-position: 5% 90%, 10% 90%, 10% 90%, 15% 90%, 25% 90%, 25% 90%, 40% 90%, 55% 90%, 70% 90%; }
  50%  { background-position: 0% 80%, 0% 20%, 10% 40%, 20% 0%, 30% 30%, 22% 50%, 50% 50%, 65% 20%, 90% 30%; }
  100% { background-position: 0% 70%, 0% 10%, 10% 30%, 20% -10%, 30% 20%, 22% 40%, 50% 40%, 65% 10%, 90% 20%;
         background-size: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
}
/* Effect 1 — particle burst, bottom */
.btn-fx:hover::after {
  bottom: -70%;
  background-image:
    radial-gradient(circle, var(--accent) 20%, transparent 20%),
    radial-gradient(circle, var(--accent) 20%, transparent 20%),
    radial-gradient(circle, transparent 10%, var(--accent) 15%, transparent 20%),
    radial-gradient(circle, var(--accent) 20%, transparent 20%),
    radial-gradient(circle, var(--accent) 20%, transparent 20%),
    radial-gradient(circle, var(--accent) 20%, transparent 20%),
    radial-gradient(circle, var(--accent) 20%, transparent 20%);
  background-size: 15% 15%, 20% 20%, 18% 18%, 20% 20%, 15% 15%, 20% 20%, 18% 18%;
  background-position: 50% 0%;
  animation: fxBottomBubbles 0.6s ease;
}
@keyframes fxBottomBubbles {
  0%   { background-position: 10% -10%, 30% 10%, 55% -10%, 70% -10%, 85% -10%, 70% -10%, 70% 0%; }
  50%  { background-position: 0% 80%, 20% 80%, 45% 60%, 60% 100%, 75% 70%, 95% 60%, 105% 0%; }
  100% { background-position: 0% 90%, 20% 90%, 45% 70%, 60% 110%, 75% 80%, 95% 70%, 110% 10%;
         background-size: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
}

/* ---------- Animated outline button (Uiverse by himanshu9682, recolored) ----------
   White outline + text on the dark bg; green ink-splatter on hover. */
.type--hs { --line_color: #ffffff; --back_color: var(--accent); }
.button {
  position: relative; z-index: 0;
  /* Cap = the rounded end-piece; it must equal the height or the ends stop
     being semicircles. Every border segment derives from it, so resizing the
     button means changing --cap/--w only. Setting the parts independently is
     what made the border look chopped. */
  --cap: 56px;
  --gap: 16px;
  --w: 240px;
  width: var(--w); height: var(--cap);
  display: inline-flex; align-items: center; justify-content: center;
  /* resets so <button> renders identically to the <a> version */
  background: transparent; border: none; padding: 0; cursor: pointer;
  text-decoration: none; font-family: var(--font-mono);
  font-size: 12px; font-weight: 500; text-transform: uppercase;
  color: var(--line_color); letter-spacing: 2px; transition: all 0.3s ease;
}
.button__text { display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; }
.button::before, .button::after, .button__text::before, .button__text::after {
  content: ""; position: absolute; height: 2px; border-radius: 2px;
  background: var(--line_color); transition: all 0.5s ease;
}
.button::before { top: 0; left: calc(var(--cap) - 2px); width: calc(100% - var(--cap) * 2 - var(--gap)); }
.button::after { top: 0; right: calc(var(--cap) - 2px); width: 8px; }
.button__text::before { bottom: 0; right: calc(var(--cap) - 2px); width: calc(100% - var(--cap) * 2 - var(--gap)); }
.button__text::after { bottom: 0; left: calc(var(--cap) - 2px); width: 8px; }
.button__line { position: absolute; top: 0; width: var(--cap); height: 100%; overflow: hidden; }
.button__line::before {
  content: ""; position: absolute; top: 0; width: 150%; height: 100%; box-sizing: border-box;
  border-radius: 300px; border: solid 2px var(--line_color);
}
.button__line:nth-child(1), .button__line:nth-child(1)::before { left: 0; }
.button__line:nth-child(2), .button__line:nth-child(2)::before { right: 0; }
.button:hover { letter-spacing: 5px; }
.button:hover::before, .button:hover .button__text::before { width: 8px; }
.button:hover::after, .button:hover .button__text::after { width: calc(100% - var(--cap) * 2 - var(--gap)); }
.button__drow1, .button__drow2 { position: absolute; z-index: -1; border-radius: 16px; transform-origin: 16px 16px; }
.button__drow1 { top: -16px; left: 40px; width: 32px; height: 0; transform: rotate(30deg); }
.button__drow2 { top: 44px; left: 77px; width: 32px; height: 0; transform: rotate(-127deg); }
.button__drow1::before, .button__drow1::after, .button__drow2::before, .button__drow2::after { content: ""; position: absolute; }
.button__drow1::before { bottom: 0; left: 0; width: 0; height: 32px; border-radius: 16px; transform-origin: 16px 16px; transform: rotate(-60deg); }
.button__drow1::after { top: -10px; left: 45px; width: 0; height: 32px; border-radius: 16px; transform-origin: 16px 16px; transform: rotate(69deg); }
.button__drow2::before { bottom: 0; left: 0; width: 0; height: 32px; border-radius: 16px; transform-origin: 16px 16px; transform: rotate(-146deg); }
.button__drow2::after { bottom: 26px; left: -40px; width: 0; height: 32px; border-radius: 16px; transform-origin: 16px 16px; transform: rotate(-262deg); }
.button__drow1, .button__drow1::before, .button__drow1::after,
.button__drow2, .button__drow2::before, .button__drow2::after { background: var(--back_color); }
.button:hover .button__drow1 { animation: drow1 ease-in 0.06s; animation-fill-mode: forwards; }
.button:hover .button__drow1::before { animation: drow2 linear 0.08s 0.06s; animation-fill-mode: forwards; }
.button:hover .button__drow1::after { animation: drow3 linear 0.03s 0.14s; animation-fill-mode: forwards; }
.button:hover .button__drow2 { animation: drow4 linear 0.06s 0.2s; animation-fill-mode: forwards; }
.button:hover .button__drow2::before { animation: drow3 linear 0.03s 0.26s; animation-fill-mode: forwards; }
.button:hover .button__drow2::after { animation: drow5 linear 0.06s 0.32s; animation-fill-mode: forwards; }
@keyframes drow1 { 0% { height: 0; } 100% { height: 100px; } }
@keyframes drow2 { 0% { width: 0; opacity: 0; } 10% { opacity: 0; } 11% { opacity: 1; } 100% { width: 120px; } }
@keyframes drow3 { 0% { width: 0; } 100% { width: 80px; } }
@keyframes drow4 { 0% { height: 0; } 100% { height: 120px; } }
@keyframes drow5 { 0% { width: 0; } 100% { width: 124px; } }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; height: 100vh; /* JS sets the real scroll height when frames load */ }
.hero-sticky {
  position: sticky; top: 0; height: 100vh; width: 100%; overflow: hidden;
}
.hero-visual { position: absolute; inset: 0; z-index: 0; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.hero-visual.has-frames #hero-canvas { opacity: 1; }
.hero-visual.has-frames .hero-placeholder { opacity: 0; }

/* Placeholder shadow figure (shown until real frames are added) */
.hero-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; justify-content: center;
  transition: opacity 0.6s var(--ease);
}
.shadow-figure {
  width: min(46vh, 380px); height: 76vh; margin-bottom: -4vh;
  background:
    radial-gradient(120% 80% at 50% 12%, rgba(115,229,61,0.10), transparent 55%),
    radial-gradient(60% 70% at 50% 30%, rgba(60,60,66,0.9), transparent 72%),
    linear-gradient(180deg, rgba(28,28,32,0.9), rgba(10,10,11,0));
  border-radius: 48% 48% 40% 40% / 60% 60% 40% 40%;
  filter: blur(6px);
}
.placeholder-hint {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 0.66rem; color: var(--faint);
  letter-spacing: 0.02em; white-space: nowrap;
}
.placeholder-hint code { color: var(--muted); }
.hero-vignette {
  position: absolute; inset: 0; pointer-events: none;
  /* Canvas draws the round vignette now; this is just a faint top scrim for nav legibility. */
  background: linear-gradient(180deg, rgba(10,10,11,0.45) 0%, transparent 16%);
}

.hero-content {
  position: absolute; z-index: 2; left: 0; top: 50%; transform: translateY(-50%);
  max-width: 600px; text-align: left;
  padding-left: clamp(28px, 7vw, 112px); padding-right: 24px;
}
.eyebrow {
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 26px;
}
.eyebrow .dot { margin: 0 8px; color: var(--accent); }
.hero-title {
  font-family: var(--font-serif); font-weight: 400;
  /* Sized so each line clears the 3D figure without wrapping inside its span */
  font-size: clamp(2.4rem, 5.4vw, 4.9rem); line-height: 1.0; letter-spacing: -0.02em;
}
.hero-title .line { display: block; }
.hero-title em { color: var(--muted); font-style: italic; }
.hero-title .line-bright { color: var(--text); }
.hero-sub {
  max-width: 430px; margin: 28px 0 0; color: var(--muted);
  font-size: 1.05rem; line-height: 1.5;
}
.hero-actions { display: flex; gap: 12px; justify-content: flex-start; margin-top: 34px; flex-wrap: wrap; }

/* Scroll-choreographed captions (opacity + rise driven by JS) */
.hero-caption { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); pointer-events: none; }
.cap-left-zone { left: 0; max-width: 600px; padding-left: clamp(28px, 7vw, 112px); padding-right: 24px; text-align: left; }
.hero-ends {
  left: 0; right: 0; display: flex; justify-content: space-between; align-items: center;
  padding: 0 clamp(28px, 6vw, 96px); gap: 24px;
}
.cap-end-left { text-align: left; }
.cap-end-right { text-align: right; }
.hero-ends .cap-inner { max-width: 430px; }
.cap-inner { opacity: 0; will-change: opacity, transform; }
.cap-heading {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(1.8rem, 4.4vw, 3.6rem); line-height: 1.04; letter-spacing: -0.01em;
  color: var(--text);
}
.cap-left-zone .eyebrow { margin-bottom: 18px; }

.scroll-cue {
  position: absolute; bottom: 30px; left: clamp(28px, 7vw, 112px); z-index: 2;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  font-family: var(--font-mono); font-size: 0.64rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--faint);
}
.scroll-cue svg { color: var(--accent); animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ============================================================
   PROJECTS
   ============================================================ */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.project-media {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
}
/* 16:9 frame; media fills it (no letterbox bars). All sources are wider than 16:9,
   so they scale by height — the site's navbar stays visible, only edges trim. */
.project-thumb { position: relative; aspect-ratio: 16 / 9; background: #0C0C0E; }
.project-cover, .project-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center top; display: block;
  transition: opacity 0.35s ease;
}
.project-video { opacity: 0; }
.project-media.is-playing .project-video { opacity: 1; }
.project-media.is-playing .project-cover { opacity: 0; }

/* Glare sweep — one quick pass across the cover on each hover.
   pointer-events:none and purely visual, so it never touches the video. */
.project-glare {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0;
  background: linear-gradient(
    -30deg,
    hsla(0, 0%, 100%, 0) 58%,
    rgba(255, 255, 255, 0.32) 70%,
    hsla(0, 0%, 100%, 0) 82%
  );
  background-repeat: no-repeat;
  background-size: 260% 260%;
  background-position: -160% -160%;
}
.project-glare.is-glaring { animation: project-glare-sweep 0.8s ease forwards; }
@keyframes project-glare-sweep {
  0%   { opacity: 1; background-position: -160% -160%; }
  100% { opacity: 1; background-position: 160% 160%; }
}
.project-tag {
  position: absolute; top: 18px; right: 18px; z-index: 2;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.04em;
  background: rgba(10,10,11,0.55); backdrop-filter: blur(8px);
  border: 1px solid var(--line); color: var(--text);
  padding: 6px 12px; border-radius: 100px;
}
.project-caption { margin-top: 18px; }
.project-caption h3 { font-family: var(--font-serif); font-weight: 400; font-size: 1.7rem; letter-spacing: -0.01em; }
.project-caption p { color: var(--muted); max-width: 520px; margin-top: 4px; }

/* ============================================================
   Intro — pinned, scroll-scrubbed word reveal
   Words start dim; each fades to full opacity as you scroll.
============================================================ */
.intro {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0;
}
.intro-eyebrow { margin-bottom: 28px; }
.intro-text {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 6.2vw, 6rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text);
  /* Flush on both edges (the last line of each paragraph stays ragged) */
  text-align: justify;
  text-justify: inter-word;
}
.intro-text + .intro-text { margin-top: 0.55em; }
.intro .container-narrow { max-width: 1320px; }
.intro-word {
  opacity: 0.14;
  will-change: opacity;
}

/* ============================================================
   Services — pinned two-column scroll wheel
============================================================ */
/* Pinned full-height section: header (with the Start a project button) stays
   fixed at the top while the wheel/card animate below it. */
.services { min-height: 100vh; display: flex; padding: 0; }
.services > .container {
  width: 100%;
  display: flex; flex-direction: column;
  padding-top: clamp(90px, 12vh, 130px);
  padding-bottom: clamp(40px, 6vh, 70px);
}
.services-stage {
  flex: 1;
  display: grid;
  grid-template-columns: 3.4fr 1fr;   /* card prolonged; wheel titles float over its right edge */
  gap: 48px;
  align-items: center;
}

/* Left content card — fixed size so the layout never jumps on content change */
.services-card {
  --card-bg: #0b0f0d;       /* dark base the photo fades into */
  position: relative;
  z-index: 1;               /* sits below the wheel so long titles float over it */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: clamp(470px, 66vh, 600px);
  border: 1px solid transparent;   /* real outline comes from the faded ::before */
  border-radius: var(--radius);
  background: var(--card-bg);
  transition: box-shadow 0.35s ease;
}

/* Top: per-service photo, crossfaded, fading down into the card */
.card-photo { position: relative; flex: 0 0 53%; overflow: hidden; }
.card-photo__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 0.5s ease;
}
.card-photo__img.is-active { opacity: 1; }
.card-photo__fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 64%;
  background: linear-gradient(to bottom, transparent 0%, var(--card-bg) 94%);
  pointer-events: none;
}

/* Bottom: text (left) + small animation (right) */
.card-bottom {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  padding: clamp(16px, 1.8vw, 28px) clamp(22px, 3vw, 42px) clamp(20px, 2.2vw, 32px);
}
.card-text { position: relative; }
/* Static outline: thin white border that fades out toward the card's mid-height
   (strong at top & bottom edges, gone in the middle). Independent of hover. */
.services-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0) 46%,
    rgba(255, 255, 255, 0) 54%,
    rgba(255, 255, 255, 0.55) 100%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
}

/* Hover: a green→white gradient border lights up, plus a soft green glow. */
.services-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(163deg, var(--accent) 0%, #ffffff 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 4;
}
.services-card:hover::after { opacity: 1; }
/* Glow matches the border: green cast upward (green edge), white cast downward. */
.services-card:hover {
  box-shadow:
    0 -12px 32px -6px rgba(115, 229, 61, 0.42),
    0 14px 32px -6px rgba(255, 255, 255, 0.26);
}
/* Crossfading gradient background layers (behind the content) */
.services-card > .card-bg { position: absolute; inset: 0; z-index: 0; }
.services-card__meta, .services-card__inner { position: relative; z-index: 1; }

/* Card inner split: text (left) + animated sketch (right). Right padding keeps
   the sketch clear of the wheel titles that float over the card's right edge. */
.services-card__inner {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;   /* left half text · right half sketch */
  gap: clamp(18px, 2.2vw, 36px);
  align-items: center;
  padding-right: clamp(10px, 1.6vw, 32px);
}
.services-card__meta {
  display: flex; align-items: center;
  margin-bottom: 12px;
}
.services-card__num { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); }
.services-card__num b { color: var(--accent); font-weight: 500; }
.services-card__body {
  position: relative;
  min-height: clamp(150px, 22vh, 210px);
}
.svc-slide { position: absolute; inset: 0; }
.svc-title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(1.5rem, 2vw, 2rem); letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.svc-desc {
  color: var(--muted); font-size: 0.92rem; line-height: 1.5; max-width: 44ch;
}

/* Right selection wheel — items are absolutely placed by JS along a curve.
   No clipping/mask: long titles extend freely leftward and float in front of
   the card (wheel sits above it), so nothing is ever cut. Distant items fade
   out via opacity falloff instead of a mask. */
.services-wheel {
  position: relative; height: 68vh; overflow: visible; z-index: 2;
  /* Scroll-driven only — never intercept clicks. Titles overflow upward over
     the header, so without this they'd steal clicks from the CTA button. */
  pointer-events: none;
}
.wheel-item {
  position: absolute; top: 50%; right: 0; left: auto; white-space: nowrap;
  text-align: right;
  font-family: var(--font-serif); font-weight: 400; font-size: 2.9rem;
  line-height: 1; letter-spacing: -0.01em;
  transform-origin: right center; will-change: transform, opacity, filter;
  /* --ow-p rises 0 -> 1 as the item nears the centre; colour brightens with it */
  color: color-mix(in srgb, var(--text) calc(var(--ow-p, 0) * 100%), var(--muted));
}
.wheel-item--active { font-weight: 500; }

/* ---- Per-service animated sketches (white line-art on the gradient) ---- */
/* Bigger sketch; SVG auto-centres in this frame via preserveAspectRatio. */
/* Bigger sketch, centred in its own bottom-right quarter via preserveAspectRatio. */
.services-card__visual { position: relative; height: clamp(185px, 27vh, 245px); }
.svc-viz { position: absolute; inset: 0; opacity: 0; transition: opacity 0.45s ease; }
.svc-viz.is-active { opacity: 1; }
/* Pause hidden sketches so only the visible one animates. */
.svc-viz:not(.is-active) * { animation-play-state: paused !important; }
.viz-svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* Web Strategy */
.viz-conn { stroke: rgba(255,255,255,.4); stroke-width: 1.5; stroke-dasharray: 3 4; }
.viz-node { stroke: rgba(255,255,255,.5); stroke-width: 1.5; fill: rgba(255,255,255,.05); }
.viz-node--lead { stroke: rgba(255,255,255,.92); fill: rgba(255,255,255,.09); }
.viz-txt { stroke: rgba(255,255,255,.75); stroke-width: 2.5; stroke-linecap: round; }
.viz-txt--dim { stroke: rgba(255,255,255,.4); }
.viz-flow { fill: var(--accent); offset-distance: 0%; animation: viz-flow 2.4s linear infinite; }
@keyframes viz-flow { to { offset-distance: 100%; } }

/* UI & UX */
.viz-frame { stroke: rgba(255,255,255,.55); stroke-width: 1.5; }
.viz-line { stroke: rgba(255,255,255,.3); stroke-width: 1.5; }
.viz-mini { fill: rgba(255,255,255,.4); }
.viz-block { fill: rgba(255,255,255,.07); stroke: rgba(255,255,255,.28); stroke-width: 1; }
.viz-btn { fill: rgba(255,255,255,.14); stroke: rgba(255,255,255,.7); stroke-width: 1.5; animation: viz-btn 3s ease-in-out infinite; }
@keyframes viz-btn { 0%, 44% { fill: rgba(255,255,255,.14); } 52% { fill: rgba(115,229,61,.55); } 62%, 100% { fill: rgba(255,255,255,.14); } }
.viz-cursor { fill: #fff; animation: viz-cursor 3s ease-in-out infinite; }
@keyframes viz-cursor {
  0% { transform: translate(120px,118px); }
  42% { transform: translate(210px,150px); }
  52% { transform: translate(210px,150px); }
  60% { transform: translate(206px,147px); }
  100% { transform: translate(120px,118px); }
}

/* CMS */
.viz-field { fill: rgba(255,255,255,.5); }
.viz-field--dim { fill: rgba(255,255,255,.22); }
.viz-arrow { stroke: rgba(255,255,255,.6); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.viz-row { fill: rgba(255,255,255,.1); stroke: rgba(255,255,255,.4); stroke-width: 1.2; animation: viz-row 3.2s ease-in-out infinite; }
@keyframes viz-row {
  0% { opacity: 0; transform: translateX(-10px); }
  12% { opacity: 1; transform: translateX(0); }
  82% { opacity: 1; }
  100% { opacity: 0; }
}

/* Web Animation */
.viz-path { stroke: rgba(255,255,255,.35); stroke-width: 1.5; stroke-dasharray: 4 5; }
.viz-ball { fill: var(--accent); offset-distance: 0%; animation: viz-ball 3.4s ease-in-out infinite alternate; }
@keyframes viz-ball { to { offset-distance: 100%; } }
.viz-kf { fill: rgba(255,255,255,.35); }
.viz-playhead { fill: var(--accent); animation: viz-playhead 3.4s ease-in-out infinite alternate; }
@keyframes viz-playhead { to { transform: translateX(224px); } }

/* Web Optimization */
.viz-gauge-bg { stroke: rgba(255,255,255,.22); stroke-width: 5; stroke-linecap: round; }
.viz-gauge-val { stroke: var(--accent); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 270; stroke-dashoffset: 270; animation: viz-gauge 3s ease-in-out infinite alternate; }
@keyframes viz-gauge { to { stroke-dashoffset: 70; } }
.viz-needle { stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; transform-box: view-box; transform-origin: 150px 176px; animation: viz-needle 3s ease-in-out infinite alternate; }
@keyframes viz-needle { 0% { transform: rotate(-72deg); } 100% { transform: rotate(64deg); } }
.viz-hub { fill: rgba(255,255,255,.9); }
.viz-bar2 { fill: rgba(115,229,61,.6); transform-box: fill-box; transform-origin: 50% 100%; animation: viz-bar 3s ease-in-out infinite; }
@keyframes viz-bar { 0% { transform: scaleY(.15); } 50% { transform: scaleY(1); } 100% { transform: scaleY(.15); } }

/* Web Maintenance */
.viz-gear-teeth { stroke: rgba(255,255,255,.7); stroke-width: 8; stroke-dasharray: 5 7; fill: none; }
.viz-gear-ring { stroke: rgba(255,255,255,.35); stroke-width: 1.5; fill: none; }
.viz-gear--a { transform-box: view-box; transform-origin: 120px 110px; animation: viz-spin 7s linear infinite; }
.viz-gear--b { transform-box: view-box; transform-origin: 176px 140px; animation: viz-spin-rev 7s linear infinite; }
@keyframes viz-spin { to { transform: rotate(360deg); } }
@keyframes viz-spin-rev { to { transform: rotate(-360deg); } }
.viz-pulse { stroke: rgba(255,255,255,.3); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.viz-pulsedot { fill: var(--accent); offset-distance: 0%; animation: viz-flow 2.6s linear infinite; }

@media (prefers-reduced-motion: reduce) { .svc-viz * { animation: none !important; } }

/* ============================================================
   Connect — metallic liquid-metal wordmark
============================================================ */
.connect {
  padding: clamp(48px, 9vh, 130px) 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
#connect-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 7 / 2;   /* placeholder until JS measures the word */
}

/* Iridescent WebGL field, with a dark scrim so text stays readable over it. */
.iridescence-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.iridescence-bg canvas { display: block; width: 100%; height: 100%; }
.iridescence-bg::after { content: ""; position: absolute; inset: 0; background: rgba(10, 10, 11, 0.5); }

/* Mobile / reduced-motion fallback — an accordion, not a stack of essays.
   Six descriptions laid out in full turned this section into a wall of text. */
.services-mobile { display: none; }
.services-mobile .svc-row { border-top: 1px solid var(--line); }
.services-mobile .svc-row:first-child { border-top: 0; }

.svc-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 19px 0; background: none; border: 0; cursor: pointer; text-align: left;
  font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.01em;
  font-size: clamp(1.25rem, 5.4vw, 1.6rem); color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
.svc-chev {
  flex: 0 0 auto; color: var(--accent);
  transition: transform 0.35s var(--ease);
}
.svc-row.is-open .svc-chev { transform: rotate(180deg); }

/* 0fr -> 1fr animates to the content's natural height without hard-coding one */
.svc-a {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.38s var(--ease);
}
.svc-row.is-open .svc-a { grid-template-rows: 1fr; }
.svc-a > p {
  overflow: hidden;
  color: var(--muted); line-height: 1.65; font-size: 0.95rem;
}
.svc-row.is-open .svc-a > p { padding-bottom: 20px; }

/* When static (reduced motion), drop the pinned stage and show the list */
.services.is-static .services-stage { display: none; }
.services.is-static .services-mobile { display: block; }
.services.is-static { min-height: auto; }

@media (max-width: 820px) {
  .services-stage { display: none; }
  .services-mobile { display: block; }
  .services { min-height: auto; }
}

/* ============================================================
   SOLUTIONS
   ============================================================ */
.solutions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.solution {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
  min-height: 210px; display: flex; flex-direction: column;
  transition: border-color 0.4s, background 0.4s, transform 0.4s var(--ease);
}
.solution:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-3px); }
.solution-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: auto; }
.solution-num { font-family: var(--font-mono); color: var(--accent); font-size: 0.8rem; }
.solution-icon { color: var(--faint); font-size: 1.1rem; }
.solution h3 { font-family: var(--font-serif); font-weight: 400; font-size: 1.35rem; margin: 30px 0 8px; letter-spacing: -0.01em; }
.solution p { color: var(--muted); font-size: 0.92rem; }

/* ============================================================
   DIGITAL GOODS
   ============================================================ */
.goods-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.good-media {
  position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius);
  display: grid; place-items: center; overflow: hidden;
}
.media-dark { background: linear-gradient(135deg, #2b2b30, #0d0d10); }
.media-warm { background: linear-gradient(135deg, #d98a2b, #7a3410); }
.good-art {
  font-family: var(--font-serif); font-size: clamp(1.6rem, 4vw, 2.6rem);
  text-align: center; color: #fff; line-height: 1; letter-spacing: -0.01em;
}
.good-badge {
  position: absolute; top: 14px; left: 14px;
  font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase;
  background: rgba(0,0,0,0.4); border: 1px solid var(--line);
  color: var(--text); padding: 4px 10px; border-radius: 100px;
}
.good-caption { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; }
.good-caption h3 { font-weight: 500; font-size: 1rem; }
.good-price { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); }

/* ============================================================
   CREDIBILITY STRIP
   ============================================================ */
.strip-label {
  text-align: center; font-family: var(--font-mono); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin-bottom: 26px;
}
.logo-strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: clamp(28px, 6vw, 68px);
}
.logo-strip span {
  font-family: var(--font-serif); font-size: 1.35rem; color: var(--muted);
  opacity: 0.7; transition: opacity 0.3s, color 0.3s;
}
.logo-strip span:hover { opacity: 1; color: var(--text); }

/* ============================================================
   BLOG
   ============================================================ */
.blog-list { list-style: none; border-top: 1px solid var(--line); }
.blog-row {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 20px;
  padding: 24px 4px; border-bottom: 1px solid var(--line); cursor: pointer;
  transition: padding-left 0.4s var(--ease), background 0.4s;
}
.blog-row:hover { padding-left: 16px; background: linear-gradient(90deg, rgba(115,229,61,0.04), transparent 60%); }
.blog-title { font-family: var(--font-serif); font-size: clamp(1.1rem, 2.4vw, 1.5rem); }
.blog-meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.blog-arrow { color: var(--accent); font-size: 1rem; transition: transform 0.3s var(--ease); }
.blog-row:hover .blog-arrow { transform: translate(3px, -3px); }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonial-grid { columns: 2; column-gap: 16px; }
.quote {
  break-inside: avoid; margin-bottom: 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
}
.quote blockquote { font-size: 1.02rem; line-height: 1.5; color: var(--text); }
.quote figcaption { display: flex; flex-direction: column; margin-top: 18px; }
.q-name { font-weight: 500; font-size: 0.9rem; }
.q-role { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); margin-top: 2px; }

/* ============================================================
   PRICING
   ============================================================ */
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.price-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px;
}
.price-card:last-child { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border-color: var(--line-2); }
.price-kind { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.price-desc { color: var(--muted); font-size: 0.92rem; margin: 12px 0 24px; }
.price-amount { font-family: var(--font-serif); font-size: 3rem; line-height: 1; letter-spacing: -0.02em; }
.price-amount span { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); letter-spacing: 0; }
.price-btn { width: 100%; margin: 24px 0; }
.price-feats { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.price-feats li { position: relative; padding-left: 24px; color: var(--muted); font-size: 0.9rem; }
.price-feats li::before {
  content: "✓"; position: absolute; left: 0; color: var(--accent); font-size: 0.8rem;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 22px 4px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 1.02rem; transition: color 0.25s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-mark { font-family: var(--font-mono); color: var(--accent); font-size: 1.2rem; transition: transform 0.3s var(--ease); }
.faq-item[open] .faq-mark { transform: rotate(45deg); }
.faq-item p { color: var(--muted); padding: 0 4px 22px; max-width: 620px; font-size: 0.95rem; }

/* ============================================================
   WORK PAGE — layout guards
   ============================================================ */
.work-hero, .case { position: relative; }

/* ============================================================
   WORK PAGE (work.html) — one case per row
   ============================================================ */
.work-hero { padding: clamp(120px, 16vh, 190px) 0 clamp(48px, 7vh, 86px); }
.work-back {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
  margin-bottom: 34px; transition: color 0.25s, gap 0.3s var(--ease);
}
.work-back:hover { color: var(--accent); gap: 14px; }
.work-title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(3rem, 8vw, 6rem); line-height: 0.98; letter-spacing: -0.02em;
}
.work-title em { color: var(--muted); }
.work-sub { color: var(--muted); max-width: 52ch; margin-top: 26px; font-size: 1.05rem; line-height: 1.6; }

.cases { padding-bottom: clamp(64px, 9vw, 130px); }
.case + .case { margin-top: clamp(72px, 10vw, 150px); }
.case-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 26px;
}
.case-title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1; letter-spacing: -0.02em;
}
.case-meta { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); letter-spacing: 0.02em; }
.case-meta b { color: var(--accent); font-weight: 500; }

/* Cover reuses .project-media / .project-thumb, so the hover glare + video preview
   from initProjectPreviews() work here unchanged. */
.case .project-media { border-radius: var(--radius); }

/* Two paragraphs side by side under the cover */
.case-body {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 78px); margin-top: 30px; align-items: start;
}
.case-desc { color: var(--muted); font-size: 1rem; line-height: 1.65; max-width: 58ch; }

/* Single closing button — no divider, no separate section */
.cases-cta { display: flex; justify-content: center; margin-top: clamp(60px, 8vw, 110px); }

@media (max-width: 820px) {
  .case-body { grid-template-columns: 1fr; gap: 20px; }
}

/* ============================================================
   TESTIMONIALS — three columns: feature quote · quote + credential · CTA + quote
   ============================================================ */
.t-grid { display: grid; grid-template-columns: 1.12fr 1fr 1fr; gap: 20px; align-items: stretch; }
.t-col { display: flex; flex-direction: column; gap: 20px; }

.t-card {
  position: relative; flex: 1;
  display: flex; flex-direction: column;
  background: #0b0f0d; border-radius: var(--radius);
  padding: clamp(24px, 2.2vw, 34px);
  overflow: hidden;
}
/* Same faded top/bottom white outline as the solutions card */
.t-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(to bottom,
    rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 46%,
    rgba(255,255,255,0) 54%, rgba(255,255,255,0.5) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
/* Feature card — the iridescent WebGL field runs behind the quote */
.t-card--feature { min-height: 330px; }
.t-card--feature > .iridescence-bg { border-radius: inherit; }
/* Keep the card outline above the shader — the canvas would otherwise cover it */
.t-card--feature::before { z-index: 2; }
/* Heavier scrim than the old full-bleed section: this sits under body copy */
.t-card--feature > .iridescence-bg::after { background: rgba(10, 10, 11, 0.66); }
.t-card--feature .t-stars,
.t-card--feature .t-quote,
.t-card--feature .t-attr { position: relative; z-index: 1; }

.t-stars { display: flex; gap: 5px; color: var(--accent); margin-bottom: 22px; }
.t-stars svg { width: 15px; height: 14px; }

.t-quote { color: var(--muted); font-size: 0.98rem; line-height: 1.6; }
/* Sans, not serif: the serif is the section-title voice, and reusing it for the
   feature quote made the two read as the same element. Colour stays. */
.t-card--feature .t-quote {
  font-family: var(--font-sans); color: var(--text);
  font-size: clamp(1.06rem, 1.5vw, 1.3rem); line-height: 1.5; letter-spacing: -0.005em;
}
.t-mark {
  background: rgba(115,229,61,0.18); color: var(--text);
  padding: 1px 4px; border-radius: 4px; box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.t-attr { margin-top: auto; padding-top: 30px; display: flex; flex-direction: column; gap: 3px; }
.t-name { font-size: 0.92rem; font-weight: 500; color: var(--text); }
.t-role { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); letter-spacing: 0.02em; }

/* Accent CTA pill, the dark pill from the reference inverted for a dark page */
.t-pill {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--accent); color: var(--on-accent);
  border-radius: 100px; padding: 16px 22px;
  font-size: 0.9rem; font-weight: 500;
  transition: background 0.25s, transform 0.3s var(--ease), box-shadow 0.35s ease;
}
.t-pill:hover { background: #8BEF5A; transform: translateY(-2px); box-shadow: 0 0 30px 1px rgba(115,229,61,0.4); }
/* The shared .btn-fx burst sizes its particles in % of the button box, so on a
   button this wide the tiles flatten and the "circles" clip into bars. Fixed px
   tiles keep them round and the same size as on the normal buttons. */
.t-pill.btn-fx:hover::before {
  background-size: 16px 16px, 30px 30px, 24px 24px, 30px 30px, 26px 26px, 16px 16px, 24px 24px, 16px 16px, 26px 26px;
}
.t-pill.btn-fx:hover::after {
  background-size: 24px 24px, 30px 30px, 26px 26px, 30px 30px, 24px 24px, 30px 30px, 26px 26px;
}
.t-pill svg { transition: transform 0.3s var(--ease); }
.t-pill:hover svg { transform: translate(2px, -2px); }

/* Credential tile — real proof point, not a client counter */
.t-proof {
  display: flex; align-items: center; gap: 13px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; color: var(--muted);
  font-family: var(--font-mono); font-size: 0.71rem; line-height: 1.45;
}
.t-proof svg { color: var(--accent); flex: 0 0 auto; }

@media (max-width: 980px) {
  .t-grid { grid-template-columns: 1fr 1fr; }
  .t-col:first-child { grid-column: 1 / -1; }
  .t-card--feature { min-height: 0; }
}
@media (max-width: 680px) {
  .t-grid { grid-template-columns: 1fr; }
  .t-col:first-child { grid-column: auto; }
}

/* ============================================================
   CONTACT — portrait + enquiry form
   ============================================================ */
.contact-grid {
  display: grid; grid-template-columns: minmax(0, 0.62fr) 1fr;
  gap: clamp(34px, 5vw, 84px); align-items: center;
}

/* Portrait, in the same faded-outline frame language as the cards */
.contact-photo { position: relative; width: 100%; max-width: 460px; }
.contact-photo__frame {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line); background: #0b0f0d;
}
.contact-photo__frame img { width: 100%; height: 100%; object-fit: cover; }
.contact-photo__frame::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(to bottom,
    rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 46%,
    rgba(255,255,255,0) 54%, rgba(255,255,255,0.5) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
/* Placeholder — shown only if the portrait file is missing */
.contact-photo__ph {
  position: absolute; inset: 0; display: none; place-items: center;
  background:
    radial-gradient(120% 70% at 50% 18%, rgba(115,229,61,0.10), transparent 58%),
    radial-gradient(70% 60% at 50% 42%, rgba(60,60,66,0.85), transparent 74%),
    linear-gradient(180deg, rgba(28,28,32,0.9), rgba(10,10,11,0.2));
}
.contact-photo.no-photo img { display: none; }
.contact-photo.no-photo .contact-photo__ph { display: grid; }
.contact-photo__hint { font-family: var(--font-mono); font-size: 0.66rem; color: var(--faint); }

.contact-badge {
  position: absolute; left: -14px; bottom: 30px;
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-mono); font-size: 0.64rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 10px 15px; border-radius: 100px;
  box-shadow: 0 12px 34px rgba(115,229,61,0.28);
}
.contact-badge i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--on-accent);
  animation: badgePulse 1.9s ease-in-out infinite;
}
@keyframes badgePulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.7); } }

.contact-eyebrow { display: inline-block; color: var(--accent); margin-bottom: 20px; }
.contact-eyebrow sup { color: var(--muted); font-size: 0.62em; margin-left: 4px; top: -0.5em; }
.contact-title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(2.4rem, 5.2vw, 4.2rem); line-height: 1.02; letter-spacing: -0.02em;
}
.contact-title em { color: var(--muted); }
.contact-sub { color: var(--muted); margin-top: 20px; max-width: 46ch; line-height: 1.6; }

.contact-form { display: flex; flex-direction: column; gap: 20px; margin-top: 36px; max-width: 660px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 9px; }
.field-label {
  font-family: var(--font-mono); font-size: 0.88rem;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent);
}
.field input, .field textarea, .field select {
  width: 100%; background: rgba(10,10,11,0.5);
  border: 1px solid var(--line-2); border-radius: 12px;
  padding: 14px 16px; color: var(--text);
  font-family: var(--font-sans); font-size: 0.92rem; line-height: 1.4;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field textarea { resize: vertical; min-height: 138px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(115,229,61,0.12);
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
/* Only flag empty/invalid fields after a submit attempt, never on first paint */
.contact-form.was-validated :is(input, select, textarea):invalid { border-color: #E5533D; }
.contact-form.is-sending { opacity: 0.6; pointer-events: none; }

.select-wrap { position: relative; display: block; }
.select-wrap select {
  appearance: none; -webkit-appearance: none;
  padding-right: 44px; cursor: pointer; color: var(--text);
}
.select-wrap select:has(option[value=""]:checked) { color: var(--faint); }
.select-wrap select option { background: var(--surface); color: var(--text); }
.select-wrap svg {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}

.contact-actions { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; margin-top: 6px; }
.contact-note { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.contact-note.is-error { color: #E5533D; }
.contact-note.is-ok { color: var(--accent); }

@media (max-width: 980px) {
  .contact-grid { grid-template-columns: 1fr; gap: 44px; }
  .contact-photo { max-width: 400px; }
}
@media (max-width: 620px) {
  .field-row { grid-template-columns: 1fr; }
  .contact-actions { gap: 14px; }
  .contact-badge { left: 12px; }
}

/* ============================================================
   FOOTER — thin green end-of-site block
   ============================================================ */
.footer {
  background: var(--accent);
  color: var(--on-accent);
  padding: clamp(40px, 5vw, 68px) 0 26px;
}
/* Three across: email + location · phone · socials */
.footer-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
  padding-bottom: clamp(28px, 4vw, 44px);
}
.footer-lines { display: flex; flex-direction: column; gap: 6px; }
.footer-mail, .footer-tel {
  font-family: var(--font-serif); font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  letter-spacing: -0.01em; text-decoration: underline;
  text-decoration-color: rgba(10,26,5,0.3); text-underline-offset: 5px;
  transition: text-decoration-color 0.25s;
}
.footer-mail:hover, .footer-tel:hover { text-decoration-color: currentColor; }

/* Social buttons (Uiverse: Zameerahmad01) — white circles that fill with the
   brand colour on hover, kept in a horizontal row, with a tooltip above. */
.socials { list-style: none; display: flex; align-items: center; gap: 14px; }
.socials .icon-content { position: relative; }
.socials .icon-content .tooltip {
  position: absolute; top: -34px; left: 50%; transform: translateX(-50%);
  color: #fff; padding: 5px 10px; border-radius: 6px; white-space: nowrap;
  font-family: var(--font-sans); font-size: 12px;
  opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.socials .icon-content:hover .tooltip { opacity: 1; visibility: visible; top: -40px; }
.socials .icon-content a {
  position: relative; overflow: hidden;
  display: flex; justify-content: center; align-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  color: #4d4d4d; background: #fff;
  transition: color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
.socials .icon-content a:hover { color: #fff; box-shadow: 3px 2px 30px rgba(0, 0, 0, 0.18); }
.socials .icon-content a svg { position: relative; z-index: 1; width: 22px; height: 22px; }
.socials .icon-content a .filled {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 0;
  background: #000; transition: height 0.3s ease-in-out;
}
.socials .icon-content a:hover .filled { height: 100%; }
.socials a[data-social="linkedin"] .filled,
.socials a[data-social="linkedin"] ~ .tooltip { background: #0274b3; }
.socials a[data-social="x"] .filled,
.socials a[data-social="x"] ~ .tooltip { background: #16181c; }
.socials a[data-social="instagram"] .filled,
.socials a[data-social="instagram"] ~ .tooltip {
  background: linear-gradient(45deg, #405de6, #5b51db, #b33ab4, #c135b4, #e1306c, #fd1f1f);
}

.footer-base {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding-top: 24px; border-top: 1px solid rgba(10,26,5,0.22);
  font-family: var(--font-mono); font-size: 0.72rem; color: rgba(10,26,5,0.7);
}

@media (max-width: 620px) {
  .footer-row { align-items: flex-start; gap: 28px; }
}

/* ============================================================
   REVEAL ANIMATION (JS-driven)
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ---------- Mobile nav ---------- */
.nav-toggle { display: none; }

@media (max-width: 860px) {
  /* The pill collapses to just the hamburger, pushed to the right edge. */
  .nav-wrap { justify-content: flex-end; top: 14px; padding: 0 16px; }
  .nav { padding: 6px; gap: 0; position: relative; }
  .nav-cta { display: none; }

  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; padding: 0 11px;
    background: none; border: 0; cursor: pointer; border-radius: 100px;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-toggle span {
    display: block; height: 1.5px; width: 100%; background: var(--text);
    border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s ease;
    transform-origin: center;
  }
  /* Stripes fold into an X while the menu is open */
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  /* Dropdown panel, anchored under the pill's right edge */
  .nav-links {
    display: block; position: absolute; top: calc(100% + 10px); right: 0;
    min-width: 208px; padding: 8px;
    background: rgba(20,20,22,0.86);
    backdrop-filter: blur(18px);
    border: 1px solid var(--line); border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.55);
    opacity: 0; visibility: hidden;
    transform: translateY(-8px) scale(0.97); transform-origin: top right;
    transition: opacity 0.22s ease, transform 0.28s var(--ease), visibility 0.28s;
  }
  .nav.is-open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-links a {
    padding: 11px 14px; font-size: 0.9rem; border-radius: 12px; color: var(--text);
  }
  .nav-links a.active { background: rgba(255,255,255,0.06); color: var(--accent); }
  /* "Get in touch" returns as the last item in the dropdown */
  .nav-links .nav-menu-cta {
    margin-top: 4px; background: var(--accent); color: var(--on-accent);
    font-weight: 500; text-align: center;
  }
}
/* ---------- Mobile hero ----------
   The frame is a 16:9-ish landscape plate. Fitting it into a tall phone viewport
   letterboxes it to a postage stamp, so on narrow screens the canvas crops to fill
   instead (see drawFrame) and the copy moves out from under the figure into the
   lower third, over a scrim. */
@media (max-width: 860px) {
  /* svh, not vh: iOS vh includes the collapsible URL bar, so the sticky hero and
     the canvas disagree about their height and the frame renders stretched. */
  .hero-sticky { height: 100svh; }

  .hero-content {
    top: auto; bottom: 0; transform: none;
    width: 100%; max-width: none;
    padding: 0 24px calc(34px + env(safe-area-inset-bottom)) 24px;
    text-align: left;
  }
  /* Scrim so the copy stays readable over the figure's legs and the floor */
  .hero-content::before {
    content: ""; position: absolute; inset: -120px 0 0 0; z-index: -1;
    background: linear-gradient(180deg, rgba(10,10,11,0) 0%, rgba(10,10,11,0.72) 42%, rgba(10,10,11,0.94) 100%);
    pointer-events: none;
  }
  .hero-title { font-size: clamp(2.1rem, 10.5vw, 3.2rem); }
  .hero-sub { margin-top: 14px; font-size: 0.94rem; max-width: 34ch; }
  .hero-actions { margin-top: 22px; gap: 10px; }
  .hero-actions .btn { padding: 12px 20px; font-size: 0.86rem; }
  /* Competes with the copy for the little vertical room there is */
  .scroll-cue { display: none; }

  /* The pill button is a fixed 240x56 — far too heavy next to a phone-sized
     heading. Scale it to sit beside the title rather than dominate it. */
  /* Resize via the two variables only — the border segments follow. */
  .section-head .button { --cap: 34px; --w: 148px; font-size: 9px; letter-spacing: 0.9px; }
  .contact-actions .button { --cap: 40px; --w: 168px; font-size: 10px; letter-spacing: 1.2px; }

  /* ---------- Type scale ----------
     Section titles were landing the same size as the item headings beneath
     them, which flattened the hierarchy. Titles up, item headings down. */
  .section-title { font-size: clamp(2.3rem, 9vw, 2.9rem); }
  .project-caption h3 { font-size: 1.24rem; }
  .project-caption p { font-size: 0.9rem; }
  .svc-q { font-size: clamp(1.02rem, 4.4vw, 1.24rem); }
  .case-title { font-size: 1.4rem; }

  /* Body copy runs at one size across sections. The feature quote stays
     distinguished by colour (--text vs --muted), not by being larger. */
  .t-quote,
  .t-card--feature .t-quote { font-size: 0.95rem; line-height: 1.65; }

  /* Static hero: `relative`, not `sticky`, so there is no travel at all. The
     text was drifting up a little then stopping — that is a sticky element
     running out of range as iOS collapses the URL bar. */
  .hero-sticky { position: relative; }
  /* A bit more air before Projects now that nothing scrolls over it */
  #work { padding-top: 104px; }

  /* ---------- Contact ----------
     Stacked, the 3:4 portrait became a full-width slab sitting above the section
     and reading as its own page. `display: contents` dissolves .contact-panel so
     its children become grid items, which lets the portrait sit as a small circle
     beside the heading instead of on its own row. */
  .contact-grid {
    display: grid; grid-template-columns: 1fr auto;
    column-gap: 18px; row-gap: 0; align-items: center;
  }
  .contact-panel { display: contents; }

  .contact-eyebrow { grid-row: 1; grid-column: 1 / -1; margin-bottom: 10px; }
  .contact-title   { grid-row: 2; grid-column: 1; }
  .contact-photo   { grid-row: 2; grid-column: 2; width: clamp(84px, 24vw, 116px); max-width: none; }
  .contact-sub     { grid-row: 3; grid-column: 1 / -1; margin-top: 18px; }
  .contact-form    { grid-row: 4; grid-column: 1 / -1; }

  .contact-photo__frame { aspect-ratio: 1; border-radius: 50%; }
  /* The gradient hairline is drawn for a rounded rectangle; a full circle reads
     cleaner with a plain ring. */
  .contact-photo__frame::after { display: none; }
  .contact-photo__frame { border-color: var(--line-2); }
  /* "Online now" pill is wider than the circle it hangs off */
  .contact-badge { display: none; }
}

@media (max-width: 620px) {
  .projects-grid, .solutions-grid, .goods-grid, .pricing-grid { grid-template-columns: 1fr; }
  .testimonial-grid { columns: 1; }
  .blog-row { grid-template-columns: 1fr auto; }
  .blog-meta { display: none; }
  /* Heading and its action stay on one line — stacking pushed a 240px-wide
     button under the title, where it read as the loudest thing on the screen. */
  .section-head { flex-direction: row; align-items: baseline; gap: 14px; }
  .placeholder-hint { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
