/* ENWOP — field notebook / California contractor
   Self-hosted Source Serif 4 + IBM Plex Sans. No CDN. */

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/SourceSerif4-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/SourceSerif4-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/SourceSerif4-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4 Display";
  src: url("../fonts/SourceSerif4Display-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/IBMPlexSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/IBMPlexSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/IBMPlexSans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/IBMPlexSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f4efe6;
  --paper-2: #ebe4d6;
  --paper-3: #e2d8c6;
  --cream: #faf7f0;
  --ink: #1c1814;
  --ink-2: #3a342c;
  --muted: #534c43;
  --rule: #c4b7a2;
  --rule-strong: #1c1814;
  --oxide: #9a2e1a;
  --oxide-2: #7c2414;
  --oxide-soft: #f0ddd4;
  --focus: #9a2e1a;
  --header-h: 4rem;
  --bar-h: 2.1rem;
  --wrap: 74rem;
  --gutter: clamp(1rem, 3.2vw, 1.75rem);
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --display: "Source Serif 4 Display", "Source Serif 4", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

@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;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.0125rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--oxide); text-underline-offset: 0.14em; }
a:hover { color: var(--oxide-2); }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 0.4rem;
  z-index: 200;
  background: var(--oxide);
  color: var(--cream);
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
  color: var(--cream);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* License bar — drawing-set title strip */
.license-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  min-height: var(--bar-h);
}
.license-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.25rem;
  min-height: var(--bar-h);
  padding-block: 0.35rem;
}
.license-bar p { margin: 0; }
.license-bar a {
  color: var(--paper);
  text-decoration: none;
}
.license-bar a:hover { color: #fff; text-decoration: underline; }
.license-bar-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
}

/* Header */
.site-header {
  position: sticky;
  top: var(--bar-h);
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule-strong);
  box-shadow: 0 1px 0 var(--paper), 0 3px 0 var(--ink);
}

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

.wordmark {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  text-decoration: none;
  color: var(--ink);
  line-height: 1;
  min-width: 0;
}
.wordmark:hover { color: var(--oxide); }
.wordmark-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: 0.16em;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.wordmark-name::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  background: var(--oxide);
  flex: 0 0 auto;
}
.wordmark-tag {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 1.1rem;
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--ink);
  background: var(--cream);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  position: relative;
  flex: 0 0 auto;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: currentColor;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  left: 0;
  top: 0;
  transform: none;
}
.nav-toggle-bar::before { transform: translateY(-6px); }
.nav-toggle-bar::after { transform: translateY(6px); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: rotate(-45deg); }

.site-nav ul {
  display: flex;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  padding: 0.55rem 0.8rem;
  display: block;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--oxide); }
.site-nav a[aria-current="page"] {
  color: var(--oxide);
  border-bottom-color: var(--oxide);
}

@media (max-width: 720px) {
  .license-bar-contact { display: none; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    position: fixed;
    inset: calc(var(--bar-h) + var(--header-h) + 4px) 0 auto 0;
    background: var(--cream);
    border-bottom: 2px solid var(--ink);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.25s ease, visibility 0.25s;
  }
  .site-nav.is-open {
    max-height: 22rem;
    visibility: visible;
  }
  .site-nav ul {
    flex-direction: column;
    padding: 0.25rem 0 0.5rem;
  }
  .site-nav a {
    padding: 0.95rem var(--gutter);
    font-size: 1.05rem;
    border-bottom: 1px solid var(--rule);
    min-height: 2.75rem;
  }
  .site-nav a[aria-current="page"] {
    box-shadow: inset 4px 0 0 var(--oxide);
    border-bottom-color: var(--rule);
  }
  body.nav-open { overflow: hidden; }
  .wordmark-tag { display: none; }
}

/* Type */
.eyebrow {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--oxide);
  margin: 0 0 0.4rem;
}
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  text-wrap: balance;
}
h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4.6vw, 3.15rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}
h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  margin: 0 0 0.5rem;
}
h3 {
  font-size: 1.08rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
}
.lede {
  font-size: 1.05rem;
  color: var(--ink-2);
  margin: 0 0 1.15rem;
}
p { margin: 0 0 0.75rem; }
p:last-child { margin-bottom: 0; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  padding: 0.7rem 1.15rem;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.2;
  min-height: 2.75rem;
}
.btn-primary {
  background: var(--oxide);
  color: var(--cream);
  border-color: var(--oxide);
}
.btn-primary:hover {
  background: var(--oxide-2);
  color: #fff;
  border-color: var(--oxide-2);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Sections — tight, filled */
main { flex: 1; }
.section {
  padding-block: 1.75rem 2rem;
}
.section-tint { background: var(--paper-2); }
.section-head {
  display: grid;
  grid-template-columns: minmax(11rem, 0.85fr) 1.45fr;
  gap: 0.5rem 1.75rem;
  align-items: start;
  border-top: 1px solid var(--ink);
  padding-top: 0.85rem;
  margin-bottom: 1.25rem;
}
.section-head p { color: var(--muted); margin: 0; }
.section-head h2 { margin: 0; }

@media (max-width: 640px) {
  .section-head { grid-template-columns: 1fr; }
}

/* Hero — split plate, not a dark overlay */
.hero {
  border-bottom: 1px solid var(--rule);
  padding-block: 1.35rem 1.6rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.25rem 1.75rem;
  align-items: stretch;
}
.plate {
  margin: 0;
  border: 1px solid var(--ink);
  background: var(--cream);
  display: flex;
  flex-direction: column;
  position: relative;
}
.plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  filter: saturate(0.92) contrast(1.03);
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-top: 1px solid var(--ink);
  padding-top: 0.85rem;
}
.hero-copy .lede { color: var(--ink-2); }

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

/* Life cycle — four ruled columns, filled */
.life-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--ink);
  background: var(--cream);
}
.life-grid li {
  padding: 1rem 1.05rem 1.15rem;
  border-right: 1px solid var(--rule);
}
.life-grid li:last-child { border-right: 0; }
.life-num {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--oxide);
  margin: 0 0 0.35rem;
  letter-spacing: 0.06em;
}
.life-grid p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .life-grid { grid-template-columns: 1fr 1fr; }
  .life-grid li:nth-child(2) { border-right: 0; }
  .life-grid li:nth-child(1),
  .life-grid li:nth-child(2) { border-bottom: 1px solid var(--rule); }
}
@media (max-width: 720px) {
  .life-grid { grid-template-columns: 1fr; }
  .life-grid li {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .life-grid li:nth-child(1),
  .life-grid li:nth-child(2) { border-bottom: 1px solid var(--rule); }
  .life-grid li:last-child { border-bottom: 0; }
}

/* Split with photo */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.25rem 1.6rem;
  align-items: stretch;
}
.split-text p { color: var(--ink-2); }
.split.reverse { grid-template-columns: 0.95fr 1.05fr; }

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

/* Extra field plates — two-up, same ruled frame as .plate */
.plates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.6rem;
}
@media (max-width: 860px) {
  .plates { grid-template-columns: 1fr; }
}

/* Field gallery — titled photos, two-up on desktop */
.field-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.35rem 1.6rem;
  align-items: start;
}
.field-gallery figure {
  margin: 0;
  border: 1px solid var(--ink);
  background: var(--cream);
  position: relative;
}

.field-gallery img {
  width: 100%;
  height: auto;
  filter: saturate(0.92) contrast(1.03);
}

/* Title bar on the photo (gallery + home/about plates) */
.pic-title,
.field-gallery figcaption,
.plate-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.85rem 0.75rem;
  box-sizing: border-box;
  background: rgba(28, 24, 20, 0.88);
  color: var(--paper);
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.35rem, 4vw, 1.5rem);
  line-height: 1.22;
  letter-spacing: 0.01em;
  text-transform: none;
  border: 0;
  display: block;
  z-index: 1;
}
.pic-title h3,
.field-gallery figcaption h3,
.plate-label h3 {
  margin: 0;
  font: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}
@media (max-width: 480px) {
  .pic-title,
  .field-gallery figcaption,
  .plate-label {
    font-size: 1.35rem;
    padding: 0.55rem 0.7rem 0.6rem;
  }
}
@media (max-width: 860px) {
  .field-gallery { grid-template-columns: 1fr; }
}

/* Spec list / named capabilities — dense two-col */
.spec {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--ink);
}
.spec article {
  padding: 0.95rem 1.1rem 1.05rem 0;
  border-bottom: 1px solid var(--rule);
}
.spec article:nth-child(odd) { padding-right: 1.4rem; border-right: 1px solid var(--rule); }
.spec article:nth-child(even) { padding-left: 1.4rem; }
.spec p { margin: 0; color: var(--muted); font-size: 0.96rem; }

@media (max-width: 700px) {
  .spec { grid-template-columns: 1fr; }
  .spec article:nth-child(odd),
  .spec article:nth-child(even) {
    padding-left: 0;
    padding-right: 0;
    border-right: 0;
  }
}

/* License title-block */
.title-block {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 1.5rem;
  align-items: center;
  border: 1px solid var(--ink);
  background: var(--cream);
  padding: 1rem 1.15rem;
  box-shadow: inset 0 3px 0 var(--oxide);
}
.title-block p { margin: 0.25rem 0 0; color: var(--muted); }
.title-block h2 { margin: 0; font-size: 1.35rem; }
.license-meta { font-size: 0.95rem; color: var(--ink-2) !important; }
@media (max-width: 700px) {
  .title-block { grid-template-columns: 1fr; }
}

/* CTA strip */
.cta-row {
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 1rem 1.5rem;
  align-items: center;
  border-top: 1px solid var(--ink);
  padding-top: 1rem;
}
.cta-row p { color: var(--muted); }
.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  margin-top: 0.65rem;
  font-size: 1.08rem;
  font-weight: 600;
}
.contact-row a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--oxide); }
.contact-row a:hover { color: var(--oxide); }
@media (max-width: 700px) {
  .cta-row { grid-template-columns: 1fr; }
}

/* Inner page masthead */
.page-mast {
  padding-block: 1.35rem 0.25rem;
}
.page-mast h1 { max-width: 22ch; }
.page-rule {
  height: 0;
  border: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 3px;
  width: 100%;
  margin: 0 0 0.85rem;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 1.25rem 1.75rem;
  align-items: start;
  padding-bottom: 1.5rem;
}
.contact-direct {
  background: var(--cream);
  border: 1px solid var(--ink);
  padding: 1.1rem 1.15rem;
  box-shadow: inset 0 3px 0 var(--oxide);
}
.contact-direct h2 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.contact-direct dl { margin: 0; }
.contact-direct dt {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--oxide);
  margin: 0.85rem 0 0.15rem;
}
.contact-direct dt:first-of-type { margin-top: 0; }
.contact-direct dd { margin: 0; font-size: 1.05rem; font-weight: 500; }
.contact-direct a { color: var(--ink); text-decoration: none; }
.contact-direct a:hover { color: var(--oxide); }

.contact-form {
  display: grid;
  gap: 0.75rem;
  border: 1px solid var(--ink);
  background: var(--cream);
  padding: 1.1rem 1.15rem;
}
.contact-form label {
  display: grid;
  gap: 0.28rem;
  font-weight: 500;
  font-size: 0.9rem;
}
.contact-form input,
.contact-form textarea {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.6rem 0.7rem;
  width: 100%;
  min-height: 2.75rem;
}
.contact-form textarea { resize: vertical; min-height: 7.5rem; }
.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--oxide);
}
.form-note {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}
.hint { font-weight: 400; color: var(--muted); }

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

/* 404 */
.error-page {
  padding-block: 2.5rem 3rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem 2rem;
  align-items: center;
}
.error-page .code {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(4rem, 12vw, 7rem);
  line-height: 0.85;
  color: var(--oxide);
  margin: 0;
}
@media (max-width: 600px) {
  .error-page { grid-template-columns: 1fr; }
}

/* Footer */
.site-footer {
  border-top: 2px solid var(--ink);
  background: var(--paper-2);
  padding-block: 1.5rem 1.25rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1.25rem 1.5rem;
}
.site-footer .wordmark-name { font-size: 1.25rem; }
.site-footer p { color: var(--muted); margin: 0.4rem 0 0; font-size: 0.92rem; }
.footer-label {
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 0.45rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.3rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.22rem 0; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--oxide); }
.footer-bottom {
  margin-top: 1.15rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--ink);
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  justify-content: space-between;
}

@media (max-width: 720px) {
  .license-bar-contact { display: none; }
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.1rem; }
}

button.btn {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
}
.contact-form .btn { justify-self: start; }
code { font-size: 0.9em; color: var(--oxide-2); }
img[loading="lazy"] { background: var(--paper-3); }
