/* Havenwood Industries — site styles
   Layout idea: one green opening panel carrying the positioning line, then an
   ivory page of label-left / text-right sections divided by hairlines.
   Single theme by choice: the brand is one green, held. */

@font-face { font-family: "Pagella"; src: url("../fonts/pagella-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Pagella"; src: url("../fonts/pagella-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --green: #143D2E;      /* Havenwood Green: the logo's own green, used only behind the mark tile */
  --deep: #0E2E22;       /* site surfaces: a shade darker than the logo green */
  --olive: #4F5A3C;      /* Wax Olive: secondary */
  --brass: #9C7A3E;      /* hairlines only */
  --ivory: #F1ECE1;      /* page ground */
  --char: #1E2321;       /* body text */
  --ink2: #5A615C;       /* secondary text */
  --rule: #D9D3C5;       /* dividers on ivory */
  --winter: #2C6A4E;     /* links, focus */

  --serif: "Pagella", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 64px);
  --measure: 34rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--char);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--brass); outline-offset: 4px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; text-wrap: balance; }

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

/* ---------- Opening panel ---------- */
.opening { color: var(--ivory); position: relative; overflow: hidden; background: var(--deep); }
.opening > * { position: relative; }
/* Growth rings: a slow wave of light travels outward, one ring at a time, then rests */
.opening > .rings {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 18%, rgba(0,0,0,.5) 60%, #000 100%);
          mask-image: linear-gradient(90deg, transparent 18%, rgba(0,0,0,.5) 60%, #000 100%);
}
.rings path { --o: .085; --d: 0s; opacity: var(--o); animation: ring 14s ease-in-out var(--d) infinite; }
.rings path:nth-child(5n+1) { --o: .16; }
/* each ring starts a little after the one inside it */
.rings path:nth-child(1){--d:0.00s}.rings path:nth-child(2){--d:0.17s}.rings path:nth-child(3){--d:0.34s}.rings path:nth-child(4){--d:0.51s}.rings path:nth-child(5){--d:0.68s}.rings path:nth-child(6){--d:0.85s}.rings path:nth-child(7){--d:1.02s}.rings path:nth-child(8){--d:1.19s}.rings path:nth-child(9){--d:1.36s}.rings path:nth-child(10){--d:1.53s}.rings path:nth-child(11){--d:1.70s}.rings path:nth-child(12){--d:1.87s}.rings path:nth-child(13){--d:2.04s}.rings path:nth-child(14){--d:2.21s}.rings path:nth-child(15){--d:2.38s}.rings path:nth-child(16){--d:2.55s}.rings path:nth-child(17){--d:2.72s}.rings path:nth-child(18){--d:2.89s}.rings path:nth-child(19){--d:3.06s}.rings path:nth-child(20){--d:3.23s}.rings path:nth-child(21){--d:3.40s}.rings path:nth-child(22){--d:3.57s}.rings path:nth-child(23){--d:3.74s}.rings path:nth-child(24){--d:3.91s}.rings path:nth-child(25){--d:4.08s}.rings path:nth-child(26){--d:4.25s}.rings path:nth-child(27){--d:4.42s}.rings path:nth-child(28){--d:4.59s}.rings path:nth-child(29){--d:4.76s}.rings path:nth-child(30){--d:4.93s}.rings path:nth-child(31){--d:5.10s}.rings path:nth-child(32){--d:5.27s}.rings path:nth-child(33){--d:5.44s}.rings path:nth-child(34){--d:5.61s}.rings path:nth-child(35){--d:5.78s}.rings path:nth-child(36){--d:5.95s}.rings path:nth-child(37){--d:6.12s}.rings path:nth-child(38){--d:6.29s}.rings path:nth-child(39){--d:6.46s}.rings path:nth-child(40){--d:6.63s}.rings path:nth-child(41){--d:6.80s}.rings path:nth-child(42){--d:6.97s}.rings path:nth-child(43){--d:7.14s}.rings path:nth-child(44){--d:7.31s}.rings path:nth-child(45){--d:7.48s}.rings path:nth-child(46){--d:7.65s}.rings path:nth-child(47){--d:7.82s}.rings path:nth-child(48){--d:7.99s}.rings path:nth-child(49){--d:8.16s}.rings path:nth-child(50){--d:8.33s}.rings path:nth-child(51){--d:8.50s}.rings path:nth-child(52){--d:8.67s}.rings path:nth-child(53){--d:8.84s}.rings path:nth-child(54){--d:9.01s}.rings path:nth-child(55){--d:9.18s}.rings path:nth-child(56){--d:9.35s}
@keyframes ring { 0%, 22%, 100% { opacity: var(--o); } 7% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .rings path { animation: none; } }
/* Optional film layer: sits under the text with a green tint so type stays legible */
.opening > .film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .32; filter: grayscale(1) contrast(1.05); mix-blend-mode: luminosity; }
@media (prefers-reduced-motion: reduce) { .opening > .film { display: none; } }

/* Menu bar: fixed to the top of the window. Solid by default; site.js makes it
   clear while the page is at the very top so the rings show through. */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10; color: var(--ivory);
  background: rgba(14, 46, 34, .96);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(156, 122, 62, .5);
  transition: background-color .3s ease, border-color .3s ease;
}
.bar.at-top { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: transparent; }
.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: clamp(12px, 3vw, 32px);
  padding-top: clamp(10px, 1.6vw, 16px); padding-bottom: clamp(10px, 1.6vw, 16px);
  transition: padding .3s ease;
}
.bar.at-top .masthead { padding-top: clamp(14px, 2.4vw, 28px); padding-bottom: clamp(14px, 2.4vw, 28px); }
.lockup { display: flex; align-items: center; gap: clamp(10px, 1.2vw, 14px); text-decoration: none; flex: none; }
.lockup svg { width: clamp(30px, 3.2vw, 38px); height: clamp(30px, 3.2vw, 38px); flex: none; }
.lockup .rule { width: 1px; height: clamp(24px, 2.6vw, 30px); background: var(--ivory); opacity: .35; }
.lockup .name { font-family: var(--serif); font-size: clamp(.9rem, 1.35vw, 1.06rem); letter-spacing: .2em; line-height: 1.1; }
.lockup .sub { display: block; font-family: var(--sans); font-weight: 500; font-size: .53em; letter-spacing: .58em; opacity: .72; margin-top: 5px; }

.nav { display: flex; flex-wrap: nowrap; gap: clamp(10px, 3.2vw, 28px); white-space: nowrap; }
.nav a {
  font-size: clamp(.56rem, 2.45vw, .72rem); font-weight: 500; letter-spacing: clamp(.08em, .4vw, .16em); text-transform: uppercase;
  text-decoration: none; opacity: .8; padding: 6px 0; border-bottom: 1px solid transparent;
}
.nav a:hover { opacity: 1; border-bottom-color: var(--brass); }
/* On phones the bar carries the mark alone beside the menu */
@media (max-width: 640px) { .bar .rule, .bar .name { display: none; } }
@media (prefers-reduced-motion: reduce) { .bar, .masthead { transition: none; } }

.statement { padding-top: calc(clamp(60px, 8vw, 96px) + clamp(48px, 9vw, 112px)); padding-bottom: clamp(72px, 11vw, 136px); }
.statement h1 { font-size: clamp(2rem, 4.7vw, 3.7rem); line-height: 1.12; letter-spacing: -.005em; max-width: 17em; }
.statement p { font-family: var(--serif); font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.5; max-width: 31em; margin-top: 28px; opacity: .86; }

/* The hanging line from the mark, drawn across the panel's foot */
.catenary { display: block; width: 100%; height: clamp(36px, 6vw, 84px); margin-top: calc(-1 * clamp(36px, 6vw, 84px)); }
.catenary path { fill: none; stroke: var(--brass); stroke-width: 1; vector-effect: non-scaling-stroke; }

/* ---------- Sections ---------- */
.section { border-top: 1px solid var(--rule); }
.opening + .section { border-top: 0; }
.section .wrap {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px 56px;
  padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 104px);
}
.label {
  font-size: .72rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink2); padding-top: .7em;
}
.section h2 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); line-height: 1.18; max-width: 20em; }
.prose { display: grid; gap: 18px; max-width: var(--measure); margin-top: 26px; }
.prose p { color: var(--char); }

/* Three promises */
.promises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 40px; margin-top: 44px; }
.promise { border-top: 1px solid var(--brass); padding-top: 20px; }
.promise h3 { font-size: 1.45rem; line-height: 1.2; }
.promise p { margin-top: 12px; font-size: 1rem; color: var(--ink2); }

/* What we own */
.traits { margin: 40px 0 0; display: grid; }
.trait { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 6px 32px; padding: 20px 0; border-top: 1px solid var(--rule); }
.trait:last-child { border-bottom: 1px solid var(--rule); }
.trait dt { font-family: var(--serif); font-size: 1.25rem; line-height: 1.3; }
.trait dd { margin: 0; color: var(--ink2); font-size: 1rem; max-width: 30rem; }

/* Closing line */
.closing .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 56px; grid-template-columns: none; padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(48px, 7vw, 88px); }
.mark-tile { background: var(--green); width: 96px; aspect-ratio: 1; display: grid; place-items: center; flex: none; margin-right: 124px; }
.mark-tile svg { width: 62%; height: 62%; }
.motto { font-family: var(--serif); font-style: italic; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.2; }

/* ---------- Footer ---------- */
.foot { background: var(--deep); color: var(--ivory); }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 40px; padding-top: 48px; padding-bottom: 40px; }
.foot .note { font-family: var(--serif); font-style: italic; font-size: 1.05rem; opacity: .86; }
.foot small { display: block; margin-top: 8px; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; opacity: .6; }
.foot .right { text-align: right; }

/* ---------- Narrow screens ---------- */
@media (max-width: 860px) {
  .section .wrap { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .label { padding-top: 0; }
  .promises { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .mark-tile { margin-right: 0; width: 80px; }
}
@media (max-width: 560px) {
  .trait { grid-template-columns: minmax(0, 1fr); }
  .foot .right { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Not-found page ---------- */
.lost { min-height: 100vh; min-height: 100svh; background: var(--deep); color: var(--ivory); display: grid; place-items: center; text-align: center; padding: var(--gutter); }
.lost .lockup { justify-content: center; text-align: left; }
.lost h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-top: 40px; }
.lost p { margin-top: 14px; opacity: .8; }
.lost p a { text-underline-offset: 4px; }

/* ---------- Print ---------- */
@media print {
  .bar { position: static; background: var(--deep); }
  .rings, .catenary { display: none; }
  .statement { padding-top: 32px; padding-bottom: 32px; }
}
