:root {
  --bg: #0a0d14;
  --bg-2: #0f131c;
  --panel: #131825;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8ecf3;
  --muted: #8a93a6;
  --gold: #d4af7a;
  --gold-2: #f0d9a8;
  --accent: #6ea8ff;
  --max: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  line-height: 1.15;
}

p { margin: 0 0 1em; color: var(--muted); }

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

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

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 2;
}

/* ---------- Polygon background ---------- */
.poly-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(212,175,122,0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(110,168,255,0.08), transparent 60%),
    linear-gradient(180deg, #0a0d14 0%, #0c1019 100%);
}
.poly-bg svg { width: 100%; height: 100%; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.6'/></svg>");
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 13, 20, 0.55);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.scrolled {
  background: rgba(10, 13, 20, 0.85);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  letter-spacing: 0.02em;
}
.brand-mark {
  width: 32px; height: 32px;
}
.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .2s ease;
  position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -6px;
  height: 1px;
  background: var(--gold);
  transition: right .3s ease;
}
.nav-links a:hover::after { right: 0; }

.nav-cta {
  padding: 10px 20px;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all .25s ease;
}
.nav-cta:hover { background: var(--gold); color: #0a0d14; }

.burger {
  display: none;
  background: none;
  border: 0;
  width: 36px; height: 36px;
  cursor: pointer;
  color: var(--text);
}
.burger span {
  display: block;
  height: 1.5px;
  background: currentColor;
  margin: 6px 0;
  transition: transform .3s ease, opacity .3s ease;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: .1s; }
.reveal.delay-2 { transition-delay: .2s; }
.reveal.delay-3 { transition-delay: .3s; }
.reveal.delay-4 { transition-delay: .4s; }
.reveal.delay-5 { transition-delay: .5s; }

/* ---------- Section base ---------- */
section {
  padding: 140px 0;
  position: relative;
}
.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
  padding-left: 40px;
  position: relative;
}
.eyebrow::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 28px; height: 1px;
  background: var(--gold);
}
.section-title {
  font-size: clamp(34px, 4.5vw, 58px);
  margin-bottom: 18px;
}
.section-lead {
  max-width: 640px;
  font-size: 17px;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  padding-top: 180px;
  display: flex;
  align-items: center;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(44px, 6.4vw, 92px);
  line-height: 1.02;
}
.hero h1 .gold {
  background: linear-gradient(120deg, var(--gold) 0%, var(--gold-2) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
}
.hero-lead {
  font-size: 19px;
  max-width: 520px;
  margin-top: 28px;
  margin-bottom: 40px;
}
.btn-row { display: flex; gap: 18px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(120deg, var(--gold), var(--gold-2));
  color: #0a0d14;
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost {
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
}
.hero-visual svg { width: 100%; height: 100%; }
.hero-visual .float {
  animation: floaty 8s ease-in-out infinite;
}
@keyframes floaty {
  0%,100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-14px) rotate(1.2deg); }
}

.hero-meta {
  display: flex;
  gap: 50px;
  margin-top: 70px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.hero-meta div span {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: var(--text);
}
.hero-meta div small {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Services ---------- */
.services-grid {
  margin-top: 70px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service {
  position: relative;
  padding: 38px 32px 34px;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: transform .35s ease, border-color .35s ease, background .35s ease;
}
.service::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(400px 200px at var(--mx,50%) var(--my,0%), rgba(212,175,122,0.10), transparent 60%);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}
.service:hover { transform: translateY(-6px); border-color: rgba(212,175,122,0.4); }
.service:hover::before { opacity: 1; }
.service-num {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 0.2em;
  margin-bottom: 24px;
}
.service h3 { font-size: 24px; margin-bottom: 14px; }
.service p { margin-bottom: 22px; font-size: 15px; }
.service-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.service-tags span {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* ---------- Portfolio ---------- */
.portfolio-grid {
  margin-top: 70px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 230px;
  gap: 22px;
}
.project {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: pointer;
  isolation: isolate;
}
.project .art { position: absolute; inset: 0; }
.project .art svg { width: 100%; height: 100%; }
.project .overlay {
  position: absolute;
  inset: 0;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(10,13,20,0) 30%, rgba(10,13,20,0.85) 100%);
  transition: background .4s ease;
}
.project:hover .overlay { background: linear-gradient(180deg, rgba(10,13,20,0.2) 0%, rgba(10,13,20,0.92) 100%); }
.project .cat {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.project h3 {
  font-size: 22px;
  margin: 0;
  transition: transform .35s ease;
}
.project:hover h3 { transform: translateY(-4px); }

.p-1 { grid-column: span 3; grid-row: span 2; }
.p-2 { grid-column: span 3; }
.p-3 { grid-column: span 2; }
.p-4 { grid-column: span 1; }
.p-5 { grid-column: span 2; grid-row: span 2; }
.p-6 { grid-column: span 2; }
.p-7 { grid-column: span 2; }

/* ---------- Process timeline ---------- */
.process {
  position: relative;
}
.timeline {
  margin-top: 90px;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line) 10%, var(--line) 90%, transparent);
  transform: translateX(-0.5px);
}
.step {
  display: grid;
  grid-template-columns: 1fr 120px 1fr;
  align-items: center;
  gap: 30px;
  margin-bottom: 90px;
}
.step:last-child { margin-bottom: 0; }
.step-art {
  grid-column: 1;
  display: flex;
  justify-content: flex-end;
}
.step-art svg { width: 280px; height: 280px; }
.step-node {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.step-dot {
  width: 16px; height: 16px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 0 6px rgba(212,175,122,0.12), 0 0 30px rgba(212,175,122,0.5);
}
.step-num {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.2em;
}
.step-body { grid-column: 3; }
.step-body h3 { font-size: 30px; margin-bottom: 12px; }
.step-body p { max-width: 420px; }
.step.reverse .step-art { grid-column: 3; justify-content: flex-start; order: 3; }
.step.reverse .step-body { grid-column: 1; text-align: right; order: 1; }
.step.reverse .step-body p { margin-left: auto; }
.step.reverse .step-node { order: 2; }

/* ---------- About / stats ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-copy h2 { font-size: clamp(32px, 4vw, 52px); }
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.stat {
  padding: 36px 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: radial-gradient(circle at top right, rgba(212,175,122,0.25), transparent 70%);
}
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 56px;
  line-height: 1;
  color: var(--text);
  margin-bottom: 10px;
}
.stat-num .gold { color: var(--gold); font-style: italic; }
.stat-label {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Contact ---------- */
.contact-wrap {
  margin-top: 70px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  padding: 60px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(212,175,122,0.10), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0));
}
.contact-info h3 { font-size: 30px; }
.contact-info a.mail {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: var(--gold);
  border-bottom: 1px solid rgba(212,175,122,0.4);
  padding-bottom: 4px;
  display: inline-block;
  margin-bottom: 30px;
}
.contact-info ul { list-style: none; padding: 0; margin: 0; color: var(--muted); }
.contact-info ul li { margin-bottom: 10px; font-size: 15px; }
.contact-info ul li strong { color: var(--text); font-weight: 500; margin-right: 8px; }

form { display: grid; gap: 18px; }
.field label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
  transition: border-color .25s ease, background .25s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255,255,255,0.05);
}
.field textarea { min-height: 130px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-status { color: var(--gold); font-size: 14px; min-height: 20px; }

/* ---------- Footer ---------- */
footer {
  padding: 50px 0 40px;
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 2;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
}
.footer-inner .socials { display: flex; gap: 20px; }
.footer-inner .socials a:hover { color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .about-grid, .contact-wrap { grid-template-columns: 1fr; gap: 50px; }
  .hero { padding-top: 140px; }
  .hero-visual { max-width: 460px; margin: 0 auto; }
  .services-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 220px; }
  .p-1,.p-2,.p-3,.p-4,.p-5,.p-6,.p-7 { grid-column: span 2; grid-row: auto; }
  .step, .step.reverse {
    grid-template-columns: 80px 1fr;
    gap: 24px;
  }
  .step-art, .step.reverse .step-art { grid-column: 2; justify-content: flex-start; order: 2; }
  .step-art svg { width: 180px; height: 180px; }
  .step-node, .step.reverse .step-node { grid-column: 1; order: 1; flex-direction: column; }
  .step-body, .step.reverse .step-body { grid-column: 2; order: 3; text-align: left; }
  .step.reverse .step-body p { margin-left: 0; }
  .timeline::before { left: 40px; }
  .contact-wrap { padding: 36px 28px; }
  .nav-links { display: none; }
  .burger { display: block; }
  .nav-cta { display: none; }
  section { padding: 100px 0; }
}

@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .row-2 { grid-template-columns: 1fr; }
  .hero-meta { gap: 28px; flex-wrap: wrap; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(10,13,20,0.97);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu ul {
  list-style: none;
  padding: 0; margin: 0;
  text-align: center;
}
.mobile-menu li { margin: 22px 0; }
.mobile-menu a {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  color: var(--text);
}
