:root {
  --navy-950: #030b14;
  --navy-900: #071525;
  --navy-800: #0c2138;
  --blue-600: #0878d1;
  --blue-500: #12a7e8;
  --cyan-400: #35d3e8;
  --white: #ffffff;
  --off-white: #f5f8fb;
  --slate-100: #e8eef4;
  --slate-300: #b7c5d3;
  --slate-500: #6f8497;
  --slate-700: #354c60;
  --text: #12283b;
  --shadow-sm: 0 10px 30px rgba(7, 21, 37, 0.08);
  --shadow-lg: 0 24px 70px rgba(4, 25, 44, 0.18);
  --radius-sm: 12px;
  --radius-md: 22px;
  --radius-lg: 34px;
  --transition: 280ms cubic-bezier(.2, .8, .2, 1);
  --header-height: 82px;

  /* --- Premium brand layer (gold + deep ink, matched to Alfa Projekti mark) --- */
  --ink-950: #05070a;
  --ink-900: #090c11;
  --ink-800: #10141c;
  --ink-700: #1a212c;
  --gold-300: #f2dca3;
  --gold-400: #e3bf74;
  --gold-500: #cd9f4c;
  --gold-600: #a97e34;
  --gold-glow: rgba(227, 191, 116, 0.35);
  --hairline: rgba(255, 255, 255, 0.09);
  --glass-fill: rgba(255, 255, 255, 0.045);
  --glass-fill-strong: rgba(255, 255, 255, 0.08);
  --ease-spring: cubic-bezier(.16, 1, .3, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --transition-slow: 620ms var(--ease-spring);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  background: var(--off-white);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.container {
  margin-inline: auto;
  max-width: 1240px;
  padding-inline: 28px;
  width: 100%;
}

.section {
  padding: 130px 0;
}

.scroll-progress {
  background: linear-gradient(90deg, var(--gold-400), var(--cyan-400), var(--blue-500));
  height: 3px;
  left: 0;
  position: fixed;
  top: 0;
  transform: scaleX(0);
  transform-origin: left;
  width: 100%;
  z-index: 1100;
}

.site-header {
  color: var(--white);
  height: var(--header-height);
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  transition: background var(--transition), box-shadow var(--transition), height var(--transition);
  z-index: 1000;
}

.site-header.scrolled {
  backdrop-filter: blur(18px);
  background: rgba(3, 11, 20, 0.9);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);
  height: 72px;
}

.navbar {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: space-between;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.brand-logo {
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  display: block;
  height: 42px;
  object-fit: cover;
  width: 42px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-copy strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  letter-spacing: 0.01em;
}

.brand-copy small {
  color: var(--slate-300);
  font-size: 10px;
  letter-spacing: 0.08em;
  margin-top: 3px;
  text-transform: uppercase;
}

.nav-panel {
  align-items: center;
  display: flex;
  gap: 38px;
}

.nav-links {
  align-items: center;
  display: flex;
  gap: 34px;
  list-style: none;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 600;
  position: relative;
  transition: color var(--transition);
}

.nav-links a::after {
  background: var(--gold-400);
  bottom: -9px;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition);
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.language-toggle {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  font-size: 11px;
  font-weight: 800;
  gap: 6px;
  padding: 8px 12px;
  transition: background var(--transition), border-color var(--transition);
}

.language-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
}

.admin-login-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.68);
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  gap: 7px;
  padding: 8px 0;
  transition: color var(--transition);
}

.admin-login-button:hover,
.admin-login-button.logged-in {
  color: var(--gold-400);
}

.admin-login-button svg {
  height: 16px;
  width: 16px;
}

.language-option.active {
  color: var(--gold-400);
}

.toggle-divider {
  opacity: 0.4;
}

.menu-toggle {
  background: transparent;
  border: 0;
  display: none;
  height: 42px;
  position: relative;
  width: 42px;
  z-index: 2;
}

.menu-toggle span {
  background: var(--white);
  height: 2px;
  left: 9px;
  position: absolute;
  transition: transform var(--transition), top var(--transition);
  width: 24px;
}

.menu-toggle span:first-child {
  top: 15px;
}

.menu-toggle span:last-child {
  top: 25px;
}

.menu-toggle.active span:first-child {
  top: 20px;
  transform: rotate(45deg);
}

.menu-toggle.active span:last-child {
  top: 20px;
  transform: rotate(-45deg);
}

.hero {
  align-items: center;
  background-image: url("./media/brand/Background3.png");
  background-position: center;
  background-size: cover;
  color: var(--white);
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

.hero-overlay {
  background:
    radial-gradient(circle at 74% 38%, rgba(18, 167, 232, 0.25), transparent 34%),
    linear-gradient(90deg, rgba(3, 11, 20, 0.97) 0%, rgba(3, 16, 28, 0.86) 48%, rgba(3, 11, 20, 0.52) 100%);
  inset: 0;
  position: absolute;
}

.hero-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 70px 70px;
  inset: 0;
  mask-image: linear-gradient(to right, black, transparent 75%);
  position: absolute;
}

.hero-content {
  padding-bottom: 70px;
  padding-top: 150px;
  position: relative;
  z-index: 1;
}

.hero-text {
  max-width: 820px;
}

.eyebrow {
  align-items: center;
  color: var(--blue-500);
  display: flex;
  font-size: 12px;
  font-weight: 800;
  gap: 12px;
  letter-spacing: 0.18em;
  margin-bottom: 22px;
  text-transform: uppercase;
}

.eyebrow::before {
  background: currentColor;
  content: "";
  height: 2px;
  width: 34px;
}

.hero .eyebrow {
  color: var(--gold-400);
}

.hero h1,
.section-heading h2,
.parallax-content h2,
.contact-info h2 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.hero h1 {
  font-family: "Outfit", sans-serif;
  font-size: clamp(3rem, 6vw, 6.2rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  max-width: 980px;
}

.hero h1 span {
  color: transparent;
  display: block;
  font-size: 0.52em;
  letter-spacing: -0.025em;
  margin-top: 18px;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.72);
}

.hero-lead {
  color: var(--slate-300);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  margin-top: 30px;
  max-width: 650px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 42px;
}

.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 12px;
  justify-content: center;
  letter-spacing: 0.03em;
  min-height: 54px;
  padding: 0 26px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
}

.button svg {
  height: 18px;
  transition: transform var(--transition);
  width: 18px;
}

.button:hover {
  transform: translateY(-3px);
}

.button:hover svg {
  transform: translateX(4px);
}

.button-primary {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500) 55%, var(--gold-600));
  box-shadow: 0 15px 35px rgba(205, 159, 76, 0.32);
  color: var(--ink-950);
  position: relative;
  overflow: hidden;
}

.button-primary::before {
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.55) 48%, transparent 66%);
  content: "";
  inset: 0;
  position: absolute;
  transform: translateX(-120%);
  transition: transform 900ms var(--ease-out);
}

.button-primary:hover::before {
  transform: translateX(120%);
}

.button-primary:hover {
  box-shadow: 0 20px 46px rgba(205, 159, 76, 0.46);
}

.button-ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--white);
}

.button-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.5);
}

.button-contact {
  border-color: rgba(227, 191, 116, 0.48);
  color: var(--gold-400);
}

.hero-stats {
  display: flex;
  gap: 1px;
  margin-top: 85px;
  max-width: 700px;
}

.stat {
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 24px;
}

.stat:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.stat:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.stat strong {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
}

.stat span {
  color: var(--slate-300);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scroll-cue {
  align-items: center;
  bottom: 35px;
  color: rgba(255, 255, 255, 0.58);
  display: flex;
  font-size: 10px;
  font-weight: 700;
  gap: 14px;
  letter-spacing: 0.2em;
  position: absolute;
  right: 5vw;
  text-transform: uppercase;
  transform: rotate(90deg);
  transform-origin: right bottom;
  z-index: 2;
}

.scroll-cue i {
  background: rgba(255, 255, 255, 0.28);
  height: 1px;
  overflow: hidden;
  position: relative;
  width: 58px;
}

.scroll-cue i::after {
  animation: scrollLine 1.8s infinite ease-in-out;
  background: var(--cyan-400);
  content: "";
  inset: 0;
  position: absolute;
  transform: translateX(-100%);
}

@keyframes scrollLine {
  50%, 100% { transform: translateX(100%); }
}

.about {
  background:
    linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.97)),
    url("./media/brand/Background1.png") center/cover fixed;
}

.about-layout {
  display: grid;
  gap: 90px;
  grid-template-columns: 0.85fr 1.45fr;
}

.section-heading h2,
.contact-info h2 {
  color: var(--navy-900);
  font-size: clamp(2.4rem, 4.6vw, 4.4rem);
}

.heading-line {
  background: linear-gradient(90deg, var(--gold-500), transparent);
  height: 1px;
  margin-top: 34px;
  width: 140px;
}

.about-copy {
  color: var(--slate-700);
  font-size: 16px;
}

.about-copy p + p {
  margin-top: 22px;
}

.about-copy p:first-child {
  color: var(--text);
  font-size: 19px;
  font-weight: 600;
}

.expertise-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 80px;
}

.expertise-card {
  background: var(--off-white);
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-md);
  padding: 36px;
  transform-style: preserve-3d;
  transition: transform 450ms var(--ease-spring), box-shadow 450ms var(--ease-spring), border-color var(--transition);
  will-change: transform;
}

.expertise-card:hover {
  border-color: rgba(227, 191, 116, 0.35);
  box-shadow: 0 30px 60px rgba(18, 22, 30, 0.14);
}

.icon-box {
  align-items: center;
  background: linear-gradient(145deg, var(--ink-800), var(--ink-950));
  border: 1px solid rgba(227, 191, 116, 0.3);
  border-radius: 15px;
  color: var(--gold-400);
  display: flex;
  height: 54px;
  justify-content: center;
  margin-bottom: 26px;
  transition: transform var(--transition), box-shadow var(--transition);
  width: 54px;
}

.expertise-card:hover .icon-box {
  box-shadow: 0 12px 26px var(--gold-glow);
  transform: translateY(-4px) rotate(-4deg);
}

.icon-box svg {
  height: 25px;
  width: 25px;
}

.expertise-card h3 {
  color: var(--navy-900);
  font-family: "Space Grotesk", sans-serif;
  font-size: 21px;
  margin-bottom: 10px;
}

.expertise-card p {
  color: var(--slate-500);
  font-size: 14px;
}

.software-strip {
  align-items: center;
  border-bottom: 1px solid var(--slate-100);
  border-top: 1px solid var(--slate-100);
  display: flex;
  justify-content: space-between;
  margin-top: 70px;
  padding-bottom: 26px;
  padding-top: 26px;
}

.software-strip > span {
  color: var(--slate-500);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.software-list {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(22px, 4vw, 54px);
}

.software-list strong {
  color: var(--slate-300);
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  letter-spacing: -0.04em;
  transition: color var(--transition);
}

.software-list strong:hover {
  color: var(--gold-500);
}

.parallax-band {
  align-items: center;
  background-attachment: fixed;
  background-image: url("./media/brand/Background5.png");
  background-position: center;
  background-size: cover;
  color: var(--white);
  display: flex;
  min-height: 560px;
  overflow: hidden;
  position: relative;
}

.parallax-overlay {
  background: linear-gradient(90deg, rgba(3, 11, 20, 0.93), rgba(3, 11, 20, 0.5));
  inset: 0;
  position: absolute;
}

.parallax-content {
  position: relative;
  z-index: 1;
}

.parallax-content .eyebrow {
  color: var(--cyan-400);
}

.parallax-content h2 {
  font-size: clamp(2.8rem, 5.5vw, 5.7rem);
  max-width: 850px;
}

.references {
  background:
    linear-gradient(rgba(245, 248, 251, 0.94), rgba(245, 248, 251, 0.97)),
    url("./media/brand/Background2.png") center/cover fixed;
}

.section-heading.centered {
  margin: 0 auto 65px;
  max-width: 760px;
  text-align: center;
}

.section-heading.centered .eyebrow {
  justify-content: center;
}

.section-heading.centered p:last-child {
  color: var(--slate-500);
  margin: 22px auto 0;
  max-width: 610px;
}

.project-grid {
  display: grid;
  gap: 22px;
  grid-auto-rows: 390px;
  grid-template-columns: repeat(12, 1fr);
}

.project-card {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  grid-column: span 4;
  overflow: hidden;
  position: relative;
}

.project-card:nth-child(1),
.project-card:nth-child(5) {
  grid-column: span 7;
}

.project-card:nth-child(2),
.project-card:nth-child(6) {
  grid-column: span 5;
}

#project-image-gallery .project-card:nth-child(3),
#project-image-gallery .project-card:nth-child(4) {
  grid-column: span 6;
}

#project-image-gallery .project-card:nth-child(5),
#project-image-gallery .project-card:nth-child(6) {
  grid-column: span 12;
}

.project-card img {
  height: 100%;
  object-fit: cover;
  transition: transform 700ms cubic-bezier(.2, .8, .2, 1), filter 700ms ease;
  width: 100%;
}

.project-card::after {
  background: linear-gradient(to top, rgba(3, 11, 20, 0.96) 4%, rgba(3, 11, 20, 0.2) 75%);
  content: "";
  inset: 0;
  position: absolute;
  transition: background var(--transition);
}

.project-card:hover img {
  filter: saturate(0.75);
  transform: scale(1.07);
}

.project-card:hover::after {
  background: linear-gradient(to top, rgba(3, 11, 20, 0.98) 12%, rgba(3, 11, 20, 0.4) 100%);
}

.project-number {
  color: rgba(255, 255, 255, 0.72);
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 700;
  position: absolute;
  right: 24px;
  top: 20px;
  z-index: 2;
}

.project-overlay {
  bottom: 0;
  color: var(--white);
  left: 0;
  padding: 30px;
  position: absolute;
  right: 0;
  transform: translateY(75px);
  transition: transform var(--transition);
  z-index: 2;
}

.project-overlay span {
  color: var(--gold-400);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.project-overlay h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  line-height: 1.2;
  margin-top: 9px;
}

.project-overlay p {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--slate-300);
  display: -webkit-box;
  font-size: 13px;
  line-height: 1.55;
  margin-top: 13px;
  opacity: 0;
  overflow: hidden;
  transition: opacity var(--transition);
}

.read-more-button {
  background: transparent;
  border: 0;
  color: var(--gold-400);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-top: 12px;
  padding: 2px 0;
  position: relative;
  text-transform: uppercase;
}

.read-more-button::after {
  background: currentColor;
  bottom: 0;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  transition: width var(--transition);
  width: 35%;
}

.read-more-button:hover::after {
  width: 100%;
}

.project-card:hover .project-overlay {
  transform: translateY(0);
}

.project-card:hover .project-overlay p {
  opacity: 1;
}

.gallery {
  background:
    linear-gradient(rgba(7, 21, 37, 0.93), rgba(7, 21, 37, 0.97)),
    url("./media/brand/Background4.png") center/cover fixed;
  color: var(--white);
  overflow: hidden;
  position: relative;
}

.gallery::before {
  background: var(--blue-600);
  border-radius: 50%;
  content: "";
  filter: blur(150px);
  height: 400px;
  opacity: 0.14;
  position: absolute;
  right: -150px;
  top: -150px;
  width: 400px;
}

.gallery-header {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 60px;
}

.gallery .section-heading h2 {
  color: var(--white);
}

.gallery-header > p {
  color: var(--slate-300);
  max-width: 440px;
}

.video-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, 1fr);
}

.video-card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}

.video-card:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(53, 211, 232, 0.32);
  transform: translateY(-7px);
}

.video-wrapper {
  aspect-ratio: 16 / 10;
  align-items: center;
  display: flex;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.video-wrapper img,
.video-wrapper video,
.video-wrapper iframe {
  border: 0;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms cubic-bezier(.2, .8, .2, 1), filter 700ms ease;
  width: 100%;
}

.video-card:hover .video-wrapper img {
  filter: saturate(0.8);
  transform: scale(1.06);
}

.video-preview-shade {
  background: linear-gradient(135deg, rgba(3, 11, 20, 0.08), rgba(3, 11, 20, 0.72));
  inset: 0;
  position: absolute;
}

.video-wrapper .play-button {
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.video-card:hover .video-wrapper .play-button {
  transform: translate(-50%, -50%) scale(1.08);
}

.video-placeholder {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(7, 21, 37, 0.2), rgba(7, 21, 37, 0.88)),
    url("./media/brand/Background4.png") center/cover;
  display: flex;
  flex-direction: column;
  gap: 15px;
  justify-content: center;
}

.video-placeholder span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.play-button {
  align-items: center;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  display: flex;
  height: 68px;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
  width: 68px;
}

.video-card:hover .play-button {
  background: var(--blue-500);
  transform: scale(1.08);
}

.play-button svg {
  fill: currentColor;
  height: 27px;
  margin-left: 4px;
  stroke: none;
  width: 27px;
}

.video-copy {
  padding: 27px;
}

.video-copy h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 19px;
  line-height: 1.3;
  margin-top: 7px;
}

.video-copy > span {
  color: var(--cyan-400);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.video-copy p {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--slate-300);
  display: -webkit-box;
  font-size: 13px;
  line-height: 1.55;
  margin-top: 9px;
  min-height: 40px;
  overflow: hidden;
}

.video-copy .read-more-button {
  color: var(--cyan-400);
  margin-top: 15px;
}

.portfolio-note {
  border-top: 1px solid rgba(18, 167, 232, 0.18);
  color: var(--slate-500);
  font-size: 13px;
  font-style: italic;
  margin-top: 36px;
  padding-top: 20px;
  text-align: center;
}

.gallery .portfolio-note {
  border-top-color: rgba(53, 211, 232, 0.18);
  color: var(--slate-300);
}

.video-empty-state {
  align-items: center;
  background: rgba(255, 255, 255, 0.055);
  border: 1px dashed rgba(53, 211, 232, 0.32);
  border-radius: var(--radius-md);
  display: flex;
  gap: 28px;
  grid-column: 1 / -1;
  padding: 42px;
}

.video-empty-state .play-button {
  flex: 0 0 68px;
}

.video-empty-state h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 23px;
}

.video-empty-state p {
  color: var(--slate-300);
  font-size: 14px;
  margin-top: 7px;
  max-width: 700px;
}

.video-empty-state a {
  color: var(--cyan-400);
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  margin-top: 15px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.contact {
  background: var(--white);
  overflow: hidden;
  position: relative;
}

.contact-glow {
  background: rgba(18, 167, 232, 0.08);
  border-radius: 50%;
  filter: blur(100px);
  height: 600px;
  left: -350px;
  position: absolute;
  top: 0;
  width: 600px;
}

.contact-layout {
  align-items: center;
  display: grid;
  gap: clamp(60px, 8vw, 120px);
  grid-template-columns: 0.9fr 1.1fr;
  position: relative;
}

.contact-intro {
  color: var(--slate-500);
  margin-top: 24px;
  max-width: 500px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  font-style: normal;
  gap: 17px;
  margin-top: 42px;
}

.contact-list > a,
.contact-list > div {
  align-items: center;
  display: flex;
  gap: 17px;
  width: fit-content;
}

.contact-list > a {
  transition: color var(--transition), transform var(--transition);
}

.contact-list > a:hover {
  color: var(--gold-500);
  transform: translateX(5px);
}

.contact-icon {
  align-items: center;
  background: var(--off-white);
  border: 1px solid var(--slate-100);
  border-radius: 13px;
  color: var(--blue-600);
  display: flex;
  flex: 0 0 46px;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.contact-icon svg {
  height: 20px;
  width: 20px;
}

.contact-list small {
  color: var(--slate-500);
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  margin-bottom: 1px;
  text-transform: uppercase;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 35px;
}

.social-links a,
.social-placeholder {
  align-items: center;
  border: 1px solid var(--slate-100);
  border-radius: 999px;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  gap: 9px;
  padding: 10px 15px;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.social-links a:hover {
  background: var(--ink-950);
  border-color: var(--gold-500);
  color: var(--gold-300);
  transform: translateY(-3px);
}

.social-placeholder {
  color: var(--slate-500);
  cursor: default;
  opacity: 0.58;
}

.social-links svg,
.social-placeholder svg {
  fill: currentColor;
  height: 16px;
  stroke: none;
  width: 16px;
}

.social-links svg rect,
.social-links svg circle,
.social-placeholder svg rect,
.social-placeholder svg circle {
  fill: none;
  stroke: currentColor;
}

.social-links svg .social-dot,
.social-placeholder svg .social-dot {
  fill: currentColor;
  stroke: none;
}

.contact-form-wrap {
  background: var(--navy-900);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 48px;
  position: relative;
}

.contact-form-wrap::before {
  border: 1px solid rgba(53, 211, 232, 0.2);
  border-radius: inherit;
  content: "";
  inset: 10px;
  pointer-events: none;
  position: absolute;
}

.contact-form {
  color: var(--white);
  position: relative;
  z-index: 1;
}

.form-heading {
  margin-bottom: 30px;
}

.form-heading h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
}

.form-heading p {
  color: var(--slate-300);
  font-size: 13px;
  margin-top: 5px;
}

.form-group + .form-group {
  margin-top: 19px;
}

.form-group label {
  color: var(--slate-300);
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--white);
  outline: none;
  padding: 14px 16px;
  resize: vertical;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(183, 197, 211, 0.52);
}

.form-group input:focus,
.form-group textarea:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(18, 167, 232, 0.13);
}

.submit-button {
  border: 0;
  margin-top: 26px;
  width: 100%;
}

.submit-button svg {
  height: 17px;
  width: 17px;
}

#hidden_iframe {
  display: none;
}

.site-footer {
  background: var(--navy-950);
  color: var(--slate-300);
  padding: 65px 0 25px;
}

.footer-main {
  align-items: center;
  display: grid;
  gap: 35px;
  grid-template-columns: 1.05fr 1.45fr auto;
}

.footer-business {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  font-size: 11px;
  gap: 12px 36px;
  margin-top: 38px;
  padding-top: 22px;
}

.footer-business strong {
  color: var(--white);
  font-weight: 700;
}

.footer-contact,
.footer-social {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  gap: 5px;
}

.footer-contact a,
.footer-social a {
  transition: color var(--transition);
}

.footer-contact a:hover,
.footer-social a:hover {
  color: var(--cyan-400);
}

.footer-social {
  text-align: right;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  font-size: 10px;
  justify-content: space-between;
  letter-spacing: 0.04em;
  margin-top: 22px;
  padding-top: 22px;
  text-transform: uppercase;
}

.modal-backdrop {
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgba(1, 7, 13, 0.84);
  display: flex;
  inset: 0;
  justify-content: center;
  overflow-y: auto;
  padding: 30px;
  position: fixed;
  z-index: 2000;
}

.modal-backdrop[hidden] {
  display: none;
}

.media-modal-panel,
.admin-modal-panel {
  animation: modalIn 280ms cubic-bezier(.2, .8, .2, 1);
  background: var(--navy-900);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.5);
  color: var(--white);
  margin: auto;
  overflow: hidden;
  position: relative;
  width: min(1100px, 100%);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
}

.media-modal-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.8fr);
  max-height: calc(100vh - 60px);
}

.modal-media {
  align-items: center;
  background: var(--navy-950);
  display: flex;
  justify-content: center;
  min-height: 520px;
  overflow: hidden;
}

.modal-media img,
.modal-media video,
.modal-media iframe {
  border: 0;
  height: 100%;
  max-height: calc(100vh - 60px);
  object-fit: contain;
  width: 100%;
}

.gallery-carousel {
  height: 100%;
  min-height: 520px;
  position: relative;
  width: 100%;
}

.gallery-carousel-image {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.carousel-control {
  align-items: center;
  background: rgba(3, 11, 20, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: var(--white);
  display: flex;
  height: 46px;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: background var(--transition), transform var(--transition);
  width: 46px;
}

.carousel-control:hover {
  background: var(--blue-600);
  transform: translateY(-50%) scale(1.06);
}

.carousel-control svg {
  height: 22px;
  width: 22px;
}

.carousel-previous {
  left: 18px;
}

.carousel-next {
  right: 18px;
}

.carousel-counter {
  backdrop-filter: blur(8px);
  background: rgba(3, 11, 20, 0.72);
  border-radius: 999px;
  bottom: 18px;
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  left: 50%;
  padding: 7px 12px;
  position: absolute;
  transform: translateX(-50%);
}

.modal-video-placeholder {
  align-items: center;
  color: var(--slate-300);
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: center;
  min-height: 420px;
  padding: 30px;
  text-align: center;
}

.modal-video-placeholder svg {
  color: var(--cyan-400);
  height: 62px;
  width: 62px;
}

.modal-content {
  align-self: center;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 58px 42px 42px;
}

.modal-category {
  color: var(--cyan-400);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.modal-content h2,
.admin-modal-panel h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.15;
  margin-top: 12px;
}

.modal-content p,
.admin-modal-panel > p {
  color: var(--slate-300);
  font-size: 14px;
  margin-top: 20px;
}

.admin-edit-trigger {
  margin-top: 28px;
  width: auto;
}

.modal-close {
  align-items: center;
  background: rgba(3, 11, 20, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: var(--white);
  display: flex;
  height: 42px;
  justify-content: center;
  position: absolute;
  right: 16px;
  top: 16px;
  transition: background var(--transition), transform var(--transition);
  width: 42px;
  z-index: 3;
}

.modal-close:hover {
  background: var(--blue-600);
  transform: rotate(5deg);
}

.modal-close svg {
  height: 19px;
  width: 19px;
}

.admin-modal-panel {
  max-width: 500px;
  padding: 48px;
}

.admin-form {
  display: flex;
  flex-direction: column;
  margin-top: 28px;
}

.admin-form label {
  color: var(--slate-300);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 16px 0 7px;
  text-transform: uppercase;
}

.admin-form input,
.admin-form textarea {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  color: var(--white);
  outline: 0;
  padding: 13px 15px;
  resize: vertical;
  width: 100%;
}

.admin-form input:focus,
.admin-form textarea:focus {
  border-color: var(--cyan-400);
  box-shadow: 0 0 0 3px rgba(53, 211, 232, 0.12);
}

.admin-form .button {
  margin-top: 25px;
}

.admin-error {
  color: #ff8585;
  font-size: 12px;
  min-height: 20px;
  padding-top: 8px;
}

body.modal-open {
  overflow: hidden;
}

.admin-edit-badge {
  align-items: center;
  background: var(--cyan-400);
  border: 0;
  border-radius: 999px;
  color: var(--navy-950);
  display: flex;
  font-size: 10px;
  font-weight: 800;
  gap: 5px;
  padding: 7px 11px;
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 5;
}

.admin-edit-badge svg {
  height: 13px;
  width: 13px;
}

.toast {
  align-items: center;
  background: var(--navy-900);
  border: 1px solid rgba(53, 211, 232, 0.25);
  border-radius: 999px;
  bottom: 28px;
  box-shadow: var(--shadow-lg);
  color: var(--white);
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 10px;
  left: 50%;
  opacity: 0;
  padding: 13px 20px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 30px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 1200;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast svg {
  color: var(--cyan-400);
  height: 20px;
  stroke-width: 2.5;
  width: 20px;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(.2, .8, .2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1050px) {
  .nav-links {
    gap: 22px;
  }

  .nav-panel {
    gap: 22px;
  }

  .about-layout,
  .contact-layout {
    gap: 55px;
  }

  .project-card,
  .project-card:nth-child(n) {
    grid-column: span 6;
  }

  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .video-card:last-child {
    grid-column: auto;
    max-width: none;
  }

  .media-modal-panel {
    grid-template-columns: 1.25fr minmax(300px, 0.75fr);
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 72px;
  }

  .section {
    padding: 95px 0;
  }

  .menu-toggle {
    display: block;
  }

  body.menu-open .site-header {
    backdrop-filter: none !important;
    background: var(--navy-950) !important;
    bottom: 0;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh;
    min-height: 100dvh;
    z-index: 1900 !important;
  }

  body.menu-open .navbar {
    align-items: flex-start;
    height: 72px;
    padding-top: 15px;
  }

  .nav-panel {
    align-items: stretch;
    background: rgba(3, 11, 20, 0.98);
    flex-direction: column;
    gap: 30px;
    inset: 0;
    justify-content: center;
    min-height: 100dvh;
    opacity: 0;
    padding: 90px 35px 45px;
    pointer-events: none;
    position: absolute;
    transform: translateY(-15px);
    transition: opacity var(--transition), transform var(--transition);
    z-index: 1;
  }

  body.menu-open #nav-panel.nav-panel.open {
    bottom: 0;
    height: 100vh;
    height: 100dvh;
    left: 0;
    opacity: 1 !important;
    pointer-events: auto !important;
    position: fixed;
    right: 0;
    top: 0;
    transition: none !important;
    transform: translateY(0) !important;
    z-index: 1901;
  }

  .nav-links {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .site-header .brand,
  .site-header .menu-toggle {
    z-index: 1902;
  }

  .nav-links a {
    font-family: "Space Grotesk", sans-serif;
    font-size: 35px;
    letter-spacing: -0.04em;
  }

  .language-toggle {
    align-self: flex-start;
  }

  .admin-login-button {
    align-self: flex-start;
    font-size: 13px;
  }

  .about-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .expertise-grid {
    grid-template-columns: 1fr;
  }

  .software-strip,
  .gallery-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 25px;
  }

  .software-list {
    gap: 20px 35px;
  }

  .hero-stats {
    margin-top: 60px;
  }

  .scroll-cue {
    display: none;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
  }

  .footer-social {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .media-modal-panel {
    display: block;
    max-height: none;
    width: min(680px, 100%);
  }

  .modal-media {
    min-height: 0;
  }

  .gallery-carousel {
    min-height: 0;
  }

  .modal-media img,
  .modal-media video,
  .modal-media iframe {
    aspect-ratio: 16 / 10;
    height: auto;
    max-height: 55vh;
  }

  .modal-content {
    max-height: none;
    padding: 35px;
  }
}

@media (max-width: 620px) {
  .container {
    padding-inline: 20px;
  }

  .navbar {
    padding-inline: 16px;
  }

  .brand-logo {
    height: 38px;
    width: 38px;
  }

  .brand-copy small {
    display: none;
  }

  .hero {
    background-position: 58% center;
  }

  .hero-content {
    padding-top: 120px;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 13vw, 4rem);
  }

  .hero h1 span {
    font-size: 0.42em;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .hero-stats {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
  }

  .stat {
    border-radius: var(--radius-sm) !important;
    padding: 15px;
  }

  .stat:last-child {
    grid-column: span 2;
  }

  .stat strong {
    font-size: 21px;
  }

  .about-layout {
    gap: 38px;
  }

  .section-heading h2,
  .contact-info h2 {
    font-size: 2.45rem;
  }

  .expertise-grid {
    margin-top: 55px;
  }

  .expertise-card {
    padding: 28px;
  }

  .parallax-band {
    background-attachment: scroll;
    min-height: 470px;
  }

  .about,
  .references,
  .gallery {
    background-attachment: scroll;
  }

  .project-grid {
    display: flex;
    flex-direction: column;
  }

  .project-card {
    height: min(410px, 108vw);
  }

  .project-overlay {
    padding: 24px;
    transform: translateY(0);
  }

  .project-overlay p {
    opacity: 1;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .video-card:last-child {
    grid-column: auto;
    max-width: none;
  }

  .video-copy {
    padding: 23px;
  }

  .video-empty-state {
    align-items: flex-start;
    flex-direction: column;
    padding: 30px 24px;
  }

  .contact-list > a,
  .contact-list > div {
    align-items: flex-start;
    max-width: 100%;
  }

  .contact-list > a span:last-child,
  .contact-list > div span:last-child {
    overflow-wrap: anywhere;
  }

  .social-links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .social-links a,
  .social-placeholder {
    justify-content: center;
  }

  .contact-form-wrap {
    border-radius: var(--radius-md);
    padding: 34px 25px;
  }

  .footer-main {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .footer-social {
    grid-column: auto;
    grid-row: auto;
    text-align: left;
  }

  .footer-business {
    flex-direction: column;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 5px;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .media-modal-panel,
  .admin-modal-panel {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    max-height: 94vh;
    overflow-y: auto;
    width: 100%;
  }

  .modal-media img,
  .modal-media video,
  .modal-media iframe {
    max-height: 42vh;
  }

  .gallery-carousel {
    aspect-ratio: 4 / 3;
  }

  .carousel-control {
    height: 40px;
    width: 40px;
  }

  .carousel-previous {
    left: 10px;
  }

  .carousel-next {
    right: 10px;
  }

  .modal-content,
  .admin-modal-panel {
    padding: 34px 22px 28px;
  }

  .modal-content h2,
  .admin-modal-panel h2 {
    padding-right: 35px;
  }

  .modal-close {
    height: 38px;
    right: 12px;
    top: 12px;
    width: 38px;
  }

  .admin-edit-trigger {
    width: 100%;
  }
}

/* ==========================================================================
   PREMIUM LAYER — preloader, ambient texture, cursor, hologram, glass,
   3D tilt, scroll-driven motion, stagger. Appended on top of the base
   system so every rule above still functions as a solid fallback.
   ========================================================================== */

/* ---- Page-load reveal: gold-lit curtain with logo mark -------------------- */
.preloader {
  align-items: center;
  animation: preloaderFallback 10ms linear 3400ms forwards;
  background: var(--ink-950);
  display: flex;
  inset: 0;
  justify-content: center;
  position: fixed;
  transition: opacity 700ms var(--ease-out), visibility 700ms var(--ease-out);
  z-index: 3000;
}

@keyframes preloaderFallback {
  to {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }
}

.preloader.is-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.preloader-mark {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.preloader-mark img {
  animation: preloaderPulse 1.8s ease-in-out infinite;
  border-radius: 14px;
  filter: drop-shadow(0 0 26px var(--gold-glow));
  height: 64px;
  width: 64px;
}

.preloader-line {
  background: rgba(227, 191, 116, 0.18);
  height: 1px;
  overflow: hidden;
  position: relative;
  width: 130px;
}

.preloader-line::after {
  animation: preloaderSweep 1.4s ease-in-out infinite;
  background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
  content: "";
  inset: 0;
  position: absolute;
}

.preloader-mark p {
  color: rgba(242, 220, 163, 0.75);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  letter-spacing: 0.34em;
}

@keyframes preloaderPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.82; }
}

@keyframes preloaderSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ---- Ambient grain for a filmic, high-end surface -------------------------- */
.grain-overlay {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/></svg>");
  inset: 0;
  mix-blend-mode: overlay;
  opacity: 0.5;
  pointer-events: none;
  position: fixed;
  z-index: 1050;
}

/* ---- Cursor glow: soft light that trails the pointer ----------------------- */
.cursor-glow {
  background: radial-gradient(circle, var(--gold-glow), transparent 68%);
  border-radius: 50%;
  height: 420px;
  left: 0;
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  top: 0;
  transition: opacity 400ms ease;
  width: 420px;
  will-change: transform;
  z-index: 5;
}

.cursor-glow.is-active {
  opacity: 1;
}

@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-glow,
  .grain-overlay {
    display: none;
  }
}

/* ---- Hero: layered beam light + two-column layout with hologram ---------- */
.hero-beam {
  background: conic-gradient(from 200deg at 82% 15%, rgba(227, 191, 116, 0.18), transparent 28%);
  inset: 0;
  mix-blend-mode: screen;
  position: absolute;
}

.hero-content {
  align-items: center;
  display: grid;
  gap: clamp(40px, 6vw, 90px);
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.hero-stats {
  margin-top: 0;
}

.hero-hologram {
  aspect-ratio: 1;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(227, 191, 116, 0.25);
  border-radius: var(--radius-md);
  backdrop-filter: blur(18px);
  overflow: hidden;
  position: relative;
  transform: perspective(1000px) rotateX(8deg) rotateY(-10deg);
  transform-style: preserve-3d;
  transition: transform 500ms var(--ease-spring), box-shadow 500ms var(--ease-spring);
  will-change: transform;
}

.hero-hologram::before {
  background: radial-gradient(circle at 30% 20%, rgba(227, 191, 116, 0.22), transparent 55%);
  content: "";
  inset: 0;
  position: absolute;
}

.hologram-grid {
  color: var(--gold-400);
  height: 100%;
  opacity: 0.85;
  padding: 20px;
  stroke-width: 0.6;
  width: 100%;
}

.hologram-plane {
  animation: hologramFloat 6s ease-in-out infinite;
  transform-origin: center;
}

@keyframes hologramFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.75; }
  50% { transform: translateY(-4px) scale(1.015); opacity: 1; }
}

.hologram-scanline {
  background: linear-gradient(180deg, transparent, rgba(53, 211, 232, 0.5), transparent);
  height: 40%;
  left: 0;
  position: absolute;
  right: 0;
  top: -40%;
  animation: hologramScan 4.5s ease-in-out infinite;
}

@keyframes hologramScan {
  0% { top: -40%; }
  100% { top: 100%; }
}

.hologram-corner {
  border-color: var(--gold-400);
  height: 22px;
  position: absolute;
  width: 22px;
  z-index: 2;
}

.hologram-corner.tl { border-left: 2px solid; border-top: 2px solid; left: 12px; top: 12px; }
.hologram-corner.tr { border-right: 2px solid; border-top: 2px solid; right: 12px; top: 12px; }
.hologram-corner.bl { border-bottom: 2px solid; border-left: 2px solid; bottom: 12px; left: 12px; }
.hologram-corner.br { border-bottom: 2px solid; border-right: 2px solid; bottom: 12px; right: 12px; }

.hologram-caption {
  background: rgba(5, 7, 10, 0.65);
  bottom: 0;
  color: rgba(242, 220, 163, 0.85);
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  left: 0;
  letter-spacing: 0.14em;
  padding: 10px 16px;
  position: absolute;
  right: 0;
  text-transform: uppercase;
  z-index: 2;
}

/* ---- Glassmorphism refinement: real depth via layered light -------------- */
.stat,
.video-card,
.contact-form-wrap,
.hero-hologram {
  position: relative;
}

.stat::before,
.video-card::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 45%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.stat {
  backdrop-filter: blur(16px) saturate(140%);
  overflow: hidden;
  transition: background var(--transition), transform var(--transition);
}

.stat:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-4px);
}

.contact-form-wrap {
  backdrop-filter: blur(20px);
  background: linear-gradient(165deg, rgba(16, 20, 28, 0.92), rgba(5, 7, 10, 0.96));
}

/* ---- 3D tilt targets: base perspective + smooth reset ---------------------- */
[data-tilt] {
  transition: transform 500ms var(--ease-spring);
  will-change: transform;
}

.project-card,
.video-card {
  transform-style: preserve-3d;
}

/* Corner HUD accents on portfolio + video cards, echoing the hologram motif */
.project-card::before,
.video-card .video-wrapper::before {
  border: 1px solid transparent;
  border-radius: inherit;
  content: "";
  inset: 10px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity var(--transition), inset var(--transition);
  z-index: 3;
}

.project-card:hover::before,
.video-card:hover .video-wrapper::before {
  border-color: rgba(227, 191, 116, 0.55);
  inset: 14px;
  opacity: 1;
}

/* ---- Reveal system: blur + scale + directional stagger -------------------- */
.reveal {
  filter: blur(6px);
  opacity: 0;
  transform: translateY(34px) scale(0.98);
  transition:
    opacity 800ms var(--ease-spring),
    transform 800ms var(--ease-spring),
    filter 800ms var(--ease-spring);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.reveal.visible {
  filter: blur(0);
  opacity: 1;
  transform: translateY(0) scale(1);
}

.expertise-grid .expertise-card:nth-child(1) { --i: 0; }
.expertise-grid .expertise-card:nth-child(2) { --i: 1; }
.expertise-grid .expertise-card:nth-child(3) { --i: 2; }

.hero-stats .stat:nth-child(1) { --i: 0; }
.hero-stats .stat:nth-child(2) { --i: 1; }
.hero-stats .stat:nth-child(3) { --i: 2; }

/* ---- Modern scroll-driven CSS animations (progressive enhancement) -------- */
@supports (animation-timeline: view()) {
  .hero-grid {
    animation: heroGridDrift linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }

  @keyframes heroGridDrift {
    from { transform: translateY(0) scale(1); opacity: 0.9; }
    to { transform: translateY(-60px) scale(1.06); opacity: 0.35; }
  }

  .project-card img,
  .video-wrapper img,
  .video-wrapper video {
    animation: mediaParallax linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 50%;
  }

  @keyframes mediaParallax {
    from { transform: scale(1.12) translateY(-3%); }
    to { transform: scale(1) translateY(0); }
  }

  .parallax-content h2 {
    animation: bandRise linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 45%;
  }

  @keyframes bandRise {
    from { transform: translateY(28px); opacity: 0.5; }
    to { transform: translateY(0); opacity: 1; }
  }
}

/* ---- Small-screen adjustments for the new hero layout --------------------- */
@media (max-width: 1050px) {
  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-side {
    flex-direction: row;
    align-items: center;
    gap: 30px;
  }

  .hero-hologram {
    flex: 0 0 200px;
    transform: perspective(1000px) rotateX(4deg) rotateY(-6deg);
  }

  .hero-stats {
    flex: 1;
  }
}

@media (max-width: 620px) {
  .hero-side {
    flex-direction: column;
  }

  .hero-hologram {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .parallax-band {
    background-attachment: scroll;
  }

  .reveal {
    filter: none;
    transform: none;
  }

  .preloader {
    display: none;
  }
}

/* ---- Continuous reference/video carousels -------------------------------- */
.carousel-shell {
  margin-inline: calc(50% - 50vw);
  overflow: hidden;
  padding: 14px clamp(18px, 4vw, 54px) 22px;
  position: relative;
}

.carousel-shell::before,
.carousel-shell::after {
  content: "";
  inset-block: 0;
  pointer-events: none;
  position: absolute;
  width: clamp(44px, 10vw, 150px);
  z-index: 4;
}

.carousel-shell::before {
  background: linear-gradient(90deg, var(--off-white), transparent);
  left: 0;
}

.carousel-shell::after {
  background: linear-gradient(270deg, var(--off-white), transparent);
  right: 0;
}

.gallery .carousel-shell::before {
  background: linear-gradient(90deg, rgba(7, 21, 37, 0.98), transparent);
}

.gallery .carousel-shell::after {
  background: linear-gradient(270deg, rgba(7, 21, 37, 0.98), transparent);
}

.carousel-viewport {
  cursor: grab;
  overflow-x: auto;
  overflow-y: visible;
  padding: 18px 0 30px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.carousel-viewport:active {
  cursor: grabbing;
}

.carousel-viewport::-webkit-scrollbar {
  display: none;
}

.carousel-track,
.project-grid.carousel-track,
.video-grid.carousel-track {
  align-items: stretch;
  display: flex;
  flex-direction: row;
  gap: clamp(18px, 2.2vw, 30px);
  grid-auto-rows: unset;
  grid-template-columns: none;
  width: max-content;
}

.carousel-track .project-card,
.carousel-track .project-card:nth-child(n) {
  flex: 0 0 clamp(292px, 34vw, 470px);
  grid-column: auto;
  height: clamp(360px, 36vw, 470px);
}

.carousel-track .video-card,
.carousel-track .video-card:last-child {
  flex: 0 0 clamp(300px, 31vw, 430px);
  grid-column: auto;
  max-width: none;
}

.carousel-track .video-wrapper {
  aspect-ratio: 16 / 10;
}

.carousel-card-clone {
  opacity: 0.96;
}

.carousel-arrow {
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(3, 11, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  color: var(--white);
  display: flex;
  height: 48px;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  width: 48px;
  z-index: 8;
}

.carousel-arrow:hover {
  background: var(--blue-500);
  border-color: rgba(255, 255, 255, 0.34);
  transform: translateY(-50%) scale(1.06);
}

.carousel-arrow svg {
  height: 22px;
  width: 22px;
}

.carousel-arrow-prev {
  left: clamp(12px, 2.4vw, 34px);
}

.carousel-arrow-next {
  right: clamp(12px, 2.4vw, 34px);
}

@media (max-width: 820px) {
  .carousel-shell {
    margin-inline: -18px;
    padding-inline: 18px;
  }

  .carousel-shell::before,
  .carousel-shell::after {
    width: 48px;
  }

  .carousel-track .project-card,
  .carousel-track .project-card:nth-child(n) {
    flex-basis: min(82vw, 360px);
    height: min(430px, 112vw);
  }

  .carousel-track .video-card,
  .carousel-track .video-card:last-child {
    flex-basis: min(84vw, 360px);
  }

  .carousel-arrow {
    height: 42px;
    width: 42px;
  }
}

/* ---- Requested logo placement and featured carousel behavior ------------- */
.hologram-logo {
  border-radius: 14px;
  filter:
    drop-shadow(0 0 22px rgba(227, 191, 116, 0.42))
    drop-shadow(0 0 34px rgba(18, 167, 232, 0.18));
  inset: 50% auto auto 50%;
  max-width: 56%;
  opacity: 0.86;
  pointer-events: none;
  position: absolute;
  transform: translate(-50%, -50%) translateZ(34px);
  width: 210px;
  z-index: 3;
}

.hero-hologram .hologram-grid {
  opacity: 0.34;
}

.featured-carousel .carousel-viewport,
.carousel-viewport {
  scroll-snap-type: x mandatory;
}

.carousel-track .project-card,
.carousel-track .project-card:nth-child(n),
.carousel-track .video-card,
.carousel-track .video-card:last-child {
  flex-basis: clamp(235px, 23vw, 330px);
  opacity: 0.54;
  scroll-snap-align: center;
  transform: scale(0.88);
  transition:
    flex-basis 700ms cubic-bezier(.16, 1, .3, 1),
    opacity 500ms ease,
    transform 700ms cubic-bezier(.16, 1, .3, 1),
    filter 500ms ease,
    box-shadow 500ms ease;
}

.carousel-track .project-card.is-hidden,
.carousel-track .video-card.is-hidden {
  display: none;
}

.carousel-track .project-card.is-active,
.carousel-track .project-card.is-active:nth-child(n) {
  flex-basis: clamp(360px, 43vw, 620px);
  opacity: 1;
  transform: scale(1);
  z-index: 3;
}

.carousel-track .video-card.is-active,
.carousel-track .video-card.is-active:last-child {
  flex-basis: clamp(360px, 41vw, 590px);
  opacity: 1;
  transform: scale(1);
  z-index: 3;
}

.carousel-track .project-card.is-neighbor,
.carousel-track .video-card.is-neighbor {
  opacity: 0.76;
  transform: scale(0.93);
  z-index: 2;
}

.carousel-track .project-card.is-left-2,
.carousel-track .project-card.is-right-2 {
  opacity: 0.48;
  transform: scale(0.82);
  z-index: 1;
}

.carousel-track .project-card.is-left-1,
.carousel-track .project-card.is-right-1,
.carousel-track .video-card.is-left-1,
.carousel-track .video-card.is-right-1 {
  opacity: 0.78;
  transform: scale(0.9);
  z-index: 2;
}

.carousel-track .project-card.is-dimmed,
.carousel-track .video-card.is-dimmed {
  filter: saturate(0.72);
}

.carousel-track .project-card.is-active .project-overlay {
  transform: translateY(0);
}

.carousel-track .project-card.is-active .project-overlay p {
  opacity: 1;
}

.carousel-track .project-card.is-active img {
  filter: saturate(1.04) contrast(1.04);
  transform: scale(1.035);
}

.carousel-track .video-card.is-active {
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.26);
}

.video-carousel .carousel-track {
  gap: 28px;
  justify-content: center;
  min-width: 100%;
  width: 100%;
}

.video-carousel .carousel-track .video-card,
.video-carousel .carousel-track .video-card:last-child {
  flex: 0 0 calc((100% - 46% - 56px) / 2);
}

.video-carousel .carousel-track .video-card.is-active,
.video-carousel .carousel-track .video-card.is-active:last-child {
  flex: 0 0 46%;
}

.video-carousel .carousel-track .video-card.is-left-1,
.video-carousel .carousel-track .video-card.is-right-1 {
  flex: 0 0 calc((100% - 46% - 56px) / 2);
}

@media (max-width: 820px) {
  .hologram-logo {
    max-width: 62%;
    width: 170px;
  }

  .carousel-track .project-card,
  .carousel-track .project-card:nth-child(n),
  .carousel-track .video-card,
  .carousel-track .video-card:last-child {
    flex-basis: min(68vw, 300px);
    transform: scale(0.92);
  }

  .carousel-track .project-card.is-active,
  .carousel-track .project-card.is-active:nth-child(n),
  .carousel-track .video-card.is-active,
  .carousel-track .video-card.is-active:last-child {
    flex-basis: min(86vw, 390px);
  }

  .video-carousel .carousel-track {
    justify-content: flex-start;
  }

  .video-carousel .carousel-track .video-card,
  .video-carousel .carousel-track .video-card:last-child,
  .video-carousel .carousel-track .video-card.is-left-1,
  .video-carousel .carousel-track .video-card.is-right-1 {
    flex-basis: min(66vw, 280px);
  }

  .video-carousel .carousel-track .video-card.is-active,
  .video-carousel .carousel-track .video-card.is-active:last-child {
    flex-basis: min(86vw, 390px);
  }
}
