/* ========================================
   AEGIS DEVELOPMENT AND PARTNERS
   Design System & Styles
   ======================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&family=Montserrat:wght@200;300;400;500;600&display=swap');

/* --- Preloader --- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a0a09;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preloader-inner {
  text-align: center;
}
.preloader-logo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 200;
  font-size: 36px;
  letter-spacing: 0.46em;
  padding-left: 0.46em;
  color: #f3efe8;
  margin-bottom: 32px;
  animation: preloaderPulse 1.5s ease-in-out infinite;
}
.preloader-bar {
  width: 120px;
  height: 1px;
  background: rgba(156, 126, 60, 0.15);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 1px;
}
.preloader-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #9c7e3c, #c4a24e);
  transform-origin: left;
  animation: preloaderSlide 1.2s ease-in-out infinite;
}
@keyframes preloaderPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
@keyframes preloaderSlide {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* --- Design Tokens --- */
:root {
  --bg-primary: #0a0a09;
  --bg-secondary: #131311;
  --bg-tertiary: #1a1a17;
  --bg-card: #16161400;
  --gold: #9c7e3c;
  --gold-light: #c4a24e;
  --gold-dim: rgba(156, 126, 60, 0.15);
  --text-primary: #f3efe8;
  --text-secondary: #9e9a91;
  --text-tertiary: #56534c;
  --line: rgba(156, 126, 60, 0.12);
  --line-light: rgba(243, 239, 232, 0.06);
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Montserrat', sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --nav-height: 80px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Selection Style */
::selection {
  background: rgba(156, 126, 60, 0.3);
  color: #f3efe8;
}

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

/* Smooth scrollbar */
body::-webkit-scrollbar {
  width: 6px;
}
body::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
body::-webkit-scrollbar-thumb {
  background: var(--gold-dim);
  border-radius: 3px;
}
body::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 40px;
}

.section-eyebrow {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.section-eyebrow::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--gold);
}

.section-heading {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.2;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.section-text {
  font-weight: 300;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 560px;
}

/* --- Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: background 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}
.nav.scrolled {
  background: rgba(10, 10, 9, 0.92);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--line-light);
}
.nav-inner {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  z-index: 1001;
}
.nav-logo-main {
  font-family: var(--font-body);
  font-weight: 200;
  font-size: 22px;
  letter-spacing: 0.46em;
  color: var(--text-primary);
  line-height: 1;
}
.nav-logo-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 8px;
  letter-spacing: 0.5em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.3s ease;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.4s var(--ease-out);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 4px;
}
.lang-btn {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  padding: 4px 10px;
  border-radius: 3px;
  transition: all 0.3s ease;
}
.lang-btn.active {
  color: var(--text-primary);
  background: var(--gold-dim);
}

/* Mobile Menu Button */
.menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 28px;
  z-index: 1001;
}
.menu-btn span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--text-primary);
  transition: all 0.4s var(--ease-out);
  transform-origin: center;
}
.menu-btn.open span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-3.5px) rotate(-45deg); }

/* ========================================
   HERO
   ======================================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 12s linear;
}
.hero.loaded .hero-bg img { transform: scale(1); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10,10,9,0.5) 0%,
    rgba(10,10,9,0.3) 40%,
    rgba(10,10,9,0.6) 100%
  );
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
}
.hero-logo {
  font-family: var(--font-body);
  font-weight: 200;
  font-size: clamp(42px, 7vw, 80px);
  letter-spacing: 0.46em;
  padding-left: 0.46em;
  color: var(--text-primary);
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeIn 1.2s var(--ease-out) 0.3s forwards;
}
.hero-rule {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 16px;
  opacity: 0;
  animation: heroFadeIn 1s var(--ease-out) 0.6s forwards;
}
.hero-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(10px, 1.5vw, 13px);
  letter-spacing: 0.5em;
  padding-left: 0.5em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 36px;
  opacity: 0;
  animation: heroFadeIn 1s var(--ease-out) 0.8s forwards;
}
.hero-tagline {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(14px, 1.8vw, 18px);
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  max-width: 520px;
  margin: 0 auto;
  opacity: 0;
  animation: heroFadeIn 1s var(--ease-out) 1s forwards;
  text-shadow: 0 2px 20px rgba(0,0,0,0.6);
}

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

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: heroFadeIn 1s var(--ease-out) 1.4s forwards;
}
.scroll-indicator span {
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about {
  padding: 160px 0;
  position: relative;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/5;
}
.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}
.about-image:hover img { transform: scale(1.04); }
.about-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  pointer-events: none;
}

/* Stats Bar */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 120px;
}
.stat {
  background: var(--bg-primary);
  padding: 44px 32px;
  text-align: center;
}
.stat-number {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* ========================================
   SERVICES SECTION
   ======================================== */
.services {
  padding: 160px 0;
  background: var(--bg-secondary);
  position: relative;
}
.services-header {
  text-align: center;
  margin-bottom: 80px;
}
.services-header .section-text {
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.service-card {
  background: var(--bg-secondary);
  padding: 56px 36px;
  position: relative;
  transition: background 0.5s ease;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}
.service-card:hover { background: var(--bg-tertiary); }
.service-card:hover::before { transform: scaleX(1); }

.service-num {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gold);
  font-weight: 400;
  margin-bottom: 32px;
}
.service-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
  line-height: 1.3;
}
.service-desc {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}
.service-link {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.3s ease;
}
.service-link:hover { gap: 14px; }
.service-link svg {
  width: 16px;
  height: 16px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.5;
}

/* ========================================
   PROJECTS SECTION
   ======================================== */
.projects {
  padding: 160px 0;
}
.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 64px;
}
.projects-link {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.3s ease;
  flex-shrink: 0;
}
.projects-link:hover { gap: 14px; }
.projects-link svg {
  width: 16px;
  height: 16px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.5;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.project-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 2px;
}
.project-card:nth-child(1) { aspect-ratio: 16/10; }
.project-card:nth-child(2) { aspect-ratio: 16/10; }
.project-card:nth-child(3) { aspect-ratio: 16/10; }
.project-card:nth-child(4) { aspect-ratio: 16/10; }

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out), filter 0.5s ease;
  filter: brightness(0.9) saturate(0.95);
}
.project-card:hover img { transform: scale(1.06); filter: brightness(1) saturate(1); }

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(10,10,9,0.85) 0%,
    rgba(10,10,9,0) 50%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 36px;
  transition: background 0.5s ease;
}
.project-card:hover .project-overlay {
  background: linear-gradient(
    0deg,
    rgba(10,10,9,0.9) 0%,
    rgba(10,10,9,0.2) 60%
  );
}
.project-type {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.project-name {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.project-location {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-secondary);
}
.project-arrow {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(243, 239, 232, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s var(--ease-out);
}
.project-card:hover .project-arrow {
  opacity: 1;
  transform: translateY(0);
}
.project-arrow svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-primary);
  fill: none;
  stroke-width: 1.5;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact {
  padding: 160px 0;
  background: var(--bg-secondary);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
}
.contact-info-block {
  margin-bottom: 48px;
}
.contact-info-label {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.contact-info-text {
  font-weight: 300;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.contact-info-text a {
  transition: color 0.3s ease;
}
.contact-info-text a:hover { color: var(--gold); }

/* Form */
.form-group {
  margin-bottom: 32px;
  position: relative;
}
.form-group label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 10px;
  font-weight: 400;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 300;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.3s ease;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--gold);
}
.form-group textarea {
  resize: vertical;
  min-height: 100px;
}
.form-group select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--gold);
  padding: 18px 40px;
  cursor: pointer;
  transition: all 0.4s ease;
  margin-top: 12px;
  position: relative;
  overflow: hidden;
}
.submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease-out);
  z-index: -1;
}
.submit-btn:hover {
  color: var(--bg-primary);
}
.submit-btn:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}
.submit-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  transition: transform 0.3s ease;
}
.submit-btn:hover svg {
  transform: translateX(4px);
}

/* Form Success Toast */
.form-toast {
  position: fixed;
  bottom: 40px;
  right: 40px;
  background: var(--bg-tertiary);
  border: 1px solid var(--gold);
  padding: 20px 32px;
  border-radius: 4px;
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-primary);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s var(--ease-out);
  pointer-events: none;
}
.form-toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.form-toast-icon {
  color: var(--gold);
  font-size: 18px;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--line-light);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-logo {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-logo-main {
  font-family: var(--font-body);
  font-weight: 200;
  font-size: 16px;
  letter-spacing: 0.46em;
}
.footer-logo-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 7px;
  letter-spacing: 0.5em;
  color: var(--text-tertiary);
  text-transform: uppercase;
}
.footer-copy {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  transition: color 0.3s ease;
}
.footer-links a:hover { color: var(--gold); }

/* ========================================
   MOBILE OVERLAY MENU
   ======================================== */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10, 10, 9, 0.97);
  backdrop-filter: blur(30px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}
.mobile-menu a {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}
.mobile-menu a:hover { color: var(--gold); }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .container { padding: 0 28px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { gap: 48px; }
  .contact-grid { gap: 60px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --nav-height: 68px; }
  .container { padding: 0 20px; }

  .nav-links { display: none; }
  .menu-btn { display: flex; }

  .hero-logo { letter-spacing: 0.3em; padding-left: 0.3em; }

  .about { padding: 100px 0; }
  .about-grid { grid-template-columns: 1fr; }
  .about-image { aspect-ratio: 16/10; }

  .services { padding: 100px 0; }
  .services-grid { grid-template-columns: 1fr; }

  .projects { padding: 100px 0; }
  .projects-grid { grid-template-columns: 1fr; }
  .projects-header { flex-direction: column; align-items: flex-start; gap: 20px; }

  .contact { padding: 100px 0; }
  .contact-grid { grid-template-columns: 1fr; gap: 60px; }

  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 80px; }

  .footer-inner { flex-direction: column; gap: 24px; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .stat { padding: 32px 24px; }
}
