/*
 * WebGhost — Design System
 * Tema: Dark Editorial + Electric Lime
 * Font: Syne (display) · Outfit (body)
 * Accent: #A3F040 Electric Lime
 */

/* ============================================================
   Variables
============================================================ */
:root {
  --bg:          #07090E;
  --bg-surface:  #0C0F18;
  --bg-card:     #121724;
  --border:      #1B2236;
  --border-hover:rgba(163, 240, 64, 0.25);
  --text:        #E5E1D8;
  --muted:       #8799B5;
  --muted-light: #9AAECE;
  --accent:      #A3F040;
  --accent-hover:#B8FF4D;
  --accent-glow: rgba(163, 240, 64, 0.10);
  --accent-dim:  rgba(163, 240, 64, 0.05);

  --font-display: 'Syne', sans-serif;
  --font-body:    'Outfit', sans-serif;

  --nav-h: 68px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
}

/* ============================================================
   Reset
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img { max-width: 100%; display: block; }

/* ============================================================
   Layout
============================================================ */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 2rem;
}
.section  { padding: 7rem 0; }
.section-sm { padding: 4rem 0; }

/* ============================================================
   Typography
============================================================ */
.d-xl {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.035em;
}
.d-lg {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.d-md {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.d-sm {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.text-accent { color: var(--accent); }
.text-muted  { color: var(--muted); }

/* ============================================================
   Nav
============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 200;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom-color: var(--border);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  line-height: 1;
}
.nav-logo img {
  height: 36px;
  width: auto;
  display: block;
  transition: filter 0.25s ease;
}
/* On hover: subtle lime glow */
.nav-logo:hover img {
  filter: drop-shadow(0 0 6px rgba(163, 240, 64, 0.4)) brightness(1.08);
}
/* Fallback mark (used only inside ghost-visual) */
.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  flex-shrink: 0;
}

/* Nav links — centered absolutely so position is independent of logo/CTA width */
.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2.5rem;
  white-space: nowrap;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); }

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: calc(var(--nav-h) + 2rem) 2rem 2rem;
  gap: 0.5rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.mobile-nav.open {
  pointer-events: all;
  opacity: 1;
  transform: translateY(0);
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: -0.02em;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a.active,
.mobile-nav a:hover { color: var(--text); }

/* ============================================================
   Buttons
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  position: relative;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  letter-spacing: 0.01em;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(163, 240, 64, 0.2);
}
.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-ghost {
  color: var(--muted-light);
}
.btn-ghost:hover { color: var(--text); }
.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.8rem; border-radius: var(--radius-sm); }
.btn svg { flex-shrink: 0; }

/* Arrow button */
.btn-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  transition: gap 0.2s var(--ease);
}
.btn-arrow:hover { gap: 0.7rem; }

/* ============================================================
   Cards
============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s;
}
.card:hover {
  border-color: var(--border-hover);
  background: rgba(163, 240, 64, 0.02);
}

/* ============================================================
   Badge / Label
============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge-accent {
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(163, 240, 64, 0.2);
}
.badge-muted {
  background: rgba(255,255,255,0.04);
  color: var(--muted-light);
  border: 1px solid var(--border);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
}

/* ============================================================
   Hero (Home)
============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}
.hero-bg-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(163, 240, 64, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(163, 240, 64, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
}
.hero-layout {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 4rem;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 2;
}
.hero-eyebrow { margin-bottom: 1.5rem; }
.hero h1     { margin-bottom: 1.5rem; }
.hero-sub {
  font-size: 1.05rem;
  color: var(--muted-light);
  max-width: 480px;
  margin-bottom: 2.5rem;
  line-height: 1.75;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.hero-stat .num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.hero-stat .lbl {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.2rem;
}
.hero-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* ============================================================
   Ghost Visual (Radar)
============================================================ */
.ghost-visual {
  position: relative;
  width: 480px;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ghost-bg-word {
  position: absolute;
  width: 220px;
  height: auto;
  opacity: 0.05;
  user-select: none;
  pointer-events: none;
  z-index: 1;
}
.ghost-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--accent);
  animation: radar-ping 4s ease-out infinite;
}
.ghost-ring:nth-child(2) { width: 160px; height: 160px; animation-delay: 0s;    opacity: 0; }
.ghost-ring:nth-child(3) { width: 260px; height: 260px; animation-delay: 0.8s;  opacity: 0; }
.ghost-ring:nth-child(4) { width: 370px; height: 370px; animation-delay: 1.6s;  opacity: 0; }
.ghost-ring:nth-child(5) { width: 460px; height: 460px; animation-delay: 2.4s;  opacity: 0; }
.ghost-core {
  position: relative;
  z-index: 5;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0 0 0 8px var(--accent-glow),
    0 0 0 16px rgba(163, 240, 64, 0.04),
    0 0 48px rgba(163, 240, 64, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ghost-breathe 3s ease-in-out infinite;
}
.ghost-core-logo {
  width: 34px;
  height: auto;
  /* white ghost on lime background → invert to dark */
  filter: brightness(0) opacity(0.75);
  position: relative;
  z-index: 2;
}
.ghost-node {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  animation: node-blink 4s ease-in-out infinite;
}
.ghost-node:nth-child(6)  { top: 18%; left: 12%;  animation-delay: 0.5s; }
.ghost-node:nth-child(7)  { top: 72%; left: 18%;  animation-delay: 1.2s; }
.ghost-node:nth-child(8)  { top: 22%; right: 8%;  animation-delay: 2s;   }
.ghost-node:nth-child(9)  { bottom: 18%; right: 22%; animation-delay: 0.8s; }
.ghost-node:nth-child(10) { top: 50%; left: 5%;   animation-delay: 3s;   }

@keyframes radar-ping {
  0%   { transform: scale(0.15); opacity: 0; }
  8%   { opacity: 0.65; }
  100% { transform: scale(1);    opacity: 0; }
}
@keyframes ghost-breathe {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.06); box-shadow: 0 0 0 12px var(--accent-glow), 0 0 0 22px rgba(163,240,64,0.04), 0 0 72px rgba(163,240,64,0.4); }
}
@keyframes node-blink {
  0%, 100%  { opacity: 0; transform: scale(0.5); }
  40%, 60%  { opacity: 0.7; transform: scale(1); }
}

/* ============================================================
   Services Section
============================================================ */
.services-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
  gap: 2rem;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease);
}
.service-card:hover {
  border-color: var(--border-hover);
  background: rgba(163, 240, 64, 0.02);
  transform: translateY(-2px);
}
.service-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--accent-glow);
  border: 1px solid rgba(163, 240, 64, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.service-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ============================================================
   About Section
============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: 6rem;
  align-items: center;
}
.about-text p {
  font-size: 1rem;
  color: var(--muted-light);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}
.about-text p:last-child { margin-bottom: 0; }
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.about-stat {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.about-stat .num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.03em;
}
.about-stat .lbl {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* ============================================================
   Portfolio Preview
============================================================ */
.portfolio-grid-home {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}
.portfolio-card-home {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.portfolio-card-home:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}
.p-thumb {
  height: 180px;
  background: var(--bg-surface);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.p-thumb-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(163, 240, 64, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(163, 240, 64, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}
.p-thumb-label {
  position: relative;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.15;
  letter-spacing: -0.03em;
}
.p-info {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
}
.p-info h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.p-info p { font-size: 0.8rem; color: var(--muted); }
.p-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.75rem;
}
.p-tag {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* ============================================================
   CTA Band
============================================================ */
.cta-band {
  padding: 6rem 0;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(163, 240, 64, 0.04) 50%, transparent);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: 'WG';
  position: absolute;
  font-family: var(--font-display);
  font-size: 20rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.015;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
}
.cta-band h2 { margin-bottom: 1rem; }
.cta-band p  { color: var(--muted); max-width: 380px; margin: 0 auto 2rem; font-size: 1rem; }
.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ============================================================
   Footer
============================================================ */
.footer {
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}
.footer-brand .nav-logo { margin-bottom: 1rem; }
.footer-brand p {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 240px;
  line-height: 1.7;
}
.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-col a {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
  gap: 1rem;
}
.footer-ghost {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.5;
}

/* ============================================================
   Page Hero (inner pages)
============================================================ */
.page-hero {
  padding: calc(var(--nav-h) + 4.5rem) 0 4rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 120%, rgba(163, 240, 64, 0.06), transparent);
  pointer-events: none;
}
.page-hero h1 { margin-bottom: 1rem; }
.page-hero .sub {
  font-size: 1.1rem;
  color: var(--muted-light);
  max-width: 520px;
  line-height: 1.75;
}

/* ============================================================
   Services Page — Detailed
============================================================ */
.service-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.service-detail-card {
  background: var(--bg-card);
  padding: 2.5rem;
  transition: background 0.3s;
}
.service-detail-card:hover {
  background: rgba(163, 240, 64, 0.02);
}
.service-detail-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--accent-glow);
  border: 1px solid rgba(163, 240, 64, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.service-detail-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.service-detail-card > p {
  font-size: 0.9rem;
  color: var(--muted-light);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.service-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.service-feature {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.service-feature::before {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  opacity: 0.7;
}

/* Process section */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}
.process-step {
  padding: 2rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
}
.process-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.15;
  line-height: 1;
  margin-bottom: 0.75rem;
}
.process-step h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.process-step p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ============================================================
   Portfolio Page
============================================================ */
.portfolio-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.filter-btn {
  padding: 0.45rem 1.1rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--bg-card);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  cursor: pointer;
}
.filter-btn:hover { border-color: rgba(255,255,255,0.2); color: var(--text); }
.filter-btn.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.portfolio-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.portfolio-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}
.portfolio-card.hidden { display: none; }
.port-thumb {
  height: 200px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
}
/* Cards with real screenshot previews */
.port-thumb.has-preview,
.p-thumb.has-preview {
  background-size: cover;
  background-position: top center;
  transition: background-position 0.6s ease;
}
.portfolio-card:hover .port-thumb.has-preview { background-position: center center; }
.port-thumb.has-preview .port-thumb-pattern,
.port-thumb.has-preview .port-thumb-label,
.p-thumb.has-preview .p-thumb-pattern,
.p-thumb.has-preview .p-thumb-label { display: none; }
/* Subtle dark veil over previews so overlay is always readable */
.port-thumb.has-preview::after,
.p-thumb.has-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 14, 0.18);
  pointer-events: none;
}
.port-thumb-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(163,240,64,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(163,240,64,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}
.port-thumb-label {
  position: relative;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.2;
}
.port-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 14, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.portfolio-card:hover .port-overlay { opacity: 1; }
.port-visit {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(163, 240, 64, 0.4);
  border-radius: var(--radius-sm);
  background: rgba(163, 240, 64, 0.06);
  transition: background 0.2s, border-color 0.2s;
}
.port-visit:hover {
  background: rgba(163, 240, 64, 0.14);
  border-color: var(--accent);
  color: var(--accent);
}
.port-info {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
}
.port-info h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.port-info .port-type {
  font-size: 0.78rem;
  color: var(--muted);
}
.port-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
}
.port-tags { display: flex; gap: 0.3rem; }
.port-tag {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--muted);
}

/* ============================================================
   Contact Page
============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: 4rem;
  align-items: start;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.form-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted-light);
  letter-spacing: 0.01em;
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(163, 240, 64, 0.4);
  box-shadow: 0 0 0 3px rgba(163, 240, 64, 0.08);
  outline: none;
}
/* Custom select arrow */
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238799B5' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--muted); }
.form-group textarea { resize: vertical; min-height: 140px; }
.form-group select option { background: var(--bg-card); }

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.contact-info-card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  gap: 1rem;
}
.contact-info-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-glow);
  border: 1px solid rgba(163, 240, 64, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.contact-info-text h4 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.contact-info-text p,
.contact-info-text a {
  font-size: 0.85rem;
  color: var(--muted-light);
}
.contact-info-text a:hover { color: var(--accent); }

/* Divider */
hr { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ============================================================
   Scroll Reveal
============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Responsive
============================================================ */
/* ── Tablet ─────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hero-layout            { grid-template-columns: 1fr; }
  .ghost-visual           { display: none; }
  .services-grid          { grid-template-columns: repeat(2, 1fr); }
  .about-grid             { grid-template-columns: 1fr; gap: 3rem; }
  .portfolio-grid-home    { grid-template-columns: repeat(2, 1fr); }
  .footer-grid            { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .service-detail-grid    { grid-template-columns: 1fr; }
  .process-grid           { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid         { grid-template-columns: repeat(2, 1fr); }
  .contact-grid           { grid-template-columns: 1fr; gap: 3rem; }
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .container              { padding: 0 1.25rem; }
  .section                { padding: 4rem 0; }
  .section-sm             { padding: 2.5rem 0; }

  /* Nav */
  .nav-links,
  .nav-cta-desktop        { display: none; }
  .nav-toggle             { display: flex; }

  /* Hero */
  .hero                   { min-height: 90vh; padding-top: calc(var(--nav-h) + 1rem); }
  .hero-sub               { font-size: 0.95rem; }
  .hero-actions           { flex-direction: column; align-items: stretch; width: 100%; }
  .hero-actions .btn      { width: 100%; justify-content: center; }
  .hero-meta              { flex-wrap: wrap; gap: 1.25rem; padding-top: 1.5rem; margin-top: 2rem; }
  .hero-stat .num         { font-size: 1.25rem; }
  .hero-divider           { display: none; }

  /* Services */
  .services-grid          { grid-template-columns: 1fr; }
  .services-header        { flex-direction: column; align-items: flex-start; gap: 1rem; }

  /* About */
  .about-stats            { grid-template-columns: 1fr 1fr; }
  .about-stat .num        { font-size: 1.75rem; }

  /* Portfolio */
  .portfolio-grid-home    { grid-template-columns: 1fr; }
  .portfolio-grid         { grid-template-columns: 1fr; }

  /* Process */
  .process-grid           { grid-template-columns: 1fr 1fr; }

  /* CTA */
  .cta-band               { padding: 4rem 0; }
  .cta-actions            { flex-direction: column; align-items: stretch; }
  .cta-actions .btn       { width: 100%; justify-content: center; }

  /* Footer */
  .footer-grid            { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-brand p         { max-width: 100%; }
  .footer-bottom          { flex-direction: column; gap: 0.5rem; text-align: center; }

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

  /* Contact info */
  .contact-info-card      { flex-direction: column; gap: 0.75rem; }

  /* Buttons global */
  .btn-lg                 { padding: 0.875rem 1.5rem; }

  /* Page hero */
  .page-hero              { padding: calc(var(--nav-h) + 3rem) 0 2.5rem; }
}

/* ── Small Mobile ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .process-grid           { grid-template-columns: 1fr; }
  .about-stats            { grid-template-columns: 1fr 1fr; }
  .portfolio-filters      { gap: 0.4rem; }
  .filter-btn             { font-size: 0.78rem; padding: 0.4rem 0.85rem; }
  .service-detail-card    { padding: 1.5rem; }

  /* Ensure tap targets are big enough */
  .btn, .filter-btn       { min-height: 44px; }
  .nav-toggle             { min-height: 44px; min-width: 44px; }
}

/* ============================================================
   FAQ cards (contatti.html)
============================================================ */
.faq-card {
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.faq-card-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}
.faq-q {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.faq-a {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ============================================================
   Focus visible (WCAG 2.4.7)
============================================================ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
/* Form inputs have their own visible focus indicator */
.form-group input:focus-visible,
.form-group select:focus-visible,
.form-group textarea:focus-visible {
  outline: none;
}

/* ============================================================
   Reduced Motion (WCAG 2.3.3)
============================================================ */
@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; }
}
