@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* --- DESIGN SYSTEM & CSS VARIABLES --- */
:root {
  --color-bg: #06070b;
  --color-surface: rgba(13, 16, 26, 0.6);
  --color-surface-hover: rgba(22, 28, 45, 0.7);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-glow: rgba(58, 134, 255, 0.3);
  
  --color-primary: #3a86ff;      /* Cyber Blue */
  --color-secondary: #8338ec;    /* Neon Purple */
  --color-accent: #ff006e;       /* Electric Magenta */
  
  --color-primary-rgb: 58, 134, 255;
  --color-secondary-rgb: 131, 56, 236;
  --color-accent-rgb: 255, 0, 110;
  
  --color-text-primary: #f8f9fa;
  --color-text-secondary: #94a3b8;
  --color-text-dim: #64748b;
  
  --font-title: 'Outfit', sans-serif;
  --font-code: 'Space Grotesk', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- RESET & BASICS --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

html {
  scroll-behavior: smooth;
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
  width: 10px;
  background: var(--color-bg);
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
  background: rgba(58, 134, 255, 0.2);
  border: 2px solid var(--color-bg);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(131, 56, 236, 0.4);
}

/* --- SCROLL PROGRESS INDICATOR --- */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent));
  box-shadow: 0 0 10px rgba(58, 134, 255, 0.6), 0 0 4px rgba(255, 0, 110, 0.4);
  z-index: 99999;
  transition: width 0.08s ease-out;
  will-change: width;
}

/* --- DYNAMIC AMBIENT GLOWS --- */
#ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 50vw;
  height: 50vw;
  max-width: 600px;
  max-height: 600px;
  background: radial-gradient(circle, rgba(58, 134, 255, 0.12) 0%, rgba(131, 56, 236, 0.08) 50%, rgba(255, 0, 110, 0) 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  border-radius: 50%;
  mix-blend-mode: screen;
  will-change: transform;
}

/* Static ambient mesh background */
.mesh-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: 
    radial-gradient(at 10% 20%, rgba(58, 134, 255, 0.03) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(131, 56, 236, 0.03) 0px, transparent 50%);
  z-index: 0;
}

#canvas-network {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* --- REUSABLE UTILITIES & GLASSMORPHISM --- */
.glass {
  background: var(--color-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass-interactive {
  transition: border var(--transition-normal), background var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
}

.glass-interactive:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-glow);
  box-shadow: 0 12px 40px 0 rgba(58, 134, 255, 0.15);
}

.glow-text {
  text-shadow: 0 0 15px rgba(58, 134, 255, 0.4);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(58, 134, 255, 0.1);
  border: 1px solid rgba(58, 134, 255, 0.2);
  color: var(--color-primary);
  border-radius: 100px;
  font-family: var(--font-code);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-primary);
}

/* --- HEADER / NAVIGATION --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 8%;
  z-index: 100;
  transition: padding var(--transition-normal);
}

header.scrolled {
  padding: 12px 8%;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
  border-radius: 100px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-code);
  font-weight: 700;
  font-size: 1.6rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-accent) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  filter: drop-shadow(0 0 8px rgba(58, 134, 255, 0.3));
  transition: transform var(--transition-normal), filter var(--transition-normal);
}

.logo:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 0 12px rgba(58, 134, 255, 0.6)) drop-shadow(0 0 4px rgba(255, 0, 110, 0.3));
}

.logo-glow {
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 50%;
  box-shadow: 0 0 10px var(--color-primary);
  animation: pulse-glow 1.5s infinite ease-in-out;
  flex-shrink: 0;
  -webkit-text-fill-color: initial;
}

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

.nav-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  cursor: pointer;
}

.nav-link:hover, .nav-link.active {
  color: var(--color-text-primary);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

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

/* Lang Switcher Toggle Pill */
.lang-switcher {
  position: relative;
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px;
  border-radius: 100px;
  cursor: pointer;
  width: 110px;
  height: 38px;
}

.lang-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-code);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-dim);
  z-index: 2;
  transition: color var(--transition-normal);
  text-transform: uppercase;
}

.lang-btn.active {
  color: var(--color-text-primary);
}

.lang-slider {
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: calc(50% - 3px);
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 100px;
  z-index: 1;
  transition: transform var(--transition-normal);
  box-shadow: 0 0 10px rgba(58, 134, 255, 0.3);
}

.lang-switcher.en .lang-slider {
  transform: translateX(0);
}

.lang-switcher.pt .lang-slider {
  transform: translateX(100%);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 101;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--color-text-primary);
  margin: 5px 0;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

/* --- HERO SECTION --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 120px 8% 50px 8%;
  text-align: center;
  position: relative;
  z-index: 10;
}

.hero-content {
  max-width: 1000px;
  margin: 0 auto;
}

.hero-headline {
  font-family: var(--font-title);
  font-size: 5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--color-text-primary);
}

.hero-headline span.gradient-text {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-accent) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  padding-bottom: 10px;
}

/* Typing text area */
.hero-dynamic-text {
  font-family: var(--font-code);
  font-weight: 700;
  color: var(--color-text-primary);
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  min-width: 200px;
}

.cursor-blink {
  display: inline-block;
  width: 3px;
  height: 1.2em;
  background-color: var(--color-accent);
  margin-left: 5px;
  vertical-align: middle;
  animation: blink 0.8s infinite steps(2, start);
  box-shadow: 0 0 8px var(--color-accent);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--color-text-secondary);
  max-width: 700px;
  margin: 0 auto 40px auto;
  line-height: 1.7;
}

/* Futuristic Buttons */
.btn-premium {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 36px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-text-primary);
  text-decoration: none;
  font-weight: 600;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  font-family: var(--font-title);
  box-shadow: 0 4px 20px rgba(58, 134, 255, 0.3);
}

.btn-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease-in-out;
}

.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(131, 56, 236, 0.5);
}

.btn-premium:hover::before {
  left: 100%;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-normal);
}

.btn-premium:hover .btn-icon {
  transform: translateX(4px);
}

.scroll-indicator {
  margin-top: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--color-text-dim);
  font-family: var(--font-code);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.scroll-indicator:hover {
  color: var(--color-text-primary);
}

.scroll-mouse {
  width: 22px;
  height: 36px;
  border: 2px solid var(--color-text-dim);
  border-radius: 20px;
  position: relative;
  display: flex;
  justify-content: center;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background-color: var(--color-primary);
  border-radius: 4px;
  position: absolute;
  top: 6px;
  animation: scroll-anim 1.8s infinite ease-in-out;
  box-shadow: 0 0 6px var(--color-primary);
}

/* --- METHODOLOGY / APPROACH --- */
.section-approach {
  padding: 80px 8%;
  position: relative;
  z-index: 10;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 48px auto;
}

.section-title {
  font-family: var(--font-title);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
}

.deck-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.craft-card {
  padding: 48px 36px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  height: 100%;
}

.craft-card-glow {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.15;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.craft-card:nth-child(1) .craft-card-glow {
  background: var(--color-primary);
}
.craft-card:nth-child(2) .craft-card-glow {
  background: var(--color-secondary);
}
.craft-card:nth-child(3) .craft-card-glow {
  background: var(--color-accent);
}

.craft-card:hover .craft-card-glow {
  opacity: 0.35;
}

.craft-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  color: var(--color-text-primary);
  transition: background var(--transition-normal), color var(--transition-normal), border-color var(--transition-normal);
}

.craft-card:hover .craft-icon-wrapper {
  background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.2), rgba(var(--color-secondary-rgb), 0.2));
  color: var(--color-primary);
  border-color: rgba(var(--color-primary-rgb), 0.3);
}

.craft-card h3 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.craft-card p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- SERVICES SECTION --- */
.section-services {
  padding: 80px 8%;
  position: relative;
  z-index: 10;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.srv-card {
  padding: 48px;
  border-radius: 24px;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  position: relative;
  overflow: hidden;
  height: 100%;
}

.srv-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--color-primary);
  transition: transform var(--transition-normal), color var(--transition-normal), background var(--transition-normal), border var(--transition-normal);
}

.srv-card:hover .srv-icon {
  transform: scale(1.05) rotate(5deg);
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-text-primary);
  border-color: transparent;
}

.srv-details h3 {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-text-primary);
}

.srv-details p {
  color: var(--color-text-secondary);
  font-size: 0.98rem;
  line-height: 1.6;
}

/* --- SPOTLIGHT / PORTFOLIO --- */
.section-spotlight {
  padding: 80px 8%;
  position: relative;
  z-index: 10;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.proj-card {
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.proj-img-container {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
}

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

.proj-card:hover .proj-img {
  transform: scale(1.08);
}

.proj-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(8, 9, 13, 0.95) 0%, rgba(8, 9, 13, 0) 100%);
  pointer-events: none;
}

.proj-tag {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(8, 9, 13, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-code);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-primary);
  text-transform: uppercase;
}

.proj-info {
  padding: 32px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.proj-info h3 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.proj-info p {
  color: var(--color-text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* --- LEAD FORM / CONTACT --- */
.section-contact {
  padding: 80px 8%;
  position: relative;
  z-index: 10;
}

.contact-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 56px;
  border-radius: 32px;
  position: relative;
  overflow: hidden;
}

.contact-decor-glow {
  position: absolute;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 200px;
  background: radial-gradient(circle, rgba(131, 56, 236, 0.15) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(50px);
}

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

.form-label {
  display: block;
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--color-text-primary);
  letter-spacing: 0.02em;
}

/* Tag Selection */
.form-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-selector {
  padding: 10px 20px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-family: var(--font-code);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tag-selector:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.tag-selector.selected {
  background: rgba(58, 134, 255, 0.15);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 12px rgba(58, 134, 255, 0.25);
  font-weight: 600;
}

/* Range Sliders */
.range-display {
  font-family: var(--font-code);
  color: var(--color-primary);
  font-weight: 700;
  margin-left: 8px;
  font-size: 1.05rem;
}

.slider-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.form-slider {
  flex: 1;
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  outline: none;
}

.form-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  cursor: pointer;
  box-shadow: 0 0 10px rgba(58, 134, 255, 0.5);
  transition: transform var(--transition-fast);
}

.form-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Standard Inputs */
.form-input-container {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-normal), background-color var(--transition-normal);
}

.form-input:focus {
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.05);
}

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

/* Form States */
.form-feedback {
  padding: 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  display: none;
  margin-bottom: 24px;
  animation: fade-in var(--transition-normal);
}

.form-feedback.success {
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.3);
  color: #2ecc71;
}

.form-feedback.error {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.3);
  color: #e74c3c;
}

.submit-btn-wrapper {
  display: flex;
  justify-content: flex-end;
}

/* --- FOOTER --- */
footer {
  padding: 80px 8% 40px 8%;
  background: #030406;
  border-top: 1px solid var(--color-border);
  position: relative;
  z-index: 10;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 64px;
  max-width: 1200px;
  margin: 0 auto 60px auto;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-desc {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  max-width: 320px;
}

.footer-col h4 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--color-text-primary);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--color-text-dim);
}

.footer-credits-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-credits-link:hover {
  color: var(--color-primary);
}

/* --- ANIMATIONS & KEYFRAMES --- */
@keyframes blink {
  from, to { opacity: 0; }
  50% { opacity: 1; }
}

@keyframes scroll-anim {
  0% { transform: translateY(0); opacity: 0; }
  25% { opacity: 1; }
  75% { transform: translateY(12px); opacity: 0; }
  100% { opacity: 0; }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.8; box-shadow: 0 0 12px rgba(58, 134, 255, 0.4); }
  50% { opacity: 1; box-shadow: 0 0 20px rgba(58, 134, 255, 0.8); }
}

/* Scroll reveal states */
.reveal {
  opacity: 0;
  will-change: opacity, transform;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Default state if no directional class is specified (reveal-up) */
.reveal:not(.reveal-left):not(.reveal-right):not(.reveal-scale):not(.reveal-down) {
  transform: translateY(50px) rotateX(6deg) scale(0.97);
  transform-origin: bottom center;
}

.reveal-up {
  transform: translateY(50px) rotateX(6deg) scale(0.97);
  transform-origin: bottom center;
}

.reveal-down {
  transform: translateY(-50px) rotateX(-6deg) scale(0.97);
  transform-origin: top center;
}

.reveal-left {
  transform: translateX(-50px) rotateY(-6deg) scale(0.97);
  transform-origin: right center;
}

.reveal-right {
  transform: translateX(50px) rotateY(6deg) scale(0.97);
  transform-origin: left center;
}

.reveal-scale {
  transform: scale(0.92) translateY(20px);
}

.reveal.active {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1) rotateX(0deg) rotateY(0deg) !important;
}

.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }
.reveal-delay-4 { transition-delay: 0.6s; }

/* Portfolio project outbound links styling */
.project-link {
  color: var(--color-text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition-fast);
}

.project-link:hover {
  color: var(--color-primary);
}

.link-arrow {
  transition: transform var(--transition-normal);
  color: var(--color-primary);
}

.project-link:hover .link-arrow {
  transform: translate(3px, -3px);
}

/* Hover scales and subtle translations for list items */
.nav-menu li, .tag-selector, .btn-premium, .craft-card, .srv-card, .proj-card {
  will-change: transform;
}

/* --- MOBILE & RESPONSIVENESS --- */
@media (max-width: 1024px) {
  .hero-headline { font-size: 4rem; }
  .deck-container { grid-template-columns: 1fr; gap: 24px; }
  .services-grid { grid-template-columns: 1fr; }
  .spotlight-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: span 2; }
}

@media (max-width: 768px) {
  header { padding: 16px 5%; }
  header.scrolled { padding: 10px 5%; }
  
  .menu-toggle { display: block; }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: rgba(6, 7, 11, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--color-border);
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    z-index: 100;
    transition: right var(--transition-normal);
  }
  
  .nav-menu.open {
    right: 0;
  }
  
  .nav-actions {
    margin-right: 40px;
  }
  
  /* Make close icon for burger when open */
  .menu-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .menu-toggle.open span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  
  .hero { padding-top: 120px; padding-bottom: 40px; }
  .hero-headline { font-size: 3rem; }
  .hero-subtitle { font-size: 1rem; }
  .srv-card { grid-template-columns: 1fr; padding: 32px; gap: 16px; }
  .srv-icon { width: 60px; height: 60px; font-size: 1.5rem; }
  .contact-wrapper { padding: 32px 24px; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}
