/* ===== CSS Variables ===== */
:root {
  --color-bg: #0a0a0f;
  --color-bg-alt: #12121a;
  --color-surface: #1a1a24;
  --color-accent: #c9a227;
  --color-accent-dim: #8b6914;
  --color-text: #e8e6e3;
  --color-text-muted: #9a968f;
  --color-border: rgba(201, 162, 39, 0.2);
  --font-display: 'Cinzel', serif;
  --font-body: 'Crimson Text', Georgia, serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  scroll-behavior: smooth;
}

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

/* ===== Noise Overlay ===== */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  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)'/%3E%3C/svg%3E");
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background: linear-gradient(to bottom, rgba(10, 10, 15, 0.95), transparent);
  transition: background 0.4s var(--ease-out-expo);
}

.nav.scrolled {
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--color-accent);
  text-decoration: none;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.3s var(--ease-out-expo);
}

.nav-links a:hover {
  color: var(--color-accent);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.3s;
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% 20%, rgba(201, 162, 39, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(139, 105, 20, 0.06) 0%, transparent 40%),
    radial-gradient(ellipse 40% 30% at 20% 60%, rgba(201, 162, 39, 0.04) 0%, transparent 40%);
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 10vw, 6rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.title-line {
  display: block;
  opacity: 0;
  transform: translateY(40px);
  animation: titleReveal 1s var(--ease-out-expo) forwards;
}

.title-line:nth-child(1) {
  animation-delay: 0.2s;
}

.title-line:nth-child(2) {
  animation-delay: 0.5s;
}

.title-accent {
  color: var(--color-accent);
  text-shadow: 0 0 60px rgba(201, 162, 39, 0.3);
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(30px);
  animation: titleReveal 0.8s var(--ease-out-expo) 0.8s forwards;
}

.hero-cta {
  display: inline-block;
  padding: 1rem 2.5rem;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: all 0.4s var(--ease-out-expo);
  opacity: 0;
  animation: titleReveal 0.8s var(--ease-out-expo) 1.1s forwards;
}

.hero-cta:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  box-shadow: 0 0 40px rgba(201, 162, 39, 0.4);
}

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

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: scrollPulse 2s ease-in-out infinite;
}

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

@keyframes scrollPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes scrollLine {
  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; }
}

/* ===== Hero particles ===== */
@keyframes particleFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translate(20px, -30px) scale(1.2);
    opacity: 1;
  }
  50% {
    transform: translate(-15px, -60px) scale(0.9);
    opacity: 0.5;
  }
  75% {
    transform: translate(10px, -30px) scale(1.1);
    opacity: 0.8;
  }
}

/* ===== Sections ===== */
.section {
  position: relative;
  padding: 8rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-inner {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.section-inner.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  margin-bottom: 3rem;
  color: var(--color-text);
}

.title-underline {
  position: relative;
  display: inline-block;
}

.title-underline::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  transition: width 0.6s var(--ease-out-expo) 0.3s;
}

.section-inner.visible .title-underline::after {
  width: 120px;
}

.section-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section-text {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.section-text.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-text:nth-child(1) { transition-delay: 0.1s; }
.section-text:nth-child(2) { transition-delay: 0.25s; }
.section-text:nth-child(3) { transition-delay: 0.4s; }

/* ===== Contact Section ===== */
.section-contact {
  padding-bottom: 10rem;
}

.contact-content {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.contact-content.visible {
  opacity: 1;
  transform: translateY(0);
}

.contact-intro {
  margin-bottom: 2.5rem;
  font-size: 1.2rem;
}

/* ===== Contact Form ===== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 500px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.form-group input,
.form-group textarea {
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-muted);
  opacity: 0.7;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  align-self: flex-start;
  padding: 1rem 2.5rem;
  background: transparent;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
}

.form-submit:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  box-shadow: 0 0 30px rgba(201, 162, 39, 0.3);
}

/* ===== Footer ===== */
.footer {
  padding: 2rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--color-border);
}

/* ===== Scroll-triggered animations ===== */
[data-scroll-animate] {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

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

/* Stagger children */
.section-content [data-scroll-animate]:nth-child(1) { transition-delay: 0.1s; }
.section-content [data-scroll-animate]:nth-child(2) { transition-delay: 0.2s; }
.section-content [data-scroll-animate]:nth-child(3) { transition-delay: 0.3s; }

/* ===== Parallax text effect (subtle) ===== */
.parallax-text {
  will-change: transform;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 2rem;
    background: rgba(10, 10, 15, 0.98);
    gap: 1.5rem;
  }

  .section {
    padding: 5rem 1.5rem;
  }

  .contact-links {
    flex-direction: column;
  }

  .contact-link {
    text-align: center;
  }
}
