/* ==========================================================================
   Mestri Studio — Stylesheet
   Design system: architectural drafting / blueprint annotation
   ========================================================================== */

:root {
  --paper: #1a1b1e;
  --paper-raised: #232529;
  --ink: #f1efe8;
  --ink-soft: #b5b3ac;
  --teal: #c9a227;
  --teal-dark: #a6841c;
  --stone: #3a3b3e;
  --stone-light: #202226;
  --ochre: #e4c465;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Work Sans", -apple-system, Segoe UI, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --max-width: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--teal);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 0.9em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--ochre);
  display: inline-block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  padding: 0.9em 1.5em;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}
.btn-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.btn-primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #fff;
}
.btn::after { content: "→"; }

/* ---------- Drafting frame (signature element) ----------
   A corner-tick "crop mark" frame used around images and
   key content blocks, echoing architectural drawing sheets. */
.drawing-frame {
  position: relative;
  padding: 10px;
}
.drawing-frame::before,
.drawing-frame::after,
.drawing-frame > .tick-tl,
.drawing-frame > .tick-br {
  content: "";
}
.drawing-frame {
  --tick: 20px;
}
.drawing-frame::before {
  position: absolute;
  top: 0; left: 0;
  width: var(--tick); height: var(--tick);
  border-top: 2px solid var(--teal);
  border-left: 2px solid var(--teal);
}
.drawing-frame::after {
  position: absolute;
  bottom: 0; right: 0;
  width: var(--tick); height: var(--tick);
  border-bottom: 2px solid var(--teal);
  border-right: 2px solid var(--teal);
}
.drawing-frame img { width: 100%; height: auto; }

.sheet-number {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-top: 0.6em;
}

/* ---------- Header / title block navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--stone);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--gutter);
  max-width: var(--max-width);
  margin: 0 auto;
}
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--teal);
  margin-top: 0.35em;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink);
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}
.main-nav a {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  color: var(--ink);
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 5px;
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--stone);
  }
  .main-nav.open { display: block; }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }
  .main-nav li { border-top: 1px solid var(--stone-light); }
  .main-nav a { display: block; padding: 1rem var(--gutter); }
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero h1 { margin-bottom: 0.4em; }
.hero-lede {
  font-size: 1.05rem;
  max-width: 34ch;
}
.hero-actions { margin-top: 1.6rem; }

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

/* ---------- Section rhythm ---------- */
.section {
  padding: clamp(3rem, 6vw, 5.5rem) 0;
}
.section-border-top { border-top: 1px solid var(--stone); }
.section-alt { background: var(--stone-light); }

.section-head {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

/* ---------- Three-up feature grid ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
}
.feature h3 { margin-top: 1em; }
.feature .sheet-number { margin-bottom: 0.3em; }

/* ---------- Services list ---------- */
.service-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.5rem;
  padding: 1.8rem 0;
  border-top: 1px solid var(--stone);
}
.service-row:last-child { border-bottom: 1px solid var(--stone); }
.service-index {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--ochre);
  padding-top: 0.2em;
}
.service-row h3 { margin-bottom: 0.35em; }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--stone);
  padding: 0.4em 0.8em;
  color: var(--ink-soft);
}

/* ---------- Municipalities / logo strip ---------- */
.logo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}
.logo-strip img {
  filter: grayscale(1);
  opacity: 0.75;
  border: 1px solid var(--stone);
}

/* ---------- Hours table ---------- */
.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.hours-table td {
  padding: 0.55em 0;
  border-top: 1px solid var(--stone);
}
.hours-table td:first-child {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  width: 40%;
}

/* ---------- Contact layout ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.field {
  margin-bottom: 1.3rem;
}
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 0.5em;
}
.field input,
.field textarea {
  width: 100%;
  background: var(--paper-raised);
  border: 1px solid var(--stone);
  padding: 0.85em 1em;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
}
.field input:focus,
.field textarea:focus {
  border-color: var(--teal);
  outline: none;
}
.field textarea { resize: vertical; min-height: 140px; }
.required { color: var(--ochre); }

.form-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.8rem;
}
.form-status {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-top: 1rem;
  display: none;
}
.form-status.show { display: block; }
.form-status.ok { color: var(--teal); }
.form-status.err { color: #a4372d; }

/* honeypot field — hidden from real visitors, catches bots */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--teal);
  color: #fff;
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #dfe8e5; }
.cta-band .btn {
  border-color: #fff;
  color: #fff;
}
.cta-band .btn:hover {
  background: #fff;
  color: var(--teal-dark);
}

/* ---------- Footer / title block ---------- */
.site-footer {
  border-top: 1px solid var(--stone);
  background: var(--stone-light);
  padding: 3rem 0 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--stone);
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-grid h4 {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: var(--ink);
  margin-bottom: 0.8em;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.5em; }
.footer-grid a { color: var(--ink-soft); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.7rem;
}

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

/* Charcoal Editorial — brass is light, so text sitting on solid brass
   needs to be dark ink for contrast, not white. */
.btn-primary {
  color: #1a1b1e;
}
.btn-primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #1a1b1e;
}
.cta-band {
  color: #1a1b1e;
}
.cta-band h2 { color: #1a1b1e; }
.cta-band p { color: #33291a; }
.cta-band .btn {
  border-color: #1a1b1e;
  color: #1a1b1e;
}
.cta-band .btn:hover {
  background: #1a1b1e;
  color: var(--teal);
}
.logo-strip img {
  filter: grayscale(1) invert(0.92);
}
