/* ==========================================================================
   RUBEL BROTHERS — Stylesheet
   Design language: technical/blueprint drawing — dimension lines, drawing
   numbers, title blocks, drafting grids. Edit the variables below to
   restyle the whole site from one place.
   ========================================================================== */

:root {
  /* ---- Color tokens ---- */
  --navy:        #102A43;  /* primary dark / blueprint background */
  --navy-2:      #1C3D5C;  /* lighter navy for cards/gradients on dark */
  --line:        #9FC4DE;  /* pale cyan "blueprint linework" */
  --line-dim:    rgba(159, 196, 222, 0.28);
  --steel:       #51606B;  /* steel grey body text on light bg */
  --paper:       #ECE8DC;  /* cement / drawing-paper background */
  --paper-2:     #E2DDCC;  /* deeper paper for cards & borders */
  --ink:         #1A1F23;  /* near-black ink */
  --rebar:       #C9601E;  /* accent — rebar / safety-paint orange */
  --rebar-dark:  #A24B14;
  --white:       #FFFFFF;

  /* ---- Type ---- */
  --font-display: 'IBM Plex Sans Condensed', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;
  --font-body:    'IBM Plex Sans', sans-serif;

  /* ---- Layout ---- */
  --container-w: 1140px;
  --radius: 2px;
}

/* ---- Reset ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; }

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

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

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rebar);
  margin-bottom: 12px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.12;
}
h2 { font-size: clamp(28px, 4vw, 38px); }
h3 { font-size: 21px; }

p { color: var(--steel); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--rebar);
  color: var(--white);
}
.btn-primary:hover { background: var(--rebar-dark); }
.btn-ghost {
  border-color: var(--line-dim);
  color: var(--line);
}
.btn-ghost:hover { border-color: var(--line); }
.btn-dark {
  background: var(--navy);
  color: var(--white);
}
.btn-dark:hover { background: var(--navy-2); }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  border-bottom: 1px solid rgba(159,196,222,0.18);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
}
.logo-mark { height: 46px; width: auto; object-fit: contain; }
.logo-text {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.logo-text strong { color: var(--rebar); font-weight: 700; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--line);
  opacity: 0.85;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover,
.site-nav a.active { opacity: 1; border-color: var(--rebar); }
.site-nav .nav-cta {
  background: var(--rebar);
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius);
  border-bottom: none;
}
.site-nav .nav-cta:hover { background: var(--rebar-dark); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-dim);
  color: var(--line);
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  font-size: 18px;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 18px;
    border-bottom: 1px solid rgba(159,196,222,0.18);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { width: 100%; padding: 12px 0; border-bottom: 1px solid rgba(159,196,222,0.1); }
  .site-nav .nav-cta { margin-top: 8px; text-align: center; }
}

/* ==========================================================================
   GRID / BLUEPRINT BACKGROUND
   ========================================================================== */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, var(--line-dim) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, var(--line-dim) 0 1px, transparent 1px 48px);
  opacity: 0.5;
  pointer-events: none;
}
.grid-bg-light {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(81,96,107,0.07) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(81,96,107,0.07) 0 1px, transparent 1px 40px);
  pointer-events: none;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
  padding-top: 88px;
}
.hero-inner { position: relative; padding-bottom: 64px; max-width: 760px; }
.hero h1 { font-size: clamp(32px, 5.4vw, 54px); color: var(--white); margin-bottom: 20px; }
.hero-lede { color: rgba(234,242,246,0.8); font-size: 17px; max-width: 600px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(159,196,222,0.25);
}
.stat {
  padding: 22px 24px;
  border-right: 1px solid rgba(159,196,222,0.18);
  position: relative;
}
.stat:last-child { border-right: none; }
.stat dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--line);
  opacity: 0.75;
  margin-bottom: 6px;
}
.stat dd {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--white);
}
@media (max-width: 760px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
}

/* ==========================================================================
   SECTION SPACING
   ========================================================================== */
section { padding: 88px 0; position: relative; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { color: var(--ink); }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about { background: var(--paper); }
.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 56px;
  align-items: start;
}
.about-stamp {
  width: 180px;
  height: 180px;
  color: var(--navy);
}
.about-copy h2 { margin-bottom: 18px; }
.about-copy p { margin-bottom: 16px; max-width: 620px; }
@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-stamp { width: 120px; height: 120px; }
}

/* ==========================================================================
   SERVICES
   ========================================================================== */
.services { background: var(--paper-2); }
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--steel);
  border: 1px solid var(--steel);
}
.service-card {
  background: var(--paper-2);
  padding: 28px 24px;
  position: relative;
}
.service-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--rebar);
  margin-bottom: 18px;
}
.service-icon { width: 38px; height: 38px; color: var(--navy); margin-bottom: 18px; }
.service-card h3 { margin-bottom: 10px; }
.service-card p { font-size: 14.5px; }
@media (max-width: 980px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .service-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   SECTORS BAND
   ========================================================================== */
.sectors {
  background: var(--navy);
  padding: 0;
}
.sectors-row {
  display: flex;
  flex-wrap: wrap;
}
.sector-item {
  flex: 1 1 220px;
  padding: 36px 28px;
  border-right: 1px solid rgba(159,196,222,0.18);
  border-bottom: 1px solid rgba(159,196,222,0.18);
}
.sector-item:last-child { border-right: none; }
.sector-item .eyebrow { color: var(--line); opacity: 0.7; }
.sector-item h3 { color: var(--white); font-size: 18px; }

/* ==========================================================================
   CTA BAND
   ========================================================================== */
.cta-band {
  background: var(--paper);
  text-align: center;
  border-top: 1px solid var(--paper-2);
}
.cta-band h2 { margin-bottom: 16px; }
.cta-band p { max-width: 520px; margin: 0 auto 30px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: var(--navy); color: var(--line); padding: 56px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(159,196,222,0.18);
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { color: rgba(159,196,222,0.75); font-size: 14px; max-width: 320px; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 16px;
}
.footer-col a, .footer-col li {
  display: block;
  color: rgba(159,196,222,0.85);
  font-size: 14.5px;
  margin-bottom: 10px;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 22px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(159,196,222,0.55);
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   PROJECT LEDGER (timeline) — projects.html
   ========================================================================== */
.ledger-hero {
  background: var(--navy);
  color: var(--white);
  padding: 56px 0 44px;
  position: relative;
  overflow: hidden;
}
.ledger-hero h1 { color: var(--white); font-size: clamp(28px, 4.6vw, 42px); max-width: 700px; }
.ledger-hero p { color: rgba(234,242,246,0.8); max-width: 600px; margin-top: 14px; }

.ledger { background: var(--paper); }
.ledger-list { position: relative; }
.ledger-list::before {
  content: "";
  position: absolute;
  left: 84px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(to bottom, var(--steel) 0 6px, transparent 6px 12px);
}
.ledger-item {
  position: relative;
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 32px;
  padding-bottom: 56px;
}
.ledger-item:last-child { padding-bottom: 0; }
.ledger-marker {
  position: relative;
  display: flex;
  justify-content: flex-end;
  padding-top: 6px;
}
.ledger-year {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--navy);
}
.ledger-marker::after {
  content: "";
  position: absolute;
  right: -41px;
  top: 10px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--rebar);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--steel);
}
.ledger-card {
  background: var(--white);
  border: 1px solid var(--paper-2);
  border-left: 3px solid var(--rebar);
  padding: 28px 30px;
  border-radius: var(--radius);
}
.ledger-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--rebar);
  margin-bottom: 12px;
}
.ledger-card h3 { margin-bottom: 12px; color: var(--ink); }
.ledger-card > p { margin-bottom: 18px; font-size: 15px; }
.ledger-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  border-top: 1px dashed var(--paper-2);
  padding-top: 16px;
}
.ledger-specs li {
  font-size: 13.5px;
  color: var(--ink);
}
.ledger-specs li span {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 4px;
}
.ledger-sub {
  margin-top: 14px;
  padding-left: 16px;
  border-left: 1px solid var(--paper-2);
}
.ledger-sub li { font-size: 14px; color: var(--steel); margin-bottom: 6px; }
.ledger-sub li strong { color: var(--ink); }

.ledger-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.ledger-gallery figure { margin: 0; }
.ledger-gallery img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--paper-2);
}
.ledger-gallery figcaption {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel);
  margin-top: 6px;
}
.gallery-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rebar);
  margin: 18px 0 8px;
}

/* ==========================================================================
   FEATURED PROJECT — homepage
   ========================================================================== */
.featured {
  background: var(--paper-2);
}
.featured-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
  align-items: center;
}
.featured-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 8px;
}
.featured-photos a:first-child { grid-column: 1 / -1; }
.featured-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
}
.featured-photos a:first-child img { height: 260px; }
.featured-photos a:not(:first-child) img { height: 150px; }
.featured-copy h2 { margin-bottom: 14px; }
.featured-copy p { margin-bottom: 22px; }
@media (max-width: 860px) {
  .featured-grid { grid-template-columns: 1fr; }
}

.about-photo {
  margin-top: 28px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--paper-2);
}
.about-photo img { width: 100%; display: block; }
.about-photo figcaption {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel);
  padding: 8px 2px 0;
}

@media (max-width: 700px) {
  .ledger-list::before { left: 6px; }
  .ledger-item { grid-template-columns: 1fr; gap: 14px; }
  .ledger-marker { justify-content: flex-start; padding-left: 24px; }
  .ledger-marker::after { right: auto; left: -1px; }
}

/* ==========================================================================
   CONTACT — title block
   ========================================================================== */
.contact-hero {
  background: var(--navy);
  color: var(--white);
  padding: 56px 0 44px;
}
.contact-hero h1 { color: var(--white); font-size: clamp(28px, 4.6vw, 42px); }
.contact-hero p { color: rgba(234,242,246,0.8); margin-top: 12px; max-width: 560px; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 0;
  border: 1px solid var(--navy);
}
.title-block { background: var(--white); }
.title-block-head {
  background: var(--navy);
  color: var(--white);
  padding: 16px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.title-block-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  border-bottom: 1px solid var(--paper-2);
}
.title-block-row:last-child { border-bottom: none; }
.title-block-row dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel);
  padding: 18px 16px;
  border-right: 1px solid var(--paper-2);
}
.title-block-row dd {
  padding: 18px 20px;
  font-size: 15px;
  color: var(--ink);
}
.title-block-row dd a { color: var(--rebar); }
.title-block-row dd a:hover { text-decoration: underline; }

.contact-form { background: var(--paper); padding: 36px; }
.contact-form h3 { margin-bottom: 8px; }
.contact-form .form-note { font-size: 13.5px; margin-bottom: 22px; }
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 8px;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--paper-2);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  border-radius: var(--radius);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--rebar);
  outline: none;
}
.form-row textarea { resize: vertical; min-height: 110px; }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Reveal-on-scroll (subtle, respects reduced motion)
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
