/* Goats and Horses: landing page styles */

:root {
  --orange: #e07c23;
  --red: #d92525;
  --black: #000;
  --white: #fff;
  --charcoal: #2b2b2b;
  --beige: #dcd6d0;
  --muted: #9f9f9f;
  --light: #ddd;
  --field-border: #69727d;

  --font-head: "Oxygen", "Open Sans", sans-serif;
  --font-body: "Open Sans", sans-serif;
  --font-alt: "Nunito Sans", "Open Sans", sans-serif;

  --container: 1338px;   /* 1290px of content plus gutters */
  --gutter: 24px;
  --inset: 30px;           /* extra left inset used by hero, about and contact */
  --leaf: 10px 0;          /* signature corner: top-left and bottom-right rounded */
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16.8px;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; }
p { margin: 0 0 1.6em; }
p:last-child { margin-bottom: 0; }
ul { list-style: none; margin: 0; padding: 0; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--black); color: var(--white); padding: 10px 16px; }
.skip-link:focus { top: 16px; }

.icon { width: 1em; height: 1em; flex: none; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 1;
  letter-spacing: .2px;
  padding: 20px; border: 0; border-radius: 0;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s;
}
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover, .btn-dark:focus-visible { background: var(--orange); }
.btn-orange { background: var(--orange); color: var(--white); border-radius: var(--leaf); }
.btn-orange:hover, .btn-orange:focus-visible { background: var(--black); }

:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

/* Header (sits on top of the hero) */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 40px 11px;
}
.site-logo img { width: 83px; border-radius: 10px; }
.site-nav ul { display: flex; gap: 14px; }
.site-nav a {
  display: block; padding: 13px 20px;
  font-size: 16px; font-weight: 600; line-height: 1; letter-spacing: .5px;
  text-decoration: none; color: var(--black);
  transition: color .2s;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--orange); }
.header-cta { padding: 20px; }
.menu-toggle { display: none; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  min-height: 900px;
  display: flex; align-items: center;
}
.hero-bg {
  position: absolute; inset: 0 0 -40% 0;
  background: #bfe3dc url("../img/hero-roof.webp") center top / cover no-repeat;
  will-change: transform;
}
.hero-inner { position: relative; width: 100%; padding-left: calc(var(--gutter) + var(--inset)); padding-top: 60px; }
.hero h1 {
  max-width: 590px;
  font-size: 58px; line-height: 1.2; font-weight: 700;
  color: var(--orange);
  margin-bottom: 24px;
}
.hero p { max-width: 470px; margin-bottom: 32px; }

/* About */
.about { padding: 40px 0; }
.about-inner {
  display: grid; grid-template-columns: minmax(0, 492px) minmax(0, 563px);
  justify-content: space-between; align-items: center; gap: 60px;
  min-height: 542px;
  padding-left: calc(var(--gutter) + var(--inset));
}
.eyebrow { font-family: var(--font-head); font-size: 17.6px; line-height: 1.4; font-weight: 700; margin-bottom: 20px; }
.about h2 { font-size: 32px; line-height: 1.3; font-weight: 700; margin-bottom: 20px; }
.about-text p:not(.eyebrow) { font-size: 16.8px; }

/* Services */
.services { background: var(--charcoal); color: var(--white); padding: 82px 0 80px; }
.services h2 { text-align: center; font-size: 28px; line-height: 1.2; font-weight: 700; margin-bottom: 70px; }
.services-grid {
  display: grid; grid-template-columns: repeat(2, 1fr) auto repeat(2, 1fr);
  column-gap: 40px; align-items: start;
}
.service h3 { font-size: 24px; line-height: 1.4; font-weight: 700; color: var(--orange); margin-bottom: 20px; }
.service p { font-family: var(--font-alt); font-size: 18.4px; line-height: 1.6; color: var(--light); }
.services-photo { padding: 0 15px; }
.services-photo img { width: 197px; height: 197px; border-radius: 50%; object-fit: cover; border: 3px solid var(--white); }
.services-cta { text-align: center; margin-top: 70px; }

/* Projects */
.projects { padding: 80px 0 165px; }
.projects-head { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 94px; align-items: start; margin-bottom: 68px; }
.projects h2 { font-size: 35.2px; line-height: 1.4; font-weight: 700; }
.projects-rule { height: 10px; background: var(--red); margin-top: 44px; }
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 136px 100px; }
.projects-grid a { display: block; border-radius: var(--leaf); overflow: hidden; }
.projects-grid img { width: 100%; aspect-ratio: 1440 / 770; object-fit: cover; transition: transform .5s ease; }
.projects-grid a:hover img, .projects-grid a:focus-visible img { transform: scale(1.03); }

/* Contact */
.contact { background: var(--beige); padding: 80px 0 100px; }
.contact-inner {
  display: grid; grid-template-columns: minmax(0, 554px) minmax(0, 627px);
  justify-content: space-between; gap: 24px;
  padding-left: calc(var(--gutter) + var(--inset));
}
.contact h2 { font-size: 32px; line-height: 1.4; font-weight: 700; margin-bottom: 20px; }
.contact-form { display: grid; gap: 12px; align-content: start; }
.contact-form input, .contact-form textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--black);
  background: var(--white); border: 1px solid var(--field-border); border-radius: 5px;
  padding: 16px 18px;
}
.contact-form input { height: 59px; }
.contact-form textarea { height: 117px; resize: vertical; }
.contact-form ::placeholder { color: #7a7a7a; }
.contact-form [aria-invalid="true"] { border-color: var(--red); }
.btn-send { justify-self: start; padding: 20px 40px; border-radius: var(--leaf); margin-top: 4px; }
.btn-send[disabled] { opacity: .6; cursor: wait; }
.form-status { margin: 4px 0 0; font-size: 15px; min-height: 1.6em; }
.form-status.is-error { color: var(--red); }
.form-status.is-ok { color: #1f6b3a; font-weight: 600; }
.turnstile { min-height: 65px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.site-footer { background: var(--black); color: var(--white); padding: 100px 0 60px; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 60px; align-items: center; padding-left: var(--gutter); }
.footer-brand { display: flex; align-items: center; gap: 50px; }
.footer-brand img { width: 83px; border-radius: 10px; flex: none; }
.footer-brand p { max-width: 490px; font-size: 14.4px; line-height: 1.6; margin: 0; }
.footer-cols { display: grid; grid-template-columns: 205px 194px 150px; }
.footer-cols h4 { font-size: 17.6px; line-height: 1.4; font-weight: 700; margin-bottom: 14px; }
.footer-cols a { font-family: var(--font-head); font-size: 14.4px; line-height: 1.8; color: var(--muted); text-decoration: none; }
.footer-cols a:hover, .footer-cols a:focus-visible { color: var(--white); }

/* Scroll fade-ins (only when JavaScript is running, so content never stays hidden) */
.js .fade { opacity: 0; transition: opacity .9s ease, transform .9s ease; }
.js .fade[data-anim="fade-up"] { transform: translateY(40px); }
.js .fade.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .fade { opacity: 1; transform: none; transition: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  :root { --inset: 0px; }
  .site-header { padding: 12px 24px; }
  .site-nav ul { gap: 0; }
  .hero h1 { font-size: 48px; }
  .about-inner { grid-template-columns: 1fr 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .services-photo { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
  .projects-grid { gap: 64px 40px; }
  .projects-head { gap: 40px; }
  .footer-inner { grid-template-columns: 1fr; padding-left: var(--gutter); }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  body { font-size: 16px; }
  .site-header { padding: 10px 16px; }
  .site-logo img { width: 60px; }
  .header-cta { display: none; }
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; padding: 0; border: 0; border-radius: var(--leaf);
    background: var(--black); color: var(--white); font-size: 22px; cursor: pointer;
  }
  .menu-toggle .icon-close { display: none; }
  .menu-open .menu-toggle .icon-open { display: none; }
  .menu-open .menu-toggle .icon-close { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 16px; right: 16px;
    background: var(--white); box-shadow: 0 12px 30px rgba(0, 0, 0, .15);
    display: none;
  }
  .menu-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 18px 20px; border-bottom: 1px solid #eee; }

  .hero { min-height: 720px; align-items: flex-start; }
  .hero-bg { background-position: 18% top; }
  .hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(214, 236, 231, .75) 0%, rgba(214, 236, 231, .35) 45%, rgba(214, 236, 231, 0) 70%); }
  .hero-inner { padding-top: 110px; padding-bottom: 64px; }
  .hero h1 { font-size: 36px; }
  .hero p { max-width: 300px; }

  .about { padding: 64px 0; }
  .about-inner { grid-template-columns: 1fr; gap: 40px; min-height: 0; }
  .about h2 { font-size: 26px; }

  .services { padding: 64px 0; }
  .services h2 { font-size: 24px; margin-bottom: 40px; }
  .services-grid { grid-template-columns: 1fr; }
  .services-photo img { width: 160px; height: 160px; }
  .services-cta { margin-top: 48px; }

  .projects { padding: 64px 0; }
  .projects-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 40px; }
  .projects h2 { font-size: 28px; }
  .projects-rule { margin-top: 0; width: 100%; }
  .projects-grid { grid-template-columns: 1fr; gap: 32px; }

  .contact { padding: 64px 0; }
  .contact-inner { grid-template-columns: 1fr; gap: 32px; }
  .contact h2 { font-size: 28px; }

  .site-footer { padding: 64px 0 48px; }
  .footer-brand { flex-direction: column; align-items: flex-start; gap: 24px; }
  .footer-cols { grid-template-columns: repeat(3, auto); justify-content: start; gap: 40px; }
}
