/* ==========================================================
   Yassine Edit — styles
   ========================================================== */

:root {
  --ink: #0f1722;
  --paper: #ffffff;
  --mist: #f4f6f9;
  --muted: #5d6878;
  --smoke-1: #7e96b4;
  --smoke-2: #2b3f5c;
  --smoke-3: #b9c8da;
  --accent: #7fd9b0;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

.container { width: min(1200px, 92vw); margin: 0 auto; }
.narrow { width: min(760px, 92vw); }
.center { text-align: center; }

/* ---------- Grain overlay ---------- */
.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .04;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
}

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}
.section-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.05;
  margin: 0 0 1.2rem;
}
.sub, .lead {
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  max-width: 620px;
  margin: 0 auto;
}
.lead { font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--ink); }
.underline {
  background: linear-gradient(currentColor, currentColor) 0 92% / 100% 3px no-repeat;
  transition: background-size .5s var(--ease);
}
.underline:hover { background-size: 0 3px; background-position: 100% 92%; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, 94vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem .6rem .55rem 1rem;
  z-index: 50;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .16);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .4);
  box-shadow: 0 8px 32px rgba(15, 23, 34, .15), inset 0 1px 0 rgba(255, 255, 255, .4);
  color: #fff;
  transition: background .4s var(--ease), color .4s var(--ease), transform .6s var(--ease);
}
.nav.scrolled {
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-color: rgba(255, 255, 255, .6);
  color: var(--ink);
  box-shadow: 0 8px 32px rgba(15, 23, 34, .12), inset 0 1px 0 rgba(255, 255, 255, .7);
}

.logo { display: flex; align-items: center; gap: .6rem; font-weight: 600; font-size: .95rem; }
.logo-img { height: 44px; width: auto; display: block; }
.logo-dot {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255, 255, 255, .3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow: 0 6px 16px rgba(15, 23, 34, .18);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
  animation: pulse 4s ease-in-out infinite;
}

.nav-links { display: flex; gap: .25rem; align-items: center; }
.nav-links a:not(.pill) {
  font-size: .9rem;
  padding: .45rem .8rem;
  border-radius: var(--radius-pill);
  opacity: .85;
  transition: background .3s, opacity .3s;
}
.nav-links a:not(.pill):hover,
.nav-links a.active { opacity: 1; background: transparent; }
.nav-links .pill {
  font-size: .9rem;
  background: #fff;
  color: var(--ink);
  padding: .5rem 1.1rem;
  border-radius: var(--radius-pill);
  transition: transform .3s var(--ease), background .3s;
}
.nav-links .pill:hover { transform: translateY(-2px); background: #e9eef5; }

.nav-right { display: flex; align-items: center; gap: .6rem; }
.status {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .8rem;
  padding: .45rem .9rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .1));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(127, 217, 176, .7);
  animation: ping 2s infinite;
}

.burger { display: none; width: 42px; height: 42px; border: 0; border-radius: 50%; background: linear-gradient(135deg, rgba(255,255,255,.35), rgba(255,255,255,.08)); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.35); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 6px 16px rgba(15,23,34,.15); cursor: pointer; position: relative; }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: currentColor; transition: transform .4s var(--ease); }
.burger span:first-child { top: 16px; }
.burger span:last-child { top: 24px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  padding: .5rem .5rem .5rem 1.4rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--ink);
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(15, 23, 34, .18);
  transition: box-shadow .4s var(--ease), transform .4s var(--ease);
}
.btn:hover { box-shadow: 0 16px 40px rgba(15, 23, 34, .26); }
.btn-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  transition: transform .5s var(--ease);
}
.btn:hover .btn-icon { transform: translateX(4px) rotate(-10deg); }
.btn.full { width: 100%; justify-content: space-between; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(180deg, #a9bcd2 0%, #6f88a8 45%, #2b3f5c 100%);
  isolation: isolate;
}

/* Smoke: layered blurred blobs drifting slowly */
.smoke { position: absolute; inset: -10%; z-index: -1; filter: blur(60px); }
.blob {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--c, #1d3050) 0%, transparent 70%);
  animation: drift 22s ease-in-out infinite alternate;
  will-change: transform;
}
.b1 { --c: #1d3050; width: 60vw; height: 60vw; left: 20%; top: 10%; }
.b2 { --c: #9fb4cf; width: 50vw; height: 50vw; left: -5%; top: 30%; animation-duration: 28s; animation-delay: -6s; }
.b3 { --c: #0c1a2e; width: 45vw; height: 45vw; right: -5%; bottom: -5%; animation-duration: 26s; animation-delay: -12s; }
.b4 { --c: #c4d3e4; width: 35vw; height: 35vw; right: 15%; top: 0; animation-duration: 30s; animation-delay: -3s; }

@keyframes drift {
  0%   { transform: translate3d(-4%, -2%, 0) scale(1); }
  50%  { transform: translate3d(4%, 3%, 0) scale(1.08); }
  100% { transform: translate3d(-2%, 4%, 0) scale(.96); }
}

.hero-inner { text-align: center; padding: 0 6vw; display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }

.avatar { position: relative; width: 120px; height: 120px; transition: transform .2s linear; }
.avatar-img {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: url("HERO_AVATAR.svg") center / cover no-repeat;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
  animation: float 6s ease-in-out infinite;
}
.avatar-tag {
  position: absolute;
  right: -90px; bottom: 8px;
  background: #fff; color: var(--ink);
  font-size: .75rem; font-weight: 500;
  padding: .4rem .8rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
  animation: float 7s ease-in-out infinite reverse;
}

.hero-title {
  font-size: clamp(2.6rem, 6.4vw, 5.2rem);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1.02;
  margin: 0;
  max-width: 980px;
  text-shadow: 0 2px 30px rgba(15, 23, 34, .25);
}

.scroll-hint {
  position: absolute;
  bottom: 28px; left: 50%;
  width: 26px; height: 42px;
  transform: translateX(-50%);
  border: 2px solid rgba(255, 255, 255, .7);
  border-radius: 20px;
}
.scroll-hint span {
  position: absolute; left: 50%; top: 8px;
  width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: #fff;
  animation: wheel 1.8s var(--ease) infinite;
}

/* ---------- Split text (words animate in) ---------- */
.split .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: .08em;
  margin-bottom: -.08em;
}
.split .word > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 1s var(--ease);
  transition-delay: calc(var(--i) * 45ms);
}
.split.in .word > span { transform: none; }

/* ---------- Generic section ---------- */
.section { padding: clamp(90px, 14vw, 160px) 0; position: relative; }
.section-head { margin-bottom: clamp(48px, 7vw, 80px); }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  filter: blur(8px);
  transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- Services ---------- */
.services { background: var(--paper); }
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.service-card {
  position: relative;
  background: var(--mist);
  border-radius: 22px;
  padding: 28px 24px 30px;
  min-height: 300px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .6s var(--ease), background .6s var(--ease), color .6s var(--ease);
}
.service-card::before {
  /* spotlight following the cursor (set by script.js) */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(127, 217, 176, .25), transparent 60%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.service-card:hover { transform: translateY(-8px); }
.service-card:hover::before { opacity: 1; }
.service-card:nth-child(2) { background: linear-gradient(160deg, #7e96b4, #2b3f5c); color: #fff; }
.service-card:nth-child(2) p { color: rgba(255, 255, 255, .75); }

.service-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  margin-bottom: auto;
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, .45);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 8px 24px rgba(15, 23, 34, .12), inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.service-card:nth-child(2) .service-icon {
  background: rgba(255, 255, 255, .2);
  border-color: rgba(255, 255, 255, .45);
}
.service-card:hover .service-icon {
  transform: translateY(-3px) rotate(-6deg);
  box-shadow: 0 14px 30px rgba(15, 23, 34, .18), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.service-icon i {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: .8;
  transition: transform .8s var(--ease);
}
.service-card:hover .service-icon i { transform: scale(1.4); }

.service-card h3 { font-size: 1.15rem; font-weight: 500; margin: 2.5rem 0 .6rem; letter-spacing: -.01em; }
.service-card p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ---------- Floating work cluster ---------- */
.work { background: linear-gradient(180deg, #6f88a8 0%, #1f3050 100%); color: #fff; overflow: hidden; }
.work .eyebrow { color: rgba(255, 255, 255, .65); }
.work .section-title { color: #fff; }
.work .section-head { margin-bottom: 0; }
.work .container { position: relative; z-index: 2; }

.cluster {
  position: relative;
  height: min(72vw, 560px);
  margin-top: -20px;
  perspective: 1200px;
}
.tile {
  position: absolute;
  width: clamp(90px, 11vw, 150px);
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  background: linear-gradient(160deg, var(--c1), var(--c2));
  box-shadow: 0 20px 40px rgba(0, 0, 0, .35);
  transform: translate3d(0, 0, 0);
  transition: transform .8s var(--ease), filter .4s;
  will-change: transform;
  overflow: hidden;
  animation: bob 9s ease-in-out infinite;
}
.tile span {
  position: absolute; left: 50%; bottom: -34px;
  transform: translateX(-50%);
  font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  white-space: nowrap; opacity: .85;
  transition: bottom .5s var(--ease), opacity .5s;
}
.frame-bg.has-img {
  background: var(--img) center / cover no-repeat;
}
.tile.has-img {
  background: var(--img) center / cover no-repeat;
}
.tile:hover { filter: brightness(1.1); }
.tile:hover span { bottom: -26px; opacity: 1; }

.t1 { left: 14%; top: 10%; animation-delay: -1s; }
.t2 { left: 44%; top: 4%;  animation-delay: -3s; }
.t3 { left: 70%; top: 12%; animation-delay: -5s; }
.t4 { left: 24%; top: 40%; animation-delay: -2s; }
.t5 { left: 52%; top: 36%; animation-delay: -6s; }
.t6 { left: 80%; top: 42%; animation-delay: -4s; }
.t7 { left: 36%; top: 68%; animation-delay: -7s; }
.t8 { left: 62%; top: 72%; animation-delay: -8s; }

@keyframes bob {
  0%, 100% { margin-top: 0; }
  50%      { margin-top: -14px; }
}

/* ---------- Selected frames: stacked sticky cards ---------- */
.frames { background: var(--paper); }

.stack {
  position: relative;
  padding-bottom: 12vh;
}

.frame-card {
  position: sticky;
  top: calc(110px + var(--i) * 22px);
  width: min(1200px, 92vw);
  height: min(74vh, 640px);
  margin: 0 auto 6vh;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  transform-origin: center top;
  transform: scale(var(--s, 1));
  filter: brightness(var(--b, 1));
  box-shadow: 0 30px 80px rgba(15, 23, 34, .25), inset 0 1px 0 rgba(255, 255, 255, .25);
  will-change: transform, filter;
}

/* Card background */
.frame-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, var(--c1) 0%, var(--c2) 100%);
}
.frame-bg::after {
  /* soft vignette for depth */
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 60%, transparent 40%, rgba(0, 0, 0, .35) 100%);
}

/* Title block, top-left */
.frame-head {
  position: absolute;
  top: clamp(24px, 4vw, 44px);
  left: clamp(24px, 4vw, 48px);
  max-width: 60%;
  z-index: 2;
}
.frame-kind {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .85;
}
.frame-kind i { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.frame-head h3 {
  font-size: clamp(1.8rem, 3.8vw, 3rem);
  font-weight: 500;
  letter-spacing: -.03em;
  margin: .6rem 0 .6rem;
}
.frame-tags { font-size: .85rem; opacity: .7; margin: 0; }

/* Circular media, centered */
.frame-disc-wrap {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
}
.frame-disc {
  width: min(52vh, 440px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--c1), var(--c2) 80%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .15);
  transform: scale(var(--disc, 1)) rotate(var(--rot, 0deg));
}

.frame-disc { position: relative; }
.frame-disc video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  border-radius: 50%;
  display: block;
}

/* Footer, bottom-right */
.frame-foot {
  position: absolute;
  right: clamp(24px, 4vw, 48px);
  bottom: clamp(24px, 4vw, 40px);
  text-align: right;
  z-index: 2;
}
.frame-year-label { display: block; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.frame-year { display: block; font-size: clamp(2rem, 4vw, 3rem); font-weight: 300; letter-spacing: -.03em; margin-top: .2rem; }

/* ---------- Contact ---------- */
.contact {
  background: linear-gradient(180deg, #6f88a8 0%, #2b3f5c 100%);
  color: #fff;
  overflow: hidden;
  padding-bottom: 0;
  isolation: isolate;
}
.contact-smoke { position: absolute; inset: -10%; z-index: -1; filter: blur(70px); opacity: .9; }
.contact-inner { padding-bottom: 80px; }
.contact-title {
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1;
  margin: 0 0 1.4rem;
}
.contact .sub { color: rgba(255, 255, 255, .8); }
.contact-form {
  margin: 48px auto 0;
  width: min(640px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  text-align: left;
}
.field.full { grid-column: 1 / -1; }
.field input, .field textarea {
  width: 100%;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  outline: none;
  transition: border-color .3s, background .3s, box-shadow .3s;
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255, 255, 255, .7); }
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, .2);
  box-shadow: 0 0 0 4px rgba(127, 217, 176, .2);
}
.field.invalid input, .field.invalid textarea { border-color: #ffb4a8; }
.contact-form .btn { grid-column: 1 / -1; justify-self: center; width: min(320px, 100%); }
.form-note { grid-column: 1 / -1; text-align: center; font-size: .9rem; margin: 4px 0 0; min-height: 1.2em; color: rgba(255, 255, 255, .85); }

.footer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255, 255, 255, .25);
  background: rgba(15, 23, 34, .2);
}
.foot-link {
  display: flex; justify-content: space-between; align-items: center;
  padding: 26px clamp(16px, 3vw, 40px);
  font-size: .9rem;
  border-right: 1px solid rgba(255, 255, 255, .25);
  transition: background .4s, padding .4s var(--ease);
}
.foot-link:last-child { border-right: 0; }
.foot-link span { transition: transform .4s var(--ease); }
.foot-link:hover { background: rgba(255, 255, 255, .1); padding-left: calc(clamp(16px, 3vw, 40px) + 8px); }
.foot-link:hover span { transform: translate(3px, -3px); }

/* ---------- Keyframes ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
  50%      { box-shadow: 0 0 0 7px rgba(255,255,255,.08); }
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(127,217,176,.7); }
  70%  { box-shadow: 0 0 0 9px rgba(127,217,176,0); }
  100% { box-shadow: 0 0 0 0 rgba(127,217,176,0); }
}
@keyframes wheel {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .status { display: none; }
}
@media (max-width: 960px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .frame-card { position: relative; top: auto; height: 70vh; min-height: 460px; margin-bottom: 24px; }
  .frame-disc { width: min(46vh, 340px); }
  .footer { grid-template-columns: repeat(2, 1fr); }
  .foot-link:nth-child(2) { border-right: 0; }
  .foot-link:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.25); }
}
@media (max-width: 760px) {
  .burger { display: block; }
  .nav-links {
    position: fixed;
    top: 84px; left: 4vw; right: 4vw;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 24px;
    background: rgba(255,255,255,.95);
    color: var(--ink);
    box-shadow: 0 20px 50px rgba(0,0,0,.2);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity .4s, transform .5s var(--ease);
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a:not(.pill) { padding: .9rem 1rem; }
  .nav-links .pill { text-align: center; }
  .avatar-tag { right: -40px; bottom: -28px; }
  .service-grid { grid-template-columns: 1fr; }
  .cluster { height: 620px; }
  .tile span { display: none; }
  .contact-form { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; filter: none; }
  .split .word > span { transform: none; }
}

/* ==========================================================
   Fluted glass — navbar, icons and logo
   ========================================================== */

:root {
  /* vertical ribs: bright ridge, soft shadow valley, repeated every 16px */
  --flute: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.75) 0px,
    rgba(255, 255, 255, 0.15) 3px,
    rgba(255, 255, 255, 0) 5px,
    rgba(10, 25, 45, 0.22) 8px,
    rgba(10, 25, 45, 0.04) 11px,
    rgba(255, 255, 255, 0.5) 13px,
    rgba(255, 255, 255, 0) 16px
  );
  --flute-dark: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.35) 0px,
    rgba(255, 255, 255, 0.05) 3px,
    rgba(255, 255, 255, 0) 5px,
    rgba(0, 0, 0, 0.25) 8px,
    rgba(0, 0, 0, 0.05) 11px,
    rgba(255, 255, 255, 0.25) 13px,
    rgba(255, 255, 255, 0) 16px
  );
}

/* Navbar */
.nav,
.nav.scrolled {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 10px 30px rgba(15, 23, 34, 0.12);
  isolation: isolate;
}
.nav.scrolled {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.75), rgba(240, 245, 250, 0.7));
  border-color: rgba(255, 255, 255, 0.8);
}
.nav::before {
  /* fluted texture layer over the whole bar; keeps the bar's rounded shape */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--flute);
  opacity: 0.55;
  pointer-events: none;
  z-index: -1;
}
.nav.scrolled::before { opacity: 0.35; }

/* Keep nav children above the texture */
.nav > * { position: relative; z-index: 1; }

/* The mobile menu must hang below the bar (it is no longer a fixed child of a transformed element) */
@media (max-width: 760px) {
  .nav-links {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.92);
  }
  .nav-links::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--flute);
    opacity: 0.5;
    pointer-events: none;
  }
}

/* Logo dot */
.logo-dot {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 30% 30%, #ffffff, #8ea6c4 50%, #2b3f5c);
  isolation: isolate;
}
.logo-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--flute);
  opacity: 0.6;
  z-index: 1;
  pointer-events: none;
}

/* Service icons */
.service-icon {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 8px 20px rgba(15, 23, 34, 0.08);
  isolation: isolate;
}
.service-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--flute);
  opacity: 0.7;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease);
}
.service-card:hover .service-icon::before { opacity: 1; }
.service-icon i { position: relative; z-index: 1; }

/* Icon inside the highlighted (dark) card */
.service-card:nth-child(2) .service-icon {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
}
.service-card:nth-child(2) .service-icon::before {
  background: var(--flute-dark);
  opacity: 0.9;
}


/* =========================================================
   Cluster entrance + zoomable photos + lightbox
   ========================================================= */

/* Tiles: buttons, reset styles */
.tile {
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: zoom-in;
  text-align: left;
  opacity: 0;
  scale: .3;
  transition: transform .8s var(--ease), filter .4s, opacity .9s var(--ease), scale 1.1s var(--ease);
}
.cluster.in .tile {
  opacity: 1;
  scale: 1;
  transition-delay: calc(var(--k, 0) * 110ms);
}
.cluster.in .tile:hover { transition-delay: 0ms; }
.tile:focus-visible, .zoomable:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* Zoomable cursors */
.zoomable { cursor: zoom-in; }
.avatar-img.zoomable { transition: transform .5s var(--ease); }
.avatar-img.zoomable:hover { transform: scale(1.04); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 5vh 5vw;
  background: rgba(10, 16, 26, .45);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s var(--ease), visibility .5s;
}
.lightbox.open { opacity: 1; visibility: visible; }

.lb-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transform: scale(.92) translateY(20px);
  transition: transform .7s var(--ease);
}
.lightbox.open .lb-figure { transform: none; }

.lb-media {
  width: min(78vw, 640px);
  aspect-ratio: 4 / 5;
  max-height: 78vh;
  border-radius: 28px;
  background-size: cover;
  background-position: center;
  background-color: #1d3050;
  border: 1px solid rgba(255, 255, 255, .35);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.lb-media.round { border-radius: 50%; aspect-ratio: 1; }
.lb-media video {
  width: 100%; height: 100%;
  object-fit: contain; /* show the full original frame */
  border-radius: inherit;
  display: block;
}

.lb-caption {
  color: #fff;
  font-size: .9rem;
  letter-spacing: .04em;
  padding: .45rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lb-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .4);
  background: linear-gradient(135deg, rgba(255,255,255,.3), rgba(255,255,255,.08));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: transform .4s var(--ease);
}
.lb-close:hover { transform: rotate(90deg) scale(1.05); }

body.lb-lock { overflow: hidden; }
