:root {
  --gold: #b8860b;
  --gold-light: #c9a227;
  --gold-dark: #8b6914;
  --brass: #a08040;
  --walnut: #3d2e1f;
  --walnut-light: #5c4a32;
  --steel: #6b7280;
  --steel-light: #9ca3af;
  --green-oxide: #4a5d4e;
  --charcoal: #1e1a16;
  --ivory: #f5f0e6;
  --ivory-dark: #e8e0d0;
  --text: #2a2318;
  --text-muted: #5c5348;
  --border: #c4b89a;
  --shadow: rgba(30, 26, 22, 0.15);
  --font-serif: "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-serif);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--ivory);
  background-image:
    radial-gradient(circle at 20% 80%, rgba(184, 134, 11, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(74, 93, 78, 0.05) 0%, transparent 50%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--gold);
}

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(--ivory);
}

.logo-mark {
  width: 32px;
  height: 32px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  position: relative;
  background: radial-gradient(circle, var(--gold-dark) 30%, transparent 31%);
}

.logo-mark::before,
.logo-mark::after {
  content: "";
  position: absolute;
  background: var(--gold-light);
}

.logo-mark::before {
  width: 2px;
  height: 14px;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
}

.logo-mark::after {
  width: 14px;
  height: 2px;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--gold);
  padding: 8px;
  cursor: pointer;
  border-radius: var(--radius);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gold-light);
  transition: var(--transition);
}

.site-nav ul {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  padding: 0;
  align-items: center;
}

.site-nav a {
  color: var(--ivory-dark);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  font-size: 0.95rem;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  border-radius: var(--radius);
  transition: var(--transition);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--gold-light);
  background: rgba(184, 134, 11, 0.12);
}

.nav-cta {
  border: 1px solid var(--gold) !important;
  color: var(--gold-light) !important;
}

/* 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.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  background: var(--walnut);
  color: var(--ivory);
}

.btn::before {
  content: "⚙";
  position: absolute;
  left: -20px;
  opacity: 0;
  transition: var(--transition);
  font-size: 0.75rem;
}

.btn:hover::before,
.btn:focus-visible::before {
  left: 10px;
  opacity: 0.6;
  animation: gearSpin 0.6s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--gold-dark);
  border-color: var(--gold-light);
  padding-left: 2rem;
}

@keyframes gearSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(180deg); }
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--charcoal);
  border-color: var(--gold-light);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--charcoal);
}

.btn-secondary {
  background: transparent;
  color: var(--walnut);
  border-color: var(--walnut-light);
}

.btn-secondary:hover {
  background: var(--walnut);
  color: var(--ivory);
}

/* Main layout */
main {
  flex: 1;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.section-header .mono-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green-oxide);
  margin-bottom: 0.5rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: 70vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 3rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-content {
  padding: 2rem 0;
}

.hero-content .mono-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--steel);
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  display: block;
}

.hero-content h1 {
  margin-bottom: 1.25rem;
}

.hero-content .lead {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 32rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  border-radius: var(--radius);
  border: 3px solid var(--gold);
  box-shadow: 8px 8px 0 var(--walnut-light);
}

.hero-visual::after {
  content: "76000";
  position: absolute;
  bottom: -12px;
  right: 20px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--green-oxide);
  letter-spacing: 0.2em;
  background: var(--ivory);
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 2px 8px var(--shadow);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--shadow);
  border-color: var(--gold);
}

.card-image {
  aspect-ratio: 16/10;
  overflow: hidden;
  border-bottom: 2px solid var(--gold-dark);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 1.25rem;
}

.card-body h3 {
  margin-bottom: 0.5rem;
}

.card-body h3 a {
  text-decoration: none;
  color: var(--walnut);
}

.card-body h3 a:hover {
  color: var(--gold-dark);
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--steel);
  margin-top: 0.75rem;
}

/* Page hero */
.page-hero {
  background: linear-gradient(135deg, var(--walnut) 0%, var(--charcoal) 60%, var(--green-oxide) 100%);
  color: var(--ivory);
  padding: 3.5rem 1.5rem;
  text-align: center;
  border-bottom: 3px solid var(--gold);
}

.page-hero h1 {
  color: var(--ivory);
  margin-bottom: 0.75rem;
}

.page-hero p {
  max-width: 600px;
  margin: 0 auto;
  color: var(--ivory-dark);
  font-size: 1.15rem;
}

.page-hero.with-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  text-align: left;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.page-hero.with-image img {
  border: 2px solid var(--gold);
  border-radius: var(--radius);
}

/* Testimonials */
.testimonial {
  background: var(--ivory-dark);
  border-left: 4px solid var(--gold);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.testimonial blockquote {
  font-style: italic;
  margin-bottom: 1rem;
}

.testimonial cite {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-style: normal;
  color: var(--text-muted);
}

.stars {
  color: var(--gold);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  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-serif);
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--ivory);
  color: var(--text);
  transition: 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 3px rgba(184, 134, 11, 0.15);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #9b2c2c;
}

.field-error {
  color: #9b2c2c;
  font-size: 0.85rem;
  margin-top: 0.35rem;
  font-family: var(--font-mono);
}

.form-status {
  padding: 1rem;
  border-radius: var(--radius);
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.form-status.success {
  background: rgba(74, 93, 78, 0.15);
  border: 1px solid var(--green-oxide);
  color: var(--green-oxide);
}

.form-status.error {
  background: rgba(155, 44, 44, 0.1);
  border: 1px solid #9b2c2c;
  color: #9b2c2c;
}

/* Contact layout */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.contact-info {
  background: var(--ivory-dark);
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-info h2 {
  margin-bottom: 1.5rem;
}

.contact-info address {
  font-style: normal;
}

.contact-info address p {
  margin-bottom: 0.75rem;
}

/* Pricing */
.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 var(--border);
}

.pricing-table th {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--walnut);
  background: var(--ivory-dark);
}

.pricing-note {
  background: var(--ivory-dark);
  padding: 1.5rem;
  border-left: 4px solid var(--green-oxide);
  margin-top: 2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Legal pages */
.legal-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.legal-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.legal-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

/* Blog */
.article-meta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--steel);
  margin-bottom: 2rem;
}

.article-cover {
  margin-bottom: 2rem;
  border: 2px solid var(--gold-dark);
  border-radius: var(--radius);
}

/* Process steps */
.process-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.process-steps li {
  counter-increment: step;
  position: relative;
  padding: 1.5rem 1.5rem 1.5rem 4rem;
  margin-bottom: 1rem;
  background: var(--ivory-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.process-steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--gold);
  font-weight: 500;
}

/* 404 */
.error-page {
  text-align: center;
  padding: 6rem 1.5rem;
}

.error-page h1 {
  font-size: 6rem;
  color: var(--gold);
  font-family: var(--font-mono);
}

/* Footer */
.site-footer {
  background: var(--charcoal);
  color: var(--ivory-dark);
  border-top: 3px solid var(--gold);
  margin-top: auto;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-brand {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-size: 0.95rem;
  color: var(--steel-light);
}

.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col a {
  color: var(--ivory-dark);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--gold-light);
}

.footer-bottom {
  border-top: 1px solid var(--walnut-light);
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--steel-light);
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--walnut);
  border-top: 2px solid var(--gold);
  padding: 1.25rem;
  z-index: 200;
  box-shadow: 0 -4px 20px var(--shadow);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-inner p {
  flex: 1;
  min-width: 250px;
  color: var(--ivory);
  font-size: 0.95rem;
}

.cookie-inner a {
  color: var(--gold-light);
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
}

/* Instrument decoration */
.instrument-border {
  border: 1px solid var(--border);
  padding: 2rem;
  position: relative;
  background: var(--ivory);
}

.instrument-border::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border: 1px dashed var(--gold-dark);
  pointer-events: none;
  opacity: 0.4;
}

/* Responsive */
@media (max-width: 900px) {
  .hero,
  .page-hero.with-image,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .page-hero.with-image {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--charcoal);
    border-bottom: 2px solid var(--gold);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }

  .site-nav.open {
    max-height: 400px;
  }

  .site-nav ul {
    flex-direction: column;
    padding: 1rem;
    align-items: stretch;
  }

  .site-nav a {
    display: block;
    padding: 0.75rem 1rem;
  }

  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }
}
