/* ===== FOUNDATIONS ===== */
:root {
  --bg: #0a0a0a;
  --text: #f5f5f5;
  --muted: rgba(245, 245, 245, 0.60);
  --dim: rgba(245, 245, 245, 0.35);
  --rule: rgba(245, 245, 245, 0.10);
  --card: rgba(255, 255, 255, 0.025);
  --card-hover: rgba(255, 255, 255, 0.05);
  --accent: rgba(255, 120, 60, 0.10);
  --max-width: 1200px;
  --nav-height: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% -10%, var(--accent), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ===== TYPOGRAPHY ===== */
.eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
  display: inline-block;
}

h1, h2, h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

h1 { font-size: clamp(2.5rem, 7vw, 5.5rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; }

em, .serif-italic {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

h1 em, h2 em { font-size: 1.02em; }

/* ===== LAYOUT ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

main section { padding: 6rem 0; position: relative; z-index: 1; }
main section + section { border-top: 1px solid var(--rule); }

/* ===== HEADER / NAV ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--rule);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  padding: 0 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.wordmark {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.wordmark em {
  font-size: 1.15rem;
  margin-left: 0.15rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  list-style: none;
}

.nav-links > li > a,
.nav-links > li > .dropdown-toggle {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.nav-links > li > a:hover,
.nav-links > li > .dropdown-toggle:hover { opacity: 1; }
.nav-links > li > a.active { opacity: 1; }

/* ===== DROPDOWN ===== */
.dropdown { position: relative; }

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.dropdown-toggle::after {
  content: '';
  width: 0.35rem;
  height: 0.35rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.dropdown.open .dropdown-toggle::after {
  transform: rotate(-135deg) translateY(1px);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 1.25rem);
  right: -0.75rem;
  min-width: 280px;
  background: #141414;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  list-style: none;
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.92rem;
  opacity: 0.85;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.dropdown-menu a:hover {
  background: var(--card-hover);
  opacity: 1;
}

.dropdown-menu .num {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--dim);
  min-width: 1.25rem;
}

/* ===== MOBILE MENU TOGGLE ===== */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: currentColor;
  margin: 6px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ===== HERO ===== */
.hero {
  padding: 8rem 0 6rem;
}

.hero .eyebrow { margin-bottom: 2rem; }

.hero h1 {
  max-width: 900px;
  margin-bottom: 2rem;
}

.hero-lead {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--muted);
  max-width: 640px;
  line-height: 1.55;
  margin-bottom: 3rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary:hover {
  transform: translateY(-1px);
  background: #ffffff;
}

.btn-primary::after {
  content: '→';
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.btn-primary:hover::after {
  transform: translateX(3px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--rule);
}

.btn-secondary:hover {
  border-color: rgba(245, 245, 245, 0.3);
  background: var(--card);
}

/* ===== SECTION HEADERS ===== */
.section-header {
  margin-bottom: 4rem;
  max-width: 780px;
}

.section-header .eyebrow { margin-bottom: 1.25rem; }
.section-header h2 { margin-bottom: 1.5rem; }
.section-header p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ===== SERVICE GRID ===== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  overflow: hidden;
}

.service-card {
  background: var(--bg);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  transition: background 0.2s ease;
  min-height: 280px;
  color: inherit;
}

.service-card:hover { background: var(--card); }

.service-card .num {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--dim);
  margin-bottom: 1.5rem;
}

.service-card h3 { margin-bottom: 0.75rem; }

.service-card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  flex: 1;
}

.service-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 1.5rem;
  transition: opacity 0.2s ease;
}

.service-card:hover .card-link { opacity: 1; }
.service-card .card-link::after {
  content: '→';
  transition: transform 0.2s ease;
}
.service-card:hover .card-link::after { transform: translateX(3px); }

/* ===== PROSE (article content) ===== */
.prose { max-width: 720px; }

.prose p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.prose p:last-child { margin-bottom: 0; }

.prose h3 {
  color: var(--text);
  margin-top: 3rem;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 500;
}

.prose h3:first-child { margin-top: 0; }

.prose ul {
  list-style: none;
  margin: 1rem 0 2rem;
}

.prose ul li {
  color: var(--muted);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.98rem;
}

.prose ul li:last-child { border-bottom: none; }

/* ===== CTA BLOCK ===== */
.cta-block {
  padding: 6rem 0;
}

.cta-block h2 {
  margin-bottom: 1.5rem;
  max-width: 700px;
}

.cta-block p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

/* ===== CONTACT SPECIFIC ===== */
.contact-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-detail {
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.contact-detail .label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 0.6rem;
}

.contact-detail .value {
  font-size: 1.15rem;
  color: var(--text);
}

.contact-detail .value a { border-bottom: 1px solid var(--rule); padding-bottom: 2px; transition: border-color 0.2s; }
.contact-detail .value a:hover { border-color: var(--text); }

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 3rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.footer-links a {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.footer-links a:hover { opacity: 1; }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero > * { animation: fadeUp 0.8s ease-out both; }
.hero .eyebrow { animation-delay: 0s; }
.hero h1 { animation-delay: 0.1s; }
.hero-lead { animation-delay: 0.2s; }
.hero .btn { animation-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
  .menu-toggle { display: block; z-index: 101; }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #0a0a0a;
    border-bottom: 1px solid var(--rule);
    padding: 0 2rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  .nav-links.open {
    max-height: 600px;
    padding-top: 1rem;
    padding-bottom: 2rem;
  }

  .nav-links > li { border-bottom: 1px solid var(--rule); }
  .nav-links > li:last-child { border-bottom: none; }

  .nav-links > li > a,
  .nav-links > li > .dropdown-toggle {
    display: flex;
    padding: 1.15rem 0;
    font-size: 1rem;
    width: 100%;
    text-align: left;
    justify-content: space-between;
  }

  .dropdown-menu {
    position: static;
    background: transparent;
    border: none;
    padding: 0 0 1rem;
    min-width: 0;
    opacity: 1;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transform: none;
    transition: max-height 0.3s ease, visibility 0.3s, padding 0.3s ease;
  }

  .dropdown.open .dropdown-menu {
    visibility: visible;
    max-height: 400px;
    transform: none;
  }

  .service-grid { grid-template-columns: 1fr; }
  .contact-block { grid-template-columns: 1fr; gap: 2rem; }

  main section { padding: 4rem 0; }
  .hero { padding: 5rem 0 4rem; }
  .container, .nav { padding-left: 1.5rem; padding-right: 1.5rem; }
}
