:root {
  --gold: #c9a227;
  --gold-light: #d4af37;
  --gold-dark: #8b6914;
  --brass: #b8860b;
  --walnut: #3d2b1f;
  --walnut-light: #5c4033;
  --steel: #6b7280;
  --steel-light: #9ca3af;
  --oxidized: #4a6741;
  --charcoal: #1a1612;
  --ivory: #f5f0e6;
  --ivory-dark: #e8e0d0;
  --shadow: rgba(26, 22, 18, 0.25);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-mono: "IBM Plex Mono", monospace;
  --radius: 4px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-display);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--ivory);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--brass); }

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--walnut);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.35rem; }

p + p { margin-top: 1rem; }

ul, ol { padding-left: 1.5rem; }
li + li { margin-top: 0.4rem; }

/* Header */
.site-header {
  background: linear-gradient(180deg, var(--walnut) 0%, var(--charcoal) 100%);
  border-bottom: 2px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--gold-light);
}

.logo-mark { color: var(--gold); }

.logo-text {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gold-light);
}

.main-nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--ivory);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: color var(--transition);
}

.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--gold-light); }

.nav-cta {
  border: 1px solid var(--gold);
  padding: 0.4rem 1rem !important;
  border-radius: var(--radius);
  background: rgba(201, 162, 39, 0.15);
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--charcoal);
  color: var(--ivory-dark);
  border-top: 3px solid var(--brass);
  padding: 3rem 1.5rem 1.5rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-brand {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gold-light);
}

.footer-tagline { font-size: 0.95rem; margin-top: 0.5rem; opacity: 0.85; }

.footer-heading {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.footer-col address { font-style: normal; font-size: 0.95rem; }
.footer-col address p + p { margin-top: 0.35rem; }
.footer-col a { color: var(--ivory-dark); }

.footer-links { list-style: none; padding: 0; }
.footer-links a { color: var(--ivory-dark); text-decoration: none; font-size: 0.95rem; }
.footer-links a:hover { color: var(--gold-light); }

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--walnut-light);
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--gold-dark);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--charcoal);
  border-color: var(--gold-dark);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  color: var(--charcoal);
}

.btn-secondary {
  background: transparent;
  color: var(--walnut);
  border-color: var(--steel);
}

.btn-secondary:hover {
  border-color: var(--gold-dark);
  color: var(--gold-dark);
}

.gear-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.2) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}

.gear-btn:active {
  transform: scale(0.97);
}

.gear-btn.gear-spin::before { opacity: 1; }

/* Layout utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background: linear-gradient(180deg, var(--ivory-dark) 0%, var(--ivory) 100%);
  border-top: 1px solid rgba(184, 134, 11, 0.2);
  border-bottom: 1px solid rgba(184, 134, 11, 0.2);
}

.section-header {
  margin-bottom: 2.5rem;
  max-width: 680px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--oxidized);
  margin-bottom: 0.5rem;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 520px;
  background: var(--walnut);
  color: var(--ivory);
  overflow: hidden;
}

.hero-content {
  padding: 4rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.hero-content::before {
  content: "";
  position: absolute;
  top: 2rem;
  left: 2rem;
  width: 60px;
  height: 60px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  opacity: 0.4;
}

.hero-index {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
}

.hero h1 {
  color: var(--ivory);
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 480px;
  margin-bottom: 2rem;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-image {
  position: relative;
  min-height: 300px;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--walnut) 0%, transparent 30%);
  pointer-events: none;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}

.card {
  background: var(--ivory);
  border: 1px solid rgba(184, 134, 11, 0.35);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 2px 8px var(--shadow);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--shadow);
}

.card-image {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--ivory-dark);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body { padding: 1.5rem; }

.card-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--oxidized);
  margin-bottom: 0.5rem;
}

.card h3 { margin-bottom: 0.75rem; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--gold-dark); }

.card-price {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--gold-dark);
  margin-top: 1rem;
}

/* Testimonials */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.testimonial {
  background: var(--ivory);
  border-left: 3px solid var(--gold);
  padding: 1.5rem;
  box-shadow: 0 2px 6px var(--shadow);
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 1rem;
}

.testimonial-author {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--steel);
}

.testimonial-service {
  font-size: 0.85rem;
  color: var(--oxidized);
  margin-top: 0.25rem;
}

/* Page hero */
.page-hero {
  background: linear-gradient(135deg, var(--walnut) 0%, var(--charcoal) 60%, var(--oxidized) 100%);
  color: var(--ivory);
  padding: 3.5rem 0;
  border-bottom: 3px solid var(--gold);
}

.page-hero h1 { color: var(--ivory); margin-bottom: 0.75rem; }
.page-hero p { opacity: 0.9; max-width: 640px; }

.page-hero.with-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0;
  min-height: 320px;
}

.page-hero.with-image .page-hero-text {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero.with-image .page-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 320px;
}

/* Content prose */
.prose { max-width: 720px; }
.prose-wide { max-width: 900px; }

.prose h2 { margin-top: 2rem; margin-bottom: 0.75rem; }
.prose h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; }

/* Detail layout */
.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.detail-sidebar {
  background: var(--ivory-dark);
  border: 1px solid rgba(184, 134, 11, 0.3);
  padding: 1.75rem;
  border-radius: var(--radius);
  position: sticky;
  top: 5rem;
}

.detail-sidebar dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--oxidized);
  margin-top: 1rem;
}

.detail-sidebar dt:first-child { margin-top: 0; }

.detail-sidebar dd {
  margin-left: 0;
  margin-top: 0.25rem;
  font-weight: 600;
}

.detail-hero-img {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
  border: 2px solid var(--gold-dark);
}

/* Process steps */
.process-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.process-steps li {
  counter-increment: step;
  padding-left: 3.5rem;
  position: relative;
  padding-bottom: 2rem;
  border-left: 2px solid var(--gold);
  margin-left: 1rem;
}

.process-steps li:last-child { border-left-color: transparent; }

.process-steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: -1.1rem;
  top: 0;
  width: 2.2rem;
  height: 2.2rem;
  background: var(--walnut);
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--gold);
}

/* Pricing table */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}

.pricing-table th,
.pricing-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(184, 134, 11, 0.25);
}

.pricing-table th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--oxidized);
  background: var(--ivory-dark);
}

.pricing-note {
  background: var(--ivory-dark);
  border-left: 3px solid var(--gold);
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
  font-size: 0.95rem;
}

/* Contact form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
}

.contact-info address {
  font-style: normal;
  margin-top: 1.5rem;
}

.contact-info address p + p { margin-top: 0.5rem; }

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  color: var(--walnut);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-display);
  font-size: 1rem;
  border: 1px solid rgba(184, 134, 11, 0.4);
  border-radius: var(--radius);
  background: var(--ivory);
  color: var(--charcoal);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.2);
}

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

.form-error {
  color: #8b2500;
  font-size: 0.85rem;
  margin-top: 0.35rem;
  display: none;
}

.form-group.invalid .form-error { display: block; }
.form-group.invalid input,
.form-group.invalid select,
.form-group.invalid textarea { border-color: #8b2500; }

.form-status {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-top: 1rem;
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(74, 103, 65, 0.15);
  border: 1px solid var(--oxidized);
  color: var(--oxidized);
}

.form-status.error {
  display: block;
  background: rgba(139, 37, 0, 0.1);
  border: 1px solid #8b2500;
  color: #8b2500;
}

/* Legal pages */
.legal-content h2 {
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-content h3 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
}

.cookies-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.cookies-table th,
.cookies-table td {
  padding: 0.75rem;
  border: 1px solid rgba(184, 134, 11, 0.25);
  text-align: left;
}

.cookies-table th {
  background: var(--ivory-dark);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* 404 */
.error-page {
  text-align: center;
  padding: 6rem 1.5rem;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 5rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 1rem;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--charcoal);
  color: var(--ivory);
  border-top: 2px solid var(--gold);
  padding: 1.25rem 1.5rem;
  z-index: 200;
  box-shadow: 0 -4px 20px var(--shadow);
}

.cookie-banner[hidden] { display: none; }

.cookie-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-inner p { font-size: 0.95rem; max-width: 720px; }
.cookie-inner a { color: var(--gold-light); }

.cookie-actions { display: flex; gap: 0.75rem; flex-shrink: 0; }

/* Stars */
.stars {
  color: var(--gold);
  letter-spacing: 2px;
  font-size: 0.9rem;
}

/* Case study */
.case-study {
  background: var(--ivory-dark);
  border: 1px solid rgba(184, 134, 11, 0.3);
  padding: 2rem;
  border-radius: var(--radius);
  margin-top: 3rem;
}

.case-study h3 { margin-bottom: 1rem; }

/* Responsive */
@media (max-width: 900px) {
  .hero,
  .page-hero.with-image,
  .detail-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-image::after {
    background: linear-gradient(0deg, var(--walnut) 0%, transparent 40%);
  }

  .hero-content { padding: 3rem 1.5rem; }
  .detail-sidebar { position: static; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--charcoal);
    border-bottom: 2px solid var(--gold);
    padding: 1rem 1.5rem;
    display: none;
  }

  .main-nav.open { display: block; }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .header-inner { position: relative; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
