/* Homepage. Builds on site.css. Left-aligned: content hangs from a left margin, space falls to the right. */

.home {
  --h-left: clamp(1rem, 7vw, 7rem);
  --h-max: 62rem;
  --h-sec: clamp(4rem, 3rem + 4vw, 6.5rem);
}

/* Blue sky */
.sky-hero {
  /* A clear painted sky. Clouds are separate pieces of the same painting, placed and moved
     by assets/sky.js at two depths: far (smaller, hazier, slow) and near (larger, faster). */
  --sky-h: clamp(4rem, 8vw, 7.5rem);
  --base-h: calc(var(--sky-h) * 1.7);
  position: relative; overflow: hidden;
  width: 100%; height: var(--sky-h);
  background: url("../images/home-sky-clear.jpg") 0 45% / auto var(--base-h) repeat-x;
}
.sky-far, .sky-near { position: absolute; inset: 0; }
.sky-hero .cl { position: absolute; left: 0; will-change: transform; }

/* Left-aligned frame for header, sections, footer */
.home .site-head, .home .hx, .home .site-foot {
  max-width: calc(var(--h-max) + var(--h-left) + var(--gutter));
  margin-left: 0; margin-right: auto;
  padding-left: var(--h-left); padding-right: var(--gutter);
}
.home .site-head { font-size: 0.875rem; }

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

/* Opening statement */
.home main > .hx:first-child { padding-top: clamp(1.5rem, 4vw, 3.25rem); }
.h-statement { margin: 0; max-width: 25em; font-size: clamp(1.55rem, 1.1rem + 1.6vw, 2.5rem); line-height: 1.34; letter-spacing: -0.012em; color: var(--ink); text-wrap: pretty; }
.h-statement strong { font-weight: 720; }

/* Principles */
.h-eyebrow { margin: clamp(3rem, 6vw, 4.5rem) 0 0; padding-bottom: 1rem; border-bottom: 1px solid var(--ink); font-family: var(--mono); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.h-principles { --pg: clamp(1.5rem, 3vw, 2.5rem); list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--pg); }
.h-principles li { position: relative; padding: 1.5rem 0 2.25rem; }
.h-principles li:nth-child(n+4) { padding-top: 1.75rem; }
.h-principles li:nth-child(4)::before { content: ""; position: absolute; top: 0; left: 0; width: calc(300% + 2 * var(--pg)); border-top: 1px solid var(--rule); }
.hp-k { margin: 0 0 0.9rem; font-family: var(--mono); font-weight: 400; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.hp-n { color: var(--ink-3); }
.hp-t { margin: 0 0 0.7rem; font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.55rem); line-height: 1.2; letter-spacing: -0.012em; font-weight: 500; text-wrap: balance; }
.hp-d { margin: 0; max-width: 34em; font-size: 1rem; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
@media (max-width: 60rem) {
  .h-principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-principles li, .h-principles li:nth-child(n+4) { grid-column: span 1; padding-top: 1.5rem; }
  .h-principles li:nth-child(4)::before { display: none; }
  .h-principles li:nth-child(n+3) { padding-top: 1.75rem; }
  .h-principles li:nth-child(3)::before { content: ""; position: absolute; top: 0; left: 0; width: calc(200% + var(--pg)); border-top: 1px solid var(--rule); }
  .h-principles li:nth-child(5)::before { content: ""; position: absolute; top: 0; left: 0; width: calc(200% + var(--pg)); border-top: 1px solid var(--rule); }
}
@media (max-width: 36rem) {
  .h-principles { grid-template-columns: 1fr; }
  .h-principles li, .h-principles li:nth-child(n) { grid-column: auto; padding: 1.4rem 0 1.6rem; border-top: 0; }
  .h-principles li::before, .h-principles li:nth-child(n)::before { display: none; }
  .h-principles li:nth-child(n+2) { border-top: 1px solid var(--rule); }
}

/* Now */
.h-now { margin-top: var(--h-sec); }
.h-now p { margin: 0; padding: 0.7rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 0.9375rem; line-height: 1.45; color: var(--ink-2); display: flex; gap: 0.9rem; align-items: baseline; flex-wrap: wrap; }
.h-now b { font-family: var(--mono); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.h-now span { flex: 1 1 20rem; }
.h-now a { font-family: var(--mono); font-size: 0.875rem; }

/* Section heads */
.h-sec { margin-top: var(--h-sec); }
.h-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 1rem; border-bottom: 1px solid var(--ink); margin-bottom: 1.75rem; }
.h-head h2 { margin: 0; font-family: var(--mono); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.h-head a { font-family: var(--mono); font-size: 0.875rem; }

/* Work cards: one graphic frame for all four */
.h-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2.75rem 2rem; }
.h-cards a { display: block; color: inherit; text-decoration: none; }
.gp { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; background: var(--paper-2); transition: background .2s ease; }
.h-cards a:hover .gp, .h-cards a:focus-visible .gp { background: var(--accent-wash); }
.hc-co { display: block; margin: 0.9rem 0 0.35rem; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.hc-t { display: block; max-width: 26em; font-size: clamp(1.2rem, 1.05rem + 0.5vw, 1.45rem); line-height: 1.25; letter-spacing: -0.008em; font-weight: 500; }
.h-cards a:hover .hc-t, .h-cards a:focus-visible .hc-t { color: var(--accent); }
@media (max-width: 44rem) { .h-cards { grid-template-columns: 1fr; } }

.g { width: 100%; height: auto; overflow: visible; font-family: var(--mono); }
.g .gb { fill: var(--sky); }
.g .gi { fill: var(--ink); }
.g .go { fill: none; stroke: var(--ink-3); stroke-width: 1.3; }
.g .t1 { fill: var(--paper); stroke: var(--ink-3); stroke-width: 1.2; }
.g .t2 { fill: color-mix(in srgb, var(--sky) 25%, var(--paper)); }
.g .t3 { fill: color-mix(in srgb, var(--sky) 55%, var(--paper)); }
.g .t4 { fill: var(--accent); }
.g .gn { font-family: var(--serif); font-size: 52px; font-weight: 500; letter-spacing: -0.02em; fill: var(--ink); }
.g .gl { font-size: 9.5px; letter-spacing: 0.12em; fill: var(--ink-2); }
.g .gbox { fill: none; stroke: var(--sky); stroke-width: 1.5; stroke-dasharray: 3 3; }

/* Writing */
.h-writing { list-style: none; margin: -1.75rem 0 0; padding: 0; }
.h-writing li { border-bottom: 1px solid var(--rule); }
.h-writing a { display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; column-gap: 1.5rem; align-items: center; padding: 1rem 0; color: inherit; text-decoration: none; }
.hw-img { display: block; aspect-ratio: 2 / 1; overflow: hidden; border: 1px solid var(--rule); }
.hw-img img { width: 100%; height: 100%; object-fit: cover; }
.hw-t { display: block; font-size: 1.2rem; line-height: 1.25; letter-spacing: -0.005em; }
.hw-s { display: block; margin-top: 0.25rem; font-size: 0.95rem; line-height: 1.4; color: var(--ink-3); }
.hw-m { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.h-writing a:hover .hw-t, .h-writing a:focus-visible .hw-t { color: var(--accent); }
@media (max-width: 48rem) {
  .h-writing a { grid-template-columns: 6.5rem minmax(0, 1fr); row-gap: 0.3rem; align-items: start; }
  .hw-m { grid-column: 2; }
}

/* Contact */
.h-contact { padding-bottom: var(--h-sec); }
.h-contact h2 { margin: 0 0 1rem; padding-top: 2rem; border-top: 1px solid var(--ink); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); line-height: 1.12; letter-spacing: -0.015em; font-weight: 500; }
.h-contact p { margin: 0 0 1.5rem; color: var(--ink-2); }
.h-btns { margin: 0; }
.btn { display: inline-block; font-family: var(--mono); font-size: 0.875rem; padding: 0.7rem 1.1rem; background: var(--ink); color: var(--paper); text-decoration: none; margin: 0 0.6rem 0.6rem 0; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn:hover, .btn:focus-visible { background: var(--accent); color: #fff; box-shadow: none; }
@media (max-width: 30rem) {
  .home .site-head { font-size: 0.8125rem; flex-wrap: nowrap; }
  .home .site-head nav { gap: 0.9rem; }
}

/* Work artifacts: one ink treatment (black and white) across every case; the sky stays the only blue */
.gp-art { background: none; overflow: hidden; outline: 1px solid var(--rule); outline-offset: -1px; }
.gp-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.h-cards a:hover .gp-art, .h-cards a:focus-visible .gp-art { background: none; }
.h-cards a:hover .gp-art img, .h-cards a:focus-visible .gp-art img { transform: scale(1.015); }

/* Work, text only: a blue result, then the case in one sentence with its turn in bold */
.h-work { list-style: none; margin: -1.75rem 0 0; padding: 0; }
.h-work li { border-bottom: 1px solid var(--rule); }
.h-work a { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); column-gap: var(--pg, 2.5rem); align-items: start; padding: 1.75rem 0 1.9rem; color: inherit; text-decoration: none; }
.hk-m b { display: block; white-space: nowrap; font-weight: 500; font-size: clamp(1.75rem, 0.8rem + 1.9vw, 2.7rem); line-height: 1; letter-spacing: -0.03em; color: var(--sky); font-variant-numeric: lining-nums; }
.hk-m span { display: block; margin-top: 0.55rem; max-width: 16em; font-size: 0.9375rem; line-height: 1.4; color: var(--ink-3); }
.hk-co { display: block; margin: 0.35rem 0 0.6rem; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.hk-t { display: block; max-width: 28em; font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.55rem); line-height: 1.3; letter-spacing: -0.01em; text-wrap: pretty; }
.hk-t strong { font-weight: 700; }
.h-work a:hover .hk-t, .h-work a:focus-visible .hk-t { color: var(--accent); }
@media (max-width: 44rem) {
  .h-work a { grid-template-columns: 1fr; row-gap: 0.9rem; }
  .hk-co { margin-top: 0; }
}
.h-more { margin: 1.25rem 0 0; font-family: var(--mono); font-size: 0.875rem; }
.h-more a::after { content: " →"; }
.h-intro { margin: -0.25rem 0 2.75rem; max-width: 34em; font-size: clamp(1.15rem, 1rem + 0.45vw, 1.35rem); line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
.h-intro + .h-work { margin-top: 0; border-top: 1px solid var(--rule); }

/* Work rows: two-row grid so the blue hook sits on the sentence's baseline */
.h-work li { position: relative; }
.h-work a { --pg: 2.5rem; grid-template-rows: auto auto; row-gap: 0.6rem; align-items: baseline; padding: 1.75rem 0 1.9rem; }
.hk-x { display: contents; }
.hk-co { grid-column: 1; grid-row: 1; margin: 0; }
.hk-t { grid-column: 1; grid-row: 2; }
.hk-m { grid-column: 2; grid-row: 2; padding-left: var(--pg); }
.h-work li::after { content: ""; position: absolute; top: 1.75rem; bottom: 1.9rem; left: calc((100% - var(--pgw, 2.5rem)) * 2 / 3 + var(--pgw, 2.5rem)); border-left: 1px solid var(--rule); }
@media (max-width: 44rem) {
  .h-work a { grid-template-columns: 1fr; grid-template-rows: auto; row-gap: 0.6rem; }
  .hk-co, .hk-t, .hk-m { grid-column: 1; grid-row: auto; }
  .hk-m { padding-left: 0; margin-top: 0.4rem; }
  .h-work li::after { display: none; }
}

/* Writing: a bold strip of four square covers, titles knocked out over the image, spanning the content width. */
.w-strip {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px;
}
.w-strip a { position: relative; display: block; aspect-ratio: 1; overflow: hidden; color: #fff; text-decoration: none; background: #15181c; }
.w-strip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, opacity .3s ease; }
.w-strip a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,12,15,.92) 0%, rgba(10,12,15,.78) 32%, rgba(10,12,15,.35) 58%, rgba(10,12,15,.08) 78%, rgba(10,12,15,.35) 100%); }
.ws-t, .ws-m { text-shadow: 0 1px 12px rgba(0,0,0,.35); }
body.home { overflow-x: clip; }
.ws-m, .ws-t { position: absolute; left: clamp(0.9rem, 1.4vw, 1.4rem); right: clamp(0.9rem, 1.4vw, 1.4rem); z-index: 1; }
.ws-m { top: clamp(0.8rem, 1.2vw, 1.2rem); font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,.85); }
.ws-t { bottom: clamp(0.9rem, 1.4vw, 1.4rem); font-size: clamp(1.15rem, 0.7rem + 0.95vw, 1.7rem); line-height: 1.12; letter-spacing: -0.015em; font-weight: 700; text-wrap: balance; }
.w-strip a:hover img, .w-strip a:focus-visible img { transform: scale(1.05); }
.w-strip a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 52rem) {
  .w-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 2px; padding-right: var(--gutter); -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .w-strip::-webkit-scrollbar { display: none; }
  .w-strip li { flex: 0 0 min(72vw, 20rem); scroll-snap-align: start; }
  .ws-t { font-size: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) { .w-strip img { transition: none; } }

/* Farm band: the closing band, same height as the sky. Four depths, as if walking past:
   distant hills and sky (slowest), crop rows that sweep around a fixed vanishing point
   (drawn live on a canvas), near wheat, and a thin cattle fence (fastest).
   Photo tiles are seamless, 1912 x 270, sharing one frame; fence SVG is 900 x 115. */
.home .site-foot { padding-bottom: clamp(2rem, 4vw, 3rem); }
.field-band {
  --sky-h: clamp(4rem, 8vw, 7.5rem);
  --farm-w: calc(var(--sky-h) * 1912 / 270);
  --fence-w: calc(var(--sky-h) * 900 / 115);
  position: relative; overflow: hidden;
  width: 100%; height: var(--sky-h);
  background: url("../images/home-farm-back.jpg") 0 0 / auto 100% repeat-x;
  animation: farm-pan 800s linear infinite var(--back-phase, 0s);
}
.field-rows { position: absolute; inset: 0; width: 100%; height: 100%; }
.field-near {
  position: absolute; inset: 0;
  background: url("../images/home-farm-near.webp") 0 0 / auto 100% repeat-x;
  animation: farm-pan 80s linear infinite var(--near-phase, 0s);
}
.field-band::after {
  content: ""; position: absolute; inset: 0;
  background: url("../images/home-fence.svg") 0 0 / auto 100% repeat-x;
  animation: farm-fence 64s linear infinite var(--fence-phase, 0s);
}
@keyframes farm-pan { from { background-position-x: 0; } to { background-position-x: calc(-1 * var(--farm-w)); } }
@keyframes farm-fence { from { background-position-x: 0; } to { background-position-x: calc(-1 * var(--fence-w)); } }
@media (prefers-reduced-motion: reduce) { .field-band, .field-near, .field-band::after { animation: none; } }
.home .site-foot { margin-top: var(--h-sec); }
