/* --- CSS VARIABLES & RESET --- */
:root {
  --bg-color: #0f1115;
  --surface-color: #161b22;
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --accent-gold: #c5a059;
  --accent-gold-hover: #e0b86a;
  --font-heading: "Cormorant Garamond", serif;
  --font-body: "Montserrat", sans-serif;
  --transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}
ul {
  list-style: none;
}
img {
  width: 100%;
  display: block;
}

/* --- PRELOADER --- */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transition: opacity 0.8s ease-out, visibility 0.8s;
}

.loader-logo {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--accent-gold);
  letter-spacing: 0.2em;
  animation: pulse 3s infinite;
}

.loader-line {
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  margin-top: 20px;
  animation: loadLine 3s ease-in-out forwards;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.98);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

@keyframes loadLine {
  0% {
    width: 0;
  }
  100% {
    width: 150px;
  }
}

/* --- NAVIGATION --- */
header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  transition: background 0.4s ease, padding 0.4s ease;
}

header.scrolled {
  background: rgba(15, 17, 21, 0.95);
  backdrop-filter: blur(10px);
  padding: 15px 5%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
}
.logo span {
  color: var(--accent-gold);
}

nav ul {
  display: flex;
  gap: 40px;
}

nav a {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  cursor: pointer;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-gold);
  transition: width 0.3s ease;
}

nav a:hover {
  color: var(--accent-gold);
}
nav a:hover::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
  z-index: 101;
}

/* --- HERO SECTION --- */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("https://images.unsplash.com/photo-1600210492486-724fe5c67fb0?q=80&w=1974&auto=format&fit=crop")
    no-repeat center center/cover;
  filter: brightness(0.4);
  transform: scale(1.1);
  transition: transform 10s ease;
  z-index: -1;
}

.hero:hover .hero-bg {
  transform: scale(1);
}

.hero-content {
  z-index: 1;
  max-width: 800px;
  padding: 0 20px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s ease 2.2s forwards;
}

.hero-subtitle {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--accent-gold);
  margin-bottom: 20px;
  display: block;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 30px;
  font-weight: 300;
}

.btn {
  display: inline-block;
  padding: 15px 40px;
  border: 1px solid var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.btn:hover {
  background: var(--text-primary);
  color: var(--bg-color);
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  opacity: 0.7;
}

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

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* --- GENERAL SECTIONS --- */
section {
  padding: 100px 5%;
}

.section-header {
  text-align: center;
  margin-bottom: 80px;
}

.section-subtitle {
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  margin-bottom: 10px;
  display: block;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--text-primary);
}

/* --- ABOUT --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-img {
  position: relative;
  overflow: hidden;
}

.about-img img {
  transition: transform 0.8s ease;
}

.about-img:hover img {
  transform: scale(1.05);
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1.05rem;
}

/* --- PORTFOLIO --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.portfolio-item {
  position: relative;
  height: 400px;
  overflow: hidden;
  cursor: pointer;
}

.portfolio-item img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  transition: opacity 0.4s ease;
}

.portfolio-item:hover img {
  transform: scale(1.1);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.project-cat {
  font-size: 0.8rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 5px;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: #fff;
}

/* --- SERVICES --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
}

.service-card {
  background: var(--surface-color);
  padding: 50px 30px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-gold);
}

.service-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 30px;
  fill: var(--accent-gold);
}

.service-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.service-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* --- CONTACT --- */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  background: var(--surface-color);
  padding: 60px;
}

.contact-info h3 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 20px;
}

.info-item {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.info-item svg {
  width: 20px;
  height: 20px;
  fill: var(--accent-gold);
  margin-right: 15px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

input,
textarea {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border 0.3s;
}

input:focus,
textarea:focus {
  border-color: var(--accent-gold);
}

textarea {
  resize: none;
  height: 120px;
}

/* --- FOOTER --- */
footer {
  text-align: center;
  padding: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* --- SCROLL REVEAL UTILITY --- */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s ease;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .hero h1 {
    font-size: 3rem;
  }
  .about-grid,
  .contact-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
    color: #fff;
    margin-left: 9rem;
  }

  nav ul {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 60%;
    background: var(--surface-color);
    flex-direction: column;
    justify-content: left;
    align-items: left;
    transition: 0.5s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    padding-top: 6rem;
    padding-left: 1rem;
  }

  nav ul.active {
    right: 0;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  .section-title {
    font-size: 2.2rem;
  }
}