:root {
  --brick: #8f3a2b;
  --brick-light: #a5462f;
  --slate: #1f2a33;
  --slate-2: #2c3a45;
  --cream: #f4ecdf;
  --paper: #fbf7f1;
  --signal: #3fb6a8;
  --signal-dark: #13786d;  /* signal color for text on light backgrounds (WCAG AA) */
  --amber: #e8b04a;
  --ink: #1d232a;
  --muted: #5d6670;
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 72px);
  --shadow: 0 12px 30px rgba(31, 42, 51, .12);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  /* shown under photos, and on its own until the photo files exist */
  --brick-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='30'%3E%3Cg fill='none' stroke='%23000' stroke-opacity='.18' stroke-width='2'%3E%3Cpath d='M0 15h60M0 30h60M30 0v15M0 15v15M60 15v15'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--brick); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-size: 1.35rem; }

.container { width: min(100rem, 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding: clamp(64px, 10vw, 112px) 0; }
.section-intro { max-width: 46rem; color: var(--muted); font-size: 1.1rem; margin-bottom: 48px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .8rem;
  font-weight: 700;
  color: var(--signal-dark);
  margin: 0 0 12px;
}
.hero .eyebrow, .mill .eyebrow { color: var(--signal); }  /* dark backgrounds */

/* Skip link: first thing keyboard users reach; hidden until focused */
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--slate); color: #fff; padding: 12px 18px; border-radius: 10px;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
#main:focus { outline: none; }  /* skip-link target, not an interactive control */

/* Buttons */
.btn {
  display: inline-block;
  background: var(--brick);
  color: #fff;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid var(--brick);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: transform .15s, background .15s;
}
.btn:hover { background: var(--brick-light); transform: translateY(-2px); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-small { padding: 8px 18px; }

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  transition: background .25s, box-shadow .25s;
}
.site-header.scrolled { background: rgba(31, 42, 51, .96); box-shadow: 0 4px 20px rgba(0,0,0,.2); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand img { background: var(--cream); border-radius: 10px; padding: 3px; }
.brand-text { font-size: 1.05rem; letter-spacing: .02em; }
.brand-text strong { font-family: var(--serif); font-size: 1.2rem; }
.nav-links { display: flex; gap: 28px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links a:not(.btn) { color: #fff; text-decoration: none; font-weight: 500; opacity: .9; }
.nav-links a:not(.btn):hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: transform .2s, opacity .2s; }

/* Photo sections: overlay, then photo, then brick fallback */
.photo {
  background-color: var(--brick);
  background-image:
    linear-gradient(180deg, rgba(31,42,51,.55), rgba(31,42,51,.8)),
    var(--photo, none),
    var(--brick-pattern);
  background-size: cover, cover, 60px 30px;
  background-position: center;
  color: #fff;
}

/* Hero */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 120px 0 80px;
}
.hero h1 { font-size: clamp(2.3rem, 5.5vw, 5.6rem); max-width: 20ch; }
.hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.45rem); max-width: 42rem; opacity: .92; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 2px solid rgba(255,255,255,.7);
  border-radius: 14px;
}
.scroll-cue::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: #fff;
  animation: cue 1.6s infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* Services */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 2.5vw, 40px); }
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border-top: 5px solid var(--brick);
}
.card p { color: var(--muted); }
.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--cream);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.card-icon svg { width: 32px; height: 32px; fill: none; stroke: var(--brick); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ticks { list-style: none; padding: 0; margin: 16px 0 0; }
.ticks li { padding-left: 26px; position: relative; margin: 6px 0; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 12px;
  height: 6px;
  border-left: 2px solid var(--signal);
  border-bottom: 2px solid var(--signal);
  transform: rotate(-45deg);
}

/* Mill story */
.mill { background: var(--slate); color: var(--cream); padding: clamp(48px, 8vw, 112px) 0; }
.mill-photo { margin: 0 0 clamp(32px, 5vw, 64px); }
.mill-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 2000 / 586;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  background: var(--slate-2);
}
.mill-copy { max-width: 46rem; }
.mill-copy p { opacity: .9; }

/* Process */
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.steps li { position: relative; padding-top: 24px; border-top: 2px solid var(--brick); }
.steps p { color: var(--muted); margin: 0; }
.step-num { font-family: var(--serif); font-size: 2.6rem; color: #b07c6f; display: block; line-height: 1; margin-bottom: 8px; }

/* Band */
/* Our work */
.work { background: var(--cream); }
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 2.5vw, 40px); }
.work-card {
  display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: transform .2s, box-shadow .2s;
}
.work-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.14); }
.work-card:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
.work-card img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-bottom: 1px solid rgba(0,0,0,.08); }
.work-body { padding: clamp(20px, 2vw, 32px); }
.work-body h3 { margin: 0 0 6px; }
.work-body p { color: var(--muted); margin: 0 0 14px; }
.work-link { color: var(--brick); font-weight: 700; }
.work-card:hover .work-link { text-decoration: underline; text-underline-offset: 4px; }

.band { padding: clamp(72px, 11vw, 140px) 0; }
.band-title { font-size: clamp(2rem, 5vw, 3.4rem); max-width: 18ch; margin-bottom: .4em; }
.band-text { font-size: clamp(1.1rem, 1.8vw, 1.4rem); line-height: 1.6; max-width: 44rem; margin: 0; opacity: .95; }
.band-sign { width: clamp(140px, 16vw, 240px); height: auto; margin-bottom: 28px; filter: drop-shadow(0 10px 24px rgba(0,0,0,.35)); }
@media (min-width: 900px) {
  .band-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(32px, 4.5vw, 96px); align-items: center; }
  .band-sign { margin: 0; }
  .band-title { margin: 0; }
  .band-text { border-left: 3px solid var(--signal); padding-left: clamp(20px, 2.5vw, 36px); }
}

/* Contact */
.contact { background: var(--cream); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 120px); align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 28px 0 0; }
.contact-list li { padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,.08); display: flex; gap: 16px; flex-wrap: wrap; }
.contact-list span { font-weight: 700; min-width: 80px; color: var(--slate); }
.contact-form { position: relative; background: #fff; padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow); display: grid; gap: 16px; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.contact-form .req { color: #c0392b; font-weight: 700; }
.form-key { margin: 0; font-size: .85rem; color: var(--muted); }
/* only after the visitor has interacted, so the form doesn't start out red */
.contact-form :is(input, textarea):user-invalid { border-color: #c0392b; background: #fdf3f2; }
.contact-form input, .contact-form select, .contact-form textarea {
  font: inherit;
  font-weight: 400;
  padding: 12px 14px;
  border: 1px solid #d5ccbf;
  border-radius: 10px;
  background: var(--paper);
  width: 100%;
}
.contact-form :focus-visible { outline: 3px solid var(--signal); outline-offset: 1px; }
.contact-form button:disabled { opacity: .7; cursor: wait; transform: none; }
.form-success {
  margin: 0;
  padding: 12px 16px;
  border-radius: 10px;
  background: #e3f4f1;
  border-left: 4px solid var(--signal);
  color: var(--slate);
  font-weight: 600;
}
.form-error {
  margin: 0;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fbe6e2;
  border-left: 4px solid var(--brick);
  color: var(--slate);
  font-weight: 600;
}
/* !important so form-field styles (e.g. width: 100%) can't make hidden fields stretch the page */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

/* Footer */
.site-footer { background: var(--slate); color: var(--cream); padding: 48px 0; text-align: center; }
.footer-logo { margin: 0 auto 16px; background: var(--cream); padding: 10px 16px; border-radius: 12px; height: auto; }
.site-footer p { margin: 4px 0; opacity: .85; }
.small { font-size: .85rem; }

/* Scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue::after { animation: none; }
}

/* Responsive */
/* Large screens: scale type up a little so the wider layout stays balanced */
@media (min-width: 1440px) { html { font-size: 106.25%; } }
@media (min-width: 1920px) { html { font-size: 112.5%; } }
@media (min-width: 2400px) { html { font-size: 125%; } }
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--slate);
    padding: 8px 16px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a:not(.btn) { display: block; padding: 12px 0; }
  .nav-links .btn { margin-top: 8px; display: block; text-align: center; }
  .site-header.menu-open { background: var(--slate); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .steps { grid-template-columns: 1fr; }
  /* phones load the mill-and-towers crop (see <picture> in index.html) */
  .mill-photo img { aspect-ratio: 620 / 360; }
  .card, .contact-form { padding: 24px; }
}
