/* ===== Mill Stewardship — styles ===== */
/* Century Schoolbook where installed; otherwise the metric-matched open-source Schola */
@font-face { font-family: "Schola Web"; font-weight: 400; font-style: normal; font-display: swap; src: url(assets/fonts/schola-regular.woff2?v=4) format("woff2"); }
@font-face { font-family: "Schola Web"; font-weight: 700; font-style: normal; font-display: swap; src: url(assets/fonts/schola-bold.woff2?v=4) format("woff2"); }
@font-face { font-family: "Schola Web"; font-weight: 400; font-style: italic; font-display: swap; src: url(assets/fonts/schola-italic.woff2?v=4) format("woff2"); }
:root {
  --navy: #2E445A;        /* storm blue, primary */
  --navy-deep: #1F3042;   /* hover / deep */
  --grey: #D9D9D9;        /* blades, hairlines */
  --grey-light: #E3E5EA;  /* section backgrounds, map */
  --ink: #1a1a1a;
  --ink-soft: #3c3c3c;
  --white: #ffffff;
  --font: "Century Schoolbook", "New Century Schoolbook", "Schola Web", Georgia, serif;
  --nav-h: 72px;
  --wrap: 1120px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 700; color: var(--navy); line-height: 1.15; }
h2 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); margin-bottom: 1.25rem; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 3rem); margin-inline: auto; }
.section { padding: clamp(2.75rem, 5vw, 4.25rem) 0; }
.hidden { display: none; }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(160%) blur(8px);
  transition: background .35s var(--ease), box-shadow .35s var(--ease);
}
.nav.scrolled { box-shadow: 0 1px 0 var(--grey), 0 6px 24px rgba(0,0,0,.06); }
/* Transparent over the hero; turns solid once you scroll past it */
.nav.nav-clear:not(.scrolled):not(.open) { background: transparent; backdrop-filter: none; box-shadow: none; }
.nav.nav-clear:not(.scrolled):not(.open) .nav-links a { color: rgba(255,255,255,.9); }
.nav.nav-clear:not(.scrolled):not(.open) .nav-links a:hover,
.nav.nav-clear:not(.scrolled):not(.open) .nav-links a.active { color: var(--white); }
.nav.nav-clear:not(.scrolled):not(.open) .nav-links a::after { background: var(--white); }
.nav.nav-clear:not(.scrolled):not(.open) .nav-links .nav-cta { background: transparent; border: 1.5px solid rgba(255,255,255,.8); color: var(--white); }
.nav.nav-clear:not(.scrolled):not(.open) .nav-links .nav-cta:hover { background: rgba(255,255,255,.12); }
.nav.nav-clear:not(.scrolled):not(.open) .nav-toggle span { background: var(--white); }
.brand-lockup.lockup-light { display: none; }
.nav.nav-clear:not(.scrolled):not(.open) .brand-lockup.lockup-dark { display: none; }
.nav.nav-clear:not(.scrolled):not(.open) .brand-lockup.lockup-light { display: block; }
.nav-inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: flex; align-items: center; gap: .7rem; }
.brand-lockup { height: 46px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  font-size: .92rem; color: var(--ink-soft); position: relative; padding: .3rem 0;
  transition: color .2s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--navy); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--navy); }
.nav-links a.active::after { transform: scaleX(1); }
.nav-links .nav-cta {
  color: var(--white); background: var(--navy); padding: .55rem 1.1rem; border-radius: 3px; border: 1.5px solid var(--navy);
  transition: background .3s, color .3s, border-color .3s;
}
.nav-links .nav-cta::after { display: none; }
.nav-links .nav-cta:hover, .nav-links .nav-cta.active { background: var(--navy-deep); color: var(--white); }
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: transform .3s, opacity .3s; }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 100svh; padding-top: var(--nav-h);
  display: grid; align-items: center; overflow: hidden; color: var(--white); text-align: center;
}
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero-fallback {
  background:
    radial-gradient(ellipse at 20% 80%, rgba(255,255,255,.08), transparent 55%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
}
.hero-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(46,68,90,.38), rgba(31,48,66,.6)); }
/* Headline centred under the nav links (right half), clear of the mill in the footage */
.hero-content { position: relative; padding: 6rem 0 4rem; margin: 0 7% 0 auto; width: 56%; text-align: center; }
.hero h1.hero-line { color: var(--white); font-size: clamp(2rem, 4.4vw, 3.6rem); font-weight: 700; line-height: 1.12; letter-spacing: .005em; text-shadow: 0 2px 24px rgba(0,0,0,.25); }
.scroll-cue {
  display: inline-block; margin-top: 3.5rem; width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.7); border-radius: 14px; position: relative;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--white);
  animation: cue 1.8s infinite var(--ease);
}
@keyframes cue { 0% { transform: translateY(0); opacity: 1 } 70% { transform: translateY(14px); opacity: 0 } 100% { opacity: 0 } }

/* ===== Uniques / pinwheel (static, text in the quadrants like the one-pager) =====
   Geometry copied from the one-pager PowerPoint, as fractions of the mill's width:
   measured from the PDF: text sits 5.6% from the hub on its open side and 12.7% on the
   side where a blade intrudes; text area is 33% wide; type is 11pt/8pt against a 4.5in
   mill (3.4% / 2.5% of its width), one blank 8pt line between header and body. */
/* About layout: photo left with a grey block behind, flat card overlapping its upper right */
.about-layout { display: grid; grid-template-columns: 1fr; align-items: start; }
.about-layout.has-photo { grid-template-columns: 44% 1fr; }
.about-photo { position: relative; padding: 1.5rem 0 0 1.5rem; margin-top: 5.5rem; }
.about-photo::before { content: ""; position: absolute; left: 0; top: 0; width: 70%; height: 95%; background: var(--grey-light); }
.about-photo-img { position: relative; aspect-ratio: 4 / 5; background: url(assets/about-temp.jpg?v=4) 45% 30% / cover no-repeat; }
.about-card { background: var(--white); padding: 0; margin: 0; position: relative; }
.about-layout.has-photo .about-card { padding: 0 0 1.5rem 2.5rem; margin: -1rem 0 0 -110px; }
.mill-wrap { position: relative; width: min(70vh, 56vw, 720px); aspect-ratio: 1; margin: 0 auto; container-type: inline-size; }
.about-layout.has-photo .mill-wrap { width: 100%; max-width: 720px; margin: 0; }
.mill-wrap .mill { width: 100%; height: auto; display: block; }
.mill-wrap { --near: 5cqw; --far: 12cqw; }
.unique { position: absolute; width: 36cqw; }
.unique h3 { font-size: clamp(.95rem, 3.2cqw, 1.5rem); line-height: 1.2; margin-bottom: 2.6cqw; white-space: nowrap; }
.unique p { margin: 0; color: var(--ink-soft); font-size: clamp(.8rem, 2.46cqw, 1.15rem); line-height: 1.2; }
.u-tl { right: calc(50% + var(--near)); bottom: calc(50% + var(--far)); text-align: right; }
.u-tr { left: calc(50% + var(--far)); bottom: calc(50% + var(--near)); }
.u-bl { right: calc(50% + var(--far)); top: calc(50% + var(--near)); text-align: right; }
.u-br { left: calc(50% + var(--near)); top: calc(50% + var(--far)); }
.dots { display: none; }

/* ===== Process ===== */
.process { background: var(--grey-light); }
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.5rem; position: relative;
}
.steps::before {
  content: ""; position: absolute; left: 0; right: 0; top: 36px; height: 2px; background: var(--grey);
}
.step { position: relative; padding-top: 5.4rem; }
.step-icon {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 72px; height: 72px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--navy); display: grid; place-items: center;
  box-shadow: 0 0 0 6px var(--grey-light);
}
.step-icon img { width: 42px; height: 42px; }
.step { text-align: center; }
.step h3 { margin-bottom: .4rem; }
.step p { margin: 0; font-size: .92rem; color: var(--ink-soft); }

/* ===== Values ===== */
.value-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; }
.value-list li { border-top: 3px solid var(--navy); padding-top: 1rem; }
.value-list h3 { margin-bottom: .3rem; }
.value-list p { margin: 0; color: var(--ink-soft); }

/* ===== Target ===== */
.target { background: var(--white); }
.about { background: var(--grey-light); }
.target-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.criteria { margin: 0; }
.criteria div { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--grey); }
.criteria div:first-child { border-top: 1px solid var(--grey); }
.criteria dt { font-weight: 700; color: var(--navy); }
.criteria dd { margin: 0; color: var(--ink-soft); }
.map-blue { color: var(--navy); font-weight: 700; }
.target-map { margin: 0 0 0 auto; position: relative; width: min(100%, 380px); }
.target-map svg { width: 100%; height: auto; display: block; }
.target-map .county { transition: fill .15s; cursor: default; }
.target-map .county:hover, .target-map .county.on { fill: var(--navy-deep); }
.map-tip { position: absolute; pointer-events: none; background: var(--white); color: var(--navy); font-size: .85rem; padding: .35rem .6rem; border-radius: 3px; box-shadow: 0 2px 10px rgba(0,0,0,.12); opacity: 0; transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap; transition: opacity .15s; }
.map-tip.show { opacity: 1; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.about-text p { color: var(--ink-soft); line-height: 1.55; margin-bottom: 1em; }
.linkedin { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: var(--white); margin-top: .5rem; transition: background .2s; }
.linkedin:hover { background: var(--navy-deep); }
.headshot { margin: 0; }
.headshot img { width: 100%; border-radius: 4px; background: linear-gradient(180deg, var(--grey-light), #CFD3D9); }
.about-name { font-weight: 700; color: var(--navy); font-size: 1.15rem; margin-bottom: 1.2rem; }
.about-name span { font-weight: 400; color: var(--ink-soft); margin-left: .6rem; font-size: .95rem; }
.placeholder { color: #8a8f94; font-style: italic; }

/* ===== Contact ===== */
.contact { background: var(--navy); color: var(--white); }
.contact h2 { color: var(--white); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.contact-text p { opacity: .92; max-width: 42ch; }
.contact-lines { font-size: 1.1rem; line-height: 1.9; }
.contact-lines a:hover { text-decoration: underline; }
.contact-address { font-style: normal; line-height: 1.6; opacity: .92; margin-top: 1.25rem; }
.contact-form { display: grid; gap: 1rem; }
.field label { display: block; font-size: .85rem; margin-bottom: .35rem; opacity: .9; }
.field small { opacity: .7; font-weight: 400; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink); padding: .7rem .85rem; border: 0; border-radius: 3px; background: var(--white);
}
.field textarea { resize: vertical; }
.btn {
  justify-self: start; font: inherit; font-weight: 700; color: var(--navy); background: var(--white);
  border: 0; border-radius: 3px; padding: .8rem 1.8rem; cursor: pointer; transition: background .2s;
}
.btn:hover { background: var(--grey); }

/* ===== Footer ===== */
.footer { padding: 2rem 0; border-top: 1px solid var(--grey); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer .brand-lockup { height: 34px; }
.footer p { margin: 0; font-size: .85rem; color: var(--ink-soft); }

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .scroll-cue span { animation: none; } }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 2.5rem; }
  .steps::before { display: none; }
  .value-list { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  :root { --nav-h: 64px; }
  .brand-lockup { height: 38px; }
  .hero-media { object-position: 27% 50%; }
  .hero { align-items: end; }
  .hero-content { width: 100%; margin: 0; padding: 0 0 6rem; }
  .hero h1.hero-line { font-size: 1.8rem; }
  .h1-mill { font-size: 3.6rem; }
  .h1-stew { font-size: 1.1rem; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--white);
    flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.5rem 1.25rem;
    box-shadow: 0 12px 24px rgba(0,0,0,.08); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8rem 0; border-bottom: 1px solid var(--grey-light); }
  .nav-links a::after { display: none; }
  .nav-links .nav-cta { margin-top: .75rem; text-align: center; }
  .nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Phone: mill on top, the four points stacked beneath */
  .about-layout { grid-template-columns: 1fr; }
  .about-photo { display: none; }
  .about-card { margin: 0; padding: 0; }
  /* Phone: same quadrant layout as desktop, mill nearly edge to edge, type scaled to the mill */
  .mill-wrap { width: calc(100% + 2rem); max-width: none; aspect-ratio: 1; margin: 3.5rem -1rem 3rem; --near: 3cqw; --far: 9.5cqw; }
  .unique { width: 40cqw; }
  .unique h3 { font-size: 4.4cqw; margin-bottom: 1.4cqw; white-space: normal; line-height: 1.1; }
  .unique p { font-size: 3.35cqw; line-height: 1.32; }

  .value-list { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; row-gap: 0; position: relative; }
  .steps::before { display: block; left: 35px; right: auto; top: 36px; bottom: 36px; width: 2px; height: auto; background: var(--grey); }
  .step { display: grid; grid-template-columns: 72px 1fr; column-gap: 1.25rem; align-items: start; padding: 0 0 2rem; text-align: left; }
  .step-icon { position: static; transform: none; grid-row: 1 / span 2; }
  .step h3 { padding-top: .35rem; margin-bottom: .3rem; }
  .step p { grid-column: 2; }
  .step:last-child { padding-bottom: 0; }
  .target-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .target-map { order: -1; }
  .headshot { width: min(60vw, 260px); }

  /* Phone: pinned About — mill turns with scroll, one point at a time in a card overlaying the mill (offset right) */
  .uniques.spin { padding-bottom: 0; }
  .uniques.spin .pin-track { height: 420vh; }
  .uniques.spin .pin-stage { position: sticky; top: var(--nav-h); height: calc(100svh - var(--nav-h)); display: flex; flex-direction: column; justify-content: flex-start; padding-top: 1.5rem; }
  .uniques.spin .pin-stage > .wrap:first-child { margin-bottom: 0; }
  .uniques.spin .pin-stage h2 { margin-bottom: 0; }
  .uniques.spin .about-layout { margin-block: 1.25rem auto; }
  .uniques.spin .about-layout { display: block; }
  .uniques.spin .mill-wrap { width: calc(100% + 2rem); max-width: 460px; margin: 0 auto; margin-inline: max(-1rem, calc((100% - 460px) / 2)); aspect-ratio: 1; position: relative; }
  .uniques.spin .about-card { padding: 0; }
  .uniques.spin .mill-wrap .mill { width: 100%; will-change: transform; }
  .uniques.spin .unique {
    position: absolute; left: auto; right: 0; top: 50%; bottom: auto; transform: translateY(-50%);
    width: 66%; max-width: calc(100vw - 2.5rem); text-align: left; margin: 0;
    background: rgba(255,255,255,.93); padding: 1.1rem 1.2rem; border-left: 3px solid var(--navy); box-shadow: 0 8px 28px rgba(0,0,0,.08);
    opacity: 0; pointer-events: none;
  }
  .uniques.spin .unique h3 { font-size: 1.2rem; margin-bottom: .4rem; white-space: normal; }
  .uniques.spin .unique p { font-size: .98rem; line-height: 1.4; }
  .uniques.spin .dots { display: flex; justify-content: center; gap: .55rem; margin-top: 1rem; }
  .uniques.spin .dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--grey); transition: background .3s; }
  .uniques.spin .dots span.on { background: var(--navy); }
}
