/* Terraline LLC — shared styles */
:root {
  --orange: #C05010;
  --orange-dark: #9A3D0C;
  --orange-hover: #A8440E;
  --charcoal: #1a1a1a;
  --charcoal-soft: #2d2d2d;
  --text: #333333;
  --muted: #666666;
  --light-gray: #f5f5f5;
  --border: #e0e0e0;
  --white: #ffffff;
  --cta-h: 56px;
  --nav-h: 72px;
  --max: 1100px;
  --radius: 6px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  padding-bottom: var(--cta-h);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-hover); }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* —— Nav —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: -0.02em;
}
.logo span { color: var(--orange); }
.logo:hover { color: var(--charcoal); }

.nav-links {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.nav-links a {
  color: var(--charcoal-soft);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover,
.nav-links a.active { color: var(--orange); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--charcoal);
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* —— Hero —— */
.hero {
  background: linear-gradient(135deg, var(--charcoal) 0%, #2c3e50 100%);
  color: var(--white);
  padding: 4rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/hero.jpg") center/cover no-repeat;
  opacity: 0.25;
}

.hero .container { position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.25;
  max-width: 18ch;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 36ch;
  margin-bottom: 1.75rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--orange-hover);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--charcoal);
}

.btn-group { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* —— Sections —— */
.section {
  padding: 3.5rem 0;
}

.section-alt { background: var(--light-gray); }

.section-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange);
  margin-bottom: 0.5rem;
}

.section h2 {
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  color: var(--charcoal);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-intro {
  color: var(--muted);
  max-width: 55ch;
  margin-bottom: 2rem;
}

/* —— About —— */
.about-grid {
  display: grid;
  gap: 2rem;
}

.about-text p + p { margin-top: 1rem; }

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--charcoal-soft);
}

/* —— Experience bar —— */
.experience-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.experience-card h3 {
  font-size: 1.1rem;
  color: var(--charcoal);
  margin-bottom: 0.35rem;
}

.experience-card .role {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.exp-bar-track {
  height: 10px;
  background: var(--light-gray);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.exp-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--orange), var(--orange-hover));
  border-radius: 999px;
  transition: width 1.2s ease-out;
}

.exp-bar-fill.filled { width: 80%; } /* 8 of ~10 years visual */

.exp-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.9rem;
}

.exp-stat strong {
  font-size: 1.5rem;
  color: var(--orange);
  font-weight: 700;
}

/* —— Service cards —— */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--light-gray);
}

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

.card-body { padding: 1.35rem 1.35rem 1.5rem; }

.card-body h3 {
  font-size: 1.15rem;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}

.accent-line {
  width: 40px;
  height: 3px;
  background: var(--orange);
  margin-bottom: 0.85rem;
  border-radius: 2px;
}

.card-body p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--orange);
}
.card-link:hover { color: var(--orange-hover); }
.card-link svg { width: 16px; height: 16px; transition: transform 0.2s; }
.card-link:hover svg { transform: translateX(3px); }

/* Service detail (services page) */
.service-block {
  display: grid;
  gap: 1.5rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.service-block:last-child { border-bottom: none; }
.service-block:nth-child(even) .service-img { order: 0; }

.service-img {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--light-gray);
}
.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-content h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.service-content p {
  color: var(--muted);
  margin-bottom: 0.75rem;
}

/* —— CTA band —— */
.cta-band {
  background: var(--charcoal);
  color: var(--white);
  text-align: center;
  padding: 3rem 0;
}

.cta-band h2 {
  color: var(--white);
  margin-bottom: 0.75rem;
}

.cta-band p {
  opacity: 0.85;
  margin-bottom: 1.5rem;
  max-width: 40ch;
  margin-left: auto;
  margin-right: auto;
}

/* —— Contact —— */
.contact-grid {
  display: grid;
  gap: 2.5rem;
}

.contact-info h2 { margin-bottom: 1rem; }

.info-item {
  margin-bottom: 1.25rem;
}

.info-item dt {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange);
  margin-bottom: 0.25rem;
}

.info-item dd {
  color: var(--charcoal-soft);
  font-size: 1rem;
}

.info-item a { color: var(--charcoal-soft); }
.info-item a:hover { color: var(--orange); }

.contact-form {
  background: var(--light-gray);
  padding: 1.75rem;
  border-radius: var(--radius);
}

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

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

.form-group .optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.85rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  background: var(--white);
  color: var(--charcoal);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--orange);
}

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

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

.page-hero {
  background: var(--light-gray);
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: var(--muted);
  max-width: 50ch;
}

/* —— Sticky CTA bar —— */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--cta-h);
  display: flex;
  z-index: 200;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.12);
}

.sticky-cta a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--white);
  transition: background 0.2s;
}

.sticky-cta .cta-quote {
  background: var(--charcoal);
}
.sticky-cta .cta-quote:hover { background: var(--charcoal-soft); color: var(--white); }

.sticky-cta .cta-email {
  background: var(--orange);
}
.sticky-cta .cta-email:hover { background: var(--orange-hover); color: var(--white); }

/* —— Scroll top —— */
.scroll-top {
  position: fixed;
  bottom: calc(var(--cta-h) + 1rem);
  right: 1rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s, background 0.2s;
  z-index: 150;
  box-shadow: var(--shadow);
}
.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}
.scroll-top:hover { background: var(--orange-hover); }
.scroll-top svg { width: 20px; height: 20px; }

/* —— Footer —— */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.7);
  padding: 2rem 0;
  font-size: 0.9rem;
  text-align: center;
}

.site-footer .logo {
  color: var(--white);
  display: inline-block;
  margin-bottom: 0.5rem;
}
.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: var(--orange); }
.site-footer p + p { margin-top: 0.35rem; }

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

  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border);
    display: none;
    padding: 0.5rem 0;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    padding: 0.85rem 1.25rem;
    width: 100%;
  }

  .hero { padding: 3rem 0 3.5rem; }
}

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .cards { grid-template-columns: repeat(3, 1fr); }

  .about-grid {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }

  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
  }

  .service-block {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .service-block:nth-child(even) .service-img { order: 1; }
}

@media (min-width: 640px) and (max-width: 899px) {
  .cards.teasers { grid-template-columns: repeat(2, 1fr); }
}

/* —— Logo image —— */
.logo-img {
  display: block;
  height: 48px;
  width: auto;
}
.site-footer .logo-img {
  height: 56px;
  margin: 0 auto 0.75rem;
}
@media (max-width: 480px) {
  .logo-img { height: 40px; }
}

/* Text-only services (no photos until organic shots) */
.service-block {
  grid-template-columns: 1fr !important;
  max-width: 720px;
  padding: 2rem 0;
}
.service-block:nth-child(even) .service-img { order: 0; }

.card.text-only .card-body,
.cards .card .card-body {
  padding-top: 1.5rem;
}

.photo-note {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 0.5rem;
}
