/* =========================================================
   Tugaloo Engineering — compact 2010-style static site
   ========================================================= */

:root {
  --green-950: #0d241c;
  --green-900: #15382c;
  --green-800: #1e4538;
  --green-700: #285343;
  --green-100: #e3ebe4;
  --ink: #25322c;
  --ink-soft: #4c5d54;
  --paper: #f7f2e6;
  --white: #fffdf8;
  --cream: #f2ead9;
  --gold: #e5a33e;
  --gold-dark: #9a5a15;
  --copper: #a25f1d;
  --line: #c7d2c9;
  --line-dark: #0e281f;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: "Trebuchet MS", Verdana, Tahoma, Arial, sans-serif;
  --page: 1120px;
  --pad: clamp(20px, 3.5vw, 44px);
  --edge: clamp(16px, 2.4vw, 28px);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 24px 0;
  color: var(--ink);
  background-color: #16372b;
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 9px);
  font: 14px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

::selection {
  background: #f2c472;
  color: #1c2a22;
  text-shadow: none;
}

::-moz-selection {
  background: #f2c472;
  color: #1c2a22;
  text-shadow: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: #1f5c48;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--copper);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin-top: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 8px 12px;
  border: 1px solid var(--green-900);
  background: var(--white);
  color: var(--green-900);
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page {
  width: min(var(--page), calc(100% - clamp(16px, 3vw, 40px)));
  margin: 0 auto;
  border: 1px solid #0a1d16;
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

/* ---------- Utility bar ---------- */

.utility-bar {
  padding: 0 var(--edge);
  border-radius: 5px 5px 0 0;
  background: linear-gradient(#2b5343, #173a2d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #dfeae2;
  font-size: 9.5px;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 29px;
}

.utility-inner p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.utility-extra {
  white-space: nowrap;
}

.preview-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border: 1px solid #815014;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 30;
  border-bottom: 1px solid #b9c8be;
  background: linear-gradient(#ffffff, #edf3ee);
  box-shadow: inset 0 1px 0 #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: clamp(70px, 7vw, 82px);
  padding: 0 var(--edge);
}

.brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--green-900);
  text-decoration: none;
}

.brand:hover {
  color: var(--green-900);
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border: 2px solid #b6c6bb;
  border-radius: 50%;
  background: linear-gradient(145deg, #4f7c69, #234b3b 55%, #15372b);
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.35), inset 0 -2px 3px rgba(0, 0, 0, 0.28), 0 1px 2px rgba(0, 0, 0, 0.18);
  color: #f5ebd4;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: bold;
  letter-spacing: -1px;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-family: var(--serif);
  font-size: clamp(21px, 2.3vw, 26px);
  letter-spacing: -0.6px;
  text-shadow: 0 1px 0 #fff;
  white-space: nowrap;
}

.brand-text small {
  margin-top: 4px;
  color: #5f7468;
  font-size: 8.5px;
  font-weight: bold;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.header-badge {
  padding: 5px 9px;
  border: 1px solid #bcc9c0;
  border-radius: 3px;
  background: #f4f7f3;
  color: #5f7468;
  font-size: 8.5px;
  font-weight: bold;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--green-900);
  font: bold 10px/1 var(--sans);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-toggle-lines {
  display: grid;
  gap: 4px;
  width: 21px;
}

.nav-toggle-lines i {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

/* ---------- Navigation ---------- */

.primary-nav {
  display: flex;
  align-items: stretch;
  padding: 0 var(--edge);
  border-top: 1px solid #4e7b68;
  border-bottom: 1px solid var(--line-dark);
  background: linear-gradient(#356653, #224b3b 55%, #1b4032);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 37px;
  padding: 0 17px;
  border-right: 1px solid rgba(8, 28, 21, 0.24);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  color: #f0f5ef;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.48);
  text-transform: uppercase;
}

.primary-nav a:first-child {
  border-left: 0;
}

.primary-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.primary-nav .active {
  background: linear-gradient(#fffdf6, #eee7d8);
  color: #1e4538;
  text-shadow: 0 1px 0 #fff;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-block;
  padding: 10px 17px;
  border: 1px solid var(--gold-dark);
  border-radius: 5px;
  background: linear-gradient(#f4c877, #e2a13b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 2px 3px rgba(61, 35, 8, 0.25);
  color: #2d1a05;
  font: bold 10.5px/1.2 var(--sans);
  letter-spacing: 0.09em;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
}

.button:hover {
  background: linear-gradient(#fbd58c, #e8ad49);
  color: #2d1a05;
}

.button-gold {
  color: #2d1a05;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: clamp(440px, 39vw, 520px);
  overflow: hidden;
  border-bottom: 4px solid var(--copper);
  background: var(--green-900);
}

.hero-media,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media img {
  object-fit: cover;
  object-position: 49% 58%;
  filter: saturate(0.9) contrast(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 24, 18, 0.94) 0%, rgba(7, 24, 18, 0.84) 38%, rgba(7, 24, 18, 0.54) 68%, rgba(7, 24, 18, 0.32) 100%),
    linear-gradient(0deg, rgba(7, 24, 18, 0.78) 0%, rgba(7, 24, 18, 0.08) 55%, rgba(7, 24, 18, 0.28) 100%);
}

.hero-content {
  position: absolute;
  right: clamp(20px, 3.4vw, 38px);
  bottom: clamp(24px, 3.4vw, 38px);
  left: clamp(20px, 3.4vw, 38px);
  z-index: 1;
  max-width: 720px;
}

.hero-kicker {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 9px 3px;
  border: 1px solid #8e5516;
  border-radius: 3px;
  background: var(--gold);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  color: #2d1a05;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 14px;
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(36px, 4.4vw, 56px);
  font-weight: bold;
  letter-spacing: -1.5px;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55), 0 0 18px rgba(0, 0, 0, 0.4);
}

.hero h1 em {
  color: #f2c472;
  font-weight: bold;
}

.hero-lede {
  max-width: 520px;
  margin: 0;
  color: #f6f2e9;
  font-size: 14.5px;
  line-height: 1.65;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px 22px;
  margin-top: 20px;
}

/* ---------- Section basics ---------- */

.section {
  padding: 32px var(--pad) 36px;
}

.section-label {
  display: inline-block;
  margin: 0 0 12px;
  padding: 3px 7px 2px;
  border: 1px solid #c4d0c7;
  border-radius: 3px;
  background: #e8eee7;
  color: #3f5c4b;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.section-label span {
  margin-right: 5px;
  color: var(--copper);
}

.section-label-light {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.15);
  color: #dbe7df;
}

.section-label-light span {
  color: #f2c472;
}

h2 {
  margin: 0;
  color: #1d4537;
  font-family: var(--serif);
  font-size: clamp(28px, 3.5vw, 33px);
  font-weight: bold;
  letter-spacing: -0.8px;
  line-height: 1.1;
  text-shadow: 0 1px 0 #fff;
}

h2 em {
  color: var(--copper);
  font-weight: bold;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(230px, 0.75fr);
  gap: 8px 30px;
  align-items: end;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid #d6ded6;
}

.section-heading .section-label {
  grid-column: 1 / -1;
  justify-self: start;
  margin-bottom: 0;
}

.section-heading h2 {
  grid-column: 1;
}

.section-intro {
  grid-column: 2;
  margin: 0 0 2px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

/* ---------- Capabilities ---------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(12px, 1.4vw, 16px);
}

.service-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(22, 49, 38, 0.08);
}

.service-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-bottom: 1px solid #c5d0c7;
  background: linear-gradient(#f2f6f1, #e2eae4);
}

.service-number {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  border: 1px solid #8f5315;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  color: #2d1a05;
  font-size: 8.5px;
  font-weight: bold;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.service-card h3 {
  margin: 0;
  color: #1e4538;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: bold;
  letter-spacing: -0.3px;
  line-height: 1.15;
  text-shadow: 0 1px 0 #fff;
}

.service-card > p {
  flex: 1;
  margin: 0;
  padding: 13px 14px 16px;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.7;
}

/* ---------- Approach ---------- */

.approach {
  padding: 30px var(--pad) 34px;
  border-top: 1px solid #0b2118;
  border-bottom: 3px solid var(--copper);
  background: #1e4538;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: #f4efe3;
}

.approach-intro h2 {
  color: #fff;
  font-size: clamp(27px, 3.2vw, 31px);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

.approach-intro h2 em {
  color: #f2c472;
}

.process-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(16px, 2vw, 22px);
  margin: 21px 0 0;
  padding: 19px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  list-style: none;
}

.process-number {
  display: block;
  margin-bottom: 3px;
  color: #f2c472;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
}

.process-step h3 {
  margin: 0 0 4px;
  color: #fff;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: bold;
  line-height: 1.15;
}

.process-step p {
  margin: 0;
  color: #c8d7cf;
  font-size: 12px;
  line-height: 1.65;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: clamp(280px, 30vw, 350px) minmax(0, 1fr);
  gap: clamp(22px, 3vw, 32px);
  align-items: center;
}

.about-photo {
  padding: 6px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 2px 5px rgba(22, 49, 38, 0.15);
}

.about-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 45% 62%;
}

.about-lede {
  margin: 15px 0 11px;
  color: #2b4b3e;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
}

.about-copy > p:not(.section-label):not(.about-lede) {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.72;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 18px var(--edge) 16px;
  border-radius: 0 0 5px 5px;
  border-top: 3px solid var(--copper);
  background: #15382c;
  color: #cfddd4;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
}

.brand-footer {
  color: #f5efdf;
}

.brand-footer:hover {
  color: #f5efdf;
}

.brand-footer .brand-mark {
  width: 38px;
  height: 38px;
  border-color: rgba(255, 255, 255, 0.28);
  font-size: 14px;
}

.brand-footer .brand-text strong {
  color: #f5efdf;
  font-size: 17px;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.brand-footer .brand-text small {
  color: #91aa9c;
  font-size: 7.5px;
}

.footer-inner > p {
  margin: 0;
  color: #a8bdb1;
  font-size: 9.5px;
  line-height: 1.5;
}

.back-top {
  color: #d7e3db;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.back-top:hover {
  color: #f2c472;
}

.footer-credit {
  margin: 12px 0 0;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #9ab0a3;
  font-size: 8.5px;
  line-height: 1.5;
}

/* ---------- 404 ---------- */

.not-found {
  padding: 52px var(--pad) 58px;
  text-align: center;
}

.not-found h1 {
  margin: 0 0 8px;
  color: #1d4537;
  font-family: var(--serif);
  font-size: clamp(64px, 14vw, 105px);
  line-height: 0.9;
  letter-spacing: -4px;
  text-shadow: 0 1px 0 #fff;
}

.not-found h1 em {
  color: var(--copper);
}

.not-found > p:not(.section-label) {
  max-width: 430px;
  margin: 0 auto 22px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

/* ---------- Anchor offset ---------- */

#capabilities,
#approach,
#about {
  scroll-margin-top: 12px;
}

/* ---------- Responsive ---------- */

@media (max-width: 840px) {
  :root {
    --pad: clamp(18px, 4vw, 32px);
  }

  .header-badge {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    float: none;
    overflow-y: auto;
    padding: 80px var(--edge) 34px;
    border: 0;
    background: linear-gradient(#1d4537, #0c241c);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 220ms ease, visibility 220ms ease, transform 220ms ease;
  }

  .primary-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .primary-nav a {
    min-height: 0;
    padding: 12px 2px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-family: var(--serif);
    font-size: 23px;
    font-weight: bold;
    letter-spacing: -0.4px;
    text-transform: none;
  }

  .primary-nav .active {
    background: transparent;
    color: #f2c472;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
  }

  .nav-open .brand {
    visibility: hidden;
  }

  .nav-open .nav-toggle {
    position: relative;
    z-index: 3;
    color: #f5efdf;
  }

  .nav-open .nav-toggle-label {
    font-size: 0;
  }

  .nav-open .nav-toggle-label::after {
    content: "Close";
    font-size: 10px;
  }

  .nav-open .nav-toggle-lines i:first-child {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-open .nav-toggle-lines i:nth-child(2) {
    opacity: 0;
  }

  .nav-open .nav-toggle-lines i:last-child {
    transform: translateY(-6px) rotate(-45deg);
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .section-heading .section-label,
  .section-heading h2,
  .section-intro {
    grid-column: 1;
  }

  .section-intro {
    max-width: 520px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .about-photo {
    max-width: 340px;
  }
}

@media (max-width: 720px) {
  body {
    padding: 0;
  }

  .page {
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .utility-bar {
    border-radius: 0;
  }

  .utility-inner p:last-child,
  .utility-extra {
    display: none;
  }

  .utility-inner {
    min-height: 27px;
  }

  .header-inner {
    min-height: 70px;
    padding: 0 16px;
  }

  .brand-mark {
    width: 43px;
    height: 43px;
    font-size: 15px;
  }

  .brand-text strong {
    font-size: 21px;
    letter-spacing: -0.4px;
  }

  .brand-text small {
    display: none;
  }

  .hero {
    height: 480px;
  }

  .hero-content {
    right: 20px;
    bottom: 28px;
    left: 20px;
  }

  .hero h1 {
    font-size: clamp(34px, 10vw, 43px);
    letter-spacing: -1.1px;
  }

  .hero-lede {
    font-size: 13px;
  }

  .section,
  .approach {
    padding-right: 20px;
    padding-left: 20px;
  }

  .section {
    padding-top: 26px;
    padding-bottom: 30px;
  }

  .approach {
    padding-top: 26px;
    padding-bottom: 30px;
  }

  h2 {
    font-size: clamp(26px, 7.3vw, 30px);
  }

  .about-photo {
    max-width: 100%;
  }

  .site-footer {
    border-radius: 0;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }
}

@media (max-width: 480px) {
  .brand-text strong {
    font-size: 19px;
  }

  .hero {
    height: 460px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .button {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .header-inner {
    gap: 8px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }

  .brand-text strong {
    font-size: 17px;
    letter-spacing: -0.3px;
  }

  .nav-toggle {
    gap: 0;
  }

  .nav-toggle-label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
