/* ==========================================================
   FusionMinds.Design — Portfolio
   ========================================================== */
:root {
  --bg: #0b0b0b;
  --bg-2: #121212;
  --surface: #171717;
  --line: rgba(255, 255, 255, 0.08);
  --text: #ece7e2;
  --muted: #8f8585;
  --accent: #ca4300;
  --accent-2: #ff6a1f;
  --glow: rgba(202, 67, 0, 0.35);
  --logo: #dcdcdc; /* original logo colour — keep the logo single-colour */

  --f-display: "Syne", system-ui, sans-serif;
  --f-body: "Quicksand", system-ui, sans-serif;
  --f-script: "Allura", cursive;

  --gutter: clamp(16px, 4vw, 64px);
  --max: 1440px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-loading, body.no-scroll { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
mark { background: none; color: var(--accent-2); }
::selection { background: var(--accent); color: #fff; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { position: relative; padding: clamp(80px, 12vw, 160px) 0; }

/* ---------- Grain overlay ---------- */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 9990; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); } 10% { transform: translate(-5%,-10%); } 30% { transform: translate(3%,-15%); }
  50% { transform: translate(12%,9%); } 70% { transform: translate(9%,4%); } 90% { transform: translate(-1%,7%); }
}

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 10000; background: var(--bg);
  display: grid; place-content: center; justify-items: center; gap: 22px;
  transition: clip-path 1.1s var(--ease-io);
  clip-path: inset(0 0 0 0);
}
.loader.is-done { clip-path: inset(0 0 100% 0); }
.loader__mark { width: 92px; stroke: var(--logo); stroke-width: 2; }
.loader__mark * { stroke-dasharray: 500; stroke-dashoffset: 500; animation: draw 1.8s var(--ease) forwards; }
.loader__mark path:nth-child(2) { animation-delay: .35s; }
.loader__mark path:nth-child(3) { animation-delay: .7s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.loader__brand { font-family: var(--f-body); letter-spacing: .35em; font-size: 13px; text-transform: uppercase; color: var(--logo); opacity: 0; animation: fadeIn .8s .6s forwards; }
.loader__count { position: absolute; right: var(--gutter); bottom: 28px; font-family: var(--f-display); font-weight: 800; font-size: clamp(48px, 10vw, 140px); line-height: 1; color: #1e1e1e; }
@keyframes fadeIn { to { opacity: 1; } }

/* ---------- Progress & cursor ---------- */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 9000; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform-origin: 0 50%; transform: scaleX(0); }

.cursor {
  position: fixed; top: 0; left: 0; z-index: 9500; pointer-events: none;
  width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: var(--accent-2); mix-blend-mode: difference;
  display: grid; place-items: center;
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s;
}
.cursor span { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #000; opacity: 0; transition: opacity .2s; }
.cursor.is-link { width: 44px; height: 44px; margin: -22px 0 0 -22px; background: #fff; }
.cursor.is-view { width: 86px; height: 86px; margin: -43px 0 0 -43px; background: #fff; mix-blend-mode: normal; }
.cursor.is-view span { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 26px; border-radius: 100px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.25); color: var(--text);
  font-weight: 600; font-size: 15px; letter-spacing: .02em; isolation: isolate;
  transition: border-color .4s, color .4s;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--accent); transform: translateY(101%); transition: transform .5s var(--ease);
}
.btn:hover { border-color: var(--accent); color: #fff; }
.btn:hover::before { transform: translateY(0); }
.btn svg { width: 18px; stroke: currentColor; stroke-width: 2; transition: transform .4s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--small { padding: 10px 20px; font-size: 14px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 800;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px var(--gutter);
  transition: transform .5s var(--ease), background .4s, padding .4s;
}
.nav.is-scrolled { background: rgba(11,11,11,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__logo { display: flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: .04em; font-size: 16px; z-index: 2; color: var(--logo); }
.nav__logo svg { width: 34px; stroke: var(--logo); stroke-width: 4; transition: transform .6s var(--ease); }
.nav__logo:hover svg { transform: rotate(-8deg) scale(1.06); }
.nav__logo em { font-style: normal; }
.nav__links { display: flex; gap: clamp(14px, 2vw, 32px); }
.nav__links a { position: relative; font-size: 14px; font-weight: 500; color: #cfc8c2; padding: 6px 0; transition: color .3s; }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--accent-2); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.nav__links a:hover, .nav__links a.is-active { color: #fff; }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__burger { display: none; width: 44px; height: 44px; position: relative; z-index: 2; }
.nav__burger span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--text); transition: transform .5s var(--ease), top .5s var(--ease); }
.nav__burger span:first-child { top: 17px; }
.nav__burger span:last-child { top: 25px; }
.nav.is-open .nav__burger span:first-child { top: 21px; transform: rotate(45deg); }
.nav.is-open .nav__burger span:last-child { top: 21px; transform: rotate(-45deg); }

@media (max-width: 1080px) {
  .nav__cta { display: none; }
  .nav__burger { display: block; }
  .nav__links {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 6px;
    padding: 0 var(--gutter); background: var(--bg);
    clip-path: circle(0% at calc(100% - 40px) 40px); transition: clip-path .8s var(--ease-io);
  }
  .nav.is-open .nav__links { clip-path: circle(150% at calc(100% - 40px) 40px); }
  .nav__links a { font-family: var(--f-display); font-size: clamp(34px, 9vw, 64px); font-weight: 700; line-height: 1.2; color: var(--text); opacity: 0; transform: translateY(30px); transition: opacity .5s, transform .6s var(--ease), color .3s; }
  .nav__links a::before { content: attr(data-num); font-family: var(--f-body); font-size: 13px; color: var(--accent-2); margin-right: 14px; vertical-align: super; }
  .nav__links a::after { display: none; }
  .nav.is-open .nav__links a { opacity: 1; transform: none; }
  .nav.is-open .nav__links a:nth-child(1) { transition-delay: .25s; }
  .nav.is-open .nav__links a:nth-child(2) { transition-delay: .3s; }
  .nav.is-open .nav__links a:nth-child(3) { transition-delay: .35s; }
  .nav.is-open .nav__links a:nth-child(4) { transition-delay: .4s; }
  .nav.is-open .nav__links a:nth-child(5) { transition-delay: .45s; }
  .nav.is-open .nav__links a:nth-child(6) { transition-delay: .5s; }
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; padding: 120px 0 clamp(60px, 9vh, 110px); }
.hero__media { position: absolute; inset: -6% 0 0 0; will-change: transform; }
.hero__media img, .hero__media video { display: block; width: 100%; height: 112%; object-fit: cover; transform: scale(1.18); transition: transform 2.6s var(--ease); }
body.is-ready .hero__media img, body.is-ready .hero__media video { transform: scale(1.04); }
.hero__shade { position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(11,11,11,.55) 0%, rgba(11,11,11,.05) 30%, rgba(11,11,11,.35) 60%, var(--bg) 100%),
  radial-gradient(90% 60% at 0% 100%, rgba(11,11,11,.8), transparent 70%); }
.hero__content { position: relative; z-index: 2; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .28em; text-transform: uppercase; color: #ddd4cd; margin-bottom: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 0 var(--glow); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.hero__title { font-family: var(--f-display); font-weight: 800; font-size: clamp(32px, 9vw, 200px); line-height: .9; letter-spacing: -0.02em; color: var(--accent); text-shadow: 0 10px 60px rgba(0,0,0,.35); }
.split { display: inline-flex; overflow: hidden; padding-bottom: .04em; }
.split .ch { display: inline-block; transform: translateY(110%) rotate(8deg); transition: transform 1.1s var(--ease); }
body.is-ready .split .ch { transform: none; }
.hero__script { font-family: var(--f-script); font-size: clamp(44px, 8vw, 120px); line-height: 1; color: #fff; margin: -0.42em 0 0 clamp(20px, 12vw, 220px); position: relative; opacity: 0; transform: translateY(20px); transition: opacity 1.2s .9s, transform 1.2s .9s var(--ease); }
body.is-ready .hero__script { opacity: 1; transform: none; }
.hero__row { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; margin-top: clamp(24px, 4vh, 48px); opacity: 0; transform: translateY(20px); transition: opacity 1s 1.2s, transform 1s 1.2s var(--ease); }
body.is-ready .hero__row { opacity: 1; transform: none; }
.hero__lead { max-width: 460px; color: #d7cfc9; font-size: clamp(16px, 1.4vw, 19px); }
.hero__scroll { position: absolute; right: var(--gutter); bottom: 36px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; writing-mode: vertical-rl; color: #cfc8c2; }
.hero__scroll span { width: 1px; height: 60px; background: rgba(255,255,255,.2); position: relative; overflow: hidden; }
.hero__scroll span::after { content: ""; position: absolute; inset: 0; background: var(--accent-2); animation: scrollLine 2s var(--ease-io) infinite; }
@keyframes scrollLine { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }
@media (max-width: 700px) { .hero__scroll { display: none; } }

/* ---------- Waves illustration ---------- */
.waves { position: absolute; pointer-events: none; overflow: visible; }
.waves path { fill: none; stroke-width: 1; vector-effect: non-scaling-stroke; }
.waves--hero { right: -10%; top: 6%; width: 75%; height: 60%; z-index: 1; opacity: .85; transform: rotate(-12deg); mix-blend-mode: screen; }
.waves--about { left: -12%; top: 0; width: 70%; height: 420px; opacity: .6; transform: rotate(18deg); }
.waves--chapter { right: -8%; top: -40px; width: 62%; height: 360px; opacity: .8; transform: rotate(-16deg); }
.waves--left { left: -10%; right: auto; transform: rotate(14deg) scaleX(-1); }
.waves--contact { left: -10%; bottom: 30%; width: 120%; height: 440px; opacity: .55; transform: rotate(-6deg); }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 22px 0; background: var(--bg); position: relative; z-index: 2; }
.marquee__track { display: flex; width: max-content; gap: 36px; align-items: center; animation: marquee 38s linear infinite; }
.marquee span { font-family: var(--f-display); font-weight: 700; font-size: clamp(22px, 3.2vw, 44px); white-space: nowrap; color: transparent; -webkit-text-stroke: 1px #6d6461; transition: color .4s; }
.marquee span:hover { color: var(--accent-2); -webkit-text-stroke-color: var(--accent-2); }
.marquee i { font-style: normal; color: var(--accent); font-size: 22px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Section heads ---------- */
.section-tag { display: inline-flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); margin-bottom: 28px; }
.section-tag span { color: var(--accent-2); font-weight: 700; letter-spacing: .1em; }
.section-tag::after { content: ""; width: 48px; height: 1px; background: currentColor; opacity: .5; }
.section-title { font-family: var(--f-display); font-weight: 700; font-size: clamp(36px, 5.6vw, 84px); line-height: 1.02; letter-spacing: -0.02em; }
.section-title em { font-style: normal; color: var(--accent); }

/* ---------- About ---------- */
.about { overflow: hidden; }
.about__vision { font-family: var(--f-display); font-weight: 600; font-size: clamp(28px, 4.2vw, 62px); line-height: 1.14; letter-spacing: -0.015em; max-width: 1200px; }
.about__vision .w { opacity: .14; transition: opacity .3s linear; }
.about__vision .w.on { opacity: 1; }
.about__vision mark .w { color: var(--accent-2); }
.about__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 110px); margin-top: clamp(60px, 8vw, 120px); align-items: start; }
.about__body { color: #b5aca6; font-size: clamp(17px, 1.35vw, 20px); max-width: 560px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg); padding: clamp(20px, 2.4vw, 34px); display: flex; flex-direction: column; justify-content: space-between; gap: 30px; min-height: 210px; transition: background .4s; }
.stat:hover { background: var(--bg-2); }
.stat__num { font-family: var(--f-display); font-weight: 800; font-size: clamp(48px, 5vw, 76px); line-height: 1; color: var(--text); }
.stat__label { color: var(--muted); font-size: 14px; line-height: 1.45; }
.globe { width: clamp(52px, 5vw, 72px); stroke: var(--accent-2); stroke-width: 1.6; }
.globe__spin { transform-origin: 32px 32px; animation: spinY 5s linear infinite; }
@keyframes spinY { 0% { transform: scaleX(1); } 50% { transform: scaleX(-1); } 100% { transform: scaleX(1); } }
@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat { min-height: 0; flex-direction: row; align-items: center; }
}

/* ---------- Services ---------- */
.services { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { margin-bottom: clamp(40px, 6vw, 80px); }
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; perspective: 1200px; }
.service {
  position: relative; padding: 34px; border-radius: 20px; min-height: 380px;
  background: linear-gradient(160deg, #1b1b1b, #121212); border: 1px solid var(--line);
  display: flex; flex-direction: column; overflow: hidden; transform-style: preserve-3d;
  transition: border-color .5s, transform .5s var(--ease);
}
.service::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(255,106,31,.16), transparent 50%); opacity: 0; transition: opacity .5s; }
.service:hover { border-color: rgba(255,106,31,.4); }
.service:hover::before { opacity: 1; }
.service__num { font-family: var(--f-display); font-weight: 700; color: var(--muted); font-size: 14px; letter-spacing: .2em; }
.service__art { width: 100%; max-width: 220px; margin: 30px 0 auto; stroke: #7b7270; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transform: translateZ(40px); }
.service__art .draw { stroke-dasharray: 700; stroke-dashoffset: 700; transition: stroke-dashoffset 2.2s var(--ease), stroke .5s; }
.service.in .service__art .draw { stroke-dashoffset: 0; }
.service:hover .service__art .draw { stroke: var(--accent-2); }
.service__art .sun, .service__art .play { fill: transparent; transition: fill .6s, stroke-dashoffset 2.2s var(--ease); }
.service:hover .service__art .sun, .service:hover .service__art .play { fill: rgba(255,106,31,.25); }
.service h3 { font-family: var(--f-display); font-size: clamp(28px, 2.6vw, 38px); font-weight: 700; text-transform: uppercase; margin-top: 30px; letter-spacing: .01em; transform: translateZ(30px); }
.service h3 span { color: var(--accent); }
.service p { color: var(--muted); margin-top: 8px; transform: translateZ(20px); }
@media (max-width: 900px) { .services__grid { grid-template-columns: 1fr; } .service { min-height: 0; } }

/* ---------- Chapters ---------- */
.work, .walk { padding-top: clamp(60px, 9vw, 120px); }
.chapter { position: relative; padding: clamp(40px, 6vw, 80px) 0 clamp(40px, 5vw, 70px); overflow-x: clip; }
html, body { overflow-x: clip; }
.chapter__title { font-family: var(--f-body); font-weight: 300; font-size: clamp(40px, 8.4vw, 132px); line-height: 1; letter-spacing: .06em; color: var(--text); white-space: nowrap; }
.chapter__meta { color: var(--muted); margin-top: 18px; font-size: 15px; }
.chapter__meta span { color: var(--accent-2); font-weight: 700; }
@media (max-width: 520px) { .chapter__title { font-size: 11vw; letter-spacing: .02em; } }

/* ---------- Project index ---------- */
.index { border-bottom: 1px solid var(--line); }
.index__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: clamp(40px, 6vw, 80px); }
.index__filters { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; padding: 10px 18px; border-radius: 100px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: #cfc8c2; transition: background .4s, border-color .4s, color .4s; }
.chip sup { font-size: 10px; color: var(--muted); margin-left: 2px; transition: color .4s; }
.chip:hover { border-color: rgba(255,255,255,.3); color: #fff; }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.is-active sup { color: rgba(255,255,255,.75); }

.index__labels, .irow a { display: grid; grid-template-columns: 70px minmax(0, 1fr) minmax(160px, 300px) 90px; gap: 20px; align-items: center; }
.index__labels { padding: 0 0 14px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.index__labels span:last-child { text-align: right; }
.index__list { list-style: none; border-bottom: 1px solid var(--line); }
.irow { border-top: 1px solid var(--line); position: relative; }
.irow.is-hidden { display: none; }
.index__list .irow { opacity: 0; }
.index__list.in .irow { animation: rowIn .8s var(--ease) both; animation-delay: var(--d, calc(var(--i) * 45ms)); }
@keyframes rowIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.irow a { position: relative; padding: clamp(18px, 2.2vw, 28px) 0; isolation: isolate; transition: opacity .4s; }
.irow a::before { content: ""; position: absolute; inset: 0 calc(-1 * var(--gutter)); z-index: -1; background: linear-gradient(90deg, rgba(202,67,0,.16), rgba(202,67,0,.04)); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .5s var(--ease); }
.irow a:hover::before, .irow a:focus-visible::before { transform: scaleY(1); }
.index__list:hover .irow a:not(:hover) { opacity: .38; }
.irow__no { font-family: var(--f-display); font-weight: 700; font-size: 14px; color: var(--accent-2); letter-spacing: .08em; }
.irow__title { display: flex; align-items: center; gap: 16px; min-width: 0; }
.irow__name { font-family: var(--f-display); font-weight: 600; font-size: clamp(22px, 3vw, 44px); line-height: 1.1; letter-spacing: -0.015em; transition: transform .6s var(--ease), color .4s; }
.irow a:hover .irow__name { transform: translateX(18px); color: #fff; }
.irow__thumb { display: none; flex: 0 0 auto; width: 72px; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: var(--surface); }
.irow__thumb img { width: 100%; height: 100%; object-fit: cover; }
.irow__cat { font-size: 14px; color: #cfc8c2; display: flex; flex-direction: column; line-height: 1.4; }
.irow__cat em { font-style: normal; color: var(--muted); font-size: 13px; }
.irow__views { display: flex; justify-content: flex-end; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 600; color: var(--muted); }
.irow__views svg { width: 22px; stroke: currentColor; stroke-width: 1.6; transition: transform .5s var(--ease), stroke .3s; }
.irow a:hover .irow__views { color: var(--accent-2); }
.irow a:hover .irow__views svg { transform: rotate(45deg); }

.index__preview { position: fixed; left: 0; top: 0; z-index: 700; pointer-events: none; width: clamp(260px, 24vw, 380px); aspect-ratio: 4 / 3; margin: calc(clamp(260px, 24vw, 380px) * -0.375) 0 0 calc(clamp(260px, 24vw, 380px) * -0.5); }
.index__preview-inner { position: absolute; inset: 0; border-radius: 12px; overflow: hidden; transform: scale(.6); opacity: 0; transition: transform .6s var(--ease), opacity .4s; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.index__preview.is-on .index__preview-inner { transform: none; opacity: 1; }
.index__preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; clip-path: inset(0 0 100% 0); transform: scale(1.2); transition: clip-path .7s var(--ease-io), transform 1s var(--ease); }
.index__preview img.on { clip-path: inset(0); transform: none; z-index: 1; }

@media (hover: none), (pointer: coarse) { .irow__thumb { display: block; } }
@media (max-width: 760px) {
  .index__labels { display: none; }
  .irow a { grid-template-columns: 1fr auto; grid-template-areas: "title views" "cat cat"; gap: 8px 14px; }
  .irow__no { display: none; }
  .irow__title { grid-area: title; }
  .irow__cat { grid-area: cat; flex-direction: row; gap: 8px; flex-wrap: wrap; font-size: 13px; padding-left: 88px; }
  .irow__views { grid-area: views; }
  .irow__name { font-size: 20px; }
}

/* ---------- Project showcases ---------- */
.projects { display: flex; flex-direction: column; gap: clamp(100px, 13vw, 200px); width: 100%; max-width: var(--max); margin: 0 auto; padding: clamp(20px, 3vw, 40px) var(--gutter) 0; }
.project { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(28px, 3vw, 48px) clamp(16px, 2vw, 32px); align-items: start; }
.project__meta { position: relative; display: flex; flex-direction: column; gap: 18px; }
.project__no { font-family: var(--f-display); font-weight: 800; font-size: clamp(64px, 8vw, 140px); line-height: .8; letter-spacing: -0.04em; color: transparent; -webkit-text-stroke: 1px #4a4240; transition: -webkit-text-stroke-color .6s, color .6s; }
.project:hover .project__no { -webkit-text-stroke-color: var(--accent-2); }
.project__cat { display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent-2); }
.project__cat i { display: inline-block; width: 28px; height: 1px; background: currentColor; opacity: .6; }
.project__title { font-family: var(--f-display); font-weight: 700; font-size: clamp(28px, 3.3vw, 52px); line-height: 1.04; letter-spacing: -0.02em; margin: 12px 0 16px; }
.project__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.project__tags li { font-size: 12px; font-weight: 600; letter-spacing: .06em; padding: 5px 12px; border-radius: 100px; border: 1px solid var(--line); color: #cfc8c2; }
.project__disc { margin-top: 16px; font-size: 14px; color: var(--muted); }
.project__text > * { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.project__text > :nth-child(2) { transition-delay: .08s; } .project__text > :nth-child(3) { transition-delay: .16s; } .project__text > :nth-child(4) { transition-delay: .24s; }
.project__no { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease), transform 1s var(--ease), -webkit-text-stroke-color .6s; }
.project.in .project__text > *, .project.in .project__no { opacity: 1; transform: none; }

.project__media { display: grid; gap: clamp(16px, 2vw, 28px); align-items: start; }
.shot { position: relative; display: block; cursor: none; }
.shot__frame { position: relative; display: block; overflow: hidden; border-radius: 10px; aspect-ratio: var(--ar); max-height: 86vh; background: var(--surface);
  clip-path: inset(100% 0 0 0 round 10px); transition: clip-path 1.4s var(--ease-io) calc(var(--d, 0s) + .1s); }
.project.in .shot__frame { clip-path: inset(0 0 0 0 round 10px); }
.shot__frame img { position: absolute; left: 0; top: -7%; width: 100%; height: 114%; object-fit: cover; translate: 0 var(--py, 0); scale: 1.25; opacity: 0; transition: scale 2s var(--ease) calc(var(--d, 0s) + .1s), opacity .6s; }
.shot__frame img.loaded { opacity: 1; }
.project.in .shot__frame img { scale: 1; }
.project.in .shot:hover .shot__frame img { scale: 1.05; transition: scale 1.2s var(--ease), opacity .6s; }
.shot__frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); pointer-events: none; }
.shot__cap { display: block; margin-top: 12px; font-size: 12px; letter-spacing: .2em; color: var(--muted); text-align: right; }
@media (hover: none) { .shot { cursor: pointer; } }

/* Layout: split — sticky copy left, image right */
.project--split .project__meta { grid-column: 1 / 5; position: sticky; top: 120px; }
.project--split .project__media { grid-column: 5 / 13; }
.project--split-r .project__meta { grid-column: 10 / 13; grid-row: 1; position: sticky; top: 120px; }
.project--split-r .project__media { grid-column: 1 / 10; grid-row: 1; }
/* Layout: quad — sticky copy + 2×2 */
.project--quad .project__meta { grid-column: 1 / 5; position: sticky; top: 120px; }
.project--quad .project__media { grid-column: 5 / 13; grid-template-columns: 1fr 1fr; }
.project--quad .shot__frame { aspect-ratio: 4 / 3; }
.project--quad .shot:nth-child(even) { margin-top: 70px; }
/* Row layouts — heading across, images below */
.project--full .project__meta, .project--pair .project__meta, .project--duo .project__meta, .project--trio .project__meta {
  grid-column: 1 / -1; flex-direction: row; align-items: flex-end; gap: clamp(20px, 4vw, 60px); }
.project--full .project__media, .project--pair .project__media, .project--duo .project__media, .project--trio .project__media { grid-column: 1 / -1; }
.project--full .project__media { margin-inline: calc(-1 * var(--gutter)); }
.project--full .shot__frame { aspect-ratio: 21 / 9; border-radius: 0; clip-path: inset(0 0 0 100%); max-height: none; }
.project--full.in .shot__frame { clip-path: inset(0); }
@media (min-width: 1441px) { .project--full .project__media { margin-inline: calc((var(--max) - 100vw) / 2 - var(--gutter)); } }
.project--pair .project__media { grid-template-columns: 7fr 5fr; }
.project--pair .shot:nth-child(2) { margin-top: 16%; }
.project--duo .project__media { grid-template-columns: 1fr 1fr; }
.project--duo .shot:nth-child(2) { margin-top: 12%; }
.project--trio .project__media { grid-template-columns: 1fr 1.25fr 1fr; align-items: end; }
.project--trio .shot:nth-child(2) { margin-bottom: 60px; }

/* Scale-model photos are small originals — keep them at a crisp size */
[data-projects="models"] .project--split .project__media { grid-column: 5 / 12; }
[data-projects="models"] .project--split-r .project__media { grid-column: 2 / 9; }
[data-projects="models"] .project--duo .project__media, [data-projects="models"] .project--trio .project__media { max-width: 1240px; }

@media (max-width: 900px) {
  .project .project__meta, .project--split-r .project__meta { grid-column: 1 / -1 !important; grid-row: auto; position: relative; top: auto; flex-direction: row; align-items: flex-end; gap: 20px; }
  .project .project__media, .project--split-r .project__media { grid-column: 1 / -1 !important; grid-row: auto; }
  .project__no { font-size: clamp(54px, 14vw, 90px); }
  .project--full .shot__frame { aspect-ratio: 16 / 10; }
}
@media (max-width: 600px) {
  .project__meta { flex-direction: column !important; align-items: flex-start !important; gap: 10px !important; }
  .project--pair .project__media, .project--duo .project__media { grid-template-columns: 1fr; }
  .project--pair .shot:nth-child(2), .project--duo .shot:nth-child(2) { margin-top: 0; width: 82%; margin-left: auto; }
  .project--quad .shot:nth-child(even) { margin-top: 30px; }
  .project--trio .project__media { gap: 10px; }
  .project--trio .shot:nth-child(2) { margin-bottom: 30px; }
}

/* ---------- Walkthrough ---------- */
.walk__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.film { grid-column: span 2; position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface); isolation: isolate; }
.film:nth-child(1), .film:nth-child(2) { grid-column: span 3; aspect-ratio: 16 / 10; }
.film img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 1.4s var(--ease), filter .8s; filter: contrast(1.05) brightness(.8); }
.film:hover img { transform: scale(1.14); filter: contrast(1.1) brightness(.6); }
.film::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.75)); }
.film__tint { position: absolute; inset: 0; z-index: 1; background: var(--accent); mix-blend-mode: color; opacity: 0; transition: opacity .8s; }
.film:hover .film__tint { opacity: .45; }
.film__play { position: absolute; left: 50%; top: 50%; z-index: 2; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.35); transition: transform .6s var(--ease), background .4s; }
.film__play::before, .film__play::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); animation: ring 2.4s var(--ease) infinite; }
.film__play::after { animation-delay: 1.2s; }
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.9); opacity: 0; } }
.film__play svg { width: 28px; margin-left: 4px; fill: #fff; }
.film:hover .film__play { transform: scale(1.12); background: var(--accent); border-color: var(--accent); }
.film__meta { position: absolute; left: 22px; right: 22px; bottom: 18px; z-index: 2; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.film__title { font-family: var(--f-display); font-weight: 700; font-size: clamp(18px, 1.7vw, 24px); }
.film__cta { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: #ddd; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.film__cta svg { width: 14px; stroke: currentColor; stroke-width: 2; transition: transform .4s var(--ease); }
.film:hover .film__cta svg { transform: translate(3px, -3px); }
.film.reveal-up { transition-duration: 1.1s; }
@media (max-width: 900px) {
  .walk__grid { grid-template-columns: 1fr 1fr; }
  .film, .film:nth-child(1), .film:nth-child(2) { grid-column: span 1; aspect-ratio: 4 / 3; }
  .film:nth-child(1) { grid-column: span 2; aspect-ratio: 16 / 10; }
}
@media (max-width: 560px) {
  .walk__grid { grid-template-columns: 1fr; }
  .film, .film:nth-child(1) { grid-column: span 1; }
  .film__play { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
}

/* ---------- Contact ---------- */
.contact { position: relative; overflow: hidden; padding-top: clamp(100px, 14vw, 200px); background: radial-gradient(80% 60% at 50% 110%, rgba(202,67,0,.22), transparent 70%), var(--bg); border-top: 1px solid var(--line); }
.contact__inner { position: relative; z-index: 1; }
.contact__title { font-family: var(--f-display); font-weight: 800; font-size: clamp(48px, 10vw, 160px); line-height: .95; letter-spacing: -0.03em; }
.contact__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.contact__title .line > span { display: inline-block; transform: translateY(110%); transition: transform 1.2s var(--ease); }
.contact__title .line:nth-child(2) > span { transition-delay: .12s; }
.contact__title.in .line > span { transform: none; }
.contact__title em { font-family: var(--f-script); font-weight: 400; font-style: normal; color: var(--accent-2); font-size: 1.15em; letter-spacing: 0; }
.contact__lead { color: #b5aca6; max-width: 560px; margin-top: 26px; font-size: clamp(17px, 1.4vw, 20px); }
.contact__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: clamp(40px, 6vw, 80px); }
.ccard { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 28px; border-radius: 18px; border: 1px solid var(--line); background: rgba(20,20,20,.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); overflow: hidden; transition: border-color .4s, background .4s; }
.ccard::after { content: "↗"; position: absolute; right: 24px; top: 22px; font-size: 22px; color: var(--muted); transition: transform .5s var(--ease), color .4s; }
.ccard:hover { border-color: var(--accent); background: rgba(202,67,0,.1); }
.ccard:hover::after { transform: translate(4px,-4px) rotate(45deg); color: var(--accent-2); }
.ccard svg { width: 30px; stroke: var(--accent-2); stroke-width: 1.5; stroke-linejoin: round; margin-bottom: 26px; }
.ccard__label { font-size: 12px; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }
.ccard__value { font-family: var(--f-display); font-weight: 600; font-size: clamp(18px, 1.7vw, 24px); word-break: break-word; }
.ccard__value b { color: var(--accent-2); font-weight: 600; }
@media (max-width: 900px) { .contact__cards { grid-template-columns: 1fr; } }

.footer { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: clamp(80px, 10vw, 140px); padding-bottom: 40px; }
.footer__logo { width: 180px; }
.footer__spaced { color: var(--muted); letter-spacing: .15em; margin-top: 8px; font-size: 15px; }
.footer__copy { color: #5e5757; font-size: 13px; margin-top: 30px; }
.footer__top { position: absolute; right: var(--gutter); bottom: 36px; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: background .4s, border-color .4s; }
.footer__top svg { width: 20px; stroke: var(--text); stroke-width: 1.6; }
.footer__top:hover { background: var(--accent); border-color: var(--accent); }
@media (max-width: 600px) { .footer__top { position: static; margin-top: 24px; } }

/* ---------- Reveal ---------- */
.reveal-up { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.reveal-up.in { opacity: 1; transform: none; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 9600; background: rgba(8,8,8,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: grid; grid-template-rows: auto 1fr; opacity: 0; transition: opacity .45s; }
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__top { display: flex; align-items: center; gap: 20px; padding: 18px var(--gutter); font-size: 13px; letter-spacing: .25em; text-transform: uppercase; }
.lightbox__cat { color: var(--accent-2); }
.lightbox__count { color: var(--muted); margin-right: auto; }
.lightbox__close { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: transform .5s var(--ease), background .3s; }
.lightbox__close:hover { transform: rotate(90deg); background: var(--accent); }
.lightbox__close svg, .lightbox__nav svg { width: 22px; stroke: #fff; stroke-width: 1.8; }
.lightbox__stage { position: relative; display: grid; place-items: center; padding: 0 clamp(16px, 7vw, 110px) clamp(16px, 4vh, 40px); min-height: 0; overflow: hidden; touch-action: pan-y; }
.lightbox__stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; opacity: 0; transform: scale(.96); transition: opacity .5s, transform .7s var(--ease); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lightbox__stage img.loaded { opacity: 1; transform: none; }
.lightbox__spinner { position: absolute; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent-2); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lightbox__nav { position: absolute; top: 50%; z-index: 2; width: 56px; height: 56px; margin-top: -28px; border-radius: 50%; border: 1px solid var(--line); background: rgba(20,20,20,.6); display: grid; place-items: center; transition: background .3s, transform .4s var(--ease); }
.lightbox__nav:hover { background: var(--accent); }
.lightbox__nav--prev { left: clamp(10px, 2vw, 30px); }
.lightbox__nav--next { right: clamp(10px, 2vw, 30px); }
.lightbox__nav--prev:hover { transform: translateX(-4px); }
.lightbox__nav--next:hover { transform: translateX(4px); }
@media (max-width: 700px) { .lightbox__nav { top: auto; bottom: 18px; margin: 0; } .lightbox__stage { padding-bottom: 90px; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .shot__frame, .project--full .shot__frame { clip-path: none; }
  .shot__frame img { scale: 1; }
  .project__text > *, .project__no, .index__list .irow { opacity: 1; transform: none; }
}
