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

:root {
  --bg: #0a0a0a;
  --bg-elevated: #141414;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222;
  --text: #f5f5f0;
  --text-secondary: #888;
  --text-muted: #555;
  --accent: #c8956c;
  --accent-light: #e0b896;
  --accent-glow: rgba(200, 149, 108, 0.15);
  --border: rgba(255,255,255,0.06);
  --border-light: rgba(255,255,255,0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --font: 'DM Sans', -apple-system, sans-serif;
  --font-display: 'Syne', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 clamp(1.5rem, 4vw, 3rem); }

/* ===== Cursor Glow ===== */
.cursor-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.5s;
}

/* ===== Shared ===== */
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
}

.heading--light { color: var(--text); }

.text-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section { padding: clamp(5rem, 10vw, 10rem) 0; position: relative; }

.section--accent {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section--dark {
  background: linear-gradient(180deg, var(--bg) 0%, #0d0d0d 100%);
}

.section-header { margin-bottom: 4rem; }

/* ===== Animations ===== */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero animations — play on load, not scroll */
.hero [data-animate] {
  animation: heroFadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero [data-animate]:nth-child(1) { animation-delay: 0.1s; }
.hero [data-animate]:nth-child(2) { animation-delay: 0.25s; }
.hero [data-animate]:nth-child(3) { animation-delay: 0.4s; }
.hero [data-animate]:nth-child(4) { animation-delay: 0.55s; }

.hero__floating [data-animate] {
  animation-delay: 0.6s;
}
.hero__floating [data-animate]:nth-child(2) { animation-delay: 0.7s; }
.hero__floating [data-animate]:nth-child(3) { animation-delay: 0.8s; }

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: all var(--transition);
}

.nav--scrolled {
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}

.nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav__logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: filter var(--transition), transform var(--transition);
}

.nav__logo {
  position: relative;
}

.nav__logo::before {
  content: '';
  position: absolute;
  inset: -10px -14px;
  background: radial-gradient(ellipse at center, rgba(240, 138, 36, 0.18) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.nav__logo:hover::before {
  opacity: 1;
}

.nav__logo:hover .nav__logo-img {
  filter: drop-shadow(0 0 10px rgba(240, 138, 36, 0.5));
  transform: scale(1.05);
}

.nav__logo-text {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 400;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  color: var(--text);
}

.nav__links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav__links a {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-secondary);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  transition: all var(--transition);
  white-space: nowrap;
}

.nav__links a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.nav__cta {
  background: var(--accent-glow) !important;
  color: var(--accent) !important;
  font-weight: 500 !important;
}

.nav__cta:hover {
  background: rgba(200, 149, 108, 0.25) !important;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  z-index: 101;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
  transform-origin: center;
}

.nav__toggle.active span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__toggle.active span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 8rem 0 4rem;
}

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

.hero__grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
}

.hero__gradient {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 70%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(200, 149, 108, 0.08) 0%, transparent 70%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  border: 1px solid rgba(200, 149, 108, 0.15);
  margin-bottom: 2.5rem;
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}

.hero__title-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 50%, #dfc4a8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 2.5rem;
  font-weight: 300;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #b07d55);
  color: #0a0a0a;
  box-shadow: 0 0 30px rgba(200, 149, 108, 0.2);
}

.btn--primary:hover {
  box-shadow: 0 0 50px rgba(200, 149, 108, 0.35);
  transform: translateY(-2px);
}

.btn--ghost {
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.03);
}

/* Hero scroll */
.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
}

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

@keyframes scrollPulse {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Floating stats */
.hero__floating {
  position: absolute;
  right: clamp(1.5rem, 4vw, 3rem);
  bottom: 8rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 1;
}

.hero__float-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-width: 140px;
}

.hero__float-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.hero__float-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ===== About ===== */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 8rem);
  align-items: start;
}

.about__lead {
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.about__right p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.about__divider {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin: 2rem 0;
}

.about__quote {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  font-style: italic;
  color: var(--accent-light) !important;
}

/* ===== Services ===== */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.service::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.5s;
}

.service:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-4px);
}

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

.service__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: var(--accent-glow);
  border-radius: 12px;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.service__num {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.75rem;
}

.service__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.service__text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== Gallery ===== */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.55rem 1.15rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: all var(--transition);
}

.filter-btn:hover {
  color: var(--text-secondary);
  border-color: var(--border-light);
}

.filter-btn.active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--bg-card);
  aspect-ratio: 4 / 3;
}

.gallery-item--wide {
  grid-column: span 2;
  aspect-ratio: 16 / 7;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.7) 100%);
  opacity: 0;
  transition: opacity 0.4s;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}

.gallery-item:hover .gallery-item__overlay { opacity: 1; }

.gallery-item__overlay span {
  font-size: 0.8rem;
  font-weight: 500;
  color: white;
  letter-spacing: 0.05em;
}

/* ===== EU Projects ===== */
.eu-projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.eu-project {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.eu-project:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
}

.eu-project__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.eu-project__code {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
}

.eu-project__period {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.eu-project__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.eu-project__text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.eu-project__stats {
  display: flex;
  gap: 2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.eu-project__stat-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.eu-project__stat-value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.eu-project__logos {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.eu-project__logos img {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: brightness(0.9);
  opacity: 0.85;
  transition: opacity var(--transition);
}

.eu-project__logos img:hover {
  opacity: 1;
}

@media (max-width: 900px) {
  .eu-projects {
    grid-template-columns: 1fr;
  }
}

/* ===== Contact ===== */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 8rem);
  align-items: center;
}

.contact__text {
  color: var(--text-secondary);
  margin-top: 1.5rem;
  max-width: 400px;
  line-height: 1.8;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-item__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--accent-glow);
  border-radius: 10px;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-item__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.contact-item__value {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.contact-item__value a { transition: color var(--transition); }
.contact-item__value a:hover { color: var(--accent); }

/* ===== Footer ===== */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

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

.footer__logo {
  display: flex;
  align-items: center;
}

.footer__logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.footer__logo:hover .footer__logo-img {
  opacity: 1;
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer__links {
  display: flex;
  gap: 1.5rem;
}

.footer__links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer__links a:hover { color: var(--text-secondary); }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(30px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox__img {
  max-width: 88vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  color: var(--text);
  opacity: 0.7;
  transition: all var(--transition);
}

.lightbox__close:hover { opacity: 1; background: rgba(255,255,255,0.1); }

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  color: var(--text);
  opacity: 0.5;
  transition: all var(--transition);
}

.lightbox__prev:hover,
.lightbox__next:hover { opacity: 1; background: rgba(255,255,255,0.1); }

.lightbox__prev { left: 1.5rem; }
.lightbox__next { right: 1.5rem; }

.lightbox__counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero__floating { display: none; }
}

@media (max-width: 900px) {
  .about, .contact { grid-template-columns: 1fr; gap: 3rem; }
  .services { grid-template-columns: 1fr; }
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-item--wide {
    grid-column: span 1;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 600px) {
  .nav__links {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
  }

  .nav__links.open {
    opacity: 1;
    pointer-events: all;
  }

  .nav__links a {
    font-size: 1.2rem;
    padding: 0.75rem 1.5rem;
  }

  .nav__toggle { display: flex; }

  .hero { padding: 7rem 0 6rem; }
  .hero__title { font-size: 2.5rem; }
  .hero__actions { flex-direction: column; align-items: flex-start; }

  .gallery { grid-template-columns: 1fr; }
  .gallery-item--wide { grid-column: span 1; aspect-ratio: 4 / 3; }

  .gallery-filters { gap: 0.35rem; }
  .filter-btn { padding: 0.45rem 0.85rem; font-size: 0.7rem; }

  .footer__inner { flex-direction: column; gap: 1rem; text-align: center; }
  .footer__links { gap: 1rem; }
}
