/* ============================================
   USTUDIO.KZ — Premium Design System
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --bg-primary: #050510;
  --bg-secondary: #0a0a18;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --bg-glass: rgba(10, 10, 24, 0.8);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #818cf8;
  --accent-2: #6366f1;
  --accent-3: #4f46e5;
  --gradient: linear-gradient(135deg, #7c3aed, #6366f1, #3b82f6);
  --gradient-text: linear-gradient(135deg, #c084fc, #818cf8, #60a5fa);
  --gradient-cta: linear-gradient(135deg, #f97316, #fb923c);
  --glow: rgba(99, 102, 241, 0.15);
  --glow-orange: rgba(249, 115, 22, 0.15);
  --success: #10b981;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --container: 1200px;
  --header-h: 72px;
}

html[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #eef2ff;
  --bg-card: rgba(15, 23, 42, 0.04);
  --bg-card-hover: rgba(15, 23, 42, 0.08);
  --bg-glass: rgba(248, 250, 252, 0.86);
  --border: rgba(15, 23, 42, 0.10);
  --border-hover: rgba(15, 23, 42, 0.18);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --glow: rgba(79, 70, 229, 0.14);
  --glow-orange: rgba(249, 115, 22, 0.18);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

ul,
ol {
  list-style: none;
}

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

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

input,
textarea,
select {
  font-family: inherit;
}

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

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-3);
  border-radius: 3px;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}

h4 {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
}

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Kazakh: Space Grotesk + negative tracking look cramped for Cyrillic; relax metrics site-wide */
html[lang="kk"] h1,
html[lang="kk"] h2,
html[lang="kk"] h3,
html[lang="kk"] h4,
html[lang="kk"] h5,
html[lang="kk"] h6 {
  font-family: 'Inter', system-ui, sans-serif;
  letter-spacing: 0;
  line-height: 1.25;
}

html[lang="kk"] .section-badge {
  letter-spacing: 0.04em;
  line-height: 1.35;
}

html[lang="kk"] .footer-col h4 {
  letter-spacing: 0.06em;
  line-height: 1.4;
}

html[lang="kk"] .footer-brand p {
  max-width: 360px;
  line-height: 1.75;
}

html[lang="kk"] .footer-bottom {
  line-height: 1.5;
}

html[lang="kk"] .blog-related-card h3 {
  line-height: 1.35;
}

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

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: clamp(60px, 10vw, 120px) 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(40px, 6vw, 64px);
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-badge svg {
  width: 14px;
  height: 14px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.05rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 24px var(--glow), 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px var(--glow), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
}

.btn-outline:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-cta {
  background: var(--gradient-cta);
  color: #fff;
  box-shadow: 0 4px 24px var(--glow-orange);
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px var(--glow-orange);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.05rem;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: all var(--transition);
  border-bottom: 1px solid transparent;
}

.header.scrolled {
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom-color: var(--border);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  z-index: 101;
}

.logo-svg {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.logo:hover .logo-svg {
  transform: scale(1.05);
}

.logo-u {
  stroke-dasharray: 60;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.logo:hover .logo-u {
  animation: drawLogoU 1.2s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes drawLogoU {
  0% {
    stroke-dashoffset: 60;
  }

  100% {
    stroke-dashoffset: 0;
  }
}

.logo-bracket-l,
.logo-bracket-r {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover .logo-bracket-l {
  transform: translateX(-3px);
}

.logo:hover .logo-bracket-r {
  transform: translateX(3px);
}

.logo-dot {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: 16px 27px;
}

.logo:hover .logo-dot {
  transform: translateY(-3px) scale(1.15);
  filter: drop-shadow(0 4px 6px rgba(96, 165, 250, 0.6));
}

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

.nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 1px;
  transition: width var(--transition);
}

.nav a:hover,
.nav a.active {
  color: var(--text-primary);
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.lang-switcher {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 16px;
}

.lang-switcher a {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  text-transform: uppercase;
}

.lang-switcher a:hover,
.lang-switcher a.active {
  color: var(--text-primary);
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid rgba(248, 250, 252, 0.32);
  color: #0f172a;
  transition: all var(--transition);
  margin-right: 10px;
  z-index: 101;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.35);
  animation: themeTogglePulse 2.8s ease-in-out infinite;
}

.theme-toggle:hover {
  color: #020617;
  border-color: rgba(248, 250, 252, 0.55);
  transform: translateY(-1px) scale(1.03);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.35s ease, opacity 0.25s ease;
}

.theme-icon-moon,
html[data-theme="light"] .theme-icon-sun {
  display: none;
}

html[data-theme="light"] .theme-icon-moon {
  display: block;
}

/* In light mode, make toggle dark (inverse). */
html[data-theme="light"] .theme-toggle {
  background: #0f172a;
  border-color: rgba(15, 23, 42, 0.28);
  color: #f8fafc;
  box-shadow: 0 0 0 0 rgba(15, 23, 42, 0.35);
}

html[data-theme="light"] .theme-toggle:hover {
  color: #ffffff;
  border-color: rgba(15, 23, 42, 0.48);
}

.theme-toggle::after {
  content: '';
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.25) 0%, rgba(129, 140, 248, 0) 65%);
  transform: translateX(-70%) rotate(18deg);
  transition: transform 0.7s ease;
  pointer-events: none;
}

.theme-toggle:hover::after {
  transform: translateX(30%) rotate(18deg);
}

.theme-toggle.is-switching {
  animation: none;
  box-shadow: 0 0 0 6px rgba(129, 140, 248, 0.14);
}

.theme-toggle.is-switching .theme-icon-sun,
.theme-toggle.is-switching .theme-icon-moon {
  transform: rotate(20deg) scale(1.15);
  opacity: 0.8;
}

@keyframes themeTogglePulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.18);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.05);
  }
}

.header-cta {
  z-index: 101;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  z-index: 101;
  cursor: pointer;
}

.burger span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.burger span:nth-child(1) {
  width: 24px;
}

.burger span:nth-child(2) {
  width: 16px;
}

.burger span:nth-child(3) {
  width: 20px;
}

.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  width: 24px;
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav Overlay */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-slow);
}

.mobile-nav.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav a {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all var(--transition);
  transform: translateY(20px);
  opacity: 0;
}

.mobile-nav.active a {
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav a:hover {
  color: var(--text-primary);
}

.mobile-nav a:nth-child(1) {
  transition-delay: 0.1s;
}

.mobile-nav a:nth-child(2) {
  transition-delay: 0.15s;
}

.mobile-nav a:nth-child(3) {
  transition-delay: 0.2s;
}

.mobile-nav a:nth-child(4) {
  transition-delay: 0.25s;
}

.mobile-nav a:nth-child(5) {
  transition-delay: 0.3s;
}

.mobile-nav a:nth-child(6) {
  transition-delay: 0.35s;
}

/* --- Page Hero (inner pages) --- */
.page-hero {
  padding: calc(var(--header-h) + 64px) 0 80px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.page-hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 16px;
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.page-hero>.container>p {
  font-size: 1.1rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-secondary);
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease-out both;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs span:last-child {
  color: var(--text-secondary);
}

/* --- FAQ Accordion --- */
.faq-list {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition);
  background: var(--bg-card);
  user-select: none;
}

.faq-q:hover {
  background: var(--bg-card-hover);
}

.faq-q svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent);
  transition: transform var(--transition);
}

.faq-item.open .faq-q {
  background: var(--bg-card-hover);
}

.faq-item.open .faq-q svg {
  transform: rotate(180deg);
}

.faq-a {
  padding: 0 24px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
  background: var(--bg-card);
}

.faq-item.open .faq-a {
  max-height: 300px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
}

/* --- Blog Layout --- */
.blog-content {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) 24px;
}

.blog-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  margin: 48px 0 16px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.blog-content h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  margin: 32px 0 12px;
  color: var(--text-primary);
}

.blog-content p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.blog-content ul,
.blog-content ol {
  padding-left: 20px;
  margin-bottom: 20px;
}

.blog-content li {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 8px;
  list-style: disc;
}

.blog-content ol li {
  list-style: decimal;
}

.blog-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.blog-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-content a.btn,
.blog-content .btn {
  color: #fff;
  text-decoration: none;
}

.blog-content .btn.btn-outline {
  color: var(--text-primary);
}

.blog-hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease-out both;
}

.blog-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-date,
.blog-read-time {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.blog-content table,
.blog-price-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  display: table;
}

.blog-content table th,
.blog-content table td,
.blog-price-table th,
.blog-price-table td {
  padding: 14px 20px;
  text-align: left;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  white-space: normal;
  word-break: break-word;
}

.blog-content table th,
.blog-price-table th {
  background: var(--bg-card-hover);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-content table td,
.blog-price-table td {
  color: var(--text-secondary);
  background: var(--bg-card);
}

.blog-content table tr:last-child td,
.blog-price-table tr:last-child td {
  border-bottom: none;
}

.blog-price-table .price,
.blog-price-table td:last-child {
  color: var(--accent);
  font-weight: 600;
}

.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 16px 0;
}

/* ── Block: Callout ─────────────────────────── */
.blog-callout {
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  margin: 32px 0;
}

.blog-callout--warning {
  border-left-color: #e6a700;
}

.blog-callout--success {
  border-left-color: #22c55e;
}

.blog-callout-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.blog-callout-header strong {
  font-size: 1rem;
  color: var(--text-primary);
}

.blog-callout-body {
  margin-top: 10px;
}

.blog-callout-body p {
  margin: 0 0 8px;
}

.blog-callout-body p:last-child {
  margin-bottom: 0;
}

/* ── Block: Quote ──────────────────────────── */
.blog-quote {
  position: relative;
  margin: 40px 0;
  padding: 32px 36px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border-left: 4px solid var(--accent);
  font-style: italic;
}

.blog-quote::before {
  content: '\201C';
  position: absolute;
  top: -8px;
  left: 16px;
  font-size: 4rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.2;
  font-family: Georgia, serif;
}

.blog-quote p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-primary);
  margin: 0;
}

.blog-quote cite {
  display: block;
  margin-top: 16px;
  font-size: 0.9rem;
  font-style: normal;
  color: var(--text-muted);
  font-weight: 600;
}

/* ── Block: Image figure ───────────────────── */
.blog-block-image {
  margin: 36px 0;
  text-align: center;
}

.blog-block-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: block;
  margin: 0 auto;
}

.blog-block-image figcaption {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Block: Text wrapper ───────────────────── */
.blog-block-text {
  margin: 0;
}

/* ── Table wrapper (responsive) ────────────── */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
}

.table-wrap table,
.table-wrap .blog-price-table {
  margin: 0;
}

.blog-cta-inline {
  padding: 32px;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-align: center;
  margin: 48px 0;
  position: relative;
  overflow: hidden;
}

.blog-cta-inline::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--gradient);
  border-radius: calc(var(--radius-xl) + 2px);
  z-index: -1;
  opacity: 0.1;
}

.blog-cta-inline h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.blog-cta-inline p {
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.blog-cta-inline-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.blog-cta-inline-separator {
  display: inline-block;
  margin: 0 8px;
  color: var(--text-muted);
}

.blog-hero-cover-wrap {
  margin-top: 28px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.blog-hero-cover-img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 420px;
  object-fit: cover;
}

.blog-inline-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  max-width: 760px;
  margin: 0 auto 48px;
  padding: 0 24px;
}

.blog-gallery-figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.blog-gallery-figure img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 560px;
  object-fit: cover;
}

.blog-cta-admin-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 56px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: stretch;
}

.blog-cta-admin-wrap .blog-cta-inline {
  margin: 0;
}

.blog-related {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: clamp(48px, 6vw, 80px) 0;
}

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

.blog-related-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.blog-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.blog-card-thumb {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 8px);
  margin-bottom: 14px;
  border: 1px solid var(--border);
}

.blog-related-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.blog-related-card .blog-tag {
  margin-bottom: 16px;
}

.blog-related-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.blog-related-card p {
  font-size: 0.85rem;
}

.blog-related-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 16px;
}

.cta-section .btn-cta {
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
  .blog-related-grid {
    grid-template-columns: 1fr;
  }

  .blog-content {
    padding: 40px 16px;
  }

  .blog-cta-inline {
    padding: 24px 20px;
  }

  .blog-cta-inline-actions {
    flex-direction: column;
    gap: 12px;
  }

  .blog-quote {
    padding: 24px 20px;
    margin: 28px 0;
  }

  .blog-quote::before {
    font-size: 2.5rem;
    left: 10px;
  }

  .blog-callout {
    padding: 18px 20px;
  }

  .blog-inline-gallery {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }
}

/* --- Hero --- */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--header-h);
  perspective: 1000px;
  /* Enable 3D space */
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.hero-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.2), transparent 70%);
  top: -200px;
  right: -100px;
  animation: orbFloat 20s ease-in-out infinite;
}

.hero-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15), transparent 70%);
  bottom: -150px;
  left: -100px;
  animation: orbFloat 25s ease-in-out infinite reverse;
}

.hero-orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.1), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: orbFloat 15s ease-in-out infinite 5s;
}

.hero-grid {
  position: absolute;
  inset: -50%;
  /* Make grid larger to avoid edges showing during rotation */
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 10%, transparent 60%);
  mask-image: radial-gradient(ellipse at 50% 50%, black 10%, transparent 60%);
  transform-style: preserve-3d;
  transform: rotateX(60deg) translateY(-100px) translateZ(-200px);
  /* Lay flat like a floor grid */
  transition: transform 0.1s ease-out;
  /* Smooth JS reactions */
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  min-height: calc(100vh - var(--header-h));
}

.realistic-sphere-container {
  position: absolute;
  right: 15%;
  top: 50%;
  transform: translateY(-50%);
  width: 25vw;
  height: 25vw;
  max-width: 250px;
  max-height: 250px;
  z-index: -2;
  /* Pushed deep into the background behind elements */
  pointer-events: none;
  opacity: 0.45;
  /* Increased from 0.25 to make it glow more noticeably */
  filter: blur(12px);
  /* Slightly reduced blur for sharper glow */
  animation: roamSphere 35s ease-in-out infinite alternate;
}

.realistic-sphere {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.25) 0%, rgba(192, 132, 252, 0.15) 15%, rgba(129, 140, 248, 0.2) 35%, rgba(99, 102, 241, 0.2) 55%, transparent 85%);
  box-shadow:
    inset -15px -15px 30px rgba(5, 5, 16, 0.2),
    inset 15px 15px 30px rgba(255, 255, 255, 0.05),
    0 0 60px rgba(129, 140, 248, 0.15),
    0 0 120px rgba(192, 132, 252, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  mix-blend-mode: screen;
  /* Blend cleanly with the dark hero background */
}

.realistic-sphere::before {
  content: '';
  position: absolute;
  width: 150%;
  height: 150%;
  background: conic-gradient(from 90deg, transparent 0deg, rgba(96, 165, 250, 0.1) 180deg, transparent 360deg);
  mix-blend-mode: overlay;
  animation: spinSmooth 30s linear infinite reverse;
}

.realistic-sphere::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
}

.sphere-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 200%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(129, 140, 248, 0.15) 0%, transparent 60%);
  border-radius: 50%;
  animation: pulseHalo 12s ease-in-out infinite alternate;
  z-index: -3;
  /* Behind the sphere itself */
}

@keyframes roamSphere {
  0% {
    transform: translate(0, -60%);
  }

  33% {
    transform: translate(-20vw, -20%);
  }

  66% {
    transform: translate(-5vw, -80%);
  }

  100% {
    transform: translate(-30vw, -40%);
  }
}

@keyframes pulseHalo {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 0.9;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease-out;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s infinite;
}

.hero h1 {
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease-out 0.15s both;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  max-width: 600px;
  margin-bottom: 36px;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  animation: fadeInUp 0.8s ease-out 0.45s both;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 64px;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-stat {
  text-align: left;
}

.hero-stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.scroll-indicator {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeInUp 0.8s ease-out 0.8s both;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* --- Services --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.service-card {
  padding: 36px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

a.service-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.service-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity var(--transition);
}

.service-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px var(--glow);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: all var(--transition);
}

.service-card:hover .service-icon {
  background: var(--accent-3);
  border-color: var(--accent-2);
}

.service-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.service-card:hover .service-icon svg {
  color: #fff;
}

.service-card h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.service-card p {
  font-size: 0.92rem;
  margin-bottom: 20px;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--transition);
}

.service-link:hover {
  gap: 10px;
}

a.service-card:hover .service-link {
  gap: 10px;
}

.service-link svg {
  width: 16px;
  height: 16px;
}

/* --- Stats --- */
.stats {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: clamp(40px, 6vw, 80px) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-value .accent {
  color: var(--accent);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* --- Advantages --- */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.advantage-card {
  display: flex;
  gap: 20px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.advantage-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.wizard-btn.btn-outline {
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.wizard-btn.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.05);
}

/* --- Phase 6: Animated SVG Decorations --- */
@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(5deg);
  }

  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

@keyframes pulse-glow {
  0% {
    filter: drop-shadow(0 0 5px var(--accent-alpha));
  }

  50% {
    filter: drop-shadow(0 0 20px var(--accent));
  }

  100% {
    filter: drop-shadow(0 0 5px var(--accent-alpha));
  }
}

@keyframes draw-line {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.anim-float {
  animation: float 6s ease-in-out infinite;
}

.anim-float-delay {
  animation: float 7s ease-in-out infinite backwards;
  animation-delay: -3s;
}

.anim-pulse {
  animation: pulse-glow 3s infinite;
}

.anim-draw {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw-line 3s forwards ease-out 0.5s;
}

.anim-blink {
  animation: blink 1s step-start infinite;
}

/* Absolute positioning helpers for decor SVGs */
.decor-svg {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
}

.advantage-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

.advantage-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.advantage-card p {
  font-size: 0.9rem;
}

/* --- Process --- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

.process-grid::before {
  content: '';
  position: absolute;
  top: 40px;
  left: calc(12.5% + 12px);
  right: calc(12.5% + 12px);
  height: 2px;
  background: var(--border);
}

.process-step {
  text-align: center;
  position: relative;
}

.process-num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  transition: all var(--transition);
  position: relative;
  z-index: 1;
}

.process-step:hover .process-num {
  background: var(--accent-3);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 30px var(--glow);
}

.process-step h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.process-step p {
  font-size: 0.85rem;
}

/* --- Portfolio Preview --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.portfolio-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.portfolio-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.portfolio-card:hover .portfolio-thumb {
  transform: scale(1.05);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 5, 16, 0.9), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity var(--transition);
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.portfolio-overlay p {
  font-size: 0.85rem;
  color: var(--accent);
}

/* Portfolio filter */
.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition);
  cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
  color: #fff;
  background: var(--accent-3);
  border-color: var(--accent-2);
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-box {
  padding: clamp(48px, 6vw, 80px);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--gradient);
  border-radius: calc(var(--radius-xl) + 2px);
  z-index: -1;
  opacity: 0.15;
}

.cta-box h2 {
  margin-bottom: 16px;
}

.cta-box p {
  max-width: 500px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
}

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand p {
  margin-top: 16px;
  font-size: 0.9rem;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 6px 0;
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.footer-social {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.footer-social:hover {
  background: var(--accent-3);
  border-color: var(--accent);
}

.footer-social svg {
  width: 18px;
  height: 18px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 16, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 500px;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

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

.modal h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.modal .modal-subtitle {
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px var(--glow);
}

.form-input::placeholder {
  color: var(--text-muted);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

.modal .btn {
  width: 100%;
  margin-top: 8px;
}

/* --- Mobile Tab Bar --- */
.tab-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1500;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--border);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
}

.tab-bar-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 12px;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  text-decoration: none;
}

.tab-item span {
  display: block;
  max-width: 70px;
  text-align: center;
  line-height: 1.1;
  white-space: normal;
}

.tab-item.active {
  color: var(--accent);
}

.tab-item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

.delay-1 {
  transition-delay: 0.1s !important;
}

.delay-2 {
  transition-delay: 0.2s !important;
}

.delay-3 {
  transition-delay: 0.3s !important;
}

.delay-4 {
  transition-delay: 0.4s !important;
}

/* --- Keyframes --- */
@keyframes orbFloat {

  0%,
  100% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(30px, -30px);
  }

  50% {
    transform: translate(-20px, 20px);
  }

  75% {
    transform: translate(20px, 10px);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

@keyframes scrollPulse {

  0%,
  100% {
    opacity: 0.4;
    transform: scaleY(1);
  }

  50% {
    opacity: 1;
    transform: scaleY(1.2);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* --- Page-specific --- */
.page-hero {
  padding: calc(var(--header-h) + 60px) 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero h1 {
  margin-bottom: 16px;
}

.page-hero p {
  max-width: 600px;
  margin: 0 auto;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--accent);
}

.breadcrumbs span {
  color: var(--text-muted);
}

/* --- Contact page styles --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-info-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  transition: all var(--transition);
}

.contact-info-card:hover {
  border-color: var(--border-hover);
}

.contact-info-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info-icon svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.contact-info-card h4 {
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.contact-info-card p {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.contact-form {
  padding: 36px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.map-wrapper {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-top: 48px;
}

.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(0.8) invert(0.92) contrast(0.9);
}

/* --- About page --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.tech-tag {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.tech-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Services cards UX --- */
.services-mobile-card {
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  padding: 22px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.services-mobile-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.services-details .container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --- Calculator page --- */
.calc-form {
  max-width: 700px;
  margin: 0 auto;
  padding: 48px;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.custom-radio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.custom-radio-card {
  display: block;
  cursor: pointer;
}

.custom-radio-card input[type="radio"] {
  display: none;
}

.radio-card-inner {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition);
  height: 100%;
}

.custom-radio-card:hover .radio-card-inner {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.radio-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.radio-card-icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
}

.radio-card-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.radio-card-check svg {
  width: 14px;
  height: 14px;
  color: white;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-radio-card input[type="radio"]:checked+.radio-card-inner {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.03);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
}

.custom-radio-card input[type="radio"]:checked+.radio-card-inner .radio-card-check {
  background: var(--gradient);
  border-color: transparent;
}

.custom-radio-card input[type="radio"]:checked+.radio-card-inner .radio-card-check svg {
  opacity: 1;
  transform: scale(1);
}

.radio-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* File Upload Styles */
.file-upload-wrapper {
  margin-top: 8px;
}

.file-upload-input {
  display: none;
}

.file-upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  border: 2px dashed var(--border-hover);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.file-upload-box:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.03);
}

.file-upload-box svg {
  width: 32px;
  height: 32px;
  color: var(--accent);
  margin-bottom: 12px;
}

.file-upload-text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.file-upload-hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.file-upload-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.file-upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-primary);
}

.file-upload-item-name {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-upload-item-name svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.file-remove-btn {
  background: transparent;
  border: none;
  color: var(--error, #ef4444);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition);
}

.file-remove-btn:hover {
  opacity: 0.8;
}

.form-select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--bg-secondary) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23a1a1aa" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>') no-repeat right 16px center;
  background-size: 16px;
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.form-select:focus {
  border-color: var(--accent-2);
}

.custom-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}

.custom-checkbox:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.custom-checkbox input[type="checkbox"] {
  display: none;
}

.checkbox-box {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.checkbox-box svg {
  width: 14px;
  height: 14px;
  color: white;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-checkbox input[type="checkbox"]:checked~.checkbox-box {
  background: var(--gradient);
  border-color: transparent;
}

.custom-checkbox input[type="checkbox"]:checked~.checkbox-box svg {
  opacity: 1;
  transform: scale(1);
}

.checkbox-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition);
}

.custom-checkbox input[type="checkbox"]:checked~.checkbox-text {
  color: var(--text-primary);
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-2);
}

/* Wizard Specific Styles */
.wizard-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
  position: relative;
}

.wizard-progress::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
  transform: translateY(-50%);
  z-index: 0;
}

.wizard-progress-bar {
  position: absolute;
  top: 50%;
  left: 0;
  height: 2px;
  background: var(--gradient);
  transform: translateY(-50%);
  z-index: 1;
  transition: width 0.4s ease;
}

.wizard-step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  z-index: 2;
  position: relative;
  transition: all 0.3s ease;
}

.wizard-step-dot.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.wizard-step-dot.completed {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #fff;
}

.wizard-step-content {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.wizard-step-content.active {
  display: block;
}

.wizard-buttons {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}

.wizard-buttons .btn {
  flex: 1;
}

/* --- Navigation Buttons --- */
/* --- Responsive --- */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .services-mobile-card {
    gap: 20px;
    padding: 18px;
    border-radius: 18px;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
  }

  .services-mobile-card .about-image {
    order: -1 !important;
    aspect-ratio: 16 / 9;
    min-height: 140px;
    width: 100%;
  }

  .services-mobile-card h2 {
    font-size: 1.35rem;
    line-height: 1.25;
  }

  .services-mobile-card p {
    font-size: 0.95rem;
  }

  .services-mobile-card .tech-stack {
    margin-top: 16px;
    gap: 8px;
  }

  .services-mobile-card .tech-tag {
    font-size: 0.75rem;
    padding: 7px 12px;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .lang-switcher {
    margin: 0 8px 0 auto;
    gap: 8px;
  }

  .lang-switcher a {
    font-size: 0.76rem;
  }

  .theme-toggle {
    width: 34px;
    height: 34px;
    margin-right: 8px;
  }

  .header-cta {
    display: none;
  }

  .burger {
    display: flex;
  }

  .tab-bar {
    display: block;
  }

  body {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  .hero-content {
    text-align: center;
  }

  .hero-visual {
    display: none;
  }

  .hero .container {
    justify-content: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
  }

  .scroll-indicator {
    bottom: 4px;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

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

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .process-grid::before {
    display: none;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .cta-box {
    padding: 36px 24px;
  }

  .modal {
    padding: 28px 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .calc-form {
    padding: 28px 20px;
  }

  .custom-radio-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 24px;
  }

  .radio-card-inner {
    padding: 16px;
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .radio-card-header {
    margin-bottom: 0;
    align-items: center;
    flex-direction: row-reverse;
    gap: 16px;
  }

  .radio-card-icon {
    width: 28px;
    height: 28px;
    margin: 0;
  }

  .radio-card-title {
    font-size: 1rem;
    flex: 1;
    text-align: left;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-stat-value {
    font-size: 1.5rem;
  }

  .hero-stats {
    gap: 16px;
  }

  .scroll-indicator {
    display: none;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  .btn-lg {
    padding: 14px 28px;
  }

  .services-mobile-card {
    padding: 14px;
    gap: 14px;
    border-radius: 16px;
  }

  .services-mobile-card .about-image {
    order: -1 !important;
    min-height: 120px;
    border-radius: 14px;
    width: 100%;
  }

  .services-mobile-card h2 {
    font-size: 1.15rem;
  }

  .services-mobile-card ul {
    margin: 0;
    padding-left: 0;
  }
}

/* --- Page Loader --- */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
}

body:not(.loaded) {
  overflow: hidden;
}

.loader-svg {
  width: 120px;
  height: 120px;
  filter: drop-shadow(0 0 16px rgba(129, 140, 248, 0.4));
}

.loader-svg .outer-ring {
  opacity: 0;
  animation: fadeIn 0.5s ease-out 0.2s forwards;
}

.loader-svg .spin-ring {
  transform-origin: 60px 60px;
  animation: spinSmooth 1.6s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.loader-svg .logo-path {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation: drawLogoPremium 1.8s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.loader-svg .bracket-left {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: drawLogoPremium 1s cubic-bezier(0.65, 0, 0.35, 1) 0.3s forwards;
}

.loader-svg .bracket-right {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: drawLogoPremium 1s cubic-bezier(0.65, 0, 0.35, 1) 0.5s forwards;
}

.loader-svg .logo-dot {
  opacity: 0;
  transform-origin: 60px 82px;
  transform: scale(0);
  animation: popDot 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.2s forwards;
}

.loader-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.8s forwards;
}

.loader-progress {
  width: 120px;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  animation: fadeInUp 0.5s ease-out 0.5s forwards;
}

.loader-progress-bar {
  height: 100%;
  background: var(--gradient);
  border-radius: 2px;
  animation: loadProgress 1.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
  width: 0;
}

@keyframes drawLogoPremium {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes spinSmooth {
  to {
    transform: rotate(360deg);
  }
}

@keyframes popDot {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes loadProgress {
  to {
    width: 100%;
  }
}

/* --- Button Ripple --- */
.btn-ripple {
  position: absolute;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transform: translate(-50%, -50%);
  animation: rippleEffect 0.7s ease-out forwards;
  pointer-events: none;
}

@keyframes rippleEffect {
  to {
    width: 400px;
    height: 400px;
    opacity: 0;
  }
}

/* --- Button Glow Pulse --- */
.btn-primary,
.btn-cta {
  animation: btnGlow 3s ease-in-out infinite;
}

@keyframes btnGlow {

  0%,
  100% {
    box-shadow: 0 4px 24px var(--glow), 0 1px 2px rgba(0, 0, 0, 0.2);
  }

  50% {
    box-shadow: 0 6px 32px rgba(99, 102, 241, 0.25), 0 1px 2px rgba(0, 0, 0, 0.2);
  }
}

.btn-cta {
  animation: btnGlowOrange 3s ease-in-out infinite;
}

@keyframes btnGlowOrange {

  0%,
  100% {
    box-shadow: 0 4px 24px var(--glow-orange);
  }

  50% {
    box-shadow: 0 6px 32px rgba(249, 115, 22, 0.3);
  }
}

/* --- Button Success State --- */
.btn-success {
  background: var(--success) !important;
  box-shadow: 0 4px 24px rgba(16, 185, 129, 0.2) !important;
  animation: none !important;
}

/* --- Grain Texture Overlay --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}

.page-loader~* body::after {
  z-index: 9000;
}

/* --- Animated Gradient Border (Service Cards) --- */
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, var(--accent-3) 50%, transparent 60%);
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition);
}

.service-card:hover::after {
  opacity: 1;
  animation: borderGlow 3s linear infinite;
}

@keyframes borderGlow {
  0% {
    background-position: 0% 0%;
  }

  50% {
    background-position: 100% 100%;
  }

  100% {
    background-position: 0% 0%;
  }
}

/* --- Enhanced advantage number gradient --- */
.advantage-card:hover .advantage-num {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Floating animation for hero decorative elements --- */
.hero-float {
  animation: heroFloat 6s ease-in-out infinite;
}

.hero-float-delay {
  animation-delay: 2s;
}

@keyframes heroFloat {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-15px) rotate(3deg);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

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

  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
  }

  .page-loader {
    display: none;
  }

  body {
    overflow: auto !important;
  }

  body::after {
    display: none;
  }
}

/* =============================================
   TEAM SECTION
   ============================================= */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 28px 28px;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.team-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity var(--transition);
}

.team-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.team-card:hover::before {
  opacity: 1;
}

.team-avatar {
  --avatar-hue: 270deg;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: hsl(var(--avatar-hue), 70%, 20%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: hsl(var(--avatar-hue), 80%, 75%);
  position: relative;
  margin-bottom: 16px;
  flex-shrink: 0;
  overflow: hidden;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: relative;
  z-index: 0;
}

.team-avatar > span {
  position: relative;
  z-index: 0;
}

.team-avatar-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
      hsl(var(--avatar-hue), 90%, 65%),
      hsl(calc(var(--avatar-hue) + 60deg), 90%, 65%),
      hsl(var(--avatar-hue), 90%, 65%));
  z-index: -1;
  animation: ring-spin 6s linear infinite;
  opacity: 0.7;
}

@keyframes ring-spin {
  to {
    transform: rotate(360deg);
  }
}

.team-info {
  width: 100%;
}

.team-info h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.team-role {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.team-info p {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.team-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

@media (max-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .team-grid {
    grid-template-columns: 1fr;
  }

  .team-card {
    gap: 20px;
  }

  .team-avatar {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .team-stack {
    justify-content: flex-start;
  }
}

/* =============================================
   STATUS PAGES (404 & Thank-You)
   ============================================= */
.status-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + 48px) 24px 80px;
}

.status-page-content {
  max-width: 620px;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
}

.status-page-content h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 16px 0;
  animation: fadeInUp 0.7s ease-out 0.1s both;
}

.status-desc {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 40px;
  animation: fadeInUp 0.7s ease-out 0.2s both;
}

/* Success checkmark */
.status-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 8px;
  animation: fadeInUp 0.6s ease-out both;
}

.success-circle {
  stroke-dasharray: 226;
  stroke-dashoffset: 226;
  animation: draw-circle 0.8s ease-out 0.3s forwards;
}

.success-check {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: draw-check 0.5s ease-out 1s forwards;
}

@keyframes draw-circle {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes draw-check {
  to {
    stroke-dashoffset: 0;
  }
}

/* 404 SVG numbers */
.error-404-svg {
  width: 100%;
  max-width: 300px;
  margin: 0 auto 8px;
}

.error-404-svg svg {
  width: 100%;
  height: auto;
}

.num-4-left {
  animation: slideInLeft 0.6s ease-out 0.3s both;
}

.num-0 {
  animation: fadeInUp 0.6s ease-out 0.5s both;
}

.num-4-right {
  animation: slideInRight 0.6s ease-out 0.7s both;
}

.dot-1 {
  animation: float-in 0.4s ease-out 0.9s both;
}

.dot-2 {
  animation: float-in 0.4s ease-out 1.1s both;
}

.dot-3 {
  animation: float-in 0.4s ease-out 1.3s both;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: scale(0);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Next steps (thank-you page) */
.status-next-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
  margin-bottom: 40px;
  animation: fadeInUp 0.7s ease-out 0.3s both;
}

.next-step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.next-step-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent);
  flex-shrink: 0;
  width: 32px;
}

.next-step h3 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.next-step p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* Links grid (404 page) */
.status-links {
  margin-bottom: 40px;
  animation: fadeInUp 0.7s ease-out 0.3s both;
}

.status-links>p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.status-links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.status-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.status-link-card:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.status-link-card svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.status-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s ease-out 0.4s both;
  margin-bottom: 32px;
}

.status-contact-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  animation: fadeInUp 0.7s ease-out 0.5s both;
}

.status-contact-hint a {
  color: var(--accent);
}

@media (max-width: 640px) {
  .status-links-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .status-actions {
    flex-direction: column;
    align-items: center;
  }
}