/* Brass Mechanism — Consultora Utility Birchfield */

:root {
  --gold: #b8860b;
  --gold-light: #d4a843;
  --gold-dark: #8b6914;
  --brass: #a08040;
  --walnut: #3d2b1f;
  --walnut-dark: #2a2318;
  --steel: #6b7280;
  --steel-light: #9ca3af;
  --oxidized: #4a6741;
  --ivory: #f5f0e6;
  --ivory-dark: #e8e0d0;
  --charcoal: #1a1814;
  --tobacco: #5c4033;
  --font-display: 'Cinzel', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --radius: 4px;
  --shadow: 0 4px 24px rgba(26, 24, 20, 0.15);
  --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-body);
  font-size: 1.05rem;
  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: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

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

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 1rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.75rem; }

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

/* Header */
.site-header {
  background: var(--walnut-dark);
  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;
  color: var(--ivory);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

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

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

.main-nav a {
  color: var(--ivory-dark);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  position: relative;
}

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

.main-nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gold);
}

.nav-cta {
  background: var(--gold);
  color: var(--walnut-dark) !important;
  padding: 0.45rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--gold-light);
  color: var(--walnut-dark) !important;
}

.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);
  transition: var(--transition);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  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(--ivory);
  border: 1px solid var(--gold-dark);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 2px 8px rgba(139,105,20,0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--walnut);
  border: 1px solid var(--brass);
}

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

.btn-gear::before {
  content: '⚙';
  display: inline-block;
  transition: transform 0.6s ease;
  margin-right: 0.25rem;
}

.btn-gear:hover::before,
.btn-gear:focus::before {
  transform: rotate(90deg);
}

/* Main */
#main-content { flex: 1; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--ivory-dark);
  border-top: 1px solid rgba(184,134,11,0.2);
  border-bottom: 1px solid rgba(184,134,11,0.2);
}

.section-dark {
  background: var(--walnut-dark);
  color: var(--ivory);
}

.section-dark h2, .section-dark h3 { color: var(--gold-light); }

/* Hero */
.hero {
  position: relative;
  min-height: 520px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  background: var(--walnut-dark);
  overflow: hidden;
}

.hero-content {
  padding: 4rem 2rem 4rem max(1.5rem, calc((100vw - 1100px) / 2 + 1.5rem));
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
}

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

.hero-lead {
  color: var(--ivory-dark);
  font-size: 1.15rem;
  max-width: 480px;
  margin-bottom: 2rem;
}

.hero-meta {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  font-size: 0.85rem;
  color: var(--steel-light);
  font-variant-numeric: tabular-nums;
}

.hero-meta span {
  border-left: 2px solid var(--gold);
  padding-left: 0.75rem;
}

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

.hero-visual {
  position: relative;
  min-height: 400px;
}

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

.hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--walnut-dark) 0%, transparent 40%);
}

.hero-engraving {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  z-index: 3;
  opacity: 0.7;
}

/* Page hero (inner pages) */
.page-hero {
  background: var(--walnut-dark);
  padding: 3rem 0;
  border-bottom: 3px solid var(--gold);
}

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

.page-hero-with-image {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: center;
}

.page-hero-with-image img {
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  object-fit: cover;
}

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

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

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(26,24,20,0.2);
}

.card-image {
  aspect-ratio: 16/10;
  overflow: hidden;
  border-bottom: 2px solid var(--gold);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-image img { transform: scale(1.03); }

.card-body { padding: 1.5rem; }

.card-tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--oxidized);
  margin-bottom: 0.5rem;
}

.card-price {
  font-family: var(--font-display);
  color: var(--gold-dark);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

/* Engraved divider */
.divider-engraved {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 2rem 0;
  position: relative;
}

.divider-engraved::before {
  content: '◆';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--ivory);
  padding: 0 0.5rem;
  color: var(--gold);
  font-size: 0.6rem;
}

.section-alt .divider-engraved::before { background: var(--ivory-dark); }

/* Testimonials */
.testimonial {
  background: var(--ivory);
  border-left: 3px solid var(--gold);
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.testimonial blockquote {
  font-style: italic;
  color: var(--tobacco);
  margin-bottom: 1rem;
}

.testimonial cite {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--steel);
}

.testimonial cite strong { color: var(--walnut); display: block; }

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

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--walnut);
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--brass);
  border-radius: var(--radius);
  background: var(--ivory);
  font-family: var(--font-body);
  font-size: 1rem;
  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(184,134,11,0.2);
}

.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.25rem;
}

.form-success {
  background: rgba(74,103,65,0.1);
  border: 1px solid var(--oxidized);
  padding: 1.25rem;
  border-radius: var(--radius);
  color: var(--oxidized);
}

.form-error-msg {
  background: rgba(155,44,44,0.1);
  border: 1px solid #9b2c2c;
  padding: 1.25rem;
  border-radius: var(--radius);
  color: #9b2c2c;
  margin-top: 1rem;
}

/* Pricing table */
.pricing-block {
  background: var(--ivory);
  border: 1px solid rgba(184,134,11,0.3);
  padding: 2rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
}

.pricing-block h3 {
  color: var(--gold-dark);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.pricing-amount {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--walnut);
  margin: 0.5rem 0;
}

.pricing-note {
  font-size: 0.9rem;
  color: var(--steel);
}

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

.process-steps li {
  counter-increment: step;
  padding: 1.5rem 1.5rem 1.5rem 4rem;
  position: relative;
  margin-bottom: 1rem;
  background: var(--ivory);
  border: 1px solid rgba(184,134,11,0.25);
  border-radius: var(--radius);
}

.process-steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 1rem;
  top: 1.5rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold);
  font-weight: 700;
}

/* Blog */
.blog-meta {
  font-size: 0.85rem;
  color: var(--steel);
  margin-bottom: 0.75rem;
}

.article-content {
  max-width: 720px;
  margin: 0 auto;
}

.article-content h2 { margin-top: 2rem; }
.article-content ul, .article-content ol { margin: 1rem 0 1rem 1.5rem; }

/* Legal pages */
.legal-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.legal-content h2 {
  margin-top: 2rem;
  font-size: 1.3rem;
}

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

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

.cookies-table th,
.cookies-table td {
  border: 1px solid var(--brass);
  padding: 0.65rem 0.85rem;
  text-align: left;
}

.cookies-table th {
  background: var(--walnut-dark);
  color: var(--ivory);
}

/* 404 */
.error-page {
  text-align: center;
  padding: 6rem 1.5rem;
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

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

/* Footer */
.site-footer {
  background: var(--walnut-dark);
  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;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-name {
  font-family: var(--font-display);
  color: var(--gold-light);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.footer-grid h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer-grid a { color: var(--ivory-dark); }
.footer-grid a:hover { color: var(--gold-light); }

.footer-grid ul { list-style: none; }
.footer-grid li + li { margin-top: 0.4rem; }

.footer-grid address { font-style: normal; }
.footer-grid address p + p { margin-top: 0.35rem; }

.footer-bottom {
  border-top: 1px solid rgba(184,134,11,0.3);
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--walnut-dark);
  border-top: 2px solid var(--gold);
  padding: 1.25rem;
  z-index: 200;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
}

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

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

.cookie-inner p {
  color: var(--ivory-dark);
  font-size: 0.9rem;
  flex: 1;
  min-width: 240px;
}

.cookie-inner a { color: var(--gold-light); }

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

/* Image placeholder */
.img-placeholder {
  background: linear-gradient(135deg, var(--walnut) 0%, var(--walnut-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  min-height: 200px;
}

/* Two column layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-visual {
    min-height: 280px;
    order: -1;
  }

  .hero-visual::after {
    background: linear-gradient(180deg, transparent 60%, var(--walnut-dark) 100%);
  }

  .hero-content {
    padding: 2rem 1.5rem;
  }

  .page-hero-with-image {
    grid-template-columns: 1fr;
  }

  .two-col { grid-template-columns: 1fr; }
}

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

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(300px, 85vw);
    height: 100vh;
    background: var(--walnut-dark);
    padding: 5rem 1.5rem 2rem;
    transition: right var(--transition);
    border-left: 2px solid var(--gold);
  }

  .main-nav.open { right: 0; }

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

  .section { padding: 2.5rem 0; }
}
