:root {
  --bg: #0b0b0d;
  --bg-strong: #090909;
  --panel: rgba(25, 25, 29, 0.9);
  --card: rgba(14, 15, 18, 0.92);
  --card-soft: #121317;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f5f5;
  --muted: #b6b7bb;
  --muted-strong: #d8d7db;
  --accent: #a78bfa;
  --purple-soft: rgba(167, 139, 250, 0.1);
  --project-bg: #090909;
  --project-mid: #777777;
  --project-light: #f2f2f2;
  --tech-bg: #080c10;
  --tech-mid: #17232e;
  --tech-accent: #78b9e8;
  --success: #9ae6b4;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.38);
  --radius: 24px;
  --radius-sm: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background-color: #0b0b0d;
  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),
    radial-gradient(ellipse at 50% 8%, rgba(255, 255, 255, 0.025), transparent 52%),
    linear-gradient(180deg, #0b0b0d 0%, #0a0b0d 100%);
  background-size: 56px 56px, 56px 56px, auto, auto;
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
}

body:not(.page-is-leaving) {
  animation: page-enter 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.page-is-leaving {
  animation: page-leave 140ms ease both;
  pointer-events: none;
}

@keyframes page-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes page-leave {
  to { opacity: 0; }
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  width: min(var(--container), calc(100% - clamp(32px, 6vw, 96px)));
  margin: 0 auto;
}

.section {
  padding: clamp(72px, 8vw, 110px) 0;
}

.section-sm {
  padding: 26px 0 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.015);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.narrow {
  max-width: 820px;
}

.section-header {
  margin-bottom: 36px;
}

.eyebrow {
  margin: 0 0 18px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 0.73rem;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 6vw, 6rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
  margin-bottom: 24px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

h1 span,
.brand-text span {
  color: var(--accent);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.05em;
  max-width: 800px;
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

h3 {
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.04em;
  margin-bottom: 14px;
}

p {
  color: var(--muted);
  font-size: 1.02rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(11, 11, 13, 0.92);
  border-bottom: 1px solid var(--line);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.brand-mark {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(167, 139, 250, 0.08);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 16px rgba(167, 139, 250, 0.08);
  transition: border-color 200ms var(--motion-ease), box-shadow 200ms var(--motion-ease);
}

.brand:hover .brand-mark {
  border-color: rgba(167, 139, 250, 0.38);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 18px var(--accent-glow);
}

.brand-text {
  font-size: 0.96rem;
  letter-spacing: -0.045em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.primary-nav a {
  position: relative;
  transition: color 0.25s ease;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.45);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.primary-nav a:hover,
.primary-nav a.is-current {
  color: var(--text);
}

.primary-nav a:hover::after,
.primary-nav a.is-current::after {
  transform: scaleX(1);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--accent);
  color: #0b0b0d;
  font-weight: 700;
  box-shadow: none;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), background-color 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.button:hover {
  transform: translateY(-1px);
  background: #b5a0fb;
  box-shadow: none;
}

.button-outline,
.button-ghost {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
}

.hero {
  background-image: radial-gradient(
    ellipse at 22% 34%,
    rgba(167, 139, 250, 0.19) 0%,
    rgba(167, 139, 250, 0.065) 36%,
    transparent 70%
  );
}

.hero h1 span {
  text-shadow: 0 0 30px rgba(167, 139, 250, 0.34), 0 0 64px rgba(167, 139, 250, 0.16);
}

.hero-copy {
  max-width: 680px;
}

.lead {
  max-width: 600px;
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  color: var(--muted-strong);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 30px;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.hero-metrics li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-metrics strong {
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

.hero-metrics span {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.glass-panel {
  position: relative;
  width: min(100%, 480px);
  padding: 26px 20px 18px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(17, 17, 20, 0.94), rgba(11, 11, 13, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow), 0 0 44px rgba(167, 139, 250, 0.1);
}

.visual-card::before {
  content: "";
  position: absolute;
  inset: auto 16% -60px 16%;
  height: 110px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.08), transparent 70%);
  filter: blur(8px);
}

.window-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot.red { background: #ff7d7d; }
.dot.amber { background: #f3c76f; }
.dot.green { background: #7fe0ad; }

.code-panel {
  padding: 28px 6px 18px;
  color: #dfe7ff;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.88rem;
}

.code-line {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}

.code-line span {
  color: #8bb9ff;
}

.indent {
  padding-left: 20px;
}

.visual-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.label {
  display: block;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.7rem;
  margin-bottom: 8px;
}

.logo-bar {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}

.logo-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
  gap: 14px;
  align-items: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
}

.split-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: center;
}

.story-panel,
.info-card,
.service-card,
.stack-card,
.benchmark-item,
.contact-panel,
.project-card,
.project-shell,
.legal-content,
.search-shell,
.filter-button {
  background: rgba(16, 17, 20, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.story-panel {
  padding: 32px;
}

.info-stack {
  display: grid;
}

.info-card {
  padding: 28px 24px;
}

.info-card ul,
.service-card ul,
.check-list {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted-strong);
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.mini-stats div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mini-stats strong {
  font-size: 1.3rem;
  letter-spacing: -0.04em;
}

.mini-stats span {
  color: var(--muted);
  font-size: 0.8rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 22px;
}

.service-card {
  padding: 28px 22px 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.service-pricing {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: auto 0 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.service-pricing span {
  color: var(--muted);
  font-size: 0.82rem;
}

.service-pricing strong {
  color: var(--text);
  text-align: right;
}

.service-empty {
  grid-column: 1 / -1;
}

.service-card:hover,
.stack-card:hover,
.project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
}

.index {
  display: inline-flex;
  margin-bottom: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.project-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  align-items: stretch;
  max-width: 100%;
}

.project-card {
  overflow: hidden;
  padding: 0;
  transition: transform 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.project-media {
  min-height: 220px;
  padding: 24px 22px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border-bottom: 1px solid var(--line);
}

.project-art {
  width: 100%;
  height: 120px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, var(--project-bg), var(--project-mid));
  position: relative;
  overflow: hidden;
}

.project-art::before {
  content: "";
  position: absolute;
  inset: 12px 14px auto 14px;
  height: 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
}

.project-art::after {
  content: "";
  position: absolute;
  inset: 48px 16px 18px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.04));
}

.project-thumb-light {
  background: linear-gradient(135deg, #0b0b0d, #f2f2f2);
}

.project-thumb-tech {
  background: linear-gradient(135deg, #080c10, #17232e 58%, #78b9e8);
}

.project-content {
  padding: 20px 22px 26px;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-content p {
  margin-bottom: 18px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 20px;
}

.stack-card {
  padding: 26px 20px;
  background: #101418;
}

.two-col-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.panel-copy {
  max-width: 680px;
}

.check-list {
  list-style: none;
  padding-left: 0;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 6px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.benchmarks {
  display: grid;
  gap: 14px;
}

.benchmark-item {
  padding: 20px 18px;
  background: rgba(255, 255, 255, 0.02);
}

.benchmark-item span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.benchmark-item strong {
  font-size: 1.32rem;
  letter-spacing: -0.04em;
}

.contact-section {
  padding-top: 80px;
  padding-bottom: 110px;
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 32px 30px;
  border-radius: 30px;
  background: #121317;
  border: 1px solid var(--line);
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.contact-card > div:first-child {
  min-width: 0;
}

.contact-card .contact-links {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.contact-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(11, 11, 13, 0.8);
}

.footer-shell {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 26px;
  padding: 30px 0 40px;
}

.footer-brand {
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 22px;
  color: var(--muted);
}

.page-shell {
  min-height: calc(100vh - 200px);
}

.page-hero {
  padding-bottom: 30px;
}

.project-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.search-shell {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.02);
}

.search-shell span {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.search-shell input {
  background: transparent;
  border: 0;
  color: var(--text);
  outline: none;
  font-size: 1rem;
}

.search-shell input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: color 300ms cubic-bezier(0.22, 1, 0.36, 1), background-color 300ms cubic-bezier(0.22, 1, 0.36, 1), border-color 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.filter-button.is-active {
  background: rgba(167, 139, 250, 0.1);
  color: var(--text);
  border-color: rgba(167, 139, 250, 0.32);
}

.project-page-shell {
  padding-top: 32px;
}

.project-detail {
  display: grid;
  gap: 24px;
}

.project-shell {
  padding: 28px;
  background: rgba(255, 255, 255, 0.02);
}

.project-shell .project-media {
  min-height: 260px;
  border-radius: 20px;
  margin-bottom: 22px;
}

.project-shell .project-content {
  padding: 0;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.project-gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.project-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  margin-top: 24px;
}

.project-aside {
  display: grid;
  gap: 18px;
}

.info-block {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.info-block h3 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.info-block ul {
  padding-left: 18px;
  margin: 0;
  color: var(--muted);
}

.project-link {
  display: inline-flex;
  margin-top: 18px;
}

.legal-shell {
  padding-top: 52px;
}

.legal-content {
  padding: 30px 28px;
}

.page-content {
  max-width: 920px;
  padding: 34px clamp(20px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.contact-panel {
  padding: 28px;
  margin-top: 24px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.contact-links a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hidden {
  display: none !important;
}

.cookie-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(10, 12, 17, 0.96);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(18px);
}

.cookie-banner strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.cookie-banner p {
  margin: 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 0.92rem;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-button {
  min-width: 150px;
}

@media (max-width: 980px) {
  .cards-grid,
  .stack-grid,
  .project-grid {
    grid-template-columns: 1fr 1fr;
  }

  .primary-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    order: 2;
  }

  .primary-nav.is-open {
    position: absolute;
    top: calc(100% - 1px);
    left: 16px;
    right: 16px;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(12, 13, 16, .98);
    box-shadow: var(--shadow);
  }

  .primary-nav.is-open a {
    padding: 10px 12px;
  }

  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .hero-grid,
  .split-grid,
  .two-col-panel,
  .project-layout {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 36px;
  }
}

@media (max-width: 620px) {
  .section {
    padding: 80px 0;
  }

  .nav-shell {
    min-height: 70px;
  }

  .header-button {
    display: none;
  }

  .menu-toggle {
    margin-left: auto;
  }

  .hero-actions,
  .contact-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cards-grid,
  .stack-grid,
  .project-grid,
  .mini-stats {
    grid-template-columns: 1fr;
  }

  .contact-card,
  .footer-shell {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-card .contact-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .logo-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.reveal {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 520ms var(--motion-ease),
    transform 520ms var(--motion-ease);
}

.motion-ready .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(14px);
}

.hero-intro .hero-copy > * {
  animation: hero-copy-enter 600ms var(--motion-ease) both;
}

.hero-intro .hero-copy > :nth-child(2) { animation-delay: 50ms; }
.hero-intro .hero-copy > :nth-child(3) { animation-delay: 100ms; }
.hero-intro .hero-copy > :nth-child(4) { animation-delay: 150ms; }
.hero-intro .hero-copy > :nth-child(5) { animation-delay: 200ms; }

.hero-intro .visual-card {
  animation: hero-card-enter 720ms var(--motion-ease) 120ms both;
}

@keyframes hero-copy-enter {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-card-enter {
  from { opacity: 0; transform: translateY(20px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

:root {
  --purple-soft: rgba(167, 139, 250, 0.1);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --accent-glow: rgba(167, 139, 250, 0.16);
}

.site-header {
  background: rgba(11, 11, 13, 0.92);
  backdrop-filter: blur(12px);
}

.site-intro {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 46%, rgba(35, 27, 59, .98), #09090c 67%);
  opacity: 1;
  pointer-events: none;
  animation: intro-dismiss 1250ms cubic-bezier(.22, 1, .36, 1) both;
}

.intro-orbit {
  position: absolute;
  width: min(76vw, 650px);
  aspect-ratio: 1;
  border: 1px solid rgba(167, 139, 250, .1);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(167, 139, 250, .018), 0 0 0 92px rgba(167, 139, 250, .014);
  animation: intro-orbit-enter 1100ms cubic-bezier(.16, 1, .3, 1) both;
}

.intro-lockup {
  position: relative;
  display: grid;
  grid-template-columns: 58px auto;
  align-items: center;
  column-gap: 18px;
  animation: intro-lockup-enter 850ms cubic-bezier(.16, 1, .3, 1) both;
}

.intro-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(194, 174, 255, .6);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(167, 139, 250, .24), rgba(167, 139, 250, .06));
  box-shadow: 0 0 52px rgba(167, 139, 250, .28), inset 0 0 22px rgba(167, 139, 250, .1);
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
}

.intro-name {
  color: #fff;
  font-size: clamp(1.4rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.065em;
}

.intro-name b { color: #b8a2ff; }

.intro-caption {
  grid-column: 2;
  margin-top: 8px;
  color: rgba(231, 224, 255, .55);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .19em;
}

.intro-scan {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(194, 174, 255, .7), transparent);
  box-shadow: 0 0 24px rgba(167, 139, 250, .38);
  animation: intro-scan 1000ms cubic-bezier(.2, .65, .3, 1) both;
}

@keyframes intro-dismiss {
  0%, 70% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

@keyframes intro-lockup-enter {
  from { opacity: 0; transform: translateY(18px) scale(.97); filter: blur(8px); }
  60% { opacity: 1; filter: blur(0); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes intro-orbit-enter {
  from { opacity: 0; transform: scale(.82) rotate(-12deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes intro-scan {
  from { transform: translateY(-20vh); opacity: 0; }
  18% { opacity: .7; }
  to { transform: translateY(120vh); opacity: 0; }
}

.brand-mark {
  background: rgba(167, 139, 250, 0.08);
}

.primary-nav a,
.primary-nav a::after {
  transition-duration: 300ms;
  transition-timing-function: var(--motion-ease);
}

.button {
  background: var(--accent);
  box-shadow: 0 0 14px rgba(167, 139, 250, 0.1);
  transition:
    transform 200ms var(--motion-ease),
    color 200ms var(--motion-ease),
    background-color 200ms var(--motion-ease),
    border-color 200ms var(--motion-ease),
    box-shadow 200ms var(--motion-ease);
}

.button:hover {
  transform: translateY(-2px);
  background: #b5a0fb;
  box-shadow: 0 7px 24px rgba(167, 139, 250, 0.24), 0 0 20px rgba(167, 139, 250, 0.16);
}

.button-outline,
.button-ghost {
  background: rgba(255, 255, 255, 0.02);
}

.visual-card::before {
  display: none;
}

.contact-card {
  background: #121317;
  border-color: var(--line);
}

.stack-card {
  background: #101418;
}

.service-card,
.stack-card,
.project-card,
.filter-button {
  transition:
    transform 220ms var(--motion-ease),
    border-color 220ms var(--motion-ease),
    background-color 220ms var(--motion-ease),
    color 220ms var(--motion-ease),
    box-shadow 220ms var(--motion-ease);
}

.service-card:hover,
.stack-card:hover,
.project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(167, 139, 250, 0.24);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2), 0 0 20px rgba(167, 139, 250, 0.055);
}

.filter-button.is-active {
  background: rgba(167, 139, 250, 0.1);
  border-color: rgba(167, 139, 250, 0.42);
  box-shadow: 0 0 14px rgba(167, 139, 250, 0.1);
}

.cookie-banner {
  border-color: var(--line);
  backdrop-filter: blur(10px);
}

.reveal:nth-child(2) { transition-delay: 50ms; }
.reveal:nth-child(3) { transition-delay: 100ms; }
.reveal:nth-child(4) { transition-delay: 150ms; }

@media (prefers-reduced-motion: reduce) {
  .hero-intro .hero-copy > *,
  .hero-intro .visual-card {
    animation: none;
  }
}

:where(button, input[type="button"], input[type="submit"], input[type="reset"], .button, .filter-button, .admin-nav, .admin-item, .locale-switcher, .footer-cookie-button) {
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 180ms var(--motion-ease),
    color 180ms var(--motion-ease),
    background-color 180ms var(--motion-ease),
    border-color 180ms var(--motion-ease),
    box-shadow 180ms var(--motion-ease);
}

@media (hover: hover) {
  :where(button:not(.button), input[type="button"], input[type="submit"], input[type="reset"], .filter-button, .admin-nav, .admin-item, .locale-switcher):hover:not(:disabled) {
    transform: translateY(-1px);
  }
}

:where(button, input[type="button"], input[type="submit"], input[type="reset"], .button, .filter-button, .admin-nav, .admin-item, .locale-switcher, .footer-cookie-button):active:not(:disabled) {
  transform: scale(0.97);
  transition-duration: 90ms;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
}

input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
  transition:
    border-color 180ms var(--motion-ease),
    box-shadow 180ms var(--motion-ease);
}

input:not([type="checkbox"]):not([type="radio"]):focus,
textarea:focus,
select:focus {
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

.back-to-top {
  position: fixed;
  right: clamp(18px, 4vw, 40px);
  bottom: clamp(18px, 4vw, 36px);
  z-index: 40;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(167, 139, 250, 0.38);
  border-radius: 50%;
  background: rgba(18, 19, 23, 0.88);
  color: var(--text);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28), 0 0 18px rgba(167, 139, 250, 0.1);
  backdrop-filter: blur(12px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 220ms var(--motion-ease),
    visibility 220ms var(--motion-ease),
    transform 220ms var(--motion-ease),
    border-color 220ms var(--motion-ease),
    box-shadow 220ms var(--motion-ease),
    background-color 220ms var(--motion-ease);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-to-top:hover {
  border-color: rgba(167, 139, 250, 0.68);
  background: rgba(29, 27, 38, 0.96);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.32), 0 0 24px rgba(167, 139, 250, 0.2);
  transform: translateY(-3px);
}

.back-to-top:active {
  transform: scale(0.95);
}

@media (prefers-reduced-motion: reduce) {
  body:not(.page-is-leaving),
  body.page-is-leaving {
    animation: none !important;
  }
}
