/* Baird Forestry — modern, responsive base styles */

:root {
  /* Dark charcoal theme */
  --bg: #121314;
  --surface: #181a1c;
  --text: #e7e7ea;
  --muted: #9aa1ab;
  --accent: #22c55e; /* emerald */
  --accent-600: #16a34a;
  --accent-700: #15803d;
  --border: #262a2e;
  --ring: #22c55e;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --container-max: 1120px;
  --gutter: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; word-break: break-word; }
p, li, div { word-wrap: break-word; overflow-wrap: break-word; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(18,20,22,0.8);
  border-bottom: 1px solid var(--border);
}
.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
}
.brand { display:none; }
.brand-name { font-weight: 700; letter-spacing: 0.3px; }
.brand small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .2px;
}
.brand-logo { height: 80px; width: 80px; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 6px rgba(0,0,0,0.35); }
.nav-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.nav-links a {
  color: #e5e7eb;
  padding: 8px 10px;
  border-radius: 8px;
}
.nav-links a:hover { background: #111827; }
.nav-links a.active { color: var(--accent); font-weight: 600; }
@media (max-width: 640px) {
  .nav-links { gap: 8px; font-size: 14px; }
  .nav-links a { padding: 6px 8px; }
}

/* Dropdown (Services) */
.nav-group { position: relative; }
.nav-drop-trigger {
  background: transparent; border: none; color: #e5e7eb; cursor: pointer;
  padding: 8px 10px; border-radius: 8px; font: inherit; display: inline-flex; align-items: center; gap: 6px;
}
.nav-drop-trigger:hover, .nav-drop-trigger[aria-expanded="true"] { background: #111827; }
.nav-drop-caret { font-size: 10px; opacity: .8; }
.nav-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 300;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; padding: 6px; display: none; min-width: 240px; box-shadow: var(--shadow);
}
.nav-dropdown a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.nav-dropdown a:hover { background: #1f242a; }
.nav-group.open .nav-dropdown { display: block; }

/* Hero */
.hero {
  position: relative;
  min-height: 90vh;
  display: grid;
  align-items: end;
  color: #fff;
  background: none;
  margin-top: 0;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: center center; display: block; }
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.65) 60%, rgba(0,0,0,0.8) 100%);
  z-index: 1;
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 96px;
  padding-bottom: 56px;
  width: 100%;
  margin: 0;
  /* Align hero text to the same left edge as .container */
  padding-left: max(var(--gutter), calc((100vw - var(--container-max)) / 2 + var(--gutter)));
  padding-right: var(--gutter);
}
/* Ensure hero text block uses the same left edge as .container */
.hero-inner { text-align: left; }
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.1;
}
.hero p {
  margin: 0 0 20px;
  color: #e6e7ea;
  font-size: clamp(16px, 2vw, 20px);
}

.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform .06s ease, background .2s ease, color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-600); }
.btn-outline { background: transparent; border-color: #ffffff88; color: #fff; }
.btn-outline:hover { background: #ffffff14; }

/* Section base */
section { padding: 72px 0; }
@media (max-width: 640px) { section { padding: 56px 0; } }
.section-title { margin: 0 0 20px; font-size: 32px; letter-spacing: 0.2px; }
.section-subtitle { margin: 8px 0 28px; color: var(--muted); }

/* Services cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 1000px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}
.card h3 { margin: 2px 0; font-size: 20px; }
.card p { margin: 0; color: #cbd5e1; }
.card .more { color: var(--accent); font-weight: 600; }
.card:hover { transform: translateY(-1px); box-shadow: 0 12px 34px rgba(2, 6, 23, 0.12); }

/* Two-column content */
.two-col { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

.lead { font-size: 18px; color: #cbd5e1; }

.profile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.profile-header { display: grid; grid-template-columns: 240px 1fr; gap: 22px; align-items: center; }
.profile-photo { width: 240px; height: 240px; border-radius: 14px; object-fit: cover; }
@media (max-width: 640px) {
  .profile-header { grid-template-columns: 1fr; text-align: center; }
  .profile-photo { width: 160px; height: 160px; margin: 0 auto; }
}
.profile-name { font-weight: 700; }
.profile-title { color: var(--muted); font-size: 14px; margin-top: -2px; }
.contact-list { margin-top: 10px; display: grid; gap: 6px; }
.contact-list a { color: var(--accent); font-weight: 600; }

.credentials { margin-top: 18px; }
.credentials h4 { margin: 0 0 10px; font-size: 16px; color: #e5e7eb; }
.cred-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
@media (max-width: 640px) { .cred-grid { grid-template-columns: 1fr; } }
.cred-item { font-size: 14px; color: #cbd5e1; display: flex; gap: 8px; align-items: center; }
.cred-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }

/* Info box */
.info-box {
  background: linear-gradient(180deg, #f0fdf4 0%, #d1fae5 100%);
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  padding: 20px;
}
.info-box h3, .info-box h2 { margin: 0 0 8px; color: #064e3b; }
.info-box p { margin: 0; color: #065f46; }

/* Feature lists */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
@media (max-width: 1000px) { .feature-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.feature h4 { margin: 0 0 6px; font-size: 18px; }
.feature p { margin: 0; color: #cbd5e1; }

/* Contact section */
.contact {
  background: var(--surface);
  color: #dbe2ee;
  border-top: 1px solid #111827;
  border-bottom: 1px solid #111827;
}
.contact a { color: #a7f3d0; }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }

/* Footer */
.footer-brand { display:inline-flex; align-items:center; gap:14px; margin-bottom:8px; }
.footer-brand img { width: 225px; height: 225px; border-radius: 50%; }
@media (max-width: 640px) {
  .footer-brand img { width: 150px; height: 150px; }
}
.footer-brand .name { font-weight:700; color:#e5e7eb; }

/* Modal */
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(2,6,23,0.6); z-index: 200; padding: 20px; }
.modal.open { display: flex; }
.modal-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); width: 100%; max-width: 640px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.modal-title { margin: 0; font-size: 18px; }
.modal-close { background: transparent; border: none; font-size: 22px; line-height: 1; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.modal-close:hover { background: #1f2937; }
.modal-body { padding: 18px; }

/* Form */
form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { form .row { grid-template-columns: 1fr; } }
label { display: block; font-size: 14px; color: #cbd5e1; margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  padding: 12px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b1220;
  color: var(--text);
  font: inherit;
}
textarea { min-height: 130px; resize: vertical; }
.submit { margin-top: 10px; }

/* Utility */
.muted { color: var(--muted); }
.spacer-s { height: 10px; }
.spacer-m { height: 20px; }
.spacer-l { height: 40px; }
