/* ============================================================
   styles.css — small layer on top of Tailwind CDN.
   Only things Tailwind utilities don't do cleanly live here:
   scroll-reveal animation, the FAQ accordion, the case-study
   <dialog>, and the hero background texture.
   ============================================================ */

/* ============================================================
   THEME TOKENS — dark only.
   The Tailwind "brand" scale maps to these vars (rgb(var(--x) /
   <alpha-value>) — see the config in index.html). --c-950 is the
   solid always-dark bands (hero, Approach, contact, footer, clients).
   ============================================================ */
:root {
  --font-sans-fallback: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --c-50:  16 19 18;      /* surfaces        */
  --c-100: 24 28 26;      /* subtle panels   */
  --c-200: 43 48 45;      /* hairline borders */
  --c-300: 57 64 60;
  --c-400: 91 99 94;
  --c-500: 138 145 140;   /* captions        */
  --c-600: 167 173 169;   /* secondary text  */
  --c-700: 198 203 199;   /* body text       */
  --c-800: 222 226 223;
  --c-900: 244 246 244;   /* headings        */
  --c-950: 11 15 13;      /* always-dark bands */
  --a-500: 14 124 90;     /* emerald — buttons */
  --a-600: 52 211 153;    /* emerald — eyebrow text / bright accent */

  --surface:   #161a18;
  --surface-2: #1c211e;
  --line:      #2b302d;
  --ink:       #f4f6f4;
  --ink-muted: #a7ada9;
  --shadow-1:  0 1px 3px rgba(0, 0, 0, 0.4), 0 12px 34px rgba(0, 0, 0, 0.4);

  --pill-bg:     rgba(20, 24, 22, 0.55);
  --pill-border: rgba(255, 255, 255, 0.10);
  --pill-sheen:  linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.03) 42%, rgba(255,255,255,0) 60%);
  --menu-bg:     rgba(16, 19, 18, 0.9);

  color-scheme: dark;
}

body {
  font-family: "Inter", var(--font-sans-fallback);
}

/* Fixed header: keep anchor targets clear of the floating nav */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  background-color: rgb(var(--c-50));
}

/* ---------- Scroll-progress bar (top of viewport) ---------- */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 50;
  transform: scaleX(var(--sp, 0));
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgb(var(--a-500)), rgb(var(--a-600)));
  will-change: transform;
  pointer-events: none;
}

/* ---------- Ambient section glows ---------- */
.ambient {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.ambient::before,
.ambient::after {
  content: "";
  position: absolute;
  width: 46rem;
  height: 46rem;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  background: radial-gradient(closest-side, rgb(var(--a-500) / 0.16), transparent 70%);
}
.ambient::before { top: -18rem; right: -14rem; }
.ambient::after  { bottom: -22rem; left: -16rem; background: radial-gradient(closest-side, rgb(var(--a-600) / 0.12), transparent 70%); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Floating LIQUID-GLASS nav ----------
   Two states: DARK glass over the near-black hero (default), then a
   LIGHT glass pill once you scroll onto the white page (.is-scrolled).
   Heavy blur + saturation lift, an inset top highlight, a faint
   top-down sheen, and a layered outer shadow. */
.nav-pill {
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(18, 22, 20, 0.42);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 1px rgba(0, 0, 0, 0.20),
    0 10px 34px rgba(0, 0, 0, 0.35);
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
/* liquid sheen */
.nav-pill::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.04) 42%,
    rgba(255, 255, 255, 0) 60%
  );
}
.nav-pill .nav-brand { color: #ffffff; transition: color 0.2s ease; }
.nav-pill .nav-link { color: rgba(255, 255, 255, 0.72); transition: color 0.2s ease; }
.nav-pill .nav-link:hover,
.nav-pill .nav-link.is-current { color: #ffffff; }

/* Scrolled onto the page: flip to a frosted pill in the current theme */
#siteHeader.is-scrolled .nav-pill {
  border-color: var(--pill-border);
  background: var(--pill-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 2px 6px rgba(0, 0, 0, 0.10),
    0 14px 40px rgba(0, 0, 0, 0.16);
}
#siteHeader.is-scrolled .nav-pill::after { background: var(--pill-sheen); }
#siteHeader.is-scrolled .nav-pill .nav-brand { color: var(--ink); }
#siteHeader.is-scrolled .nav-pill .nav-link { color: var(--ink-muted); }
#siteHeader.is-scrolled .nav-pill .nav-link:hover { color: var(--a-600); }
#siteHeader.is-scrolled .nav-pill .nav-link.is-current { color: var(--ink); }

/* "Let's connect" button — white on the dark hero nav, emerald once scrolled */
.nav-cta { background: #ffffff; color: #0b0f0d; transition: background 0.2s ease, color 0.2s ease; }
.nav-cta:hover { background: #e6e9e7; }
#siteHeader.is-scrolled .nav-cta { background: var(--a-500); color: #ffffff; }
#siteHeader.is-scrolled .nav-cta:hover { background: #084a36; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav-pill { background: rgba(15, 19, 17, 0.92); }
  #siteHeader.is-scrolled .nav-pill { background: var(--menu-bg); }
}

.mobile-nav {
  border: 1px solid var(--pill-border);
  background: var(--menu-bg);
  -webkit-backdrop-filter: saturate(190%) blur(20px);
  backdrop-filter: saturate(190%) blur(20px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 14px 40px rgba(0, 0, 0, 0.18);
}
.mobile-nav .nav-link {
  color: var(--ink-muted);
  border-color: var(--line);
}
.mobile-nav .nav-link.is-current { color: var(--a-600); }

/* ---------- Featured projects ---------- */
/* guarantee the toggle wins over the panel's own `grid` utility */
.feature-panel.hidden { display: none !important; }

/* thumbnail switcher */
.proj-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.proj-thumb img {
  height: 6rem;
  width: 100%;
  object-fit: cover;
  object-position: top;
  opacity: 0.92;
  transition: opacity 0.25s ease;
}
@media (min-width: 640px) {
  .proj-thumb img { height: 7rem; }
}
.proj-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 15, 13, 0.72), rgba(11, 15, 13, 0.05) 55%, transparent);
}
.proj-thumb:hover img { opacity: 1; }
.proj-thumb.is-active {
  border-color: var(--a-500);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}
.proj-thumb.is-active img { opacity: 1; }
.proj-thumb-label {
  position: absolute;
  bottom: 0.5rem;
  left: 0.75rem;
  right: 0.75rem;
  z-index: 1;
  text-align: left;
}
.proj-thumb-name {
  display: block;
  font-family: "Sora", var(--font-sans-fallback);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}
.proj-thumb-cat {
  display: block;
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Testimonials marquee ---------- */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}
.tcard {
  display: flex;
  width: 17rem;
  flex: none;
  flex-direction: column;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1.5rem;
  box-shadow: var(--shadow-1);
}
@media (min-width: 640px) {
  .tcard { width: 20rem; }
}
.tcard-avatar {
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 6px 14px rgba(11, 15, 13, 0.12);
}
/* client logo inside a testimonial card — flattened to soft white */
.tcard-logo {
  height: 26px;
  width: auto;
  max-width: 150px;
  margin: 0 auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}
.tstars {
  margin-top: 1rem;
  text-align: center;
  letter-spacing: 0.15em;
  color: #0e7c5a;
}
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; }
  .marquee-track { animation: none; }
}

/* ---------- Clients logo marquee (always-dark band) ---------- */
#clientsTrack {
  gap: clamp(2.75rem, 7vw, 5.5rem);
  align-items: center;
  animation-duration: 34s;
}
.client-logo {
  flex: none;
  white-space: nowrap;
  font-family: "Sora", var(--font-sans-fallback);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.client-logo-img {
  flex: none;
  /* per-logo optical sizing lives in --logo-h (default: single-line wordmark) */
  height: var(--logo-h, 30px);
  width: auto;
  max-width: 230px;
  object-fit: contain;
  /* normalise any logo (black / white / colour) to soft white */
  filter: brightness(0) invert(1);
  opacity: 0.72;
  transition: opacity 0.2s ease;
}
/* stacked / squarish marks need more height to read at the same weight */
.client-logo-img[alt="Al Hajis Perfumes"] { --logo-h: 42px; }
.client-logo-img[alt="Parfumix"]          { --logo-h: 52px; }
.client-logo-img[alt="Glowitt"]           { --logo-h: 46px; }
.client-logo-img[alt="Magic Lamps"]       { --logo-h: 50px; }
.client-logo-img[alt="Mix for Less"]      { --logo-h: 48px; }
.client-logo-img:hover { opacity: 1; }

/* ---------- "Trusted by" avatar chips (hero) ---------- */
.avatar-chip {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #0b0f0d;
  background: var(--g, #334155);
  background-size: cover;
  background-position: center;
}

/* Screen-reader-only helper (used by the skip link) */
.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;
}
.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* ---------- Hero background FX: emerald glow + faint panels ---------- */
.hero-fx {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
/* oversized Shopify bag watermark, slow drift */
.hero-mark {
  position: absolute;
  top: 44%;
  right: -6rem;
  width: 30rem;
  height: 30rem;
  color: #95bf47;
  opacity: 0.06;
  transform: translateY(-50%) rotate(-8deg);
}
@media (min-width: 1024px) {
  .hero-mark { right: 2rem; width: 34rem; height: 34rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-mark { animation: heroMarkDrift 18s ease-in-out infinite; }
}
@keyframes heroMarkDrift {
  0%, 100% { transform: translateY(-50%) rotate(-8deg); }
  50%      { transform: translateY(-56%) rotate(-2deg); }
}

/* ---------- Floating Shopify marks across the whole page ---------- */
.shopify-float {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}
.shopify-float .sf {
  position: absolute;
  aspect-ratio: 1;
  height: auto;
  color: #95bf47;
  opacity: 0.07;
  animation: sfFloat var(--d, 26s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform;
}
@keyframes sfFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--r, 0deg)); }
  50%      { transform: translate3d(var(--x, 12px), -42px, 0) rotate(calc(var(--r, 0deg) + 14deg)); }
}
.sf-1 { top: 7%;   left: 4%;   width: 78px;  --d: 23s; --r: -10deg; }
.sf-2 { top: 24%;  right: 6%;  width: 120px; --d: 31s; --delay: -7s; --r: 12deg; --x: -16px; }
.sf-3 { top: 46%;  left: 9%;   width: 54px;  --d: 19s; --delay: -3s; --r: 6deg; }
.sf-4 { top: 63%;  right: 12%; width: 92px;  --d: 27s; --delay: -12s; --r: -14deg; --x: 20px; }
.sf-5 { top: 80%;  left: 16%;  width: 66px;  --d: 24s; --delay: -5s; --r: 8deg; }
.sf-6 { top: 90%;  right: 8%;  width: 104px; --d: 34s; --delay: -18s; --r: -6deg; --x: -12px; }
.sf-7 { top: 15%;  left: 42%;  width: 44px;  --d: 21s; --delay: -9s; --r: 16deg; }
@media (max-width: 640px) {
  .sf-3, .sf-7 { display: none; }
  .shopify-float .sf { opacity: 0.04; }
}
@media (prefers-reduced-motion: reduce) {
  .shopify-float .sf { animation: none; }
  .hero-mark { animation: none; }
}
/* glow rising from the bottom-centre */
.hero-fx::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -34%;
  width: min(1200px, 130%);
  height: 92%;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side,
      rgba(16, 138, 100, 0.55),
      rgba(16, 138, 100, 0.16) 52%,
      transparent 76%);
  filter: blur(6px);
}
/* a faint warm core just above the fold-line for depth */
.hero-fx::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12%;
  width: min(680px, 80%);
  height: 46%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(52, 211, 153, 0.35), transparent 72%);
  filter: blur(10px);
}
.hero-panels {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(10px, 2vw, 26px);
  padding: 0 4%;
  opacity: 0.6;
  -webkit-mask-image: linear-gradient(to top, #000 6%, transparent 90%);
  mask-image: linear-gradient(to top, #000 6%, transparent 90%);
}
.hero-panels > span {
  flex: 1 1 0;
  max-width: 210px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.015));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.hero-panels > span:nth-child(1) { height: 52%; }
.hero-panels > span:nth-child(2) { height: 78%; }
.hero-panels > span:nth-child(3) { height: 96%; }
.hero-panels > span:nth-child(4) { height: 70%; }
.hero-panels > span:nth-child(5) { height: 46%; }
@media (max-width: 640px) {
  .hero-panels > span:nth-child(1),
  .hero-panels > span:nth-child(5) { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-fx::before { animation: heroGlow 7s ease-in-out infinite alternate; }
}
@keyframes heroGlow {
  from { opacity: 0.85; transform: translateX(-50%) scale(0.98); }
  to   { opacity: 1; transform: translateX(-50%) scale(1.03); }
}

/* ---------- "My Approach" radial diagram ---------- */
.approach-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(46% 42% at 50% 46%, rgba(16, 138, 100, 0.20), transparent 70%),
    radial-gradient(70% 50% at 50% 120%, rgba(16, 138, 100, 0.12), transparent 70%);
}

/* Radial "petal" layout at EVERY width: 4 nodes around a spinning core. */
.approach-orbit {
  position: relative;
  display: grid;
  grid-template-columns: 1fr clamp(96px, 25vw, 190px) 1fr;
  grid-template-rows: auto auto auto;
  gap: clamp(0.35rem, 2.5vw, 1.75rem) clamp(0.4rem, 2vw, 3rem);
  align-items: center;
  justify-items: center;
  max-width: 1000px;
  margin: 2.5rem auto 0;
}
.approach-node[data-pos="top"]    { grid-area: 1 / 2 / 2 / 3; }
.approach-core                    { grid-area: 2 / 2 / 3 / 3; }
.approach-node[data-pos="right"]  { grid-area: 2 / 3 / 3 / 4; }
.approach-node[data-pos="bottom"] { grid-area: 3 / 2 / 4 / 3; }
.approach-node[data-pos="left"]   { grid-area: 2 / 1 / 3 / 2; text-align: right; }

.approach-node {
  position: relative;
  width: 100%;
  max-width: 320px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
  padding: clamp(0.7rem, 3vw, 1.4rem) clamp(0.7rem, 3.5vw, 1.5rem);
  text-align: center;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.approach-num {
  font-family: "Sora", var(--font-sans-fallback);
  font-weight: 800;
  font-size: clamp(0.68rem, 2.6vw, 0.78rem);
  letter-spacing: 0.12em;
  color: #34d399;
}
.approach-node-title {
  font-family: "Sora", var(--font-sans-fallback);
  font-weight: 700;
  font-size: clamp(0.9rem, 3.4vw, 1.05rem);
  margin-top: 0.15rem;
  color: #fff;
}
.approach-node-text {
  display: none;                 /* number + title only in the petals */
  margin-top: 0.4rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #c9cfcc;
}

.approach-core {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(96px, 25vw, 172px);
  aspect-ratio: 1;
}
.approach-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  animation: approachSpin 24s linear infinite;
}
.approach-ring text {
  fill: rgba(255, 255, 255, 0.55);
  font-family: "Sora", var(--font-sans-fallback);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
}
.approach-core-mark {
  display: grid;
  place-items: center;
  width: clamp(46px, 13vw, 78px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #0e7c5a;
  color: #fff;
  font-family: "Sora", var(--font-sans-fallback);
  font-weight: 800;
  font-size: clamp(0.72rem, 2.6vw, 1.05rem);
  letter-spacing: 0.06em;
  box-shadow: 0 0 0 6px rgba(14, 124, 90, 0.16), 0 0 44px rgba(16, 138, 100, 0.5);
}
@keyframes approachSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .approach-ring { animation: none; }
}

/* connector lines from the core out to each petal — shown at all widths */
.approach-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: visible;
}
.approach-lines line {
  stroke: rgba(16, 138, 100, 0.5);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

/* Desktop: roomier grid + show the descriptions inside the petals */
@media (min-width: 1024px) {
  .approach-orbit {
    grid-template-columns: 1fr minmax(160px, 200px) 1fr;
    grid-template-rows: repeat(3, minmax(150px, auto));
    gap: 1.75rem 3rem;
    margin-top: 3.5rem;
  }
  .approach-node { padding: 1.4rem 1.5rem; }
  .approach-node-text { display: block; }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal[data-reveal="left"]   { transform: translateX(-30px); }
.reveal[data-reveal="right"]  { transform: translateX(30px); }
.reveal[data-reveal="scale"]  { transform: scale(0.94); }
.reveal[data-reveal="fade"]   { transform: none; }
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* stagger children of a [data-stagger] container */
[data-stagger] > .reveal:nth-child(1) { --reveal-delay: 0ms; }
[data-stagger] > .reveal:nth-child(2) { --reveal-delay: 90ms; }
[data-stagger] > .reveal:nth-child(3) { --reveal-delay: 180ms; }
[data-stagger] > .reveal:nth-child(4) { --reveal-delay: 270ms; }
[data-stagger] > .reveal:nth-child(5) { --reveal-delay: 360ms; }
[data-stagger] > .reveal:nth-child(6) { --reveal-delay: 450ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none;
  }
  .animate-ping { animation: none !important; }
  #scrollProgress { display: none; }
}

/* ---------- FAQ accordion ---------- */
.faq-trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  text-align: left;
  font-family: "Sora", var(--font-sans-fallback);
  font-weight: 600;
  font-size: 0.975rem;
  color: var(--ink);
  cursor: pointer;
  background: none;
  border: none;
}
.faq-icon {
  transition: transform 0.25s ease;
}
.faq-trigger[aria-expanded="true"] .faq-icon {
  transform: rotate(180deg);
}
.faq-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
.faq-panel > p {
  padding-bottom: 1.15rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-muted);
}

/* ---------- Case study <dialog> ---------- */
.case-dialog {
  width: min(680px, 92vw);
  max-height: 88vh;
  padding: 0;
  border: none;
  border-radius: 1rem;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.6);
}
.case-dialog::backdrop {
  background: rgba(8, 11, 10, 0.66);
  backdrop-filter: blur(2px);
}
.case-dialog[open] {
  animation: dialogIn 0.2s ease-out;
}
@keyframes dialogIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.dialog-inner {
  padding: 1.75rem;
  overflow-y: auto;
  max-height: 88vh;
}
@media (min-width: 640px) {
  .dialog-inner { padding: 2.25rem; }
}
.dialog-close {
  position: sticky;
  top: 0;
  float: right;
  display: grid;
  place-items: center;
  height: 2.25rem;
  width: 2.25rem;
  margin: -0.5rem -0.5rem 0 0;
  border-radius: 0.6rem;
  color: var(--ink);
  background: var(--surface-2);
  border: none;
  cursor: pointer;
}
.dialog-close:hover {
  background: var(--line);
}

/* Lock body scroll while a dialog is open (class added by script.js) */
body.dialog-open {
  overflow: hidden;
}

/* ---------- Lightbox (click-to-zoom images) ---------- */
.js-zoom {
  cursor: zoom-in;
  padding: 0;
  border: 0;
  background: none;
}
dialog.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  padding: 1.5rem;
  border: none;
  background: rgba(10, 9, 8, 0.94);
}
dialog.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: dialogIn 0.15s ease-out;
}
dialog.lightbox::backdrop {
  background: rgba(10, 9, 8, 0.94);
}
.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 0.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  cursor: zoom-out;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  height: 2.75rem;
  width: 2.75rem;
  border: none;
  border-radius: 0.6rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* code tags inside placeholders */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  background: rgba(127, 122, 117, 0.22);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
}

/* ============================================================
   HOVER / TOUCH MICRO-INTERACTIONS
   Hover effects are gated to real pointers; every interactive
   element also gets an :active "press" so touch feels responsive.
   ============================================================ */

/* --- Primary CTA: lift, glow, arrow nudge, shine sweep --- */
.cta-primary {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.25s ease, background-color 0.2s ease;
}
.cta-primary svg { transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1); }
.cta-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: left 0.5s ease;
}
@media (hover: hover) {
  .cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px -8px rgba(14, 124, 90, 0.5);
  }
  .cta-primary:hover svg { transform: translateX(4px); }
  .cta-primary:hover::after { left: 130%; }
}
.cta-primary:active { transform: translateY(0) scale(0.97); }

/* --- Small round icon buttons: pop + spin the glyph --- */
.hx-pop { transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s ease; }
.hx-pop svg { transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
@media (hover: hover) {
  .hx-pop:hover { transform: scale(1.12) rotate(6deg); }
  .hx-pop:hover svg { transform: rotate(-6deg); }
}
.hx-pop:active { transform: scale(0.92); }

/* --- Nav links: underline grows from the left --- */
.nav-pill .nav-link,
.mobile-nav .nav-link { position: relative; }
.nav-pill .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (hover: hover) {
  .nav-pill .nav-link:hover::after { transform: scaleX(1); }
}
.nav-pill .nav-link.is-current::after { transform: scaleX(1); opacity: 0.5; }

/* --- Cards: lift, emerald edge, deeper shadow --- */
.hx-card,
.tcard {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.25s ease, box-shadow 0.3s ease;
}
@media (hover: hover) {
  .hx-card:hover,
  .tcard:hover {
    transform: translateY(-5px);
    border-color: rgb(var(--a-500) / 0.55);
    box-shadow: 0 20px 40px -16px rgba(11, 15, 13, 0.28);
  }
}
.hx-card:active { transform: translateY(-1px) scale(0.995); }

/* --- Skill-card icon tile: flip-ish nudge when its card is hovered --- */
.hx-card .rounded-xl { transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
@media (hover: hover) {
  .hx-card:hover .rounded-xl { transform: rotate(-8deg) scale(1.06); }
}

/* --- Feature-panel image: zoom + emerald wash on hover --- */
.feature-panel .js-zoom { position: relative; }
.feature-panel .js-zoom::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(var(--a-500) / 0);
  transition: background 0.3s ease;
  pointer-events: none;
}
@media (hover: hover) {
  .feature-panel .js-zoom:hover::after { background: rgb(var(--a-500) / 0.08); }
}
.feature-panel .js-zoom:active { transform: scale(0.99); }

/* --- Project thumbnails: image push-in + label rise --- */
.proj-thumb .proj-thumb-label {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (hover: hover) {
  .proj-thumb:hover { transform: translateY(-3px); }
  .proj-thumb:hover .proj-thumb-label { transform: translateY(-3px); }
  .proj-thumb:hover img { transform: scale(1.06); }
}
.proj-thumb img { transition: transform 0.4s ease, opacity 0.25s ease; }
.proj-thumb:active { transform: translateY(-1px) scale(0.98); }

/* --- Approach nodes: lift + edge glow (desktop) --- */
@media (min-width: 1024px) and (hover: hover) {
  .approach-node {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.25s ease;
  }
  .approach-node:hover {
    transform: translateY(-4px);
    border-color: rgb(52 211 153 / 0.5);
    box-shadow: 0 0 0 1px rgb(52 211 153 / 0.25), 0 18px 40px -18px rgba(0, 0, 0, 0.5);
  }
}

/* --- Client logos: focus one, dim the rest --- */
@media (hover: hover) {
  .marquee:hover .client-logo-img { opacity: 0.4; }
  .marquee:hover .client-logo-img:hover { opacity: 1; transform: scale(1.08); }
  .marquee:hover .client-logo { opacity: 0.35; }
  .marquee:hover .client-logo:hover { opacity: 1; }
}
.client-logo-img, .client-logo { transition: opacity 0.25s ease, transform 0.25s ease; }

/* --- FAQ rows: hover tint + chevron kick --- */
@media (hover: hover) {
  .faq-trigger:hover { color: rgb(var(--a-600)); }
  .faq-trigger:hover .faq-icon { transform: translateY(2px); }
}
.faq-trigger[aria-expanded="true"]:hover .faq-icon { transform: rotate(180deg); }

/* --- Trusted-by avatars: fan out on hover --- */
.avatar-chip { transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1); }
@media (hover: hover) {
  .flex:hover > .avatar-chip:nth-child(1) { transform: translateX(-3px) rotate(-6deg); }
  .flex:hover > .avatar-chip:nth-child(4) { transform: translateX(3px) rotate(6deg); }
}

/* --- Contact / footer links: slide + colour --- */
@media (hover: hover) {
  #contact a[href^="mailto"]:hover,
  #contact a[href^="tel"]:hover,
  #contact a[href*="linkedin"]:hover,
  #contact a[href*="ynott"]:hover { color: rgb(52 211 153); transform: translateX(3px); }
}
#contact ul a { display: inline-block; transition: color 0.2s ease, transform 0.2s ease; }

@media (prefers-reduced-motion: reduce) {
  .cta-primary, .cta-primary svg, .cta-primary::after,
  .hx-pop, .hx-pop svg, .hx-card, .tcard, .proj-thumb, .proj-thumb img,
  .approach-node, .avatar-chip,
  .nav-pill .nav-link::after { transition: none; }
}
