/* ═══════════════════════════════════════════════════════
   ESITESZ — Main Stylesheet
   Professional violet-indigo theme, mobile-first, clean, accessible
   ═══════════════════════════════════════════════════════ */

/* ── RESET & VARIABLES ── */
:root {
  --bg:            #0B1220;
  --surface:       #0F172A;
  --surface2:      #1E293B;
  --accent:        #7C3AED;
  --accent-hover:  #6D28D9;
  --accent-soft:   rgba(124,58,237,0.12);
  --tag:           #FF3D6E;
  --text:          #E2E8F0;
  --muted:         #94A3B8;
  --border:        rgba(148,163,184,0.14);
  --success:       #22c55e;
  --font-body:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display:  'Space Grotesk', var(--font-body);
  --radius:        6px;
  --radius-lg:     12px;
  --transition:    0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ── THREE.JS ANIMATED BACKGROUND ── */
#three-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
}
#three-bg canvas { display: block; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ── GRID BACKGROUND ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(124,58,237,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ── LAYOUT ── */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

section {
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════ */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 900;
  height: 64px;
  background: rgba(11,18,32,0.94);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.5px;
  color: #fff;
}

.logo span { color: var(--accent); }

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  transition: color var(--transition);
}

.nav-links a:hover { color: #fff; }

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: var(--radius);
  font-weight: 600 !important;
  font-size: 13px !important;
  transition: background var(--transition) !important;
}

.nav-cta:hover { background: var(--accent-hover) !important; }

/* Hamburger */
.ham {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  z-index: 910;
}

.ham span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: 0.3s;
}

.ham.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.ham.open span:nth-child(2) { opacity: 0; }
.ham.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ═══════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════ */
.hero {
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -2px;
  color: #fff;
  max-width: 820px;
  margin-bottom: 28px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero h1 em::after {
  content: '_';
  animation: blink 1s step-end infinite;
  color: var(--accent);
}

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-sub {
  max-width: 520px;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 44px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  transition: background var(--transition);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--muted);
  padding-bottom: 2px;
  transition: border-color var(--transition), color var(--transition);
}

.btn-ghost:hover { color: #fff; border-color: #fff; }

.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.stat-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  display: block;
  line-height: 1;
}

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

.stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  display: block;
}

/* ═══════════════════════════════════════════════════════
   SECTION LABEL
   ═══════════════════════════════════════════════════════ */
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 48px;
}

.section-label::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--muted);
}

/* ═══════════════════════════════════════════════════════
   PORTFOLIO
   ═══════════════════════════════════════════════════════ */
.portfolio {
  padding: 80px 0;
}

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 7px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

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

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.project-card {
  background: var(--bg);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.3s;
}

.project-card.hide { display: none; }

.card-img {
  height: 220px;
  overflow: hidden;
  position: relative;
  background: var(--surface);
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.5s ease;
}

.project-card:hover .card-img img { transform: scale(1.05); }

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11,18,32,0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s;
}

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

.overlay-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  transition: background var(--transition);
}

.overlay-link:hover { background: var(--accent-hover); }

.card-body {
  padding: 18px 20px;
  background: var(--surface);
}

.card-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tag);
  margin-bottom: 8px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.card-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════════════════════ */
.about {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-left h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  color: #fff;
  margin-bottom: 24px;
}

.about-left p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 44ch;
  margin-bottom: 16px;
}

.capability-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cap-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.cap-item:last-child { border-bottom: none; }
.cap-item:hover { background: var(--surface2); }

.cap-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.cap-tag {
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: var(--radius);
}

/* ═══════════════════════════════════════════════════════
   FAQ
   ═══════════════════════════════════════════════════════ */
.faq {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.faq-list {
  max-width: 720px;
  display: flex;
  flex-direction: column;
}

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

.faq-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
  gap: 16px;
}

.faq-summary::-webkit-details-marker { display: none; }

.faq-q {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.faq-icon {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 18px;
  font-weight: 300;
  flex-shrink: 0;
  transition: var(--transition);
}

details[open] .faq-icon {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.faq-body {
  padding: 0 0 22px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 560px;
}

/* ═══════════════════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════════════════ */
.contact {
  padding: 80px 0 100px;
  border-top: 1px solid var(--border);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-left h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -1px;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.1;
}

.contact-left p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 38ch;
}

.reach {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reach-item {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 10px;
}

.reach-label {
  color: var(--accent);
  font-weight: 600;
  min-width: 60px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-field {
  display:flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.03em;
}

input, textarea, select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: #fff;
  padding: 13px 16px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color var(--transition);
  resize: none;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

::placeholder { color: var(--muted); }

.consent-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 4px;
}

.consent-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
  padding: 0;
}

.consent-row label {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  cursor: pointer;
}

.consent-row a {
  color: var(--accent);
  text-decoration: underline;
}

.submit-btn {
  background: var(--accent);
  color: #fff;
  padding: 14px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: background var(--transition);
  margin-top: 4px;
}

.submit-btn:hover { background: var(--accent-hover); }
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════
   COOKIE BANNER (Granular Controls)
   ═══════════════════════════════════════════════════════ */
#cookieBanner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: rgba(15,23,42,0.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  transform: translateY(0);
  transition: transform 0.4s ease;
}

#cookieBanner.hidden { transform: translateY(110%); }

.cookie-text {
  font-size: 13px;
  color: var(--muted);
  max-width: 680px;
  line-height: 1.6;
}

.cookie-text a { color: var(--accent); text-decoration: underline; }
.cookie-text strong { color: var(--text); }

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 9px 22px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.cookie-accept {
  background: var(--accent);
  color: #fff;
  border: none;
  font-family: var(--font-display);
  font-weight: 700;
}

.cookie-accept:hover { background: var(--accent-hover); }

.cookie-decline {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.cookie-decline:hover {
  color: var(--text);
  border-color: rgba(148,163,184,0.3);
}

.cookie-manage {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(124,58,237,0.3);
}

.cookie-manage:hover {
  background: var(--accent-soft);
}

/* Cookie Preferences Modal */
.cookie-prefs {
  padding: 24px;
}

.cookie-prefs h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 20px;
}

.cookie-category {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.cookie-category:last-child { border-bottom: none; }

.cookie-cat-info { flex: 1; }

.cookie-cat-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.cookie-cat-desc {
  font-size: 12px;
  color: var(--muted);
}

.cookie-cat-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  margin-left: 16px;
}

.cookie-cat-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cookie-cat-toggle label {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--surface2);
  border-radius: 12px;
  transition: var(--transition);
}

.cookie-cat-toggle label::after {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--muted);
  border-radius: 50%;
  transition: var(--transition);
}

.cookie-cat-toggle input:checked + label {
  background: var(--accent);
}

.cookie-cat-toggle input:checked + label::after {
  transform: translateX(20px);
  background: #fff;
}

.cookie-cat-toggle input:disabled + label {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-prefs-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════
   MODAL SYSTEM
   ═══════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s;
}

.modal-overlay.visible .modal-box { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover { color: #fff; background: rgba(255,255,255,0.1); }

.modal-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.modal-date {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 28px;
}

.modal-body h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin: 24px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.modal-body h3:first-child { margin-top: 0; }

.modal-body p, .modal-body li {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 8px;
}

.modal-body ul { padding-left: 18px; }
.modal-body a { color: var(--accent); text-decoration: underline; }
.modal-body strong { color: var(--text); }

/* ═══════════════════════════════════════════════════════
   DATA SUBJECT RIGHTS FORM
   ═══════════════════════════════════════════════════════ */
.dsr-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.dsr-form .form-field { gap: 6px; }

.dsr-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394A3B8'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* ═══════════════════════════════════════════════════════
   SUCCESS POPUP
   ═══════════════════════════════════════════════════════ */
#successModal .modal-box {
  text-align: center;
  padding: 52px 40px;
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 32px;
  color: var(--accent);
}

.success-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.success-sub {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 360px;
  margin: 0 auto 28px;
}

.success-details {
  background: var(--accent-soft);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  text-align: left;
  margin-bottom: 28px;
}

.success-details p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.success-details strong { color: var(--text); }

.success-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: background var(--transition);
}

.success-close-btn:hover { background: var(--accent-hover); }

.success-timer {
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
}

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
footer {
  background: #000;
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: #fff;
}

.footer-logo span { color: var(--accent); }

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 12px;
  color: var(--muted);
  transition: color var(--transition);
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 12px;
  color: var(--muted);
}

.footer-legal {
  display: flex;
  gap: 16px;
}

.footer-legal a {
  font-size: 11px;
  color: var(--muted);
  text-decoration: underline;
  transition: color var(--transition);
}

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

/* ═══════════════════════════════════════════════════════
   PROFESSIONAL ANIMATED POLISH
   ═══════════════════════════════════════════════════════ */

/* Ambient violet glow behind the hero — slow, subtle, not gimmicky */
.hero::before {
  content: '';
  position: absolute;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 520px;
  background: radial-gradient(closest-side, rgba(124,58,237,0.22), transparent 70%);
  z-index: -1;
  animation: glowDrift 14s ease-in-out infinite alternate;
}
@keyframes glowDrift {
  from { transform: translateX(-58%); opacity: 0.7; }
  to   { transform: translateX(-42%); opacity: 1; }
}

/* Primary button sheen on hover */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
}
.btn-primary:hover::after { left: 130%; }

/* Animated stat numbers (value starts from 0 via js) */
.stat-num.counting { font-variant-numeric: tabular-nums; }

/* ═══════════════════════════════════════════════════════
   ENTRANCE ANIMATIONS
   ═══════════════════════════════════════════════════════ */
.hero > .wrap > * {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s forwards;
}

.hero-eyebrow { animation-delay: 0.1s; }
.hero h1 { animation-delay: 0.2s; }
.hero-sub { animation-delay: 0.3s; }
.hero-actions { animation-delay: 0.4s; }
.hero-stats { animation-delay: 0.55s; }

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

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .about-layout, .contact-layout { grid-template-columns: 1fr; gap: 40px; }
  .footer-main { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    background: rgba(11,18,32,0.98);
    flex-direction: column;
    gap: 0;
    padding: 0;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 16px 24px;
    font-size: 15px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
  }

  .nav-links .nav-cta {
    background: transparent !important;
    color: var(--accent) !important;
    border-radius: 0;
  }

  .ham { display: flex; }

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

  .hero-stats { gap: 28px; flex-wrap: wrap; }

  .filter-bar { gap: 6px; }

  #cookieBanner {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }

  .cookie-actions { width: 100%; }
  .cookie-actions button { flex: 1; text-align: center; }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .modal-box { padding: 28px 22px; }
}

/* ── ANCHOR OFFSET UNDER FIXED NAV + MOTION SAFETY ── */
section[id] {
  scroll-margin-top: 72px;
}

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