:root {
  --paper: #fffef0;
  --ink: #005d62;
  --muted: #58585a;
  --line: #ddd9c2;
  --panel: #f3f1de;
  --accent: #005d62;
  --accent-dark: #003e42;
  --heading-font: Corbel, "Lucida Sans Unicode", "Segoe UI", var(--sans-fallback);
  --sans: "Myriad Pro", "Myriad Web Pro", Myriad, "Segoe UI", var(--sans-fallback);
  --sans-fallback: -apple-system, system-ui, Helvetica, Arial, sans-serif;
  --radius: 4px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

h1, h2 {
  font-family: var(--heading-font);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1rem;
  color: var(--ink);
}
h1 { font-size: clamp(2.25rem, 5.5vw, 3.75rem); letter-spacing: -0.01em; max-width: 22ch; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }

p { margin: 0 0 1rem; max-width: 62ch; color: var(--muted); }
a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--accent-dark); }

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

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 10;
}
.skip:focus { left: 0; }

/* Header and footer */
.bar {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 0.75rem 2rem;
}
header.site {
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
  background: var(--panel);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: inline-flex; align-items: center; }
.brand .logo { display: block; height: 4.75rem; width: auto; }
header.site nav, footer.site nav { display: flex; flex-wrap: wrap; gap: 0.25rem 2rem; }
header.site nav a, footer.site nav a {
  font-family: var(--heading-font);
  color: var(--ink); text-decoration: none; padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
header.site nav a { font-size: 1.15rem; }
header.site nav a:hover, footer.site nav a:hover { border-bottom-color: var(--line); }
header.site nav a[aria-current="page"] { border-bottom-color: var(--accent); font-weight: 600; }
footer.site {
  border-top: 1px solid var(--line); padding: 2rem 0; margin-top: 2rem;
  color: var(--muted); font-size: 0.95rem;
}
footer.site p { margin: 0; color: var(--muted); }

/* Layout */
.hero { padding: clamp(3rem, 9vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.hero-media {
  position: relative; width: 100%; aspect-ratio: 4 / 5;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: var(--panel);
}
.hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1s ease;
}
.hero-media img.is-active { opacity: 1; }
@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: 3fr 2fr; }
}
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 1rem; }
.lead { font-size: 1.25rem; color: var(--muted); max-width: 50ch; }
.section { padding: 3.5rem 0; }
.section.tight { padding-top: 1.5rem; }
.section.tight-bottom { padding-bottom: 1.5rem; }
.section.tight-top { padding-top: 0.5rem; }
.section.es-gap { padding-top: 3rem; }
.section-intro { color: var(--muted); margin-bottom: 2rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* Buttons */
.btn {
  display: inline-block; background: var(--accent); color: #fff;
  border: 2px solid var(--accent); border-radius: var(--radius);
  padding: 0.7rem 1.4rem; font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-quiet { background: transparent; color: var(--accent); }
.btn-quiet:hover { background: var(--panel); color: var(--accent-dark); }

/* Placeholders (replace with real images) */
.ph {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--panel); border: 1px dashed #b9b592; border-radius: var(--radius);
  color: var(--muted); aspect-ratio: 4 / 3; padding: 1rem;
}
.ph.tall { aspect-ratio: 4 / 5; }
.ph img, figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo {
  display: block; width: 100%; height: auto; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line);
}
.photo.tall { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.photo.compact { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* Work grid */
.work-grid { display: grid; gap: 2rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-bottom: 2.5rem; }
.work { margin: 0; }
.work h3 { font-family: var(--heading-font); color: var(--ink); font-size: 1.2rem; margin: 0 0 0.5rem; }
.work p { margin: 0; }
.work figcaption { display: flex; flex-direction: column; margin-top: 0.75rem; }
.work figcaption strong { font-family: var(--heading-font); color: var(--ink); }
.work figcaption span { color: var(--muted); }

/* Call-to-action band */
.band { background: var(--panel); margin-top: 2rem; }
.band-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.band h2, .band p { margin: 0; }
.es-text { color: var(--ink); font-family: var(--heading-font); font-size: 1.05rem; margin: 0; max-width: none; }
.es-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.es-btn { margin: 0; }
.wide-cta {
  max-width: none; margin: 0; text-align: left;
  font-family: var(--heading-font); color: var(--ink);
  font-size: 1.2rem;
}
.wide-cta a { font-weight: 700; }

/* Services */
.service { display: grid; gap: 0.5rem 3rem; padding: 2rem 0; border-top: 1px solid var(--line); }
.service:last-child { border-bottom: 1px solid var(--line); }
.service h2 { margin: 0; font-size: 1.6rem; }
.service p:last-child { margin-bottom: 0; }
.meta { color: var(--muted); font-size: 0.975rem; }
.more-link { margin-top: 2rem; }

/* Portfolio */
.portfolio-item {
  display: grid; gap: 1.5rem; padding: 2rem 0; border-top: 1px solid var(--line);
  grid-template-columns: 1fr;
}
.portfolio-item:last-child { border-bottom: 1px solid var(--line); }
.portfolio-item .ph { aspect-ratio: 4 / 3; }
.portfolio-text h2 { margin-bottom: 0.5rem; }
.portfolio-text p { margin-bottom: 0; }
@media (min-width: 40rem) {
  .portfolio-item { grid-template-columns: 1fr 1.4fr; align-items: center; }
}
.steps { padding-left: 1.25rem; max-width: 62ch; color: var(--muted); }
.steps li { margin-bottom: 0.75rem; padding-left: 0.25rem; }
.steps strong { color: var(--ink); font-family: var(--heading-font); }

/* About */
.two-col { display: grid; gap: 2.5rem 4rem; }
.prose h2:not(:first-child) { margin-top: 2.25rem; }
.plain { padding-left: 1.25rem; max-width: 62ch; color: var(--muted); }
.plain li { margin-bottom: 0.6rem; }
.plain strong { color: var(--ink); font-family: var(--heading-font); }

/* Contact */
.details { margin: 2rem 0 0; }
.details dt { font-family: var(--heading-font); font-weight: 700; color: var(--ink); margin-top: 1rem; }
.details dd { margin: 0; color: var(--muted); }

.field { margin-bottom: 1.25rem; }
label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 0.35rem; }
input, textarea {
  width: 100%; font: inherit; color: var(--muted); background: #fff;
  border: 1px solid #9a9a7c; border-radius: var(--radius); padding: 0.7rem 0.8rem;
}
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #A32020; }
.error { color: #A32020; margin: 0.35rem 0 0; font-size: 0.95rem; }
.status { margin: 1rem 0 0; color: var(--muted); }

@media (min-width: 48rem) {
  .service { grid-template-columns: 1fr 2fr; }
  .two-col { grid-template-columns: 3fr 2fr; align-items: start; }
  .two-col.contact { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
