/* Devantia Technologies — Production-aligned styles */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

:root {
  --bg-dark: #050a0f;
  --bg-surface: #0d1520;
  --brand-green: #7ed348;
  --brand-teal: #2a9d8f;
  --brand-blue: #1a6fba;
  --text-main: #e8f0f7;
  --text-muted: rgba(232, 240, 247, 0.7);
  --neon-gradient: linear-gradient(135deg, #7ed348 0%, #2a9d8f 50%, #1a6fba 100%);
  --brand-gradient: linear-gradient(135deg, #7ed348, #2a9d8f);
  --nav-height: 4.25rem;
  --max-content: 1200px;
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

body.has-custom-cursor,
body.has-custom-cursor a,
body.has-custom-cursor button {
  cursor: none;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

.gradient-text {
  background: var(--neon-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Page journey + section headers --- */
.page-section {
  position: relative;
  z-index: 1;
  scroll-margin-top: var(--nav-height);
}

#hero.page-section {
  background: var(--bg-dark);
}

#services.page-section {
  background: linear-gradient(180deg, #050a0f 0%, #060c14 52%, #071018 100%);
}

.process-band.page-section {
  background: linear-gradient(180deg, #071018 0%, #08141c 50%, #07121a 100%);
  padding: 0;
  overflow: hidden;
}

.process-band__stage {
  position: relative;
  min-height: clamp(260px, 34vw, 340px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.process-band__canvas,
.process-band__fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.process-band__canvas {
  opacity: 0;
  z-index: 0;
}

.process-band__fallback {
  z-index: 0;
  opacity: 1;
  transition: opacity 0.45s ease;
}

.process-band.is-live .process-band__canvas {
  opacity: 1;
}

.process-band.is-live .process-band__fallback {
  opacity: 0;
}

.process-band.is-fallback .process-band__fallback {
  opacity: 0.85;
}

.process-band__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 3.5rem 24px;
  text-align: center;
}

.process-band__eyebrow {
  margin-bottom: 0;
}

.process-band__title {
  margin-top: 0.65rem;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.process-band__steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 1.25rem;
  margin-top: 1.35rem;
  padding: 0;
  list-style: none;
}

.process-band__steps li {
  position: relative;
}

.process-band__step-label {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(232, 240, 247, 0.88);
  border: 1px solid rgba(126, 211, 72, 0.22);
  border-radius: 999px;
  background: rgba(5, 10, 15, 0.55);
  backdrop-filter: blur(6px);
}

.process-band__steps li:nth-child(2) .process-band__step-label {
  border-color: rgba(42, 157, 143, 0.28);
}

.process-band__steps li:nth-child(3) .process-band__step-label {
  border-color: rgba(26, 111, 186, 0.28);
}

.process-band__steps li:nth-child(4) .process-band__step-label {
  border-color: rgba(126, 211, 72, 0.32);
}

#portfolio.page-section {
  background: linear-gradient(180deg, #07121a 0%, #08121a 48%, #0a1018 100%);
}

#about.page-section {
  background: linear-gradient(180deg, #0a1018 0%, #0a1119 50%, #09121c 100%);
}

#contact.page-section {
  background: linear-gradient(180deg, #09121c 0%, #081018 55%, #070d14 100%);
}

.page-section[data-chapter]:not(#hero)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: clamp(3rem, 8vw, 5.5rem);
  background: linear-gradient(to bottom, rgba(5, 10, 15, 0.55), transparent);
  pointer-events: none;
  z-index: 0;
}

.section-header {
  position: relative;
  z-index: 1;
  margin-bottom: 3rem;
}

.section-header__eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0;
  color: rgba(232, 240, 247, 0.9);
}

.section-header__title {
  margin-top: 0.75rem;
  font-size: clamp(1.85rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.1;
  width: fit-content;
}

.section-header__subtitle {
  margin-top: 1rem;
  max-width: 640px;
  color: rgba(232, 240, 247, 0.75);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.7;
}

.portfolio-section .section-header__title {
  max-width: 18ch;
}

.chapter-nav {
  display: none;
}

@media (min-width: 1024px) {
  .chapter-nav {
    display: block;
    position: fixed;
    right: 1.35rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
    pointer-events: none;
  }

  .chapter-nav__list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .chapter-nav__link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    pointer-events: auto;
    color: rgba(232, 240, 247, 0.42);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.25s ease;
    border-radius: 4px;
    padding-right: 13px;
  }

  .chapter-nav__link:hover,
  .chapter-nav__link:focus-visible {
    color: rgba(232, 240, 247, 0.82);
    outline: none;
  }

  .chapter-nav__link:focus-visible .chapter-nav__dot {
    box-shadow: 0 0 0 2px rgba(126, 211, 72, 0.45);
  }

  .chapter-nav__dot {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1px solid rgba(232, 240, 247, 0.28);
    background: transparent;
    transition:
      transform 0.25s ease,
      background-color 0.25s ease,
      border-color 0.25s ease;
  }

  .chapter-nav__link.is-active {
    color: var(--text-main);
  }

  .chapter-nav__link.is-active .chapter-nav__dot {
    background: var(--brand-green);
    border-color: var(--brand-green);
    transform: translateY(-50%) scale(1.2);
  }

  .chapter-nav__label {
    opacity: 0;
    transform: translateX(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    white-space: nowrap;
    padding-right: 0.55rem;
  }

  .chapter-nav__link:hover .chapter-nav__label,
  .chapter-nav__link:focus-visible .chapter-nav__label,
  .chapter-nav__link.is-active .chapter-nav__label {
    opacity: 1;
    transform: translateX(0);
  }
}

/* --- Plexus canvas (hero only) --- */
.plexus-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* --- Custom cursor --- */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
}

body.has-custom-cursor .custom-cursor { opacity: 1; }

.custom-cursor__dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-green);
  box-shadow: 0 0 10px rgba(126, 211, 72, 0.85);
  will-change: transform;
}

.custom-cursor__ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(126, 211, 72, 0.55);
  will-change: transform;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.custom-cursor.is-active .custom-cursor__ring {
  border-color: rgba(126, 211, 72, 0.85);
  box-shadow: 0 0 14px rgba(126, 211, 72, 0.35);
}

/* --- Header (fixed overlay — hero is full viewport behind it) --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  width: 100%;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 clamp(20px, 4vw, 48px);
  height: var(--nav-height);
  background: rgba(5, 10, 15, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.35s ease, border-color 0.35s ease;
}

.site-header.is-scrolled .navbar {
  background: rgba(5, 10, 15, 0.92);
  border-bottom-color: rgba(126, 211, 72, 0.2);
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.navbar__logo em {
  font-style: normal;
  font-weight: 600;
  background: var(--neon-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar__links { display: none; align-items: center; gap: 2rem; }
.navbar__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(232, 240, 247, 0.75);
  transition: color 0.2s ease;
}
.navbar__links a:hover { color: var(--brand-green); }

.navbar__actions { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(126, 211, 72, 0.4);
  border-radius: 999px;
  color: var(--text-main);
}

.lang-switch__inactive { color: rgba(232, 240, 247, 0.45); }
.lang-switch__sep { opacity: 0.35; }

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  border-radius: 0.5rem;
}
.menu-toggle__bar {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.menu-toggle.is-open .menu-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open .menu-toggle__bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-open .menu-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 10, 15, 0.97);
  backdrop-filter: blur(24px);
  visibility: hidden;
  opacity: 0;
  transform: translateX(100%);
  transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s;
}
.mobile-menu.is-open { visibility: visible; opacity: 1; transform: translateX(0); }
.mobile-menu__links { text-align: center; }
.mobile-menu__links a { display: block; font-size: 1.5rem; font-weight: 600; padding: 0.85rem; }
.lang-switch--mobile { margin-top: 2rem; width: 100%; justify-content: center; }
body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  touch-action: none;
  overscroll-behavior: none;
}

/* --- Hero (full viewport; --vh set from visualViewport on mobile) --- */
.hero-section {
  position: relative;
  z-index: 1;
  overflow: hidden;
  height: 100vh;
  height: 100svh;
  height: calc(var(--vh, 1vh) * 100);
  text-align: center;
  box-sizing: border-box;
}

.hero-section__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 100% at 50% 50%, transparent 35%, rgba(5, 10, 15, 0.65) 72%, rgba(5, 10, 15, 0.95) 100%),
    radial-gradient(ellipse 75% 58% at 50% 48%, rgba(5, 10, 15, 0.42) 0%, transparent 68%);
}

.hero-section__grain {
  position: absolute;
  inset: -20%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.042;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  animation: hero-grain 0.55s steps(5) infinite;
}

@keyframes hero-grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, -4%); }
  40% { transform: translate(4%, 2%); }
  60% { transform: translate(-2%, 5%); }
  80% { transform: translate(3%, -3%); }
  100% { transform: translate(0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-section__grain { animation: none; }
}

.hero-section__stage {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--nav-height) 24px calc(3.5rem + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

.hero-section__inner {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  pointer-events: auto;
  perspective: 900px;
  text-shadow: 0 2px 28px rgba(5, 10, 15, 0.75);
}

body.is-entering .navbar {
  opacity: 0;
}

.hero-section:not(.is-revealed) .hero-section__tagline,
.hero-section:not(.is-revealed) .hero-section__subheadline,
.hero-section:not(.is-revealed) .hero-section__actions > *,
.hero-section:not(.is-revealed) .hero-scroll-hint {
  opacity: 0;
}

.hero-section:not(.is-revealed) .hero-section__title-word {
  opacity: 1;
  visibility: visible;
  transform: translateY(18px);
}

.hero-section__tagline {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-green);
}

.hero-section__title {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2em 0.35em;
  min-height: 2.15em;
  font-size: clamp(2.25rem, 7vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.hero-section__title-word {
  display: inline-block;
  transform-style: preserve-3d;
}

.hero-section__subheadline {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: rgba(232, 240, 247, 0.85);
  max-width: 640px;
  line-height: 1.7;
}

.hero-section__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.hero-section__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 999px;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.hero-section__cta--primary {
  background: var(--brand-gradient);
  color: #050a0f;
  box-shadow: 0 4px 24px rgba(126, 211, 72, 0.25);
}

.hero-section__cta--ghost {
  border: 1px solid transparent;
  color: var(--text-main);
  background:
    linear-gradient(var(--bg-dark), var(--bg-dark)) padding-box,
    var(--neon-gradient) border-box;
}

.hero-section__cta:hover { transform: scale(1.02); filter: brightness(1.08); }

.hero-scroll-hint {
  position: absolute;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(232, 240, 247, 0.45);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: opacity 0.5s ease;
}

.hero-scroll-hint__line {
  display: block;
  width: 1px;
  height: 2.25rem;
  background: linear-gradient(to bottom, rgba(126, 211, 72, 0.55), transparent);
  transform-origin: top center;
  will-change: transform, opacity;
}

.hero-scroll-hint__ring {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid rgba(232, 240, 247, 0.25);
  will-change: transform, opacity;
}

.hero-scroll-hint__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-green);
  box-shadow: 0 0 8px rgba(126, 211, 72, 0.6);
  will-change: transform, opacity;
}

.hero-scroll-hint__chev {
  display: flex;
  color: rgba(232, 240, 247, 0.55);
  line-height: 1;
}

/* --- Services: pinned desktop / stacked mobile (no section title) --- */
.services-section {
  overflow-x: hidden;
}

.services-pin {
  display: none;
}

.services-strip {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.services-strip .service-panel__content,
.services-strip .service-panel__visual,
.services-strip .service-panel__svg {
  opacity: 1;
}

.services-strip .service-panel.js-reveal {
  opacity: 0;
  transition: opacity 0.75s cubic-bezier(0.33, 1, 0.68, 1);
}

.services-strip .service-panel.js-reveal.is-revealed {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .services-strip .service-panel.js-reveal {
    opacity: 1;
    transition: none;
  }
}

@media (max-width: 767px) {
  .services-pin {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  .services-strip {
    display: block !important;
  }
}

.service-panel {
  --mx: 50%;
  --my: 50%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: calc(var(--vh, 1vh) * 100);
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2rem;
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 4rem 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .services-pin {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100svh;
    height: calc(var(--vh, 1vh) * 100);
    overflow: hidden;
    background: var(--bg-dark);
    box-sizing: border-box;
  }

  .services-strip {
    display: none;
  }

  .services-pin__mesh {
    position: absolute;
    inset: 0;
    opacity: 0.5;
    pointer-events: none;
    background-image:
      linear-gradient(rgba(232, 240, 247, 0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(232, 240, 247, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
  }

  .services-pin__layout {
    position: relative;
    z-index: 1;
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    max-width: var(--max-content);
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 0;
  }

  .services-pin__text {
    position: relative;
    min-height: 320px;
    max-width: 560px;
    padding-right: 1rem;
  }

  .services-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    will-change: opacity, transform;
  }

  .services-slide.is-active {
    visibility: visible;
    pointer-events: auto;
  }

  .services-pin__visuals {
    position: relative;
    min-height: 40vh;
  }

  .services-visual {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent, var(--brand-green));
    opacity: 0;
    visibility: hidden;
    transform: translateY(0);
    pointer-events: none;
    will-change: opacity;
  }

  .services-dots {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 0 1.5rem;
  }

  .services-dots__btn {
    min-width: 2.5rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(232, 240, 247, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  }

  .services-dots__btn.is-active,
  .services-dots__btn:hover {
    color: var(--brand-green);
    border-color: rgba(126, 211, 72, 0.35);
    background: rgba(126, 211, 72, 0.08);
  }
}

.service-panel__content {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.service-panel__num {
  display: block;
  font-size: clamp(4rem, 18vw, 10rem);
  font-weight: 800;
  line-height: 1;
}

.services-slide .service-panel__num,
.service-panel__num {
  background: var(--neon-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.service-panel__title {
  margin-top: 1rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.service-panel__text {
  margin-top: 1.25rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 560px;
}

.service-panel__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  color: var(--accent, var(--brand-green));
}

.service-panel__svg {
  width: min(100%, 420px);
  height: min(50vh, 420px);
  max-height: 420px;
}

@media (min-width: 1024px) {
  .service-panel {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 0 40px;
  }

  .service-panel__content {
    padding-right: 1rem;
  }

  .service-panel__visual {
    min-height: 0;
    justify-content: center;
    align-items: center;
  }
}

/* --- Portfolio (alternating editorial rows) --- */
.portfolio-section {
  position: relative;
  z-index: 1;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 5rem 24px;
  overflow-x: hidden;
}

.portfolio-list {
  display: flex;
  flex-direction: column;
  gap: clamp(3.5rem, 9vw, 6.5rem);
}

.section-cta {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.portfolio-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.portfolio-item__media {
  position: relative;
  border-radius: 1.15rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: var(--bg-surface);
  aspect-ratio: 16 / 10;
}

.portfolio-item__media-inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.portfolio-item__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-item__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(126, 211, 72, 0.14) 0%, transparent 48%, rgba(26, 111, 186, 0.12) 100%);
  opacity: 0.35;
  transition: opacity 0.4s ease;
}

.portfolio-item__index {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brand-green);
  background: rgba(5, 10, 15, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(126, 211, 72, 0.25);
}

.portfolio-item__content {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.portfolio-reveal {
  opacity: 0;
  transition: opacity 0.85s cubic-bezier(0.33, 1, 0.68, 1);
}

.portfolio-reveal.is-revealed {
  opacity: 1;
}

#portfolio .section-header > .portfolio-reveal.is-revealed:nth-child(1) {
  transition-delay: 0s;
}

#portfolio .section-header > .portfolio-reveal.is-revealed:nth-child(2) {
  transition-delay: 0.08s;
}

#portfolio .section-header > .portfolio-reveal.is-revealed:nth-child(3) {
  transition-delay: 0.16s;
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-reveal {
    opacity: 1;
    transition: none;
  }
}

.portfolio-item__title {
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-main);
}

.portfolio-item__description {
  font-size: clamp(0.92rem, 2.2vw, 1.05rem);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 52ch;
}

.portfolio-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
  list-style: none;
}

.portfolio-item__tags li {
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(126, 211, 72, 0.9);
  border: 1px solid rgba(126, 211, 72, 0.28);
  border-radius: 999px;
  background: rgba(126, 211, 72, 0.06);
}

@media (min-width: 900px) {
  .portfolio-item {
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(2rem, 4vw, 4rem);
  }

  .portfolio-item:nth-child(even) {
    grid-template-columns: 0.85fr 1.15fr;
  }

  .portfolio-item:nth-child(even) .portfolio-item__media { order: 2; }
  .portfolio-item:nth-child(even) .portfolio-item__content { order: 1; }

  .portfolio-item__content {
    padding: 0 0.5rem;
  }
}

@media (hover: hover) and (pointer: fine) {
  .portfolio-item:hover .portfolio-item__overlay {
    opacity: 0.55;
  }

  .portfolio-item:hover .portfolio-item__media {
    border-color: rgba(126, 211, 72, 0.28);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
  }
}

/* --- About / Team (editorial cards) --- */
.about-section {
  padding: clamp(3.5rem, 8vw, 5.5rem) 24px;
  overflow-x: hidden;
}

.about-section__container {
  max-width: var(--max-content);
  margin: 0 auto;
}

.about-section__header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.about-section__header .section-header__title {
  max-width: none;
}

.about-intro {
  max-width: 42rem;
  margin: 0 auto 3.5rem;
  text-align: center;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.75;
  letter-spacing: -0.01em;
  color: rgba(232, 240, 247, 0.78);
}

.about-team {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 2rem 1.5rem 1.75rem;
  border-radius: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 18, 28, 0.82);
  text-align: center;
}

.team-card__portrait {
  width: 7.25rem;
  height: 7.25rem;
  margin: 0 0 1.25rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(126, 211, 72, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32);
  flex-shrink: 0;
}

.team-card__portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  flex: 1;
}

.team-card__name {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.team-card__role {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--brand-green);
  margin-bottom: 1rem;
  line-height: 1.5;
  max-width: 26ch;
}

.team-card__bio {
  width: 100%;
  overflow: hidden;
  text-align: left;
}

.team-card__description {
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(232, 240, 247, 0.68);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.team-card__bio.is-expanded .team-card__description {
  display: block;
  -webkit-line-clamp: unset;
}

.team-card__more {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 0.75rem;
  padding: 0.35rem 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-green);
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 2.75rem;
}

.team-card__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  list-style: none;
  width: 100%;
}

.team-card__tags li {
  padding: 0.25rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(232, 240, 247, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.about-section__cta {
  margin-top: 3.5rem;
}

.about-reveal {
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.33, 1, 0.68, 1);
}

.about-reveal.is-revealed {
  opacity: 1;
}

#about .section-header > .about-reveal.is-revealed:nth-child(1) {
  transition-delay: 0s;
}

#about .section-header > .about-reveal.is-revealed:nth-child(2) {
  transition-delay: 0.06s;
}

#about .about-intro.about-reveal.is-revealed {
  transition-delay: 0.12s;
}

#about .about-team .about-reveal.is-revealed:nth-child(1) {
  transition-delay: 0.2s;
}

#about .about-team .about-reveal.is-revealed:nth-child(2) {
  transition-delay: 0.28s;
}

#about .about-team .about-reveal.is-revealed:nth-child(3) {
  transition-delay: 0.36s;
}

@media (prefers-reduced-motion: reduce) {
  .about-reveal {
    opacity: 1;
    transition: none;
  }
}

@media (min-width: 768px) {
  .team-card__portrait {
    width: 7.75rem;
    height: 7.75rem;
  }
}

@media (min-width: 1024px) {
  .about-intro {
    margin-bottom: 4rem;
  }

  .about-team {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: stretch;
  }

  .team-card {
    padding: 2.25rem 1.5rem 2rem;
  }

  .team-card__portrait {
    width: 8rem;
    height: 8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-card__bio {
    transition: none;
  }
}

/* --- Contact --- */
.contact-section {
  position: relative;
  z-index: 1;
  padding: 5rem 24px 5.5rem;
  overflow-x: hidden;
}

.contact-section__accent {
  position: absolute;
  top: 2.5rem;
  left: 0;
  width: 100%;
  height: clamp(120px, 22vw, 200px);
  pointer-events: none;
}

.contact-section__accent-path {
  stroke-linecap: round;
}

.contact-section__content {
  position: relative;
  z-index: 1;
  max-width: var(--max-content);
  margin: 0 auto;
}

.contact-reveal {
  opacity: 0;
  transition: opacity 0.85s cubic-bezier(0.33, 1, 0.68, 1);
}

.contact-reveal.is-revealed {
  opacity: 1;
}

.contact-section__accent.contact-reveal.is-revealed {
  opacity: 0.85;
}

#contact .section-header > .contact-reveal.is-revealed:nth-child(1) {
  transition-delay: 0.04s;
}

#contact .section-header > .contact-reveal.is-revealed:nth-child(2) {
  transition-delay: 0.1s;
}

#contact .section-header > .contact-reveal.is-revealed:nth-child(3) {
  transition-delay: 0.16s;
}

.contact-form__group.contact-reveal.is-revealed:nth-of-type(1) { transition-delay: 0.22s; }
.contact-form__group.contact-reveal.is-revealed:nth-of-type(2) { transition-delay: 0.28s; }
.contact-form__group.contact-reveal.is-revealed:nth-of-type(3) { transition-delay: 0.34s; }
.contact-form__group.contact-reveal.is-revealed:nth-of-type(4) { transition-delay: 0.4s; }
.contact-form__group.contact-reveal.is-revealed:nth-of-type(5) { transition-delay: 0.46s; }
.contact-form__group.contact-reveal.is-revealed:nth-of-type(6) { transition-delay: 0.52s; }

.contact-form__submit.contact-reveal.is-revealed {
  transition-delay: 0.58s;
}

@media (prefers-reduced-motion: reduce) {
  .contact-reveal {
    opacity: 1;
    transition: none;
  }

  .contact-section__accent.contact-reveal {
    opacity: 0.85;
  }
}

.contact-form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.contact-form__label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  display: block;
  color: rgba(232, 240, 247, 0.88);
  transition: color 0.2s ease;
}

.contact-form__group {
  display: flex;
  flex-direction: column;
}

.contact-form__group:focus-within .contact-form__label {
  color: var(--brand-green);
}

.contact-form__group--pills:focus-within .contact-form__label--pills {
  color: rgba(232, 240, 247, 0.88);
}

.contact-form__label--pills {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 240, 247, 0.55);
  margin-bottom: 0.65rem;
}

.contact-form__group--step {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: -1.15rem;
  pointer-events: none;
  transition:
    max-height 0.45s cubic-bezier(0.33, 1, 0.68, 1),
    opacity 0.35s ease,
    margin-top 0.35s ease;
}

.contact-form__group--step.is-open {
  max-height: 220px;
  opacity: 1;
  margin-top: 0;
  pointer-events: auto;
}

.contact-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.contact-pill {
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(232, 240, 247, 0.82);
  background: rgba(13, 21, 32, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  cursor: pointer;
  transition:
    border-color 0.22s ease,
    color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

@media (hover: hover) and (pointer: fine) {
  .contact-pill:hover {
    border-color: rgba(126, 211, 72, 0.45);
    color: var(--text-main);
  }
}

.contact-pill[aria-pressed="true"] {
  color: var(--text-main);
  border-color: var(--brand-green);
  background: rgba(126, 211, 72, 0.1);
  box-shadow: 0 0 0 1px rgba(126, 211, 72, 0.15);
}

.contact-pill:focus-visible {
  outline: 2px solid var(--brand-green);
  outline-offset: 2px;
}

.contact-form__input {
  width: 100%;
  padding: 0.9rem 1rem;
  font-size: 16px;
  color: var(--text-main);
  background: rgba(13, 21, 32, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  outline: none;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease;
}

.contact-form__input::placeholder {
  color: rgba(232, 240, 247, 0.35);
}

.contact-form__input:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(13, 21, 32, 0.92);
}

.contact-form__input:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(126, 211, 72, 0.18);
  background: rgba(13, 21, 32, 0.95);
}

.contact-form__input:focus-visible {
  outline: 2px solid var(--brand-green);
  outline-offset: 2px;
}

.contact-form__textarea {
  min-height: 148px;
  resize: vertical;
}

.contact-form__submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.35rem;
  padding: 1rem 1.5rem;
  min-height: 3rem;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #050a0f;
  background: var(--brand-gradient);
  border-radius: 10px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 4px 18px rgba(42, 157, 143, 0.22);
  transition:
    transform 0.28s var(--ease-premium),
    box-shadow 0.28s ease,
    filter 0.28s ease;
}

.contact-form__submit-text {
  position: relative;
  z-index: 1;
}

.contact-form__submit-line {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 0.55rem;
  height: 2px;
  border-radius: 2px;
  background: rgba(5, 10, 15, 0.35);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-premium);
}

@media (hover: hover) and (pointer: fine) {
  .contact-form__submit:hover {
    transform: scale(1.03);
    box-shadow:
      0 8px 28px rgba(126, 211, 72, 0.32),
      0 0 0 1px rgba(126, 211, 72, 0.2);
    filter: brightness(1.06);
  }

  .contact-form__submit:hover .contact-form__submit-line {
    transform: scaleX(1);
  }
}

.contact-form__submit:active {
  transform: scale(0.98);
  box-shadow: 0 2px 10px rgba(42, 157, 143, 0.2);
}

.contact-form__submit:focus-visible {
  outline: 2px solid var(--brand-green);
  outline-offset: 3px;
  box-shadow:
    0 0 0 4px rgba(126, 211, 72, 0.2),
    0 8px 28px rgba(126, 157, 143, 0.28);
}

.contact-form__submit.is-pressed {
  transform: scale(0.97);
}

.contact-form__submit.is-loading {
  opacity: 0.78;
  cursor: wait;
  pointer-events: none;
}

.contact-form__honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form__status {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.45;
  border: 1px solid transparent;
}

.contact-form__status.is-pending {
  color: rgba(232, 240, 247, 0.85);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.contact-form__status.is-success {
  color: #d7f7c2;
  background: rgba(126, 211, 72, 0.12);
  border-color: rgba(126, 211, 72, 0.35);
}

.contact-form__status.is-error {
  color: #ffd0d0;
  background: rgba(255, 80, 80, 0.12);
  border-color: rgba(255, 80, 80, 0.35);
}

.footer-reveal {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.33, 1, 0.68, 1);
}

.footer-reveal.is-revealed {
  opacity: 1;
}

.site-footer__item.footer-reveal.is-revealed:nth-child(1) {
  transition-delay: 0s;
}

.site-footer__item.footer-reveal.is-revealed:nth-child(2) {
  transition-delay: 0.07s;
}

.site-footer__item.footer-reveal.is-revealed:nth-child(3) {
  transition-delay: 0.14s;
}

@media (prefers-reduced-motion: reduce) {
  .footer-reveal {
    opacity: 1;
    transition: none;
  }
}

/* --- Footer --- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2.5rem 24px 3rem;
  background: rgba(5, 10, 15, 0.6);
}

.site-footer__inner {
  max-width: var(--max-content);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.site-footer__link {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
  border-radius: 4px;
}

.site-footer__link:hover {
  color: var(--brand-green);
}

.site-footer__link:focus-visible {
  outline: 2px solid var(--brand-green);
  outline-offset: 3px;
  color: var(--brand-green);
}

.site-footer__sep {
  opacity: 0.35;
  margin: 0 0.35rem;
}

.site-footer__legal {
  font-size: 0.8rem;
  color: rgba(232, 240, 247, 0.5);
}

/* --- Desktop nav --- */
@media (min-width: 768px) {
  .navbar__links { display: flex; margin-left: auto; margin-right: 1rem; }
  .navbar__actions { margin-left: 0; }
  .menu-toggle { display: none; }
  .mobile-menu { display: none !important; }
  .lang-switch--mobile { display: none; }

  .site-footer__inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    text-align: left;
  }
}

@media (max-width: 767px) {
  .navbar {
    padding: 0 16px;
    gap: 0.5rem;
  }

  .navbar__logo {
    font-size: 0.82rem;
    min-width: 0;
  }

  .navbar__logo img {
    width: 24px;
    height: 24px;
  }

  .navbar__logo span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .lang-switch {
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
  }

  .hero-section__stage {
    padding: var(--nav-height) 20px calc(3rem + env(safe-area-inset-bottom, 0px));
  }

  .hero-section__shade {
    background:
      radial-gradient(ellipse 130% 105% at 50% 50%, transparent 30%, rgba(5, 10, 15, 0.7) 70%, rgba(5, 10, 15, 0.96) 100%),
      radial-gradient(ellipse 90% 65% at 50% 46%, rgba(5, 10, 15, 0.48) 0%, transparent 72%);
  }

  .hero-section__grain { opacity: 0.035; }

  .hero-section__inner {
    gap: 1rem;
    max-width: 100%;
  }

  .hero-section__tagline {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
  }

  .hero-section__title {
    font-size: clamp(1.65rem, 7.5vw, 2.25rem);
  }

  .hero-section__subheadline {
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .hero-section__actions {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    margin-top: 0.25rem;
  }

  .hero-section__cta {
    width: 100%;
    padding: 0.8rem 1.25rem;
    font-size: 0.875rem;
  }

  .hero-scroll-hint {
    bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    gap: 0.35rem;
  }

  .services-section { overflow-x: hidden; }

  .service-panel {
    padding: calc(var(--nav-height) + 1.5rem) 20px 2.5rem;
    min-height: calc(var(--vh, 1vh) * 100);
  }

  .service-panel__num {
    font-size: clamp(3.5rem, 22vw, 6rem);
  }

  .service-panel__visual {
    min-height: 24vh;
    max-width: 100%;
    order: 2;
  }

  .service-panel__content { order: 1; }

  .service-panel__svg {
    width: min(100%, 320px);
    height: auto;
    max-height: 36vh;
  }

  .portfolio-section,
  .about-section,
  .contact-section {
    padding: 3.5rem 20px;
  }

  .portfolio-section {
    padding: 3.5rem 20px;
  }

  .section-header__title {
    font-size: clamp(1.5rem, 6vw, 2rem);
    max-width: none;
  }

  .portfolio-section .section-header__title {
    max-width: none;
  }

  .portfolio-list {
    gap: 3rem;
  }

  .portfolio-item__media {
    border-radius: 1rem;
  }

  .portfolio-item__media img {
    width: 100%;
    height: 100%;
    transform: none;
  }

  .portfolio-item__overlay {
    opacity: 0.25;
  }

  .about-section {
    padding: 3.5rem 20px;
  }

  .about-intro {
    margin-bottom: 2.5rem;
    font-size: 1rem;
    line-height: 1.65;
  }

  .team-card {
    padding: 1.5rem 1.25rem 1.35rem;
  }

  .team-card__portrait {
    width: 6.5rem;
    height: 6.5rem;
  }

  .about-section__cta {
    margin-top: 2.5rem;
  }

  .process-band__stage {
    min-height: 240px;
  }

  .process-band__content {
    padding: 2.75rem 20px;
  }

  .process-band__steps {
    gap: 0.5rem 0.65rem;
  }

  .process-band__step-label {
    font-size: 0.72rem;
    padding: 0.35rem 0.7rem;
  }

  .contact-section {
    padding: 3.5rem 20px 4rem;
  }

  .contact-section__accent {
    top: 1.5rem;
    height: 100px;
    opacity: 0.65;
  }

  .contact-form__submit {
    min-height: 3.25rem;
    padding: 1.05rem 1.5rem;
  }

  .site-footer {
    padding: 2rem 20px 2.5rem;
  }

  .site-footer__contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .site-footer__sep {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .custom-cursor { display: none; }
}
