/* ==========================================================================
   Eben Construction
   Colors and type live in :root. Change them here to restyle the whole site.
   ========================================================================== */

:root {
  --ink: #0f1e2b;
  --blueprint: #12344f;
  --blueprint-deep: #0d2739;
  --paper: #f6f2ea;
  --white: #fffdf9;
  --rule: #d9d2c4;
  --muted: #4b5862;
  --orange: #f27a1a;
  --orange-hover: #ff8f38;
  --orange-text: #a84300;
  --on-dark: #e6edf2;
  --on-dark-muted: #a9bccb;
  --line-dark: rgba(255, 255, 255, 0.16);

  --display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --body: "Barlow", "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(3.5rem, 9vw, 6.5rem);
  --header-height: 84px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}

h1 { font-size: clamp(2.75rem, 8.5vw, 5.25rem); }
h2 { font-size: clamp(2.2rem, 5.5vw, 3.5rem); }
h3 { font-size: 1.5rem; line-height: 1.1; }

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

.wrap {
  width: min(100%, 1240px);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--orange);
  color: var(--ink);
  font-weight: 600;
}
.skip-link:focus { top: 0.5rem; }

.label {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-text);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.7rem 1.6rem;
  border: 2px solid transparent;
  border-radius: 2px;
  background: none;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

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

.btn-ghost { border-color: rgba(255, 255, 255, 0.55); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); background: var(--white); color: var(--ink); }

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

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

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

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-height);
}

.brand { display: block; flex: none; }
.brand img { width: auto; height: 68px; }

.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav ul { display: flex; align-items: center; gap: 1.35rem; }
.site-nav li a {
  display: block;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav li a:hover { border-color: var(--muted); }
.site-nav li a[aria-current="page"] { border-color: var(--orange); }
.site-nav .btn { min-height: 44px; padding: 0.45rem 1.1rem; font-size: 1.125rem; }

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  margin-right: -0.5rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 26px;
  height: 2px;
  margin-inline: auto;
  background: currentColor;
  transition: transform 0.2s, background-color 0.2s;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before,
.nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -8px; }
.nav-toggle span::after { top: 8px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1120px) {
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: fixed;
    inset: var(--header-height) 0 0;
    z-index: 60;
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
    padding: 1rem var(--gutter) 2rem;
    overflow-y: auto;
    background: var(--ink);
    color: var(--white);
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li a {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--line-dark);
    font-family: var(--display);
    font-size: 1.875rem;
    font-weight: 600;
    text-transform: uppercase;
  }
  .site-nav li a[aria-current="page"] { border-color: var(--line-dark); color: var(--orange); }
  .site-nav .btn { min-height: 56px; font-size: 1.375rem; }
}

/* Blueprint backdrop, shared by the hero and interior page headers -------- */

.blueprint {
  background-color: var(--blueprint);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.075) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  color: var(--white);
}

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

.hero { position: relative; overflow: hidden; }

/* Sunset that fades in as the building finishes. hero-office.js sets --dusk. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 72% at 76% 88%, rgba(242, 122, 26, 0.62), rgba(150, 62, 96, 0.3) 52%, transparent 76%),
    linear-gradient(rgba(13, 39, 57, 0.15), rgba(13, 39, 57, 0.5));
  opacity: var(--dusk, 0);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-block: clamp(1.5rem, 3.5vw, 3rem);
}

.hero .label { color: var(--orange); }

.hero h1 { margin-top: 0.85rem; font-size: clamp(2.75rem, 5.4vw, 4.5rem); }
.hero h1 em { display: block; margin-top: 0.3rem; color: var(--orange); font-style: normal; }

.hero-sub {
  max-width: 38rem;
  margin-top: 1.25rem;
  color: var(--on-dark);
  font-size: clamp(1.0625rem, 2vw, 1.1875rem);
}
.hero-sub + .hero-sub { margin-top: 0.75rem; }

.hero .btn-row { margin-top: 1.75rem; }

.hero-visual { min-width: 0; margin: 0; }
.hero-visual:empty { display: none; }
.hero-visual svg { width: 100%; height: auto; overflow: hidden; }

.scene-far {
  transform: translate(var(--far-x, 0), var(--far-y, 0));
  transition: transform 0.4s ease-out;
}
.scene-lights rect { transition: opacity 0.45s; }

.scene-sway {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: sway 4.5s ease-in-out infinite alternate;
}
@keyframes sway {
  from { transform: rotate(-1.4deg); }
  to { transform: rotate(1.8deg); }
}
.is-paused .scene-sway { animation-play-state: paused; }

.scene-status {
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.scene-status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.scene-step { color: var(--orange); font-weight: 500; }
.scene-controls { display: flex; gap: 0.25rem; }
.scene-controls[hidden] { display: none; }
.scene-controls button {
  min-height: 36px;
  padding: 0 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  background: rgba(13, 39, 57, 0.5);
  color: var(--white);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.scene-controls button:hover { background: var(--white); color: var(--ink); }
.scene-label {
  /* Fixed height so long step names never make the page jump */
  min-height: 3em;
  margin-top: 0.4rem;
  color: var(--white);
  line-height: 1.5;
}
.scene-bar { height: 4px; background: rgba(255, 255, 255, 0.18); }
.scene-bar span {
  display: block;
  height: 100%;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  /* The fixed action bar keeps Get a Quote on screen, so the show can go first */
  .hero-visual { order: -1; width: 100%; max-width: 560px; margin-inline: auto; }
  .hero::before {
    background:
      radial-gradient(90% 34% at 60% 30%, rgba(242, 122, 26, 0.6), rgba(150, 62, 96, 0.28) 55%, transparent 80%),
      linear-gradient(rgba(13, 39, 57, 0.15), rgba(13, 39, 57, 0.5));
  }
}

@media (max-width: 560px) {
  .hero .btn-row { display: grid; grid-template-columns: 1fr 1fr; }
  .hero .btn-row .btn-primary { grid-column: 1 / -1; }
  .hero .btn { padding-inline: 0.5rem; }
}

/* Interior page header --------------------------------------------------- */

.page-head { padding-block: clamp(2.75rem, 7vw, 4.75rem); }
.page-head .label { color: var(--orange); }
.page-head h1 { max-width: 16em; margin-top: 0.8rem; font-size: clamp(2.6rem, 7.5vw, 4.5rem); }
.page-head p:not(.label) {
  max-width: 44rem;
  margin-top: 1.1rem;
  color: var(--on-dark);
  font-size: clamp(1.0625rem, 2vw, 1.1875rem);
}

/* Sections --------------------------------------------------------------- */

.section { padding-block: var(--section); }
.section-white { background: var(--white); }
.section-dark { background: var(--ink); color: var(--on-dark); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .label { color: var(--orange); }

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section-head .label { display: block; margin-bottom: 0.6rem; }
.section-head p:not(.label) { margin-top: 0.9rem; color: var(--muted); }
.section-dark .section-head p:not(.label) { color: var(--on-dark-muted); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.75rem, 5vw, 5rem);
  align-items: start;
}
.split .section-head { margin-bottom: 0; }

@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}

.lead { font-size: clamp(1.1875rem, 2.6vw, 1.5rem); line-height: 1.5; }
.lead + .lead { margin-top: 1rem; }

/* Service cards ---------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.service-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.5rem;
  background: var(--white);
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.service-card svg { width: 52px; height: 52px; margin-bottom: 1.25rem; color: var(--orange-text); }
.service-card p { margin-top: 0.6rem; color: var(--muted); }
.service-card .more {
  margin-top: auto;
  padding-top: 1.25rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange-text);
}
a.service-card:hover { background: var(--blueprint); color: var(--white); }
a.service-card:hover svg, a.service-card:hover .more { color: var(--orange); }
a.service-card:hover p { color: var(--on-dark); }

/* Numbered and ruled lists ----------------------------------------------- */

.ruled li {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding-block: 0.95rem;
  border-top: 1px solid var(--rule);
  font-size: 1.1875rem;
  font-weight: 500;
}
.ruled li:last-child { border-bottom: 1px solid var(--rule); }
.ruled .num {
  flex: none;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--orange-text);
}
.section-dark .ruled li { border-color: var(--line-dark); color: var(--white); }
.section-dark .ruled .num { color: var(--orange); }

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  column-gap: 2.5rem;
}
.spec-grid li {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  padding-block: 1rem;
  border-bottom: 1px solid var(--rule);
  font-size: 1.1875rem;
  font-weight: 500;
}
.spec-grid li::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  background: var(--orange);
  transform: translateY(-1px);
}

/* Construction process --------------------------------------------------- */

.process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
  counter-reset: step;
}
.process li {
  padding: 1.5rem 1.25rem 1.75rem;
  background: var(--ink);
  color: var(--white);
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.12;
  text-transform: uppercase;
  counter-increment: step;
}
.process li::before {
  content: "Step " counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 1.5rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--orange);
}

@media (max-width: 960px) {
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .process { grid-template-columns: minmax(0, 1fr); }
  .process li { display: flex; gap: 1rem; align-items: baseline; padding: 1rem; }
  .process li::before { content: counter(step, decimal-leading-zero); flex: none; margin: 0; }
}

/* Values ----------------------------------------------------------------- */

.value { padding: 1.75rem 1.5rem; background: var(--white); }
.value p { margin-top: 0.5rem; color: var(--muted); }

.mission {
  font-family: var(--display);
  font-size: clamp(1.875rem, 5vw, 3rem);
  font-weight: 600;
  line-height: 1.12;
  color: var(--white);
}

/* Testimonials ----------------------------------------------------------- */

.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
}
.quote {
  margin: 0;
  padding: 2rem 1.5rem;
  border-top: 4px solid var(--orange);
  background: var(--white);
}
.quote p {
  font-family: var(--display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  line-height: 1.12;
}

.pull-quote {
  max-width: 54rem;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.2rem, 6.5vw, 4rem);
  font-weight: 600;
  line-height: 1.06;
}
.pull-quote-link { display: inline-block; margin-top: 1.25rem; font-weight: 600; }

/* Call to action band ---------------------------------------------------- */

.cta-band { background: var(--orange); color: var(--ink); }
.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  padding-block: clamp(2.5rem, 6vw, 3.75rem);
}
.cta-inner h2 { flex: 1 1 18rem; }

/* Project gallery -------------------------------------------------------- */

.filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding-bottom: 0.25rem;
  overflow-x: auto;
  scrollbar-width: thin;
}
.filters button {
  flex: none;
  min-height: 44px;
  padding: 0.4rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: none;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
}
.filters button:hover { background: var(--rule); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--white); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
}

.project {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 1px solid var(--rule);
  background: var(--white);
  color: inherit;
  font: inherit;
  text-align: left;
}
button.project { cursor: pointer; transition: border-color 0.15s; }
button.project:hover { border-color: var(--ink); }

.project-media { aspect-ratio: 8 / 5; overflow: hidden; }
.project-media img { width: 100%; height: 100%; object-fit: cover; }
.project-media.blueprint { background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px; }
.project-media svg { width: 100%; height: 100%; }

.project-media, .project-body { display: block; width: 100%; }
.project-body { padding: 1.1rem 1.25rem 1.35rem; }
.project-body h3, .project-title { margin-top: 0.3rem; }
.project-title {
  display: block;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}
.project-body p:not(.label), .project-place {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 1rem;
}

.project-dialog {
  width: min(calc(100vw - 2rem), 860px);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  background: var(--white);
  color: var(--ink);
}
.project-dialog::backdrop { background: rgba(15, 30, 43, 0.82); }
.dialog-close {
  position: sticky;
  top: 0;
  z-index: 2;
  display: block;
  min-height: 44px;
  margin-left: auto;
  padding: 0.4rem 1rem;
  border: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.dialog-photos { display: grid; gap: 0.5rem; }
.dialog-photos img { width: 100%; }
.dialog-body { padding: 1.5rem; }
.dialog-body h2 { margin-top: 0.3rem; font-size: clamp(1.875rem, 5vw, 2.5rem); }
.dialog-body p:not(.label) { margin-top: 0.75rem; }
.dialog-body h3 { margin-top: 1.5rem; margin-bottom: 0.25rem; font-size: 1.25rem; }
.dialog-body ul { list-style: square; padding-left: 1.25rem; }

/* Contact ---------------------------------------------------------------- */

.contact-block > * { max-width: 46rem; }

.contact-item { padding-block: 1.1rem; border-top: 1px solid var(--rule); }
.contact-item:last-child { border-bottom: 1px solid var(--rule); }
.contact-item a {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--display);
  font-size: clamp(1.625rem, 5vw, 2.125rem);
  font-weight: 600;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.contact-item a:hover { color: var(--orange-text); }

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

.site-footer { background: var(--ink); color: var(--on-dark-muted); font-size: 1rem; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 2rem 3rem;
  padding-block: clamp(2.5rem, 6vw, 3.75rem);
}
.footer-logo {
  display: inline-block;
  padding: 0.75rem 1rem;
  border-radius: 2px;
  background: var(--white);
}
.footer-logo img { width: 200px; }
.footer-grid p { margin-top: 0.9rem; max-width: 26rem; }
.footer-title {
  margin-bottom: 0.6rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
}
.footer-grid li a {
  display: inline-block;
  padding-block: 0.3rem;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.footer-grid li a:hover { color: var(--white); text-decoration: underline; }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  padding-block: 1.1rem;
  border-top: 1px solid var(--line-dark);
  font-size: 0.9375rem;
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Mobile action bar ------------------------------------------------------ */

.action-bar { display: none; }

@media (max-width: 760px) {
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }

  .action-bar {
    position: fixed;
    inset: auto 0 0;
    z-index: 40;
    display: grid;
    grid-template-columns: 1fr 1fr 1.4fr;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--ink);
    border-top: 1px solid var(--line-dark);
  }
  .action-bar a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    color: var(--white);
    font-family: var(--display);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-decoration: none;
    text-transform: uppercase;
  }
  .action-bar a + a { border-left: 1px solid var(--line-dark); }
  .action-bar a:last-child { background: var(--orange); color: var(--ink); }
}

/* Motion ----------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene-sway { animation: none; }
  * { transition: none !important; }
}
