/* ==========================================================================
   IWAY Studios — Design System
   Ink indigo base · electric cyan accent · coral signal
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Brand */
  --ink:            #070B18;
  --ink-2:          #0C1224;
  --ink-3:          #131B33;
  --indigo:         #4F46E5;
  --indigo-light:   #6D66F0;
  --indigo-dark:    #3F37C9;
  --cyan:           #22D3EE;
  --cyan-dim:       #0FA5BE;
  --coral:          #FB7185;
  --paper:          #FAFAFB;

  /* Semantic */
  --bg:             var(--ink);
  --bg-alt:         var(--ink-2);
  --surface:        rgba(255,255,255,.035);
  --surface-hover:  rgba(255,255,255,.06);
  --border:         rgba(255,255,255,.09);
  --border-strong:  rgba(255,255,255,.16);

  --text:           #E9ECF5;
  --text-muted:     #9AA3BD;
  --text-dim:       #6C7694;

  /* Type */
  --font-display: 'Space Grotesk', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --step--1: clamp(.82rem, .78rem + .18vw, .92rem);
  --step-0:  clamp(1rem, .96rem + .2vw, 1.09rem);
  --step-1:  clamp(1.2rem, 1.1rem + .45vw, 1.5rem);
  --step-2:  clamp(1.5rem, 1.3rem + .9vw, 2.1rem);
  --step-3:  clamp(1.9rem, 1.55rem + 1.6vw, 3rem);
  --step-4:  clamp(2.4rem, 1.8rem + 2.8vw, 4.4rem);

  /* Space */
  --gutter: clamp(1.15rem, .8rem + 1.6vw, 2.5rem);
  --section-y: clamp(4rem, 2.5rem + 6vw, 8.5rem);
  --maxw: 1240px;
  --maxw-narrow: 760px;

  /* Effects */
  --radius:    14px;
  --radius-lg: 22px;
  --radius-sm: 9px;
  --shadow:    0 18px 50px -12px rgba(0,0,0,.65);
  --shadow-glow: 0 0 45px -6px rgba(79,70,229,.5);
  --ease: cubic-bezier(.22,.68,.36,1);
  --dur: .55s;

  --header-h: 74px;
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

body.nav-open { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }

a { color: var(--cyan); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: #7EE8FA; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--indigo); color: #fff; }

/* Skip link */
.skip-link {
  position: absolute; top: -60px; left: var(--gutter);
  background: var(--indigo); color: #fff;
  padding: .7rem 1.2rem; border-radius: 0 0 8px 8px;
  z-index: 200; font-weight: 600;
  transition: top .25s var(--ease);
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- 3. Typography ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.024em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); font-weight: 700; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { text-wrap: pretty; }

.lede {
  font-size: var(--step-1);
  color: var(--text-muted);
  line-height: 1.6;
  font-weight: 400;
}

.gradient-text {
  background: linear-gradient(103deg, var(--cyan) 0%, var(--indigo-light) 52%, var(--coral) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-body);
  font-size: .76rem; font-weight: 600;
  letter-spacing: .17em; text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: ''; width: 26px; height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--cyan));
}

/* ---------- 4. Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-narrow { max-width: var(--maxw-narrow); }

.section { padding-block: var(--section-y); position: relative; }
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 720px; margin-bottom: clamp(2.5rem, 4vw, 4rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }
.section-head p { color: var(--text-muted); margin-top: 1.1rem; font-size: var(--step-1); }

.grid { display: grid; gap: clamp(1.1rem, 2vw, 1.8rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* Ambient glow decorations */
.glow {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .28;
  pointer-events: none; z-index: 0;
}
.glow-indigo { background: var(--indigo); }
.glow-cyan   { background: var(--cyan); }

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .92rem 1.85rem;
  border-radius: 100px;
  font-family: var(--font-body);
  font-weight: 600; font-size: var(--step--1);
  letter-spacing: .012em;
  text-align: center;
  border: 1px solid transparent;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease),
              background .28s var(--ease), border-color .28s var(--ease), color .2s;
  position: relative; overflow: hidden;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; flex-shrink: 0; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn-primary {
  background: linear-gradient(120deg, var(--indigo) 0%, var(--indigo-light) 55%, var(--cyan) 165%);
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(79,70,229,.65);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -10px rgba(79,70,229,.85);
}

.btn-accent {
  background: var(--coral); color: #2A0A12;
  box-shadow: 0 10px 30px -8px rgba(251,113,133,.5);
}
.btn-accent:hover { color: #2A0A12; transform: translateY(-3px); box-shadow: 0 18px 40px -10px rgba(251,113,133,.7); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--cyan);
  color: #fff;
  transform: translateY(-3px);
}

.btn-lg { padding: 1.1rem 2.3rem; font-size: var(--step-0); }
.btn-block { display: flex; width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; }
.btn-row.center { justify-content: center; }

/* Text link with arrow */
.link-arrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 600; font-size: var(--step--1);
  color: var(--cyan);
}
.link-arrow svg { width: 15px; height: 15px; transition: transform .3s var(--ease); }
.link-arrow:hover svg { transform: translateX(5px); }

/* ---------- 6. Header & nav ---------- */
.header {
  position: fixed; inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  display: flex; align-items: center;
  transition: background .35s var(--ease), border-color .35s var(--ease), height .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(7,11,24,.82);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--border);
  height: 64px;
}
.header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}

.logo {
  display: inline-flex; align-items: center; gap: .62rem;
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.19rem; letter-spacing: -.03em;
  color: var(--text); flex-shrink: 0;
}
.logo:hover { color: #fff; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--indigo), var(--cyan));
  display: grid; place-items: center;
  box-shadow: 0 4px 16px -3px rgba(79,70,229,.7);
  flex-shrink: 0;
}
.logo-mark svg { width: 19px; height: 19px; }
.logo span em { font-style: normal; color: var(--cyan); }

.nav { display: flex; align-items: center; gap: .35rem; }
.nav a {
  position: relative;
  padding: .5rem .95rem;
  font-size: var(--step--1); font-weight: 500;
  color: var(--text-muted); border-radius: 8px;
  transition: color .22s var(--ease), background .22s var(--ease);
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.active { color: #fff; }
.nav a.active::after {
  content: ''; position: absolute;
  left: 50%; translate: -50% 0; bottom: 1px;
  width: 16px; height: 2px; border-radius: 2px;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.header-cta { display: flex; align-items: center; gap: .8rem; flex-shrink: 0; }

/* Hamburger */
.burger {
  display: none;
  width: 44px; height: 44px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface);
  padding: 0; place-items: center;
  flex-shrink: 0;
}
.burger span {
  display: block; width: 19px; height: 2px; border-radius: 2px;
  background: var(--text);
  transition: transform .34s var(--ease), opacity .22s var(--ease);
}
.burger span + span { margin-top: 5px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.mobile-nav {
  position: fixed; inset: 0;
  z-index: 99;
  background: rgba(7,11,24,.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: calc(var(--header-h) + 2rem) var(--gutter) 2.5rem;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .42s var(--ease), visibility .42s;
  overflow-y: auto;
}
.mobile-nav.open { transform: translateX(0); visibility: visible; }
.mobile-nav a.m-link {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 7vw, 2.3rem);
  font-weight: 600; letter-spacing: -.03em;
  color: var(--text);
  padding: .62rem 0;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  opacity: 0; transform: translateX(26px);
}
.mobile-nav.open a.m-link {
  animation: slideIn .48s var(--ease) forwards;
}
.mobile-nav.open a.m-link:nth-of-type(1) { animation-delay: .08s; }
.mobile-nav.open a.m-link:nth-of-type(2) { animation-delay: .14s; }
.mobile-nav.open a.m-link:nth-of-type(3) { animation-delay: .2s; }
.mobile-nav.open a.m-link:nth-of-type(4) { animation-delay: .26s; }
.mobile-nav.open a.m-link:nth-of-type(5) { animation-delay: .32s; }
.mobile-nav a.m-link:hover, .mobile-nav a.m-link.active { color: var(--cyan); }
.mobile-nav a.m-link span { font-family: var(--font-body); font-size: .8rem; color: var(--text-dim); font-weight: 500; }
@keyframes slideIn { to { opacity: 1; transform: translateX(0); } }

.mobile-nav-foot { margin-top: auto; padding-top: 2.2rem; }
.mobile-nav-foot .btn { width: 100%; }
.mobile-nav-foot .m-contact {
  margin-top: 1.5rem; font-size: var(--step--1); color: var(--text-muted);
  display: flex; flex-direction: column; gap: .45rem;
}

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  min-height: min(94vh, 900px);
  display: flex; align-items: center;
  padding-block: calc(var(--header-h) + 4rem) 4rem;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  overflow: hidden;
}
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: .55;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 90% 65% at 22% 30%, rgba(79,70,229,.4), transparent 65%),
    radial-gradient(ellipse 70% 55% at 82% 68%, rgba(34,211,238,.26), transparent 62%),
    linear-gradient(180deg, rgba(7,11,24,.55) 0%, rgba(7,11,24,.82) 62%, var(--ink) 100%);
}

/* Animated aurora blobs */
.aurora { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora i {
  position: absolute; display: block;
  border-radius: 50%; filter: blur(70px);
  mix-blend-mode: screen;
}
.aurora i:nth-child(1) {
  width: 46vw; height: 46vw; max-width: 620px; max-height: 620px;
  background: rgba(79,70,229,.55); top: -12%; left: -8%;
  animation: drift1 22s ease-in-out infinite;
}
.aurora i:nth-child(2) {
  width: 38vw; height: 38vw; max-width: 520px; max-height: 520px;
  background: rgba(34,211,238,.38); bottom: -14%; right: -6%;
  animation: drift2 27s ease-in-out infinite;
}
.aurora i:nth-child(3) {
  width: 26vw; height: 26vw; max-width: 360px; max-height: 360px;
  background: rgba(251,113,133,.24); top: 42%; left: 52%;
  animation: drift3 19s ease-in-out infinite;
}
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(9vw, 7vh) scale(1.16); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1.1); } 50% { transform: translate(-8vw,-6vh) scale(.92); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(.95); } 50% { transform: translate(-6vw, 5vh) scale(1.22); } }

/* Grid overlay */
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 75% 60% at 50% 42%, #000 35%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 42%, #000 35%, transparent 78%);
}

.hero-inner { max-width: 880px; position: relative; z-index: 2; }
.hero h1 { margin-bottom: 1.5rem; }
.hero .lede { max-width: 620px; margin-bottom: 2.4rem; }
.hero .btn-row { margin-bottom: 3.2rem; }

.badge {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .45rem 1rem .45rem .55rem;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  backdrop-filter: blur(12px);
  border-radius: 100px;
  font-size: .8rem; font-weight: 500; color: var(--text-muted);
  margin-bottom: 1.9rem;
}
.badge b { color: var(--text); font-weight: 600; }
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #34D399; flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(52,211,153,.18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 3px rgba(52,211,153,.18); } 50% { box-shadow: 0 0 0 7px rgba(52,211,153,0); } }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: clamp(1.6rem, 5vw, 3.4rem);
  padding-top: 2.2rem;
  border-top: 1px solid var(--border);
}
.hero-stats div strong {
  display: block;
  font-family: var(--font-display); font-size: var(--step-2);
  font-weight: 700; color: #fff; line-height: 1;
  margin-bottom: .35rem;
}
.hero-stats div span { font-size: var(--step--1); color: var(--text-dim); }

/* Page hero (inner pages) */
.page-hero {
  position: relative;
  padding-block: calc(var(--header-h) + clamp(3.5rem, 8vw, 6.5rem)) clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.page-hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 70% 90% at 15% 0%, rgba(79,70,229,.28), transparent 60%),
    radial-gradient(ellipse 55% 80% at 88% 20%, rgba(34,211,238,.16), transparent 58%);
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { max-width: 900px; margin-bottom: 1.3rem; }
.page-hero .lede { max-width: 660px; }

/* Breadcrumbs */
.crumbs { display: flex; gap: .5rem; align-items: center; font-size: var(--step--1); color: var(--text-dim); margin-bottom: 1.4rem; flex-wrap: wrap; }
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--cyan); }
.crumbs span[aria-current] { color: var(--text); }

/* ---------- 8. Marquee ---------- */
.marquee {
  border-block: 1px solid var(--border);
  padding-block: 1.5rem;
  overflow: hidden;
  background: var(--bg-alt);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex; gap: 3.2rem; width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(.95rem, 2vw, 1.15rem);
  color: var(--text-dim); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 3.2rem;
  letter-spacing: -.01em;
}
.marquee-track span::after {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--cyan); opacity: .55;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 9. Cards ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 2.6vw, 2.2rem);
  transition: transform .42s var(--ease), border-color .42s var(--ease), background .42s var(--ease);
  overflow: hidden;
  height: 100%;
  display: flex; flex-direction: column;
}
.card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(500px circle at var(--mx,50%) var(--my,0%), rgba(79,70,229,.16), transparent 42%);
  opacity: 0; transition: opacity .42s var(--ease); pointer-events: none;
}
.card:hover { transform: translateY(-6px); border-color: var(--border-strong); background: var(--surface-hover); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }

.card-icon {
  width: 50px; height: 50px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, rgba(79,70,229,.24), rgba(34,211,238,.14));
  border: 1px solid var(--border-strong);
  margin-bottom: 1.35rem; flex-shrink: 0;
}
.card-icon svg { width: 23px; height: 23px; color: var(--cyan); }
.card h3 { margin-bottom: .7rem; font-size: var(--step-1); }
.card p { color: var(--text-muted); font-size: var(--step--1); margin-bottom: 1.2rem; }
.card ul { list-style: none; padding: 0; margin: 0 0 1.3rem; display: grid; gap: .55rem; }
.card ul li {
  font-size: var(--step--1); color: var(--text-muted);
  padding-left: 1.5rem; position: relative;
}
.card ul li::before {
  content: ''; position: absolute; left: 0; top: .62em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 8px rgba(34,211,238,.8);
}
.card .link-arrow { margin-top: auto; }

/* Numbered process steps */
.step { position: relative; padding-top: 2.6rem; }
.step-num {
  position: absolute; top: 0; left: 0;
  font-family: var(--font-display); font-weight: 700;
  font-size: 2.9rem; line-height: 1;
  background: linear-gradient(160deg, var(--indigo-light), transparent 88%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: .95;
}
.step h3 { font-size: var(--step-1); margin-bottom: .6rem; }
.step p { color: var(--text-muted); font-size: var(--step--1); }

/* Stat block */
.stat { text-align: center; padding: 1.5rem .8rem; }
.stat strong {
  display: block; font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.3rem); font-weight: 700;
  line-height: 1; margin-bottom: .5rem;
  background: linear-gradient(140deg, #fff, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { font-size: var(--step--1); color: var(--text-muted); }

/* ---------- 10. Work / portfolio ---------- */
.filters {
  display: flex; flex-wrap: wrap; gap: .55rem;
  margin-bottom: 2.6rem;
}
.filter-btn {
  padding: .58rem 1.25rem; border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: var(--step--1); font-weight: 500;
  color: var(--text-muted);
  transition: all .28s var(--ease);
}
.filter-btn:hover { color: var(--text); border-color: var(--border-strong); }
.filter-btn.active {
  background: linear-gradient(120deg, var(--indigo), var(--indigo-light));
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 20px -6px rgba(79,70,229,.6);
}

.work-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  transition: transform .45s var(--ease), border-color .45s var(--ease), box-shadow .45s var(--ease);
  display: flex; flex-direction: column;
  text-align: left; width: 100%;
  padding: 0;
}
.work-card:hover {
  transform: translateY(-7px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.work-media {
  position: relative; aspect-ratio: 3/2; overflow: hidden;
  background: var(--ink-3);
}
.work-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease), filter .5s;
}
.work-card:hover .work-media img { transform: scale(1.07); }
.work-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(7,11,24,.85));
}
.work-tag {
  position: absolute; top: 1rem; left: 1rem; z-index: 2;
  padding: .35rem .8rem; border-radius: 100px;
  background: rgba(7,11,24,.75); backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  font-size: .72rem; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--cyan);
}
.work-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.work-body h3 { font-size: var(--step-1); margin-bottom: .5rem; }
.work-body p { color: var(--text-muted); font-size: var(--step--1); margin-bottom: 1.1rem; }
.work-meta {
  margin-top: auto; padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: var(--step--1);
}
.work-meta b { color: var(--cyan); font-weight: 600; }
.work-meta em { font-style: normal; color: var(--text-dim); }

.work-card[hidden] { display: none; }
.is-filtering { animation: fadeUp .45s var(--ease) both; }

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 150;
  display: grid; place-items: center;
  padding: var(--gutter);
  background: rgba(3,5,12,.86);
  backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-panel {
  background: var(--ink-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  max-width: 720px; width: 100%;
  max-height: 88vh; overflow-y: auto;
  transform: translateY(24px) scale(.97);
  transition: transform .4s var(--ease);
  position: relative;
}
.modal.open .modal-panel { transform: translateY(0) scale(1); }
.modal-panel img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.modal-body { padding: clamp(1.5rem, 3vw, 2.4rem); }
.modal-body h3 { margin-bottom: .8rem; }
.modal-body h4 { font-size: var(--step-0); color: var(--cyan); margin: 1.5rem 0 .5rem; }
.modal-body p { color: var(--text-muted); font-size: var(--step--1); }
.modal-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(7,11,24,.8); border: 1px solid var(--border-strong);
  display: grid; place-items: center; color: var(--text);
  backdrop-filter: blur(8px);
  transition: background .25s, transform .25s;
}
.modal-close:hover { background: var(--coral); color: #2A0A12; transform: rotate(90deg); }
.modal-close svg { width: 18px; height: 18px; }
.modal-results {
  display: flex; flex-wrap: wrap; gap: 1.6rem;
  margin-top: 1.6rem; padding-top: 1.4rem;
  border-top: 1px solid var(--border);
}
.modal-results div strong {
  display: block; font-family: var(--font-display);
  font-size: var(--step-2); color: var(--cyan); line-height: 1;
}
.modal-results div span { font-size: .8rem; color: var(--text-dim); }

/* ---------- 11. Split feature ---------- */
.split {
  display: grid; gap: clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.split.reverse .split-media { order: -1; }
@media (min-width: 900px) { .split.reverse .split-media { order: 2; } }

.split-media {
  position: relative; border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.split-media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.split-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(145deg, rgba(79,70,229,.18), transparent 55%);
}
.split h2 { margin-bottom: 1.2rem; }
.split p { color: var(--text-muted); margin-bottom: 1.1rem; }

.check-list { list-style: none; padding: 0; margin: 1.6rem 0; display: grid; gap: .9rem; }
.check-list li {
  display: flex; gap: .85rem; align-items: flex-start;
  font-size: var(--step--1); color: var(--text-muted);
}
.check-list li svg {
  width: 20px; height: 20px; flex-shrink: 0; margin-top: .18em;
  color: var(--cyan);
}
.check-list li b { color: var(--text); font-weight: 600; }

/* ---------- 12. Accordion ---------- */
.accordion { border-top: 1px solid var(--border); }
.acc-item { border-bottom: 1px solid var(--border); }
.acc-trigger {
  width: 100%; text-align: left;
  padding: 1.4rem 3rem 1.4rem 0;
  position: relative;
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--step-1); color: var(--text);
  letter-spacing: -.02em;
  transition: color .25s;
}
.acc-trigger:hover { color: var(--cyan); }
.acc-trigger::after {
  content: ''; position: absolute; right: .4rem; top: 50%;
  width: 13px; height: 13px; translate: 0 -50%;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  rotate: 45deg; transform-origin: center;
  transition: rotate .35s var(--ease);
}
.acc-trigger[aria-expanded="true"]::after { rotate: -135deg; }
.acc-trigger[aria-expanded="true"] { color: var(--cyan); }
.acc-panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .4s var(--ease);
}
.acc-panel[data-open="true"] { grid-template-rows: 1fr; }
.acc-panel > div { overflow: hidden; }
.acc-panel p { color: var(--text-muted); font-size: var(--step-0); padding-bottom: 1.5rem; max-width: 70ch; }

/* ---------- 13. Forms ---------- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3.4vw, 2.8rem);
  position: relative;
}
.field { margin-bottom: 1.35rem; }
.field label {
  display: block; font-size: var(--step--1); font-weight: 600;
  margin-bottom: .5rem; color: var(--text);
}
.field label .req { color: var(--coral); }
.field .hint { display: block; font-weight: 400; color: var(--text-dim); font-size: .8rem; margin-top: .2rem; }

.field input, .field textarea, .field select {
  width: 100%;
  padding: .9rem 1.05rem;
  background: rgba(7,11,24,.6);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: var(--step-0);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s;
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.field select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239AA3BD' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 17px;
  padding-right: 2.8rem;
}
.field select option { background: var(--ink-2); color: var(--text); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34,211,238,.16);
  background: rgba(7,11,24,.85);
}
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--coral); }
.field.invalid input:focus, .field.invalid textarea:focus, .field.invalid select:focus {
  box-shadow: 0 0 0 3px rgba(251,113,133,.18);
}
.error-msg {
  display: none; color: var(--coral);
  font-size: .82rem; margin-top: .42rem; font-weight: 500;
}
.field.invalid .error-msg { display: block; }

.field-row { display: grid; gap: 1.35rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .field-row { grid-template-columns: 1fr 1fr; } }

.form-note { font-size: .82rem; color: var(--text-dim); margin-top: 1rem; text-align: center; }

.form-success {
  display: none;
  text-align: center; padding: clamp(2rem,5vw,3.5rem) 1rem;
}
.form-success.show { display: block; animation: fadeUp .55s var(--ease) both; }
.form-success .tick {
  width: 68px; height: 68px; margin: 0 auto 1.5rem;
  border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--indigo), var(--cyan));
  box-shadow: var(--shadow-glow);
}
.form-success .tick svg { width: 32px; height: 32px; color: #fff; }
.form-success h3 { margin-bottom: .8rem; }
.form-success p { color: var(--text-muted); max-width: 46ch; margin: 0 auto 1.6rem; }

/* Honeypot */
.hp { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* Contact aside */
.contact-aside { display: grid; gap: 1rem; align-content: start; }
.contact-item {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.contact-item:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.contact-item .card-icon { width: 42px; height: 42px; margin: 0; border-radius: 11px; }
.contact-item .card-icon svg { width: 19px; height: 19px; }
.contact-item h4 { font-size: var(--step-0); margin-bottom: .25rem; }
.contact-item p, .contact-item a { font-size: var(--step--1); color: var(--text-muted); }
.contact-item a:hover { color: var(--cyan); }

/* ---------- 14. CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 5vw, 4rem);
  text-align: center;
  background:
    radial-gradient(ellipse 80% 120% at 20% 10%, rgba(79,70,229,.4), transparent 60%),
    radial-gradient(ellipse 70% 110% at 85% 90%, rgba(34,211,238,.24), transparent 58%),
    var(--ink-2);
}
.cta-band::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000, transparent 75%);
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { margin-bottom: 1.1rem; max-width: 20ch; margin-inline: auto; }
.cta-band p { color: var(--text-muted); max-width: 52ch; margin: 0 auto 2.2rem; font-size: var(--step-1); }

/* ---------- 15. Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding-block: clamp(3rem, 5vw, 4.5rem) 2rem;
  margin-top: var(--section-y);
}
.footer-grid {
  display: grid; gap: 2.5rem;
  grid-template-columns: 1fr;
  padding-bottom: 2.8rem;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.2fr; } }
.footer-brand p { color: var(--text-muted); font-size: var(--step--1); margin: 1.1rem 0 1.4rem; max-width: 34ch; }
.footer h4 {
  font-family: var(--font-body);
  font-size: .78rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 1.1rem;
}
.footer ul { list-style: none; padding: 0; display: grid; gap: .7rem; }
.footer ul a { color: var(--text-muted); font-size: var(--step--1); }
.footer ul a:hover { color: var(--cyan); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.8rem;
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between; align-items: center;
  font-size: .84rem; color: var(--text-dim);
}
.footer-bottom nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-bottom a { color: var(--text-dim); }
.footer-bottom a:hover { color: var(--cyan); }

/* ---------- 16. Back to top ---------- */
.to-top {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem);
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--indigo); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 26px -6px rgba(79,70,229,.75);
  z-index: 90;
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s, background .25s;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--indigo-light); color: #fff; }
.to-top svg { width: 19px; height: 19px; }

/* ---------- 17. Scroll reveal ----------
   Scoped to .js so that if JavaScript fails to load, content stays
   visible instead of being stuck at opacity 0. The .js class is set by
   a tiny inline script in each page's <head>. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
  transition-delay: var(--delay, 0ms);
}
.js [data-reveal].revealed { opacity: 1; transform: none; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- 18. 404 ---------- */
.error-page {
  min-height: 100vh;
  display: grid; place-items: center;
  text-align: center;
  padding: calc(var(--header-h) + 3rem) var(--gutter) 4rem;
  position: relative; overflow: hidden;
}
.error-code {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(6rem, 22vw, 13rem); line-height: .9;
  background: linear-gradient(140deg, var(--indigo-light), var(--cyan) 60%, var(--coral));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 1rem;
}

/* ---------- 19. Responsive ---------- */
@media (max-width: 940px) {
  .nav { display: none; }
  .header-cta .btn { display: none; }
  .burger { display: grid; }
}
@media (min-width: 941px) {
  .mobile-nav { display: none; }
}
@media (max-width: 560px) {
  .btn-row .btn { width: 100%; }
  .hero-stats { gap: 1.5rem 2rem; }
  .hero-stats div { min-width: 40%; }
}

/* ---------- 20. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .aurora i { animation: none; }
  .marquee-track { animation: none; }
}

/* ---------- 21. Print ---------- */
@media print {
  .header, .mobile-nav, .to-top, .aurora, .cta-band, .footer { display: none !important; }
  body { background: #fff; color: #000; }
}
