:root {
  --bg-dark: #12151a;
  --bg-dark-alt: #191d24;
  --bg-light: #f7f5f1;
  --bg-light-alt: #efebe3;
  --text-light: #f5f3ef;
  --text-light-muted: rgba(245, 243, 239, 0.68);
  --text-dark: #1c1f24;
  --text-dark-muted: #666d75;
  --accent: #2f6fed;
  --accent-light: #4f86f7;
  --accent-dark: #1d4ed8;
  --line-light: rgba(28, 31, 36, 0.1);
  --line-dark: rgba(245, 243, 239, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1180px;
  --accent-gradient: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 55%, var(--accent-dark) 100%);
  --ease: cubic-bezier(0.16, 0.84, 0.44, 1);
  --shadow-md: 0 20px 45px -20px rgba(18, 21, 26, 0.35);
  --shadow-lg: 0 30px 70px -25px rgba(18, 21, 26, 0.45);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

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

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

ul { list-style: none; }

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

svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 130px 0; position: relative; }
@media (max-width: 640px) { .section { padding: 90px 0; } }

.section-head { max-width: 640px; margin-bottom: 64px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-intro { margin-top: 18px; color: var(--text-dark-muted); font-size: 1.05rem; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

h2 { font-size: clamp(2rem, 3.4vw, 2.7rem); margin-bottom: 22px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
  white-space: nowrap;
}
.btn-sm { padding: 11px 22px; font-size: 0.85rem; }
.btn-block { width: 100%; }

.btn-accent {
  background: var(--accent-gradient);
  color: var(--text-light);
  box-shadow: 0 14px 30px -12px rgba(47, 111, 237, 0.55);
}
.btn-accent:hover { filter: brightness(1.08) saturate(1.05); transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(47, 111, 237, 0.6); }

.btn-ghost {
  background: transparent;
  color: var(--text-light);
  border: 1.5px solid rgba(245, 243, 239, 0.3);
}
.btn-ghost:hover { background: rgba(245, 243, 239, 0.1); border-color: rgba(245, 243, 239, 0.6); transform: translateY(-2px); }

/* ---------- Photo treatment ---------- */
.photo { position: relative; overflow: hidden; border-radius: var(--radius); background: #1b1e23; }
.photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.9) contrast(1.06) brightness(0.98);
  transition: transform 0.8s var(--ease);
}
.photo::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(155deg, rgba(18,21,26,0.32) 0%, rgba(18,21,26,0) 55%), linear-gradient(0deg, rgba(18,21,26,0.28), transparent 45%);
  pointer-events: none;
}

/* ---------- Progress bar ---------- */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent-light));
  z-index: 2000; transition: width 0.1s linear;
}

/* ---------- Header ---------- */
#site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 22px 0;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
#site-header.scrolled {
  padding: 14px 0;
  background: rgba(18, 21, 26, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px -15px rgba(0,0,0,0.5);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { display: flex; align-items: center; gap: 14px; }
.logo-text { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.7rem; line-height: 1; letter-spacing: -0.01em; color: var(--text-light); }
.logo-text em { display: block; font-style: normal; font-weight: 500; font-size: 0.66rem; line-height: 1; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-light-muted); margin-top: 3px; }

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { font-size: 0.92rem; font-weight: 500; color: var(--text-light-muted); position: relative; padding: 4px 0; transition: color 0.3s; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--accent);
  transition: width 0.35s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--text-light); }
.nav-links a.active::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 18px; }

#menu-toggle { display: none; flex-direction: column; gap: 5px; width: 26px; }
#menu-toggle span { display: block; height: 2px; width: 100%; background: var(--text-light); transition: transform 0.35s var(--ease), opacity 0.3s; }
#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 ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  overflow: hidden; color: var(--text-light);
}
.hero-media { position: absolute; inset: -12% 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85) contrast(1.1) brightness(0.75); will-change: transform; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,17,21,0.75) 0%, rgba(15,17,21,0.55) 45%, rgba(15,17,21,0.92) 100%);
}
.hero-content { position: relative; z-index: 2; padding-top: 90px; max-width: 780px; }
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.4rem); margin-bottom: 24px; }
.hero-sub { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--text-light-muted); max-width: 560px; margin-bottom: 38px; }
.hero-actions { display: flex; gap: 18px; flex-wrap: wrap; }

.scroll-cue {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-light-muted);
  transition: opacity 0.4s;
}
.scroll-cue span { width: 1px; height: 34px; background: linear-gradient(var(--text-light-muted), transparent); }
.scroll-cue svg { width: 18px; height: 18px; animation: bounce 2s infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(6px); opacity: 1; } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 70px; align-items: center; }
.about-grid .section-head { margin-bottom: 40px; }
.about-media { max-width: 380px; margin-left: auto; }
.about-media .photo { aspect-ratio: 4/5; }
.about-media .photo img { filter: saturate(0.7) contrast(1.02) brightness(1.02) grayscale(0.15); }

.check-list { display: flex; flex-direction: column; gap: 14px; }
.check-list li {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  border: 1px solid var(--line-light); border-radius: var(--radius-sm); font-weight: 500;
}
.check-list svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--accent); }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 44px; }
  .about-media { max-width: 460px; margin: 0 auto; }
}

/* ---------- Services ---------- */
.services { background: var(--bg-light-alt); }

.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.service-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 12px 30px -20px rgba(28,31,36,0.25);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.service-card .photo { aspect-ratio: 4/3; border-radius: 0; }
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.service-card:hover .photo img { transform: scale(1.08); }
.service-body { padding: 26px 26px 30px; }
.service-body h3 { font-size: 1.18rem; margin-bottom: 10px; }
.service-body p { color: var(--text-dark-muted); font-size: 0.94rem; }

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

.service-grid .service-card:nth-child(1) { transition-delay: 0s; }
.service-grid .service-card:nth-child(2) { transition-delay: 0.1s; }
.service-grid .service-card:nth-child(3) { transition-delay: 0.2s; }
.service-grid .service-card:nth-child(4) { transition-delay: 0.3s; }

/* ---------- Portfolio ---------- */
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project-card { position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer; }
.project-card .photo { aspect-ratio: 3/4; border-radius: 0; }
.project-card figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 20px;
  background: linear-gradient(0deg, rgba(15,17,21,0.92), transparent);
  color: var(--text-light); transform: translateY(12px); opacity: 0.9;
  transition: transform 0.5s var(--ease);
}
.project-card figcaption h3 { font-size: 1.02rem; margin-bottom: 4px; }
.project-card figcaption span { font-size: 0.78rem; color: var(--accent-light); text-transform: uppercase; letter-spacing: 0.06em; }
.project-card:hover .photo img { transform: scale(1.1); }
.project-card:hover figcaption { transform: translateY(0); }

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

/* ---------- Contact ---------- */
.contact { background: var(--bg-dark-alt); color: var(--text-light); }
.contact .eyebrow { color: var(--accent-light); }
.contact h2 { color: var(--text-light); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 70px; }
.contact .section-intro { color: var(--text-light-muted); }

.contact-list { margin-top: 34px; display: flex; flex-direction: column; gap: 22px; }
.contact-list li { display: flex; align-items: center; gap: 16px; }
.contact-icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(79,134,247,0.28), rgba(47,111,237,0.08));
  color: var(--accent-light);
  display: flex; align-items: center; justify-content: center;
}
.contact-icon svg { width: 22px; height: 22px; }
.contact-list li div { display: flex; flex-direction: column; }
.contact-list li strong { font-size: 0.92rem; }
.contact-list li span { color: var(--text-light-muted); font-size: 0.92rem; }
.phone-row { display: inline-flex; align-items: center; gap: 10px; }
.phone-row a:first-child:hover { color: var(--text-light); }
.whatsapp-link { display: inline-flex; color: #25d366; transition: opacity 0.2s; }
.whatsapp-link:hover { opacity: 0.75; }
.whatsapp-link svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }

.contact-form {
  background: var(--bg-dark); border-radius: var(--radius); padding: 40px;
  display: flex; flex-direction: column; gap: 20px; box-shadow: var(--shadow-md); position: relative;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-form label { display: flex; flex-direction: column; gap: 8px; font-size: 0.85rem; color: var(--text-light-muted); }
.contact-form input, .contact-form textarea {
  background: rgba(245,243,239,0.05); border: 1.5px solid var(--line-dark); border-radius: var(--radius-sm);
  padding: 13px 16px; color: var(--text-light); font-family: inherit; font-size: 0.95rem;
  transition: border-color 0.3s, background 0.3s;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--accent); background: rgba(245,243,239,0.08);
}
.contact-form textarea { resize: vertical; min-height: 90px; }

.form-success {
  display: none; align-items: center; gap: 10px; color: var(--accent-light);
  font-size: 0.9rem; font-weight: 500; padding-top: 4px;
}
.form-success svg { width: 18px; height: 18px; flex-shrink: 0; }
.form-success.show { display: flex; }
.contact-form.submitted .btn { display: none; }

.form-error {
  display: none; color: #f28b82; font-size: 0.9rem; font-weight: 500; padding-top: 4px;
}
.form-error.show { display: block; }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 50px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-dark); color: var(--text-light-muted); padding: 80px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 50px; padding-bottom: 60px; border-bottom: 1px solid var(--line-dark); }

.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 { color: var(--text-light); font-size: 0.92rem; margin-bottom: 6px; }
.footer-col a, .footer-col span { font-size: 0.9rem; transition: color 0.3s; }
.footer-col a:hover { color: var(--accent-light); }

.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 26px 24px; font-size: 0.82rem; }

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

/* ---------- Back to top ---------- */
#back-to-top {
  position: fixed; bottom: 30px; right: 30px; z-index: 900;
  width: 48px; height: 48px; border-radius: 50%; background: var(--accent-gradient); color: var(--text-light);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), filter 0.3s;
}
#back-to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
#back-to-top:hover { filter: brightness(1.08); }
#back-to-top svg { width: 20px; height: 20px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 3000; background: rgba(15,17,21,0.94);
  display: flex; align-items: center; justify-content: center; padding: 40px;
  opacity: 0; pointer-events: none; transition: opacity 0.4s var(--ease);
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox figure { max-width: 900px; width: 100%; text-align: center; }
.lightbox img { width: 100%; max-height: 72vh; object-fit: cover; border-radius: var(--radius); }
.lightbox figcaption { color: var(--text-light-muted); margin-top: 18px; font-size: 0.92rem; }
.lightbox-close {
  position: absolute; top: 26px; right: 30px; font-size: 2rem; line-height: 1; color: var(--text-light);
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  transition: background 0.3s;
}
.lightbox-close:hover { background: rgba(245,243,239,0.1); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Mobile nav ---------- */
@media (max-width: 900px) {
  #menu-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(320px, 80vw);
    background: var(--bg-dark-alt); flex-direction: column; align-items: flex-start;
    justify-content: center; gap: 28px; padding: 40px;
    transform: translateX(100%); transition: transform 0.5s var(--ease);
    box-shadow: -20px 0 50px rgba(0,0,0,0.35);
  }
  .nav-links.open { transform: translateX(0); }
  .header-actions .btn-sm { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
