/* ==========================================================================
   Forbes Brothers LLC -- Design tokens
   Palette pulled from the business card: red, dark green, yellow.
   ========================================================================== */

:root {
  /* Primary: gold and silver, pulled from the logo */
  --gold: #C9A227;
  --gold-dark: #A9821E;
  --gold-light: #E4C767;
  --silver: #9BA3AB;
  --silver-light: #D8DBDE;
  --silver-dark: #6B7278;

  /* Structural dark (charcoal/black, matches the logo's badge background) */
  --ink: #17181A;
  --ink-soft: #2A2C2F;

  /* Accent colors, used sparingly (from the original business card) */
  --barn-red: #A6303B;
  --barn-red-dark: #7E2530;
  --timber-green: #1F3A2E;
  --timber-green-dark: #142821;

  /* Bright background system */
  --bg-page: #FFFFFF;
  --bg-alt: #F5F6F8;
  --white: #FFFFFF;
  --line: rgba(23, 24, 26, 0.12);

  --font-display: "Archivo Black", "Arial Black", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Space Mono", "Courier New", monospace;

  --radius: 2px;
  --shadow: 0 12px 30px rgba(23, 24, 26, 0.14);
  --container: 1180px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-transform: uppercase;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--barn-red);
  display: inline-block;
  margin-bottom: 0.6em;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: 10px 16px;
  z-index: 1000;
  font-family: var(--font-mono);
}
.skip-link:focus { left: 12px; top: 12px; }

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

/* ==========================================================================
   Signature element: the tape-measure divider
   A repeating SVG rule with inch tick marks, used between sections
   instead of a plain <hr>.
   ========================================================================== */

.tape-divider {
  height: 26px;
  width: 100%;
  background-color: var(--ink);
  background-image:
    repeating-linear-gradient(
      90deg,
      var(--gold) 0px, var(--gold) 2px,
      transparent 2px, transparent 24px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(201,162,39,0.55) 0px, rgba(201,162,39,0.55) 1px,
      transparent 1px, transparent 12px
    );
  background-position: 0 bottom, 0 center;
  background-size: 100% 60%, 100% 30%;
  background-repeat: repeat-x;
  border-top: 1px solid rgba(201,162,39,0.4);
  border-bottom: 1px solid rgba(201,162,39,0.4);
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.logo .mark {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 6px;
  object-fit: cover;
}

.logo .brand-lines { display: flex; flex-direction: column; line-height: 1; }
.logo .brand-lines small {
  font-family: var(--font-mono);
  text-transform: none;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--barn-red);
  margin-top: 4px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-radius: var(--radius);
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: var(--bg-alt);
  color: var(--barn-red-dark);
}

.nav-cta {
  background: var(--barn-red) !important;
  color: var(--white) !important;
}
.nav-cta:hover { background: var(--barn-red-dark) !important; color: var(--white) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-family: var(--font-mono);
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .main-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--line);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 8px 24px 16px; gap: 2px; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--gold-dark); color: var(--ink); }

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

.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #000000; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  background: linear-gradient(160deg, var(--ink) 0%, #000000 75%);
  color: var(--white);
  overflow: hidden;
  border-bottom: 3px solid var(--gold);
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: 110px 0 90px;
  max-width: 780px;
}

.hero .eyebrow { color: var(--gold); }

.hero h1 { color: var(--white); }
.hero h1 span { color: var(--gold); }

.hero-lede {
  font-size: 1.15rem;
  max-width: 560px;
  color: rgba(255,255,255,0.86);
}

.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

/* diagonal "cut lumber" clip on the hero's background photo layer */
.hero-cut {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 0% 100%);
}

.hero-stats {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255,255,255,0.18);
}
.hero-stats .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  padding: 28px 24px 40px;
}
.stat-num {
  font-family: var(--font-mono);
  font-size: 2rem;
  color: var(--gold);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.7);
}
.stat-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--white);
  max-width: 220px;
  padding-top: 6px;
}

/* ==========================================================================
   Sections
   ========================================================================== */

section { padding: 84px 0; }
.section-cream { background: var(--bg-alt); }
.section-dark { background: var(--ink); color: var(--white); }
.section-dark h2 { color: var(--white); }
.section-dark .eyebrow { color: var(--gold); }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ==========================================================================
   Service cards -- slight rotation + nail-pin accent instead of soft shadows
   ========================================================================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.service-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 32px 26px;
  border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:nth-child(even) { transform: rotate(-0.4deg); }
.service-card:nth-child(odd) { transform: rotate(0.4deg); }
.service-card:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: var(--shadow);
}
.service-card::before {
  content: "";
  position: absolute;
  top: 14px; right: 16px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 1px 2px rgba(0,0,0,0.3) inset;
}
.service-card .icon {
  width: 44px; height: 44px;
  margin-bottom: 18px;
  color: var(--gold-dark);
}
.service-card h3 { text-transform: none; margin-bottom: 0.35em; }
.service-card .tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--barn-red);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ==========================================================================
   Timeline (About page) -- uses the tape-measure motif as the track
   ========================================================================== */

.timeline {
  position: relative;
  padding-left: 34px;
  border-left: 4px solid var(--silver-dark);
  background-image: repeating-linear-gradient(
    180deg,
    var(--gold) 0px, var(--gold) 2px,
    transparent 2px, transparent 20px
  );
  background-position: -2px 0;
  background-size: 4px 100%;
  background-repeat: repeat-y;
}
.timeline-item { position: relative; padding-bottom: 40px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -42px; top: 2px;
  width: 16px; height: 16px;
  background: var(--barn-red);
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--silver-dark);
}
.timeline-year { font-family: var(--font-mono); color: var(--barn-red); font-size: 0.85rem; }

/* ==========================================================================
   Values grid, team, testimonials
   ========================================================================== */

.value-item { display: flex; gap: 16px; align-items: flex-start; }
.value-item .num {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  color: var(--gold-dark);
  flex-shrink: 0;
}

.testimonial {
  background: var(--white);
  border-left: 4px solid var(--barn-red);
  padding: 26px 28px;
  border-radius: var(--radius);
}
.testimonial p { font-size: 1.05rem; font-style: italic; }
.testimonial cite {
  display: block;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--timber-green);
  margin-top: 10px;
}

/* ==========================================================================
   Gallery (populated from CRM)
   ========================================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-alt);
  aspect-ratio: 4 / 3;
  position: relative;
}
.gallery-grid img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.gallery-grid figure:hover img { transform: scale(1.06); }
.gallery-grid figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(20,40,33,0.88), transparent);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 22px 12px 10px;
}
.gallery-empty {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink);
  opacity: 0.6;
  padding: 40px;
  text-align: center;
  border: 1px dashed var(--line);
  grid-column: 1 / -1;
}

/* ==========================================================================
   Forms (Contact page)
   ========================================================================== */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 860px) {
  .contact-layout { grid-template-columns: 1fr; }
}

label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  color: var(--ink);
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--barn-red);
}
textarea { resize: vertical; min-height: 130px; }

/* Honeypot field -- hidden from real users, catches bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-status {
  padding: 16px 18px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.form-status.success { background: #E4EEE7; border: 1px solid var(--timber-green); color: var(--timber-green-dark); }
.form-status.error { background: #F6E4E2; border: 1px solid var(--barn-red); color: var(--barn-red-dark); }

.contact-info-list { list-style: none; padding: 0; margin: 0; }
.contact-info-list li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  font-family: var(--font-mono);
  font-size: 0.95rem;
}
.contact-info-list li:last-child { border-bottom: none; }

/* ==========================================================================
   CTA band
   ========================================================================== */

.cta-band {
  background: var(--barn-red);
  color: var(--white);
  text-align: center;
}
.cta-band h2 { color: var(--white); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.72);
  padding: 56px 0 28px;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

/* ==========================================================================
   Utility
   ========================================================================== */

.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
