:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --text: #1f2328;
  --muted: #5b6168;
  --border: #e7e4de;
  --accent: #a8874a;
  --charcoal: #1f2328;
  --warm-white: #f6f4ef;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.72;
  background: var(--bg);
  color: var(--text);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: "DM Serif Display", "Cormorant Garamond", "Times New Roman", serif;
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 400;
  color: var(--text);
}

h1 {
  line-height: 1.06;
  letter-spacing: -0.02em;
}

h2,
h3 {
  line-height: 1.13;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.78;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.brand-mark {
  font-family: "DM Serif Display", "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0.004em;
}

.nav-link {
  color: var(--text);
  font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--accent);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.74rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid var(--charcoal);
  background: var(--charcoal);
  color: var(--warm-white);
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 24px rgba(18, 22, 27, 0.2);
}

.btn-primary:hover {
  background: #2b3138;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.74rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid var(--accent);
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
  font-weight: 600;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(168, 135, 74, 0.05);
}

.hero-wash {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(70% 95% at 10% 0%, rgba(168, 135, 74, 0.08), transparent 62%),
    radial-gradient(64% 90% at 90% 8%, rgba(31, 35, 40, 0.04), transparent 70%),
    linear-gradient(180deg, rgba(250, 250, 248, 0.98), rgba(247, 246, 243, 0.94));
}

.hero-wash::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image: radial-gradient(rgba(168, 135, 74, 0.35) 0.5px, transparent 0.5px);
  background-size: 4px 4px;
}

.section-rule {
  border-top: 1px solid var(--border);
}

.surface-card {
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface-strong);
  box-shadow: 0 10px 24px rgba(16, 22, 28, 0.05);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.surface-card:hover {
  transform: translateY(-3px);
  border-color: rgba(168, 135, 74, 0.55);
  box-shadow: 0 16px 30px rgba(16, 22, 28, 0.08);
}

.eyebrow {
  display: inline-block;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
}

.text-link {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s;
}

.text-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.contact-form label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.45rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.78rem 0.95rem;
  font: inherit;
  color: var(--text);
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form textarea {
  min-height: 9rem;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168, 135, 74, 0.16);
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.mobile-fab {
  transition: transform 0.35s ease, opacity 0.35s ease, background-color 0.2s ease;
  background: var(--charcoal);
  color: var(--warm-white);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.mobile-fab:hover {
  background: #2b3138;
  border-color: var(--accent);
}

.mobile-fab.is-hidden {
  transform: translateY(140%);
  opacity: 0;
  pointer-events: none;
}

#form-popup {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#form-popup.show {
  opacity: 1;
  transform: translateY(0);
}

.footer-copy {
  color: var(--muted);
  font-size: 0.98rem;
}

/* Case study color coding */
.bg-emerald-50 { background-color: #ecfdf5; }
.bg-emerald-500 { background-color: #10b981; }
.border-emerald-100 { border-color: #d1fae5; }
.text-emerald-600 { color: #059669; }
.text-emerald-800 { color: #065f46; }
.text-emerald-900 { color: #064e3b; }

.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-500 { background-color: #3b82f6; }
.border-blue-100 { border-color: #dbeafe; }
.text-blue-600 { color: #2563eb; }
.text-blue-800 { color: #1e40af; }
.text-blue-900 { color: #1e3a8a; }

.bg-purple-50 { background-color: #faf5ff; }
.bg-purple-500 { background-color: #a855f7; }
.border-purple-100 { border-color: #f3e8ff; }
.text-purple-600 { color: #9333ea; }
.text-purple-800 { color: #6b21a8; }
.text-purple-900 { color: #581c87; }

@media (max-width: 768px) {
  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}