:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07090d;
  --bg-elevated: #10151c;
  --surface: rgba(18, 24, 32, 0.82);
  --primary: #e8c15a;
  --primary-deep: #c49a2a;
  --ink: #f6f1e6;
  --muted: #b7b0a3;
  --line: rgba(232, 193, 90, 0.18);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --header-bg: rgba(7, 9, 13, 0.55);
  --header-bg-scrolled: rgba(7, 9, 13, 0.88);
  --grid-line: rgba(255, 255, 255, 0.03);
  --ghost-border: rgba(255, 255, 255, 0.22);
  --input-bg: rgba(7, 9, 13, 0.45);
  --stats-bg: rgba(7, 9, 13, 0.55);
  --button-ink: #1a1406;
  --hero-overlay: linear-gradient(180deg, rgba(7, 9, 13, 0.35) 0%, rgba(7, 9, 13, 0.78) 55%, var(--bg) 100%),
    linear-gradient(90deg, rgba(7, 9, 13, 0.55), transparent 55%);
  --hero-filter: saturate(0.7) contrast(1.05);
  --orb-a: #d4a017;
  --orb-b: #1e6f5c;
  --orb-opacity: 0.35;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f3ea;
  --bg-elevated: #ffffff;
  --surface: rgba(255, 255, 255, 0.86);
  --primary: #b78916;
  --primary-deep: #9a6f0d;
  --ink: #17140f;
  --muted: #5f5748;
  --line: rgba(183, 137, 22, 0.22);
  --shadow: 0 24px 60px rgba(47, 38, 16, 0.1);
  --header-bg: rgba(247, 243, 234, 0.72);
  --header-bg-scrolled: rgba(247, 243, 234, 0.94);
  --grid-line: rgba(23, 20, 15, 0.05);
  --ghost-border: rgba(23, 20, 15, 0.16);
  --input-bg: rgba(255, 255, 255, 0.92);
  --stats-bg: rgba(255, 255, 255, 0.78);
  --button-ink: #1a1406;
  --hero-overlay: linear-gradient(180deg, rgba(247, 243, 234, 0.42) 0%, rgba(247, 243, 234, 0.82) 58%, var(--bg) 100%),
    linear-gradient(90deg, rgba(247, 243, 234, 0.72), transparent 58%);
  --hero-filter: saturate(0.85) contrast(1.02) brightness(1.08);
  --orb-a: #e8c15a;
  --orb-b: #7dbaa8;
  --orb-opacity: 0.28;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--ink);
  scroll-behavior: smooth;
  transition: background 0.35s ease, color 0.35s ease;
}

body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
textarea {
  font: inherit;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: var(--orb-opacity);
}

.orb-a {
  width: 420px;
  height: 420px;
  background: var(--orb-a);
  top: -120px;
  inset-inline-end: -80px;
  animation: drift 14s ease-in-out infinite;
}

.orb-b {
  width: 360px;
  height: 360px;
  background: var(--orb-b);
  bottom: 8%;
  inset-inline-start: -90px;
  animation: drift 18s ease-in-out infinite reverse;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-40px, 30px); }
}

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.site-header.scrolled {
  background: var(--header-bg-scrolled);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 12px rgba(232, 193, 90, 0.55));
}

.logo-mark svg {
  width: 100%;
  height: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.language-switch {
  display: flex;
  gap: 0.35rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.theme-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

html[data-theme="dark"] .icon-moon,
html[data-theme="light"] .icon-sun {
  display: none;
}

.lang-button {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.2s ease;
}

.lang-button:hover,
.lang-button.active {
  background: var(--primary);
  color: var(--button-ink);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.4rem;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.25s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--ink);
}

.main-nav a:hover::after {
  width: 100%;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  padding: 7rem 0 4.5rem;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--hero-filter);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  color: var(--primary);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--primary);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 1.05;
  max-width: 14ch;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

html[data-theme="light"] .hero h1 {
  text-shadow: 0 8px 24px rgba(247, 243, 234, 0.7);
}

.hero-lead {
  max-width: 640px;
  margin: 0 0 2rem;
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 3rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f0d078, var(--primary-deep));
  color: var(--button-ink);
  padding: 0.95rem 1.7rem;
  border: none;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(212, 160, 23, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(212, 160, 23, 0.4);
}

.button-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ghost-border);
  box-shadow: none;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  max-width: 720px;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--stats-bg);
  backdrop-filter: blur(12px);
}

.hero-stats div {
  padding: 0.4rem 0.6rem;
}

.hero-stats dt {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary);
}

.hero-stats dd {
  margin: 0.15rem 0 0;
  color: var(--muted);
}

.section {
  position: relative;
  z-index: 1;
  padding: 5.5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2.8rem;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.section-header p:not(.eyebrow) {
  margin: 1rem auto 0;
  max-width: 700px;
  color: var(--muted);
  line-height: 1.9;
}

.cards-grid,
.services-grid,
.projects-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.8rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover,
.service-card:hover,
.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(232, 193, 90, 0.4);
}

.card-index {
  display: block;
  margin-bottom: 1.1rem;
  color: var(--primary);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.card h3,
.service-card h3,
.project-card h3 {
  margin-top: 0;
  margin-bottom: 0.8rem;
}

.card p,
.service-card p,
.project-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}

.icon-wrap {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
  border-radius: 16px;
  color: var(--primary);
  background: rgba(232, 193, 90, 0.1);
  border: 1px solid var(--line);
}

.icon-wrap svg {
  width: 28px;
  height: 28px;
}

.project-card {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.project-visual {
  height: 230px;
  overflow: hidden;
}

.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-visual img {
  transform: scale(1.08);
}

.project-body {
  padding: 1.4rem 1.5rem 1.6rem;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: stretch;
}

.contact-text {
  padding: 1.5rem 0;
}

.contact-text h2 {
  margin-top: 0;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.8rem 0 0;
  display: grid;
  gap: 0.9rem;
}

.contact-list li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  color: var(--muted);
  line-height: 1.7;
}

.contact-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(232, 193, 90, 0.1);
  color: var(--primary);
  flex-shrink: 0;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 2rem;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.contact-form label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 1.15rem;
  outline: none;
  background: var(--input-bg);
  color: var(--ink);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(232, 193, 90, 0.12);
}

.contact-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.success-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.success-content {
  text-align: center;
  max-width: 540px;
  padding: 3rem 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.success-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
  display: grid;
  place-items: center;
}

.success-icon svg {
  width: 100%;
  height: 100%;
  animation: scaleIn 0.6s ease forwards;
}

.success-content h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--primary);
}

.success-content p {
  margin: 0 0 2rem;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.1rem;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 5rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: center;
  text-align: center;
}

.whatsapp {
  position: fixed;
  bottom: 1.3rem;
  inset-inline-end: 1.3rem;
  z-index: 30;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s ease;
}

.whatsapp:hover {
  transform: scale(1.06);
}

.whatsapp svg {
  width: 28px;
  height: 28px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: rise 0.8s ease forwards;
}

.reveal:nth-child(2) { animation-delay: 0.08s; }
.reveal:nth-child(3) { animation-delay: 0.16s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .cards-grid,
  .services-grid,
  .projects-grid,
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .contact-inner {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 6rem 0 3.5rem;
  }

  .hero h1 {
    max-width: none;
  }
}

@media (max-width: 780px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    width: 100%;
    display: none;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.4rem;
    padding: 0.8rem 0 0.4rem;
  }

  .section {
    padding: 3.5rem 0;
  }
}
