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

:root {
  --ink:   #0a0e14;
  --deep:  #08111e;
  --ocean: #0d2035;
  --foam:  #c8dbe8;
  --rust:  #b34a1e;
  --gold:  #c9943a;
  --fog:   #7a9aad;
  --white: #f0ece4;
}

html { scroll-behavior: smooth; }

body {
  background: var(--deep);
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  overflow-x: hidden;
  cursor: none;
}

/* ─── CURSOR ─────────────────────────────────────── */
#cursor {
  position: fixed; width: 10px; height: 10px;
  background: var(--gold); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  left: -50px; top: -50px;
  transform: translate(-50%,-50%);
  opacity: 0; transition: opacity 0.3s;
}
#cursor.on { opacity: 1; }
#cursor-ring {
  position: fixed; width: 36px; height: 36px;
  border: 1px solid rgba(201,148,58,0.55); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  left: -50px; top: -50px;
  transform: translate(-50%,-50%);
  opacity: 0; transition: opacity 0.3s;
}
#cursor-ring.on { opacity: 1; }

/* ─── NAV ────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 30px 60px;
  transition: padding 0.4s ease, background 0.5s ease, border-color 0.5s ease;
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  padding: 16px 56px;
  background: rgba(6,12,20,0.75);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: rgba(201,148,58,0.12);
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem; font-weight: 300; letter-spacing: 0.18em;
  color: var(--white); text-decoration: none;
  opacity: 0; animation: fadeDown 1s 0.3s ease forwards;
}
.nav-logo span { color: var(--gold); }
.nav-links {
  display: flex; gap: 100px; list-style: none;
  opacity: 0; animation: fadeDown 1s 0.5s ease forwards;
}
.nav-links a {
  font-size: 1rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--fog); text-decoration: none; transition: color 0.3s;
}
.nav-links a:hover { color: var(--white); }
.nav-links a.active { color: var(--white); }
.nav-cta {
  font-size: 0.68rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--gold); border: 1px solid rgba(201,148,58,0.4);
  padding: 10px 22px; text-decoration: none; transition: all 0.3s;
  opacity: 0; animation: fadeDown 1s 0.7s ease forwards;
}
.nav-cta:hover { background: rgba(201,148,58,0.1); border-color: var(--gold); }

/* ─── HAMBURGER ──────────────────────────────────── */
.nav-hamburger {
  display: none; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 40px; height: 40px;
  background: none; border: none; cursor: none; padding: 4px;
  opacity: 0; animation: fadeDown 1s 0.5s ease forwards;
}
.nav-hamburger .bar {
  display: block; width: 24px; height: 1.5px; background: var(--white);
  transition: transform 0.4s cubic-bezier(0.77,0,0.18,1), opacity 0.3s, width 0.3s;
  transform-origin: center;
}
.nav-hamburger.open .bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open .bar:nth-child(2) { opacity: 0; width: 0; }
.nav-hamburger.open .bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ─── MOBILE DRAWER ──────────────────────────────── */
.mobile-drawer {
  display: none; position: fixed; inset: 0; z-index: 150;
  background: rgba(6,10,18,0.97);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  flex-direction: column; justify-content: center; align-items: flex-start;
  padding: 0 48px;
  pointer-events: none; opacity: 0; transition: opacity 0.4s ease;
}
.mobile-drawer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.mobile-drawer.open { pointer-events: all; opacity: 1; }
.drawer-links { list-style: none; width: 100%; }
.drawer-links li { overflow: hidden; border-bottom: 1px solid rgba(120,154,173,0.1); }
.drawer-links li:first-child { border-top: 1px solid rgba(120,154,173,0.1); }
.drawer-links a {
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem,10vw,3rem); font-weight: 300;
  color: var(--white); text-decoration: none; padding: 22px 0;
  transform: translateY(60px); opacity: 0;
  transition: color 0.3s, transform 0.55s cubic-bezier(0.22,1,0.36,1), opacity 0.55s ease;
}
.drawer-links a:hover { color: var(--gold); }
.drawer-links a.active { color: var(--white); }
.link-num {
  font-size: 0.65rem; letter-spacing: 0.3em; color: var(--gold);
  font-family: 'Barlow Condensed', sans-serif; align-self: flex-start; margin-top: 10px;
}
.mobile-drawer.open .drawer-links li:nth-child(1) a { transform: none; opacity: 1; transition-delay: 0.08s; }
.mobile-drawer.open .drawer-links li:nth-child(2) a { transform: none; opacity: 1; transition-delay: 0.14s; }
.mobile-drawer.open .drawer-links li:nth-child(3) a { transform: none; opacity: 1; transition-delay: 0.20s; }
.drawer-cta {
  display: inline-block; margin-top: 40px;
  font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold); border: 1px solid rgba(201,148,58,0.45);
  padding: 14px 32px; text-decoration: none;
  transform: translateY(30px); opacity: 0;
  transition: transform 0.5s ease 0.32s, opacity 0.5s ease 0.32s, background 0.3s;
}
.mobile-drawer.open .drawer-cta { transform: none; opacity: 1; }
.drawer-cta:hover { background: rgba(201,148,58,0.1); }
.drawer-est {
  position: absolute; bottom: 36px; left: 48px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.6rem; letter-spacing: 0.5em; color: rgba(201,148,58,0.3);
  text-transform: uppercase; pointer-events: none;
}

/* ─── HERO ───────────────────────────────────────── */
#hero {
  position: relative;
  height: 100vh; min-height: 600px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

/* Contact page hero background (lighter alternative to Three.js) */
.hero-background {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--ocean) 0%,
    var(--deep) 70%,
    var(--ink) 100%
  );
  overflow: hidden;
}

/* Optional: Add subtle animated wave effect */
.hero-background::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 800 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,200 Q200,250 400,200 T800,200 L800,400 L0,400 Z' fill='%230d2035' fill-opacity='0.05'/%3E%3C/svg%3E");
  animation: waveMove 15s linear infinite;
  pointer-events: none;
}

@keyframes waveMove {
  0% { background-position: 0 0; }
  100% { background-position: 800px 0; }
}
canvas#sea {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}
#hero::after {
  content: ''; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to bottom,
    rgba(8,17,30,0.15) 0%, rgba(8,17,30,0) 30%,
    rgba(8,17,30,0.5) 70%, rgba(8,17,30,0.95) 100%);
  pointer-events: none;
}
#hero::before {
  content: ''; position: absolute; inset: 0; z-index: 3; opacity: 0.35; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

/* ─── HERO TEXT ──────────────────────────────────── */
.hero-text {
  position: relative; z-index: 10; text-align: center; pointer-events: none;
}
.hero-eyebrow {
  font-size: 0.68rem; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 28px;
  opacity: 0; animation: fadeUp 1s 1s ease forwards;
}
.hero-eyebrow::before, .hero-eyebrow::after { content: '—'; margin: 0 16px; opacity: 0.5; }
.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(4rem,11vw,10rem); font-weight: 300; line-height: 0.9;
  color: var(--white);
}
.hero-title .line { overflow: hidden; display: block; }
.hero-title .line span { display: block; transform: translateY(110%); animation: slideUp 1.2s ease forwards; }
.hero-title .line:nth-child(1) span { animation-delay: 1.1s; }
.hero-title .line:nth-child(2) span { animation-delay: 1.25s; font-style: italic; color: var(--foam); }
.hero-title .line:nth-child(3) span { animation-delay: 1.4s; }
.hero-subtitle {
  font-size: 0.78rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--fog); margin-top: 32px; line-height: 2.2;
  opacity: 0; animation: fadeUp 1s 1.8s ease forwards;
}

/* ─── SCROLL HINT ────────────────────────────────── */
.scroll-hint {
  position: absolute; bottom: 110px; right: 60px; z-index: 10;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  opacity: 0; animation: fadeUp 1s 2.2s ease forwards;
}
.scroll-hint span {
  font-size: 0.6rem; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--fog); writing-mode: vertical-rl;
}
.scroll-line {
  width: 1px; height: 60px; background: rgba(122,154,173,0.3);
  position: relative; overflow: hidden;
}
.scroll-line::after {
  content: ''; position: absolute; top: -100%; left: 0;
  width: 1px; height: 100%; background: var(--gold);
  animation: scrollAnim 1.8s 2.5s ease-in-out infinite;
}

/* ─── STATS BAR ──────────────────────────────────── */
.stats-bar {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: center; padding: 0 60px;
  max-width: 1200px;
  margin: 0 auto;
}
.stats-inner {
  display: flex;
  border-top: 1px solid rgba(120,154,173,0.2);
  width: 100%; max-width: 960px;
}
.stat {
  flex: 1; padding: 22px 30px;
  border-right: 1px solid rgba(120,154,173,0.12);
  opacity: 0; animation: fadeUp 0.8s ease forwards;
}
.stat:last-child { border-right: none; }
.stat:nth-child(1) { animation-delay: 2.2s; }
.stat:nth-child(2) { animation-delay: 2.35s; }
.stat:nth-child(3) { animation-delay: 2.5s; }
.stat:nth-child(4) { animation-delay: 2.65s; }
.stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem; font-weight: 300; color: var(--white); display: block;
}
.stat-num em { font-style: normal; color: var(--gold); }
.stat-label {
  font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--fog); display: block; margin-top: 4px;
}

/* ─── SERVICES ───────────────────────────────────── */
#services {
  padding: 140px 80px; background: var(--ink); position: relative;
}
#services::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,148,58,0.4), transparent);
}
.section-label {
  font-size: 0.65rem; letter-spacing: 0.45em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 60px;
  display: flex; align-items: center; gap: 20px;
}
.section-label::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(201,148,58,0.4), transparent);
}
.services-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 2px;
  max-width: 1200px; margin: 0 auto;
}
.service-card {
  background: var(--deep); padding: 50px 40px;
  position: relative; overflow: hidden; transition: background 0.4s;
  display: block;
  text-decoration: none;
  color: inherit;
}
.service-card:link,
.service-card:visited,
.service-card:hover,
.service-card:active {
  text-decoration: none;
  color: inherit;
}
.service-card a {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.service-card::before {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s ease;
}
.service-card:hover { background: var(--ocean); }
.service-card:hover::before { transform: scaleX(1); }
.service-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.7rem; color: var(--gold); letter-spacing: 0.3em;
  margin-bottom: 16px; display: block;
}
.service-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem; font-weight: 300; color: var(--white);
  margin-bottom: 16px; line-height: 1.2;
}
.service-desc { font-size: 0.78rem; line-height: 1.9; color: var(--fog); letter-spacing: 0.05em; }

/* ─── ABOUT ──────────────────────────────────────── */
#about {
  display: grid; grid-template-columns: 1fr 1fr; gap: 100px; align-items: center;
  padding: 140px 80px; background: var(--deep);
}
.about-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem,5vw,4.5rem); font-weight: 300; line-height: 1.1; color: var(--white);
}
.about-heading em { font-style: italic; color: var(--gold); }
.about-body { font-size: 0.85rem; line-height: 2.1; color: var(--fog); letter-spacing: 0.04em; margin-top: 32px; }
.timeline {
  display: flex; flex-direction: column;
  border-left: 1px solid rgba(201,148,58,0.25);
  padding-left: 32px; margin-top: 60px;
}
.timeline-item { padding-bottom: 40px; position: relative; }
.timeline-item::before {
  content: ''; position: absolute; left: -36px; top: 6px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
}
.timeline-year { font-size: 0.65rem; letter-spacing: 0.3em; color: var(--gold); text-transform: uppercase; margin-bottom: 8px; display: block; }
.timeline-text { font-size: 0.82rem; color: var(--foam); line-height: 1.8; }

/* ─── FOOTER ─────────────────────────────────────── */
footer {
  background: var(--ink);
  border-top: 1px solid rgba(120,154,173,0.12);
  padding: 80px 80px 50px;
  display: flex; flex-direction: column; gap: 50px;
}
.footer-logo { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; font-weight: 300; color: var(--white); }
.footer-logo span { color: var(--gold); }
.footer-offices { display: flex; flex-wrap: wrap; gap: 32px 56px; margin-top: 32px; }
.footer-office { display: flex; flex-direction: column; gap: 5px; min-width: 200px; }
.office-city { font-family: 'Cormorant Garamond', serif; font-size: 1rem; color: var(--white); font-weight: 300; }
.office-city em { font-style: normal; color: var(--gold); font-size: 0.68rem; letter-spacing: 0.2em; margin-left: 6px; }
.office-addr { font-size: 0.65rem; color: var(--fog); letter-spacing: 0.06em; line-height: 1.75; }
.footer-links { display: flex; gap: 32px; flex-wrap: wrap; }
.footer-links a {
  font-size: 0.65rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--fog); text-decoration: none; transition: color 0.3s;
}
.footer-links a:hover { color: var(--white); }
.footer-copy {
  font-size: 0.6rem; letter-spacing: 0.2em;
  color: rgba(120,154,173,0.35); text-align: center;
  padding: 20px 0 10px; background: var(--ink);
}

/* ─── REVEAL ─────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ─── KEYFRAMES ──────────────────────────────────── */
@keyframes fadeDown  { from { opacity:0; transform:translateY(-20px); } to { opacity:1; transform:none; } }
@keyframes fadeUp    { from { opacity:0; transform:translateY(30px);  } to { opacity:1; transform:none; } }
@keyframes slideUp   { from { transform:translateY(110%); }            to { transform:none; } }
@keyframes scrollAnim{ 0%{top:-100%;opacity:1;} 100%{top:100%;opacity:0;} }

/* ─── RESPONSIVE ─────────────────────────────────── */
@media (hover: none) {
  #cursor, #cursor-ring { display: none; }
  body { cursor: auto; }
}

@media (max-width: 768px) {
  nav                  { padding: 20px 24px; }
  nav.scrolled         { padding: 14px 24px; }
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger       { display: flex; }
  .mobile-drawer       { display: flex; }
  .hero-title          { font-size: clamp(3rem,14vw,5rem); }
  .scroll-hint         { display: none; }
  .stats-bar           { padding: 0 16px; }
  .stats-inner         { flex-wrap: wrap; }
  .stat                { flex: 1 1 45%; padding: 16px; }
  .stat-num            { font-size: 1.5rem; }
  #services            { padding: 80px 24px; }
  .services-grid       { grid-template-columns: 1fr; }
  #about               { grid-template-columns: 1fr; gap: 60px; padding: 80px 24px; }
  footer               { padding: 50px 24px 40px; gap: 36px; }
  .footer-offices      { gap: 24px 32px; }
  .footer-links        { flex-direction: column; gap: 16px; }
}
