/* ---------------------------------------------------------------
   Poplar Woodworks LLC
   Palette: Poplar green + Nelson-style tan and butter, with a
   deep forest green for the darker sections.
   --------------------------------------------------------------- */

:root {
  --green: #47682c;        /* Poplar Woodworks brand green */
  --green-deep: #2a3d19;   /* dark sections, footer */
  --tan: #c6b389;          /* warm accent */
  --butter: #ede4ca;       /* light band background */
  --paper: #fbfaf6;        /* page background */
  --ink: #23281c;          /* body text */
  --ink-soft: #545b48;     /* secondary text */
  --rule: #d6ccb0;

  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 7rem);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

p { margin: 0; }

a { color: var(--green); text-underline-offset: 0.18em; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--tan);
  color: var(--green-deep);
  padding: 0.5rem 1rem;
  font-family: var(--display);
  font-weight: 600;
  z-index: 100;
}
.skip:focus { top: 1rem; }

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

.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  padding: 1rem 1.6rem;
  background: var(--tan);
  color: var(--green-deep);
  border: 2px solid var(--tan);
  border-radius: 3px;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { background: #d8c79f; border-color: #d8c79f; }

.btn-ghost { background: transparent; color: var(--paper); border-color: rgba(251, 250, 246, 0.55); }
.btn-ghost:hover { background: rgba(251, 250, 246, 0.1); border-color: var(--paper); }

.btn-small { font-size: 1.05rem; padding: 0.7rem 1.1rem; }

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

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 4.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand img { height: 2.9rem; width: auto; }
.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1;
}
.brand-name small { font-size: 0.6em; color: var(--green); letter-spacing: 0.08em; }

.nav { display: flex; gap: 1.75rem; }
.nav a {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green-deep);
  text-decoration: none;
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--green); }

.site-header .btn { background: var(--green); border-color: var(--green); color: var(--paper); }
.site-header .btn:hover { background: var(--green-deep); border-color: var(--green-deep); }

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

.hero {
  background: var(--green);
  color: var(--paper);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.hero h1 {
  font-size: clamp(3rem, 7.2vw, 5.75rem);
  line-height: 0.9;
  max-width: 9ch;
}

.lede {
  margin-top: 1.5rem;
  font-size: 1.25rem;
  max-width: 36ch;
  color: #e9ecdf;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.25rem; }

/* The board: Dad's logo printed onto a plank of poplar */
.board {
  margin: 0;
  position: relative;
  aspect-ratio: 4 / 3;
  background: #e6d8ae url("../img/poplar-grain.svg") center / cover no-repeat;
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 1px rgba(80, 60, 20, 0.15),
    inset 0 -14px 24px -14px rgba(80, 60, 20, 0.35),
    0 24px 40px -18px rgba(15, 25, 8, 0.6);
  transform: rotate(-2deg);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 9%;
}
/* end grain on the left edge */
.board::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 10px;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(90deg, #b8a77a, #d8c99c);
}

.board-logo {
  width: 82%;
  mix-blend-mode: multiply;
}

/* One load moment: the logo presses onto the board */
@media (prefers-reduced-motion: no-preference) {
  .board-logo { animation: press 0.55s cubic-bezier(.2, .9, .3, 1.2) 0.35s both; }
  @keyframes press {
    from { opacity: 0; transform: scale(1.12); }
    to   { opacity: 1; transform: scale(1); }
  }
}

/* ---------- Promise band ---------- */

.promises { background: var(--tan); color: var(--green-deep); }

.promise-list {
  list-style: none;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.6rem;
}
.promise-list li {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.promise-list li::before {
  content: "";
  width: 0.85em;
  height: 0.85em;
  flex: none;
  background: url("../img/roof.svg") center / contain no-repeat;
}

/* ---------- Services ---------- */

.services { padding-block: var(--section); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.split-head h2, .about h2, .work h2 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  color: var(--green);
}
.split-head p {
  margin-top: 1.25rem;
  color: var(--ink-soft);
  max-width: 30ch;
}

.service-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--green); }
.service-list li {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 0.4rem 2rem;
  align-items: baseline;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.service-list h3 { font-size: 1.65rem; color: var(--green-deep); line-height: 1.05; }
.service-list p { color: var(--ink-soft); }

/* ---------- Work gallery (shown only when _data/projects.yml has entries) ---------- */

.work { padding-block: 0 var(--section); }
.gallery {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: 1.25rem;
}
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
.gallery figcaption {
  margin-top: 0.6rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.gallery figcaption span { color: var(--ink-soft); font-weight: 500; }

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

.about { background: var(--butter); padding-block: var(--section); }

.about-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.about blockquote { margin: 0; padding-left: clamp(1.25rem, 3vw, 2rem); border-left: 6px solid var(--green); }
.about blockquote p {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.3;
  font-style: italic;
  color: var(--green-deep);
  max-width: 24ch;
}
.about blockquote footer {
  margin-top: 1.25rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
}

.about-text p { margin-top: 1.25rem; max-width: 38ch; line-height: 1.7; }

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

.contact {
  background: var(--green-deep);
  color: var(--paper);
  padding-block: var(--section);
  text-align: center;
}
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.contact h2 { font-size: clamp(2.75rem, 6vw, 4.5rem); color: var(--tan); }
.contact-note { margin-top: 1.25rem; max-width: 40ch; color: #dfe3d4; }

.contact-email, .contact-phone {
  font-family: var(--display);
  font-weight: 600;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 3px solid var(--tan);
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.contact-email { margin-top: 2.25rem; font-size: clamp(1.6rem, 4.6vw, 3rem); }
.contact-phone { margin-top: 1.25rem; font-size: clamp(1.6rem, 4vw, 2.5rem); }
.contact-email:hover, .contact-phone:hover { color: var(--tan); }

.contact-meta { margin-top: 2.5rem; font-size: 0.95rem; color: #b9c0aa; line-height: 1.7; }

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

.site-footer {
  background: var(--green-deep);
  color: #9fa891;
  border-top: 1px solid rgba(198, 179, 137, 0.25);
  font-size: 0.9rem;
}
.footer-inner { text-align: center; padding-block: 1.5rem; }

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

.notfound { padding-block: var(--section); text-align: center; }
.notfound .wrap { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.notfound h1 { font-size: clamp(2.5rem, 6vw, 4rem); color: var(--green); }

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

@media (max-width: 860px) {
  .nav { display: none; }
  .hero-inner, .split, .about-inner { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 12ch; }
  .board { max-width: 30rem; width: calc(100% - 1rem); justify-self: center; }
  .promise-list { flex-direction: column; gap: 0.9rem; }
  .service-list li { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .brand img { height: 2.3rem; }
  .brand-name { font-size: 1.3rem; }
  .brand-name small { display: none; }
  .btn { width: 100%; text-align: center; white-space: normal; }
  .header-inner { gap: 1rem; }
  .btn-small { width: auto; white-space: nowrap; }
}
