/* ============================================================
   Canific Labs — scroll-driven 3D / dark frosted-glass theme
   Near-black + warm off-white + a single molten accent.
   ============================================================ */
:root {
  --bg: #08080A;
  --bg-2: #0E0E12;
  --text: #FFFFFF;
  --muted: #D5D2C9;
  --faint: #9A9890;
  --accent: #FF5A1F;          /* molten — the one accent */
  --accent-2: #FF8A4C;
  --glass: rgba(12, 12, 15, .5);
  --glass-2: rgba(12, 12, 15, .66);
  --brd: rgba(255, 255, 255, .11);
  --brd-2: rgba(255, 255, 255, .06);

  --display: 'Inter', system-ui, -apple-system, sans-serif;
  --ui: 'Space Grotesk', system-ui, sans-serif;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1200px;
  --gut: clamp(18px, 5vw, 56px);
  --r: 16px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); line-height: 1.6; font-size: 16px; overflow-x: hidden; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---- full-page background scrim ---- */
.scrim { position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8,8,10,.82), rgba(8,8,10,.25) 16%, rgba(8,8,10,.25) 84%, rgba(8,8,10,.92)),
    radial-gradient(70vw 70vw at 0% 40%, rgba(8,8,10,.6), transparent 60%); }
body::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .02; mix-blend-mode: overlay;
  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='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---- Fixed Video Backgrounds ---- */
.fixed-backgrounds {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  overflow: hidden;
  background: #060608;
}
.bg-video-wrapper {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s;
  will-change: opacity;
}
.bg-video-wrapper.active {
  opacity: 0.75;
  visibility: visible;
}
.bg-video, .bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bg-video {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.bg-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none; /* Hide on desktop, only use on mobile fallbacks */
}
@media (max-width: 768px) {
  .bg-video {
    display: none;
  }
  .bg-img {
    display: block; /* Show static images on mobile */
  }
}

/* content sits above the 3D */
.nav, main, .footer { position: relative; z-index: 1; }
.nav { z-index: 100; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-left: max(var(--gut), env(safe-area-inset-left)); padding-right: max(var(--gut), env(safe-area-inset-right)); }
.section { padding: clamp(72px, 12vh, 150px) 0; position: relative; }

/* ---- glass primitive ---- */
.glass { background: var(--glass); border: 1px solid var(--brd); border-radius: var(--r);
  backdrop-filter: blur(18px) saturate(125%); -webkit-backdrop-filter: blur(18px) saturate(125%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 26px 60px -32px rgba(0,0,0,.85); }

/* ---- type ---- */
.eyebrow { font-family: var(--mono); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); display: inline-flex; align-items: center; gap: 9px; }
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.section-title { font-family: var(--display); font-weight: 500; font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.05; letter-spacing: -.02em; text-shadow: 0 2px 40px rgba(0,0,0,.55); }
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 720px; margin-bottom: clamp(40px, 6vw, 70px); }
.section-head .lead { color: var(--muted); font-size: 1.05rem; max-width: 54ch; }
.accent { color: var(--accent); }

/* ---- buttons ---- */
.btn { font-family: var(--ui); font-weight: 500; font-size: .92rem; display: inline-flex; align-items: center; gap: .55em; padding: 12px 20px; border-radius: 11px; border: 1px solid var(--brd); color: var(--text); cursor: pointer; background: var(--glass); backdrop-filter: blur(10px); transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s, border-color .3s; }
.btn:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.22); }
.btn-solid { color: #120a06; border-color: transparent; background: linear-gradient(135deg, #FF7A3C, #FF5A1F); box-shadow: 0 10px 30px -10px rgba(255,90,31,.7); font-weight: 600; }
.btn-solid:hover { box-shadow: 0 16px 40px -12px rgba(255,90,31,.9); }
.btn-glass:hover { background: var(--glass-2); }

.btn-white-pill {
  font-family: var(--ui);
  font-weight: 600;
  font-size: .88rem;
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: 10px 22px;
  border-radius: 999px;
  color: #0c0c0f;
  background: #ffffff;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .3s var(--ease), background .3s, box-shadow .3s var(--ease);
}
.btn-white-pill:hover {
  transform: translateY(-2px);
  background: #f2efe9;
  box-shadow: 0 10px 25px -8px rgba(255,255,255,0.22);
}
.btn-white-pill svg {
  flex-shrink: 0;
}

/* ---- nav (Rift-style transparent top bar) ---- */
.nav {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: calc(28px + env(safe-area-inset-top));
  padding-bottom: 28px;
  padding-left: max(var(--gut), calc((100% - var(--maxw)) / 2 + var(--gut)), env(safe-area-inset-left));
  padding-right: max(var(--gut), calc((100% - var(--maxw)) / 2 + var(--gut)), env(safe-area-inset-right));
  border-radius: 0;
  border: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  transition: background .4s var(--ease), padding .4s var(--ease), border-color .4s var(--ease);
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 48px;
}
.nav.scrolled {
  background: rgba(8, 8, 10, 0.76);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid var(--brd-2);
  padding-top: calc(16px + env(safe-area-inset-top));
  padding-bottom: 16px;
  padding-left: max(var(--gut), calc((100% - var(--maxw)) / 2 + var(--gut)), env(safe-area-inset-left));
  padding-right: max(var(--gut), calc((100% - var(--maxw)) / 2 + var(--gut)), env(safe-area-inset-right));
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { width: 26px; height: 26px; }
.brand b { font-family: var(--ui); font-weight: 600; font-size: 1.05rem; letter-spacing: -.01em; }
.nav-mid { display: flex; gap: 24px; }
.nav-mid a { font-family: var(--mono); font-size: .78rem; color: var(--muted); transition: color .25s; }
.nav-mid a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.lang { font-family: var(--mono); font-size: .76rem; color: var(--muted); background: none; border: 1px solid var(--brd); border-radius: 9px; cursor: pointer; padding: 8px 10px; transition: color .25s, border-color .25s; }
.lang:hover { color: var(--text); border-color: rgba(255,255,255,.22); }
.lang [data-lang-cur] { color: var(--text); }
.burger { display: none; width: 40px; height: 38px; background: none; border: 1px solid var(--brd); border-radius: 10px; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.burger span { width: 16px; height: 1.5px; background: var(--text); transition: transform .3s, opacity .3s; }
.burger.open span:nth-child(1) { transform: translateY(3.25px) rotate(45deg); }
.burger.open span:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); }

/* ---- hero ---- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px 0 60px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: none; /* Removed dark overlay to show full video brightness */
}
.hero-layout {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  padding-left: clamp(24px, 4.5vw, 64px);
  padding-right: clamp(24px, 4.5vw, 64px);
  min-height: calc(100svh - 180px);
}
.hero-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 30px;
}
.hero h1 {
  font-family: 'Plus Jakarta Sans', var(--sans);
  font-weight: 700; /* Bold, premium sans-serif */
  font-size: clamp(2.8rem, 6.8vw, 5.8rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 30px rgba(0,0,0,0.3);
  max-width: 950px;
  text-align: center;
  color: #FFFFFF;
}
.hero h1 em {
  font-family: 'Plus Jakarta Sans', var(--sans);
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
  background: linear-gradient(135deg, #FFB48A, #FF7C43);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  width: 100%;
  position: relative;
  padding-bottom: 24px;
}
.hero-bottom-left {
  max-width: 380px;
  flex: 1;
  text-align: left;
}
.hero-lead {
  color: var(--muted);
  font-family: 'Plus Jakarta Sans', var(--sans);
  font-weight: 400;
  font-size: clamp(0.95rem, 1.3vw, 1.12rem);
  line-height: 1.6;
  text-align: left;
  letter-spacing: -0.015em;
  text-shadow: none;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.status-label { font-family: var(--sans); font-size: .95rem; color: var(--muted); display: inline-flex; align-items: center; }

/* ---- Portal Background ---- */
#hero-portal-bg {
  display: none;
}

.hero-meta {
  max-width: 380px;
  flex: 1;
  text-align: right;
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--faint);
  text-shadow: none; /* Removed text shadow for clean appearance */
}
.hero-meta > span {
  display: block;
  white-space: normal;
}
.hero-meta b { color: var(--muted); font-weight: 400; }
.hero-scroll {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .25em;
  text-transform: uppercase;
}
.hero-scroll i { width: 1px; height: 36px; background: linear-gradient(var(--accent), transparent); animation: sdn 1.8s var(--ease) infinite; }
@keyframes sdn { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---- marquee ---- */
.marquee { overflow: hidden; border-top: 1px solid var(--brd-2); border-bottom: 1px solid var(--brd-2); padding: 16px 0; background: rgba(8,8,10,.4); backdrop-filter: blur(6px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.marquee-track { display: flex; gap: 38px; width: max-content; animation: marq 46s linear infinite; }
.marquee-track span { font-family: var(--mono); font-size: .9rem; color: var(--faint); white-space: nowrap; }
.marquee-track span::after { content: '·'; margin-left: 38px; color: var(--accent); }
@keyframes marq { to { transform: translateX(-50%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ---- capabilities ---- */
.cap-list { border-top: 1px solid var(--brd-2); }
.cap-row { display: grid; grid-template-columns: 60px minmax(170px, 1fr) 2fr auto; align-items: baseline; gap: 22px; padding: 26px 14px; border-bottom: 1px solid var(--brd-2); position: relative; border-radius: 12px; transition: padding-left .4s var(--ease), background .4s; }
.cap-row:hover { padding-left: 26px; background: var(--glass); }
.cap-no { font-family: var(--mono); font-size: .8rem; color: var(--accent); }
.cap-name { font-family: var(--display); font-size: clamp(1.4rem, 2.4vw, 1.95rem); font-weight: 500; letter-spacing: -.01em; }
.cap-desc { color: var(--muted); font-size: .96rem; max-width: 50ch; }
.cap-arrow { font-family: var(--mono); color: var(--faint); transition: transform .3s var(--ease), color .3s; }
.cap-row:hover .cap-arrow { color: var(--accent); transform: translate(4px, -4px); }

/* ---- work ---- */
.work-bar { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 38px; }
.w-chip { font-family: var(--mono); font-size: .77rem; color: var(--muted); background: var(--glass); border: 1px solid var(--brd); border-radius: 10px; padding: 8px 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; backdrop-filter: blur(8px); transition: color .25s, border-color .25s, background .25s, transform .25s; }
.w-chip:hover { color: var(--text); transform: translateY(-1px); }
.w-chip.is-active { color: #120a06; background: linear-gradient(135deg, #FF7A3C, #FF5A1F); border-color: transparent; font-weight: 500; }
.w-chip-n { font-size: .64rem; opacity: .65; }

/* ---- compact card redesign (Rift-style) ---- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 36px);
}
.w-item {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 20px;
  background: #0e0e12;
  border: 1px solid var(--brd-2);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.8);
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .35s, box-shadow .35s;
  transform-style: preserve-3d;
  will-change: transform;
  cursor: pointer;
}
.w-item:hover {
  border-color: rgba(255, 90, 31, 0.35);
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.08), 
    0 35px 70px -30px rgba(255, 90, 31, 0.22);
}
.w-item.is-feat {
  grid-column: span 1;
}
.w-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #09090d;
  border-bottom: 1px solid var(--brd-2);
  overflow: hidden;
}
.w-cover .cover-svg,
.cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  border: 0;
  transition: transform .7s var(--ease);
}
.w-item:hover .cover-img,
.w-item:hover .cover-svg {
  transform: scale(1.03);
}
.cover-badge {
  position: absolute;
  top: 12px;
  left: 14px;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .18em;
  color: var(--text);
  background: rgba(6,7,10,.6);
  border: 1px solid var(--brd-2);
  padding: 4px 9px;
  border-radius: 7px;
  backdrop-filter: blur(8px);
  z-index: 5;
}
.cover-cat { font-family: var(--mono); font-size: 13px; letter-spacing: .22em; fill: var(--muted); }
.cover-no { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; fill: var(--faint); }
.w-feat { position: absolute; top: 13px; right: 15px; color: var(--accent); font-size: 13px; z-index: 5; }
.w-item.is-feat .w-cover {
  aspect-ratio: 16 / 10;
}
.w-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.w-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.w-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  letter-spacing: -.01em;
}
.w-status {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
  border: 1px solid var(--brd-2);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}
.w-status.is-live {
  color: var(--accent);
  border-color: rgba(255,90,31,.25);
  background: rgba(255,90,31,.04);
}
.w-what {
  color: var(--text);
  font-size: .95rem;
  font-weight: 500;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.w-desc {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.55;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.w-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--brd-2);
}
.w-meta { font-family: var(--mono); font-size: .71rem; color: var(--faint); }
.w-link { font-family: var(--mono); font-size: .78rem; color: var(--text); display: inline-flex; gap: .5em; align-items: center; }
.w-link span { transition: transform .3s var(--ease); }
.w-link:hover { color: var(--accent); }
.w-link:hover span { transform: translate(3px, -3px); }

/* ---- approach ---- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 1.6vw, 20px); }
.step { padding: 26px 22px; border-radius: var(--r); }
.step-n { font-family: var(--mono); font-size: .8rem; color: var(--accent); }
.step h3 { font-family: var(--display); font-weight: 500; font-size: 1.45rem; margin: 14px 0 10px; letter-spacing: -.01em; }
.step p { color: var(--muted); font-size: .93rem; }

/* ---- studio ---- */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(36px, 6vw, 80px); align-items: start; }
.about-grid h2 { font-family: var(--display); font-weight: 500; font-size: clamp(1.9rem, 3.4vw, 2.9rem); line-height: 1.1; letter-spacing: -.02em; text-shadow: 0 2px 40px rgba(0,0,0,.55); }
.about-grid .body { color: var(--muted); font-size: 1.05rem; }
.facts { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.fact { padding: 26px 22px; border-right: 1px solid var(--brd-2); border-bottom: 1px solid var(--brd-2); }
.fact:nth-child(2n) { border-right: 0; }
.fact:nth-child(n+3) { border-bottom: 0; }
.fact .n { font-family: var(--display); font-size: clamp(2rem, 4vw, 2.7rem); font-weight: 500; letter-spacing: -.02em; }
.fact .l { font-family: var(--mono); font-size: .71rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-top: 8px; }

/* ---- contact ---- */
.contact-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(36px, 6vw, 70px); align-items: start; }
.contact-grid h2 { font-family: var(--display); font-weight: 500; font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.03; letter-spacing: -.02em; text-shadow: 0 2px 40px rgba(0,0,0,.55); }
.contact-lead { color: var(--muted); font-size: 1.05rem; margin-top: 20px; max-width: 44ch; }
.contact-direct { margin-top: 32px; display: flex; flex-direction: column; gap: 8px; }
.contact-direct .eyebrow { margin-bottom: 4px; }
.email { font-family: var(--display); font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 500; width: fit-content; border-bottom: 1px solid var(--brd); transition: border-color .3s; }
.email:hover { border-color: var(--accent); }
.social { font-family: var(--mono); font-size: .82rem; color: var(--muted); width: fit-content; transition: color .25s; }
.social:hover { color: var(--text); }
form.contact { display: flex; flex-direction: column; overflow: hidden; padding: 6px; }
form.contact label { display: flex; flex-direction: column; border-bottom: 1px solid var(--brd-2); padding: 4px 6px; }
form.contact label:last-of-type { border-bottom: 0; }
form.contact .lab { font-family: var(--mono); font-size: .67rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 12px 12px 0; }
form.contact input, form.contact textarea { font-family: var(--sans); font-size: 1rem; color: var(--text); background: none; border: 0; padding: 6px 12px 14px; resize: vertical; }
form.contact input:focus, form.contact textarea:focus { outline: none; }
form.contact .submit { display: flex; justify-content: space-between; align-items: center; padding: 12px; }
form.contact .submit .hint { font-family: var(--mono); font-size: .72rem; color: var(--faint); }

/* ---- footer ---- */
.footer { border-top: 1px solid var(--brd-2); padding: clamp(48px, 8vh, 84px) 0 calc(40px + env(safe-area-inset-bottom)); background: rgba(8,8,10,.5); backdrop-filter: blur(8px); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; }
.footer .brand b { font-family: var(--ui); font-size: 1.15rem; }
.footer-tag { color: var(--muted); max-width: 32ch; margin-top: 14px; font-size: .95rem; }
.footer-nav { display: flex; gap: 38px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col .h { font-family: var(--mono); font-size: .69rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.footer-col a { font-size: .92rem; color: var(--muted); transition: color .25s; }
.footer-col a:hover { color: var(--text); }
.footer-bot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: clamp(40px, 7vh, 66px); padding-top: 22px; border-top: 1px solid var(--brd-2); font-family: var(--mono); font-size: .73rem; color: var(--faint); }

/* ---- reveal ---- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---- responsive ---- */
@media (max-width: 960px) {
  .nav {
    padding-top: calc(16px + env(safe-area-inset-top));
    padding-bottom: 16px;
    padding-left: max(var(--gut), env(safe-area-inset-left));
    padding-right: max(var(--gut), env(safe-area-inset-right));
  }
  .nav-mid { display: none; }
  .burger { display: flex; }
  .nav.menu-open .nav-mid {
    display: flex;
    position: absolute;
    inset: 100% 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: rgba(8,8,11,.96);
    backdrop-filter: blur(18px);
    border: 1px solid var(--brd);
    border-top: 0;
    border-radius: 0 0 16px 16px;
    padding: 6px max(18px, env(safe-area-inset-right)) 16px max(18px, env(safe-area-inset-left));
  }
  .nav.menu-open .nav-mid a { padding: 14px 0; border-bottom: 1px solid var(--brd-2); font-size: 1rem; }
  .hero-grid { display: block; }
  .portal-doorway {
    width: 60vw;
    height: 40vh;
    min-width: 200px;
    min-height: 300px;
  }
  .cap-row { grid-template-columns: 40px 1fr; gap: 6px 14px; }
  .cap-desc { grid-column: 2; }
  .cap-arrow { display: none; }
  .steps { grid-template-columns: 1fr 1fr; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}
@media (max-width: 680px) {
  .work-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .w-item {
    flex-direction: column;
    padding: 0;
    border-radius: 18px;
    background: #0e0e12;
    border: 1px solid var(--brd-2);
  }
  .w-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10 !important;
    border-radius: 0;
    border-bottom: 1px solid var(--brd-2);
    overflow: hidden;
    background: #09090d;
  }
  .w-cover .cover-badge {
    display: block;
    position: absolute;
    top: 10px;
    left: 12px;
    font-size: 0.62rem;
    padding: 3px 7px;
    border-radius: 5px;
    z-index: 5;
  }
  .w-cover .w-feat {
    display: block;
    position: absolute;
    top: 11px;
    right: 13px;
    font-size: 11px;
    z-index: 5;
  }
  .cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
    border: 0;
  }
  .w-body {
    padding: 16px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .w-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
  }
  .w-name {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
  }
  .w-status {
    font-size: 0.58rem;
    padding: 2px 6px;
  }
  .w-what {
    font-size: 0.86rem;
    color: var(--text);
    margin-top: 6px;
    -webkit-line-clamp: 1;
  }
  .w-desc {
    display: -webkit-box;
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 6px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
  }
  .w-foot {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--brd-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .w-meta {
    font-size: 0.65rem;
    color: var(--faint);
  }
  .w-link {
    font-size: 0.72rem;
    color: var(--text);
    display: inline-flex;
    gap: 0.4em;
    align-items: center;
  }
  .w-link span {
    display: inline-block;
  }
  .steps { grid-template-columns: 1fr; }
  .hero-meta { text-align: center; width: 100%; padding-top: 12px; border-top: 1px solid var(--brd-2); }
  .hero-meta > span { white-space: normal; }
}

/* --- Project Details Modal --- */
.c-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity;
}
.c-modal.is-active {
  opacity: 1;
  pointer-events: all;
}

.c-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.82);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

.c-modal-content {
  position: relative;
  width: 100%;
  max-width: 960px;
  background: rgba(14, 14, 18, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.85);
  transform: translate3d(0, 18px, 0);
  transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 2;
  display: flex;
  flex-direction: column;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}
.c-modal.is-active .c-modal-content {
  transform: translate3d(0, 0, 0);
}

.c-modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, transform 0.25s;
  z-index: 10;
}
.c-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.05);
}

.c-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  min-height: 520px;
}

.c-modal-media {
  position: relative;
  background: #09090d;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.c-modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.c-modal-body {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
  max-height: 85vh;
}

.c-modal-meta {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}

.c-modal-title {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 10px;
}

.c-modal-tagline {
  font-size: 1.15rem;
  color: var(--text);
  opacity: 0.95;
  line-height: 1.45;
  margin-bottom: 24px;
}

.c-modal-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 24px;
  width: 100%;
}

.c-modal-desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 28px;
}

.c-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.c-modal-tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.c-modal-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
}

.c-modal-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 14px;
  border: none;
  text-decoration: none;
  box-shadow: 0 10px 24px -5px rgba(255, 74, 28, 0.35);
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
}
.c-modal-action-btn:hover {
  background: #ff5e36;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -5px rgba(255, 74, 28, 0.45);
}
.c-modal-action-btn:active {
  transform: translateY(0);
}
.c-modal-action-btn span {
  margin-left: 8px;
  transition: transform 0.25s;
}
.c-modal-action-btn:hover span {
  transform: translate(3px, -3px);
}

@media (max-width: 768px) {
  .c-modal {
    padding: 16px;
  }
  .c-modal-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .c-modal-media {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    aspect-ratio: 16 / 10;
  }
  .c-modal-body {
    padding: 28px;
    max-height: 60vh;
  }
  .c-modal-title {
    font-size: 1.6rem;
  }
  .c-modal-tagline {
    font-size: 1.05rem;
    margin-bottom: 16px;
  }
  .c-modal-content {
    max-height: 85vh;
  }
  .c-modal-close {
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    font-size: 22px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}


/* --- Floating WhatsApp Button --- */
.wa-float {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  z-index: 99;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s, background-color 0.3s;
  text-decoration: none;
}
.wa-float::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #25D366;
  opacity: 0;
  animation: wa-pulse 2s infinite;
}
.wa-float:hover {
  transform: scale(1.08) translateY(-4px);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.6);
  background: #20ba5a;
}
.wa-float svg {
  width: 28px;
  height: 28px;
  stroke: #fff;
  fill: none;
}

@keyframes wa-pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .wa-float {
    bottom: 24px;
    right: 24px;
    width: 54px;
    height: 54px;
  }
  .wa-float svg {
    width: 25px;
    height: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
