/* ════════════════════════════════════════
   VIRTUALWAYS — Global Stylesheet
   Fonts: Cormorant Garamond · DM Sans · Fragment Mono
════════════════════════════════════════ */

/* ── Tokens ───────────────────────────── */
:root {
  --ease: cubic-bezier(0.16,1,0.3,1);
  --gold: #C9964A;
  --gold2: #E8B86D;
}
[data-theme="dark"] {
  --bg:   #0B0B09;
  --bg1:  #111110;
  --bg2:  #181816;
  --line: rgba(255,255,255,0.07);
  --fg:   #F0EDE6;
  --fg2:  #A09A90;
  --fg3:  #504E48;
  --card: rgba(255,255,255,0.04);
  --nav:  rgba(11,11,9,0.9);
}
[data-theme="light"] {
  --bg:   #F8F6F1;
  --bg1:  #F0EDE6;
  --bg2:  #E8E4DB;
  --line: rgba(0,0,0,0.09);
  --fg:   #0B0B09;
  --fg2:  #5A5750;
  --fg3:  #A09A90;
  --card: rgba(255,255,255,0.7);
  --nav:  rgba(248,246,241,0.92);
}

/* ── Reset ────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg); color: var(--fg);
  overflow-x: hidden; cursor: none;
  transition: background .5s var(--ease), color .5s var(--ease);
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Cursor — velocity-stretch (aboutluca style) ──── */
/* ── Cursor — hide native, canvas draws a minimal dot ── */
html, body, a, button, input, textarea, select,
.btn, .pjc, .card-cell, .fwi, .tmc, .tc, .ham,
.tog, .logo, #btt, .fb { cursor: none !important; }
#CUR  { display: none; }
#CUR2 { display: none; }
#cursor-canvas {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  width: 100%; height: 100%;
}

/* ── Noise overlay ────────────────────── */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.03'/%3E%3C/svg%3E");
  opacity: .3;
}

/* ── Nav ──────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: 68px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 5vw;
  background: var(--nav); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--line);
  transition: background .5s, border-color .5s;
}
.logo {
  font-family: 'Fragment Mono', monospace; font-size: .8rem;
  letter-spacing: .2em; text-transform: uppercase; color: var(--fg);
  transition: color .3s;
}
.logo span { color: var(--gold); }
.navlinks { display: flex; gap: 2.4rem; list-style: none; align-items: center; }
.navlinks a {
  font-size: .78rem; letter-spacing: .04em; color: var(--fg2);
  position: relative; padding-bottom: 2px; transition: color .25s;
}
.navlinks a::after {
  content: ''; position: absolute; left: 0; bottom: 0; right: 0; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.navlinks a:hover, .navlinks a.active { color: var(--fg); }
.navlinks a:hover::after, .navlinks a.active::after { transform: scaleX(1); }
.navr { display: flex; align-items: center; gap: 1.3rem; }
.tog {
  width: 46px; height: 24px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg2);
  position: relative; cursor: pointer; transition: background .4s, border-color .4s;
}
.tog::after {
  content: ''; position: absolute; top: 4px; left: 4px;
  width: 14px; height: 14px; border-radius: 50%; background: var(--gold);
  transition: transform .4s var(--ease);
}
[data-theme="light"] .tog::after { transform: translateX(22px); }
.navcta {
  font-family: 'Fragment Mono', monospace; font-size: .7rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--gold); padding: 8px 20px; border-radius: 2px;
  transition: background .3s, color .3s;
}
.navcta:hover { background: var(--gold); color: #0B0B09; }
.ham { display: none; flex-direction: column; gap: 5px; padding: 4px; cursor: pointer; }
.ham span { display: block; width: 20px; height: 1.5px; background: var(--fg); transition: all .3s; }
.mob {
  display: none; position: fixed; inset: 0; top: 68px; z-index: 499;
  background: var(--bg); flex-direction: column; padding: 3rem 5vw;
  transition: background .5s;
}
.mob.open { display: flex; }
.mob a {
  font-family: 'Cormorant Garamond', serif; font-size: 2.3rem; font-weight: 300;
  color: var(--fg2); border-bottom: 1px solid var(--line);
  padding: 1rem 0; transition: color .2s, padding-left .3s var(--ease);
}
.mob a:hover { color: var(--fg); padding-left: .5rem; }

/* ── Scroll reveal ────────────────────── */
.sr { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.sr.v { opacity: 1; transform: none; }
.d1{transition-delay:.08s} .d2{transition-delay:.16s} .d3{transition-delay:.24s}
.d4{transition-delay:.32s} .d5{transition-delay:.40s} .d6{transition-delay:.50s}

/* ── Layout helpers ───────────────────── */
section { padding: 108px 5vw; position: relative; }
.W { max-width: 1180px; margin: 0 auto; }

/* ── Typography ───────────────────────── */
.lbl {
  font-family: 'Fragment Mono', monospace; font-size: .68rem;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
  display: flex; align-items: center; gap: .8rem; margin-bottom: 1.4rem;
}
.lbl::before { content: ''; width: 28px; height: 1px; background: var(--gold); }
.H {
  font-family: 'Cormorant Garamond', serif; font-weight: 300;
  font-size: clamp(2.4rem, 5.5vw, 5rem); line-height: 1.04;
  letter-spacing: -.02em; color: var(--fg); margin-bottom: 1.5rem;
}
.H em { font-style: italic; color: var(--gold); }
.sub { font-size: 1rem; color: var(--fg2); line-height: 1.85; max-width: 520px; }

/* ── Buttons ──────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: 'Fragment Mono', monospace; font-size: .7rem;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 12px 28px; border-radius: 2px;
  transition: all .35s var(--ease); cursor: pointer;
}
.bf { background: var(--gold); color: #0B0B09; }
.bf:hover { background: var(--gold2); transform: translateY(-2px); box-shadow: 0 12px 36px rgba(201,150,74,.28); }
.bl { border: 1px solid var(--line); color: var(--fg2); }
.bl:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

/* ── Chip / Tag ───────────────────────── */
.chip {
  display: inline-block; font-family: 'Fragment Mono', monospace; font-size: .6rem;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 11px; border: 1px solid var(--line); border-radius: 100px;
  color: var(--fg2); transition: border-color .25s, color .25s;
}

/* ── Page header banner ───────────────── */
.phd {
  min-height: 44vh; padding-top: 68px;
  display: flex; align-items: flex-end; padding-bottom: 5rem;
  padding-left: 5vw; padding-right: 5vw;
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--bg) 55%, var(--bg2));
}
.phd::after {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 48%;
  background: radial-gradient(ellipse 80% 80% at 80% 50%, rgba(201,150,74,.09), transparent 70%);
  pointer-events: none;
}
.phdi { max-width: 1180px; width: 100%; margin: 0 auto; position: relative; z-index: 1; }

/* ── Marquee ──────────────────────────── */
.mqw {
  overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg1); transition: background .5s;
}
.mqt {
  display: flex; white-space: nowrap;
  animation: mq 28s linear infinite; height: 50px; align-items: center;
}
.mqt:hover { animation-play-state: paused; }
.mi {
  font-family: 'Fragment Mono', monospace; font-size: .68rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--fg3);
  padding: 0 2.2rem; display: flex; align-items: center; gap: .8rem;
}
.mi-d { width: 3px; height: 3px; background: var(--gold); border-radius: 50%; flex-shrink: 0; }
@keyframes mq { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ── Cards (shared hover pattern) ────── */
.hover-rise { transition: border-color .3s, transform .4s var(--ease); }
.hover-rise:hover { border-color: rgba(201,150,74,.3); transform: translateY(-5px); }

/* ── Service / feature card grid ─────── */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  margin-top: 4rem;
}
.card-cell {
  background: var(--bg); padding: 2.5rem 2.2rem;
  position: relative; overflow: hidden; transition: background .35s;
}
.card-cell::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.card-cell:hover { background: var(--bg1); }
.card-cell:hover::after { transform: scaleX(1); }
.card-cell:hover .chip { border-color: rgba(201,150,74,.4); color: var(--gold); }
.cell-icon { font-size: 2.1rem; margin-bottom: 1.5rem; display: block; transition: transform .35s var(--ease); }
.card-cell:hover .cell-icon { transform: scale(1.1) rotate(-6deg); }
.cell-name { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; color: var(--fg); margin-bottom: .65rem; }
.cell-desc { font-size: .86rem; color: var(--fg2); line-height: 1.8; margin-bottom: 1.4rem; }

/* ── Tech stack grid ──────────────────── */
.tech-bg { background: var(--bg1); transition: background .5s; }
.tech-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
  gap: 1.2rem; margin-top: 3.5rem;
}
.tec {
  border: 1px solid var(--line); background: var(--card);
  padding: 1.8rem 1.5rem; backdrop-filter: blur(8px);
  transition: border-color .3s, transform .35s var(--ease);
}
.tec:hover { border-color: rgba(201,150,74,.35); transform: translateY(-4px); }
.tec-name {
  font-family: 'Fragment Mono', monospace; font-size: .63rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--gold);
  padding-bottom: .75rem; border-bottom: 1px solid var(--line); margin-bottom: .9rem;
}
.tec-item { font-size: .86rem; color: var(--fg2); display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.tec-item::before { content: '›'; color: var(--gold); font-size: 1rem; }

/* ── Featured work list (home) ────────── */
.fwl { margin-top: 4rem; }
.fwi {
  display: grid; grid-template-columns: 2.5rem 1fr 2.5rem;
  gap: 1.5rem; align-items: center; padding: 1.8rem 0;
  border-bottom: 1px solid var(--line); cursor: pointer;
  transition: padding-left .4s var(--ease);
}
.fwi:first-child { border-top: 1px solid var(--line); }
.fwi:hover { padding-left: .9rem; }
.fwnum { font-family: 'Fragment Mono', monospace; font-size: .65rem; letter-spacing: .12em; color: var(--fg3); }
.fwtype { font-family: 'Fragment Mono', monospace; font-size: .63rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: .35rem; }
.fwname { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: 1.75rem; letter-spacing: -.02em; color: var(--fg); transition: color .25s; }
.fwi:hover .fwname { color: var(--gold); }
.fwa { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--fg3); transition: all .35s var(--ease); }
.fwi:hover .fwa { border-color: var(--gold); color: var(--gold); transform: rotate(45deg); background: rgba(201,150,74,.08); }

/* ── Testimonials ─────────────────────── */
.test-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(310px,1fr));
  gap: 1.4rem; margin-top: 4rem;
}
.tc {
  background: var(--card); border: 1px solid var(--line);
  padding: 2.2rem; backdrop-filter: blur(10px);
  transition: border-color .3s, transform .4s var(--ease);
}
.tc:hover { border-color: rgba(201,150,74,.3); transform: translateY(-5px); }
.tq { font-family: 'Cormorant Garamond', serif; font-size: 3.5rem; color: var(--gold); line-height: 1; margin-bottom: .7rem; opacity: .35; }
.tt { font-size: .9rem; color: var(--fg2); line-height: 1.85; font-style: italic; margin-bottom: 1.8rem; }
.tb { display: flex; align-items: center; gap: .9rem; }
.tav { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg,var(--gold),var(--gold2)); display: flex; align-items: center; justify-content: center; font-family: 'Fragment Mono',monospace; font-size: .72rem; color: #0B0B09; font-weight: 700; flex-shrink: 0; }
.tn { font-weight: 500; font-size: .88rem; color: var(--fg); }
.tr { font-size: .77rem; color: var(--fg3); }

/* ── CTA band ─────────────────────────── */
.ctab { background: var(--bg1); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 80px 5vw; text-align: center; transition: background .5s; }

/* ── About page ───────────────────────── */
.abt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; align-items: start; }
.abt-body p { font-size: 1rem; color: var(--fg2); line-height: 1.9; margin-bottom: 1.5rem; }
.abt-body p strong { color: var(--fg); font-weight: 500; }
.sbw { margin-top: 2.4rem; }
.sb { margin-bottom: 1.4rem; }
.sbh { display: flex; justify-content: space-between; margin-bottom: .5rem; }
.sbn { font-size: .85rem; color: var(--fg2); font-weight: 500; }
.sbp { font-family: 'Fragment Mono',monospace; font-size: .72rem; color: var(--gold); }
.sbt { height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.sbf { height: 100%; background: linear-gradient(90deg,var(--gold),var(--gold2)); width: 0; transition: width 1.6s var(--ease); }
.vals { display: flex; flex-direction: column; gap: 1.2rem; }
.val { padding: 1.5rem; border: 1px solid var(--line); border-left: 3px solid var(--gold); background: var(--card); backdrop-filter: blur(8px); transition: transform .35s var(--ease); }
.val:hover { transform: translateX(8px); }
.val-t { font-weight: 600; font-size: .86rem; color: var(--fg); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .45rem; }
.val-d { font-size: .85rem; color: var(--fg2); line-height: 1.75; }

/* ── Team ─────────────────────────────── */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 1.4rem; margin-top: 3.5rem; }
.tmc { background: var(--card); border: 1px solid var(--line); padding: 2rem; backdrop-filter: blur(10px); transition: border-color .3s, transform .4s var(--ease); }
.tmc:hover { border-color: rgba(201,150,74,.3); transform: translateY(-5px); }
.tmc-av { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg,var(--gold),var(--gold2)); display: flex; align-items: center; justify-content: center; font-family: 'Fragment Mono',monospace; font-size: 1.1rem; color: #0B0B09; font-weight: 700; margin-bottom: 1.2rem; }
.tmc-nm { font-family: 'Cormorant Garamond',serif; font-size: 1.35rem; color: var(--fg); margin-bottom: .2rem; }
.tmc-ro { font-family: 'Fragment Mono',monospace; font-size: .63rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: .9rem; }
.tmc-bi { font-size: .85rem; color: var(--fg2); line-height: 1.75; }

/* ── Work page — editorial project grid ─ */
.filt-row { display: flex; gap: .7rem; flex-wrap: wrap; margin-bottom: 3.5rem; }
.fb { font-family: 'Fragment Mono',monospace; font-size: .63rem; letter-spacing: .12em; text-transform: uppercase; padding: 7px 16px; border: 1px solid var(--line); border-radius: 2px; color: var(--fg2); background: transparent; transition: all .25s; cursor: pointer; }
.fb:hover, .fb.on { background: var(--gold); color: #0B0B09; border-color: var(--gold); }
.pjg { display: grid; grid-template-columns: repeat(12,1fr); gap: 1.4rem; }
.pjc { background: var(--bg1); border: 1px solid var(--line); overflow: hidden; cursor: pointer; transition: border-color .4s, transform .5s var(--ease), box-shadow .4s; }
.pjc:hover { border-color: rgba(201,150,74,.35); transform: translateY(-7px); box-shadow: 0 24px 60px rgba(0,0,0,.18); }
.pjc:nth-child(1)  { grid-column: span 7; }
.pjc:nth-child(2)  { grid-column: span 5; }
.pjc:nth-child(3), .pjc:nth-child(4), .pjc:nth-child(5) { grid-column: span 4; }
.pjc:nth-child(6),  .pjc:nth-child(7)  { grid-column: span 6; }
.pjc:nth-child(8)  { grid-column: span 5; }
.pjc:nth-child(9)  { grid-column: span 7; }
.pjc:nth-child(10), .pjc:nth-child(11), .pjc:nth-child(12) { grid-column: span 4; }
.pjv { height: 190px; display: flex; align-items: center; justify-content: center; font-size: 3.2rem; position: relative; overflow: hidden; transition: height .4s var(--ease); }
.pjc:hover .pjv { height: 220px; }
.pjvo { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.45)); }
.pjb { padding: 1.5rem; }
.pj-type { font-family: 'Fragment Mono',monospace; font-size: .62rem; letter-spacing: .15em; text-transform: uppercase; color: var(--gold); margin-bottom: .55rem; }
.pj-name { font-family: 'Cormorant Garamond',serif; font-size: 1.4rem; color: var(--fg); margin-bottom: .55rem; letter-spacing: -.01em; }
.pj-desc { font-size: .84rem; color: var(--fg2); line-height: 1.75; }
.pjf { padding: .75rem 1.5rem 1.3rem; display: flex; gap: .5rem; flex-wrap: wrap; }

/* ── Contact ──────────────────────────── */
.cont-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7rem; align-items: start; }
.ci { padding-bottom: 2rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; display: flex; align-items: flex-start; gap: 1rem; }
.ci:last-child { border-bottom: none; margin-bottom: 0; }
.ci-ico { font-size: 1.5rem; flex-shrink: 0; margin-top: .15rem; }
.ci-lbl { font-family: 'Fragment Mono',monospace; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: .3rem; }
.ci-val { font-size: .93rem; color: var(--fg2); line-height: 1.7; }
.cf { display: flex; flex-direction: column; gap: 1rem; }
.fg { display: flex; flex-direction: column; gap: .4rem; }
.fg label { font-family: 'Fragment Mono',monospace; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--fg3); }
.fg input, .fg textarea, .fg select { background: var(--card); border: 1px solid var(--line); color: var(--fg); padding: 13px 16px; font-family: 'DM Sans',sans-serif; font-size: .92rem; border-radius: 2px; outline: none; width: 100%; transition: border-color .3s, background .3s; }
.fg input:focus, .fg textarea:focus, .fg select:focus { border-color: var(--gold); background: rgba(201,150,74,.04); }
.fg textarea { min-height: 130px; resize: vertical; }
.fg select option { background: var(--bg); color: var(--fg); }
.fgr { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.fsuc { display: none; padding: 2rem; border: 1px solid var(--gold); background: rgba(201,150,74,.07); margin-top: 1rem; text-align: center; }
.fsuc.on { display: block; }

/* ── Footer ───────────────────────────── */
footer { background: var(--bg1); border-top: 1px solid var(--line); padding: 0 5vw; transition: background .5s; }
.fm { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 3.5rem; padding: 4rem 0 3rem; }
.fbn { font-family: 'Cormorant Garamond',serif; font-size: 1.8rem; font-weight: 300; color: var(--fg); margin-bottom: .3rem; }
.fbn span { color: var(--gold); }
.ftag { font-size: .82rem; color: var(--fg3); margin-bottom: 1.4rem; }
.fadr { font-family: 'Fragment Mono',monospace; font-size: .67rem; color: var(--fg3); line-height: 1.9; letter-spacing: .04em; }
.fadr a { color: var(--gold); transition: opacity .2s; }
.fadr a:hover { opacity: .7; }
.fch { font-family: 'Fragment Mono',monospace; font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.2rem; }
.fl { display: flex; flex-direction: column; gap: .75rem; }
.fl a { font-size: .84rem; color: var(--fg2); transition: color .2s, padding-left .25s var(--ease); }
.fl a:hover { color: var(--fg); padding-left: .3rem; }
.fb2 { max-width: 1180px; margin: 0 auto; border-top: 1px solid var(--line); padding: 1.4rem 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.fcp { font-family: 'Fragment Mono',monospace; font-size: .64rem; color: var(--fg3); letter-spacing: .08em; }
.fleg { display: flex; gap: 1.5rem; }
.fleg a { font-family: 'Fragment Mono',monospace; font-size: .62rem; color: var(--fg3); transition: color .2s; }
.fleg a:hover { color: var(--gold); }

/* ── Back to top ──────────────────────── */
#btt { position: fixed; bottom: 2rem; right: 2rem; z-index: 400; width: 44px; height: 44px; background: var(--gold); border-radius: 2px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: #0B0B09; opacity: 0; transform: translateY(14px); transition: opacity .4s, transform .4s var(--ease), background .3s; cursor: pointer; }
#btt.on { opacity: 1; transform: none; }
#btt:hover { background: var(--gold2); transform: translateY(-3px); }

/* ── 3D Motion ────────────────────────── */
/* sections get depth treatment from JS; prepare them */
section, .phd, .ctab, .mqw {
  will-change: transform, opacity;
  transform-style: preserve-3d;
}
/* cards: prepare for tilt */
.card-cell, .pjc, .tmc, .tc, .val, .tec {
  will-change: transform;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}
/* inner card content pops forward slightly */
.card-cell > *, .pjc > *, .tc > *, .tmc > * {
  transform: translateZ(0);
  transition: transform 0.3s ease;
}
.card-cell:hover > *, .pjc:hover > *, .tc:hover > *, .tmc:hover > * {
  transform: translateZ(18px);
}
/* featured work rows */
.fwi { will-change: transform; transform-style: preserve-3d; }

/* Hero layers: always composited */
.hero-bg, .hero-grid { will-change: transform; }

/* Page transition overlay */
#PT { will-change: transform; }

/* Magnetic buttons — smooth base */
.btn, .navcta { will-change: transform; }

/* Noise overlay — keep above everything except cursor */
body::before { z-index: 2; }

/* ── Nav active underline always visible ─ */
.navlinks a.active::after { transform: scaleX(1); }
.navlinks a.active { color: var(--fg); }

/* ── Page header (phd) parallax layer ─── */
.phdi { transition: transform 0.12s ease-out; }

/* ── Scroll margin for anchor links ─── */
section, .phd { scroll-margin-top: 68px; }

/* ── Focus styles (accessibility) ──── */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Form input placeholder ───────── */
.fg input::placeholder,
.fg textarea::placeholder { color: var(--fg3); opacity: 1; }

/* ── Services page: stat boxes hover ─ */
.stat-box { transition: background .3s; }
.stat-box:hover { background: var(--bg2); }

/* ── Work page: show project number ─ */
.pjg-num {
  font-family: 'Fragment Mono', monospace;
  font-size: .6rem; color: var(--fg3);
  letter-spacing: .1em; padding: .4rem 1.5rem 0;
}

/* ── Smooth entrance animation for page load ── */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
body > nav,
body > div.mob,
body > section:first-of-type,
body > .hero,
body > .phd {
  animation: pageFadeIn .55s ease both;
}

/* ── Responsive ───────────────────────── */
@media (max-width: 1024px) {
  .pjc:nth-child(n)  { grid-column: span 6; }
  .pjc:nth-child(1), .pjc:nth-child(6), .pjc:nth-child(9) { grid-column: span 12; }
}
@media (max-width: 900px) {
  .abt-grid  { grid-template-columns: 1fr; gap: 3rem; }
  .cont-grid { grid-template-columns: 1fr; gap: 3.5rem; }
  .fm        { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .navlinks, .navcta { display: none; }
  .ham { display: flex; }
}
@media (max-width: 640px) {
  section { padding: 80px 5vw; }
  .pjc:nth-child(n) { grid-column: span 12; }
  .fm  { grid-template-columns: 1fr; }
  .fgr { grid-template-columns: 1fr; }
}
