/* Homepage, full width (13 Oct 2026) — the approved "version 1" layout.
   Headings sit left, the 1360px band is used for layout, and projects run as
   full-width bands, one under another, in order. Loaded after style.css. */

.hhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 44px; text-align: left; }
.hhead .section-title { margin: 12px 0 0; }
.hhead-sub { max-width: 520px; color: var(--gray-600); font-size: 1.05rem; margin: 0; }
.section-header { text-align: left; }
.section-header .section-sub { margin-left: 0; }

/* hero: the accent word readable on a photograph, and two clear actions */
.hero-title--accent { color: #CFE0AE !important; -webkit-text-fill-color: #CFE0AE; }
.hero-sub { max-width: 600px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-btn { display: inline-flex; align-items: center; min-height: 50px; padding: 0 24px; font-weight: 600; border-radius: 2px; border: 1px solid #fff; transition: background .25s, color .25s; }
.hero-btn--light { background: #fff; color: var(--olive); }
.hero-btn--light:hover { background: transparent; color: #fff; }
.hero-btn--ghost { color: #fff; }
.hero-btn--ghost:hover { background: #fff; color: var(--olive); }

/* facts we can stand behind, in place of the unverified counters */
.hfacts { border-bottom: 1px solid var(--gray-200); }
.hfacts-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hfact { padding: 34px 28px 34px 0; }
.hfact + .hfact { padding-left: 28px; border-left: 1px solid var(--gray-200); }
.hfact strong { display: block; font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--charcoal); }
.hfact span { font-size: .9rem; color: var(--gray-500); }

/* services: two panels, Build and Renewables */
.hsvc-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.hsvc-panel { background: #fff; border: 1px solid var(--gray-200); padding: 40px; }
.hsvc-panel h3 { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; letter-spacing: 0; margin: 10px 0 20px; }
.hsvc-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 64px; padding: 18px 0; border-top: 1px solid var(--gray-200); color: var(--charcoal); }
.hsvc-row strong { display: block; font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; }
.hsvc-row em { display: block; font-style: normal; font-size: .9rem; color: var(--gray-500); margin-top: 4px; }
.hsvc-row b { color: var(--olive); font-size: 1.3rem; transition: transform .3s; }
.hsvc-row:hover strong { color: var(--olive); }
.hsvc-row:hover b { transform: translateX(6px); }

/* projects: full-width bands, one under another */
.hprojects .container { margin-bottom: 0; }
.pbands { display: grid; gap: 14px; }
.pband { position: relative; display: block; height: min(68vh, 640px); min-height: 420px; overflow: hidden; background: #DDD; color: #fff; }
.pband-ph { position: absolute; inset: -48px 0; transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }
/* a <picture> only picks the file (AVIF, WebP or the JPEG); the box is the img's */
.pband-ph picture, .pview-top picture, .pview-gal picture { display: contents; }
.pband-ph picture > source, .pview-top picture > source, .pview-gal picture > source { display: none; }
.pband img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.14); transition: transform 1.4s cubic-bezier(.16,1,.3,1); }
.pband.in img { transform: scale(1.04); }
.pband:hover img { transform: scale(1.09); transition-duration: .9s; }
.pband::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.62), rgba(0,0,0,.12) 55%, transparent); transition: opacity .6s; }
.pband:hover::after { opacity: .78; }
.pband-cap { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 48px; }
.pband-cap > * { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .9s cubic-bezier(.16,1,.3,1); }
.pband.in .pband-cap > * { opacity: 1; transform: none; }
.pband.in .pband-cap > :nth-child(2) { transition-delay: .08s; }
.pband.in .pband-cap > :nth-child(3) { transition-delay: .16s; }
.pband.in .pband-cap > :nth-child(4) { transition-delay: .24s; }
.pband.in .pband-cap > :nth-child(5) { transition-delay: .32s; }
/* A small cover (under 1600px wide) is shown whole beside the words, not stretched across the screen: the whole
   house is visible and the photograph stays near its own size. --ar is its width over its height. */
.pband--frame { background: #EEF4E9; color: #1A1A1A; }
.pband--frame::after { display: none; }
.pband--frame .pband-ph { inset: 0 0 0 auto; height: 100%; width: auto; aspect-ratio: var(--ar); transform: none; will-change: auto; overflow: hidden; }
.pband--frame img, .pband--frame.in img, .pband--frame:hover img { transform: none; transition: none; object-position: center; }
.pband--frame .pband-cap { padding-right: calc(min(68vh, 640px) * var(--ar) + 32px); padding-bottom: 56px; }
.pband--frame .pband-n { color: #4A5D23; }
.pband.pband--frame h3 { color: #1A1A1A; }          /* after .pband h3 further down, so it needs the extra class */
.pband--frame .pband-cap p { color: #404040; opacity: 1; }
.pband--frame .pband-go { border-bottom-color: #1A1A1A; color: #1A1A1A; }
.pband-tag { align-self: flex-start; margin-top: 14px; font-size: .85rem; font-weight: 600;
    color: #1A1A1A; background: #CCF4D9;
    padding: 6px 10px; border-radius: 6px; }
/* On a band with a case study the badge is a button: it grows a little on hover and reads READ THE CASE STUDY.
   The label swaps by width, so the button really gets bigger. On a touch screen, which cannot hover, it shows
   the longer label from the start. */
.pband-tag[data-href] { display: inline-flex; align-items: center; gap: .4em; cursor: pointer; pointer-events: auto;
    transition: padding .3s cubic-bezier(.16,1,.3,1), font-size .3s cubic-bezier(.16,1,.3,1), background .25s, color .25s,
    box-shadow .3s, opacity .8s ease, transform .9s cubic-bezier(.16,1,.3,1); }
.pband-tag .pt-short, .pband-tag .pt-long { display: inline-block; white-space: nowrap; overflow: hidden;
    transition: max-width .35s cubic-bezier(.16,1,.3,1), opacity .25s; }
.pband-tag .pt-short { max-width: 9em; opacity: 1; }
.pband-tag .pt-long { max-width: 0; opacity: 0; }
.pband-tag .pt-long b { display: inline-block; margin-left: .25em; font-weight: 700; transition: transform .3s; }
.pband-tag[data-href]:hover, .pband-tag[data-href]:focus-visible {
    padding: 11px 20px; font-size: .84rem; background: #4A5D23; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.3); outline: none; }
.pband-tag[data-href]:focus-visible { box-shadow: 0 0 0 3px #fff, 0 8px 24px rgba(0,0,0,.3); }
.pband-tag[data-href]:hover .pt-short, .pband-tag[data-href]:focus-visible .pt-short { max-width: 0; opacity: 0; }
.pband-tag[data-href]:hover .pt-long, .pband-tag[data-href]:focus-visible .pt-long { max-width: 18em; opacity: 1; }
.pband-tag[data-href]:hover .pt-long b, .pband-tag[data-href]:focus-visible .pt-long b { transform: translateX(4px); }
@media (hover: none) {
    .pband-tag[data-href] { padding: 9px 16px; font-size: .78rem; background: #4A5D23; color: #fff; }
    .pband-tag[data-href] .pt-short { max-width: 0; opacity: 0; }
    .pband-tag[data-href] .pt-long { max-width: 18em; opacity: 1; }
}
.pband-n { font-size: .8rem; font-weight: 600; letter-spacing: .16em; color: #CFE0AE; }
.pband h3 { font-family: var(--font-display); font-size: clamp(2rem, 3.4vw, 3.25rem); font-weight: 600; letter-spacing: 0; margin: 10px 0 8px; color: #fff; }
.pband p { font-size: 1.05rem; opacity: .92; margin: 0; }
.pband-go { align-self: flex-start; margin-top: 20px; font-weight: 600; border-bottom: 2px solid #fff; padding-bottom: 4px; }
.pband-go b { display: inline-block; transition: transform .4s; }
.pband:hover .pband-go b { transform: translateX(6px); }
.pband:focus-visible { outline: 3px solid var(--olive); outline-offset: -3px; }
.pband-zoom { position: fixed; z-index: 10001; object-fit: cover; pointer-events: none; }

/* the project, opened over the page */
.pview { position: fixed; inset: 0; z-index: 10000; background: #fff; overflow-y: auto; opacity: 0; visibility: hidden; transition: opacity .35s; }
.pview.on { opacity: 1; visibility: visible; }
.pview-top { position: relative; height: 72vh; min-height: 420px; color: #fff; }
.pview-top img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pview-top::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.66), transparent 60%); }
.pview-top .container { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 48px; }
.pview-top .section-tag { color: #CFE0AE; }
.pview-top h2 { font-family: var(--font-display); font-size: clamp(2.4rem, 4.6vw, 4.5rem); font-weight: 600; letter-spacing: 0; margin: 10px 0 6px; color: #fff; }
.pview-top p { font-size: 1.15rem; opacity: .92; margin: 0; }
.pview-x { position: fixed; top: 22px; right: 22px; z-index: 10002; width: 52px; height: 52px; border-radius: 50%; border: 0; background: #fff; font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 4px 18px rgba(0,0,0,.18); }
.pview-facts { display: flex; flex-wrap: wrap; gap: 24px 60px; padding: 40px 0; border-bottom: 1px solid var(--gray-200); }
.pview-facts strong { display: block; font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; }
.pview-facts span { font-size: .9rem; color: var(--gray-500); }
.pview-about { display: grid; grid-template-columns: 4fr 8fr; gap: 72px; padding: 56px 0; }
.pview-about p { font-size: 1.15rem; line-height: 1.7; color: var(--gray-700); max-width: 680px; margin: 0; }
.pview-case[hidden] { display: none; }   /* a project with no case study has no such link */
.pview-case { display: inline-flex; align-items: center; min-height: 44px; margin-top: 18px; font-weight: 600; color: var(--olive); border-bottom: 2px solid var(--olive); }
.pview-gal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-bottom: 90px; }
.pview-gal img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* about: the paragraph beside its heading */
.about-layout { display: block !important; }
.about-content { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 72px; align-items: start; max-width: none; }
.about-content > .section-tag, .about-content > .section-title { grid-column: 1; }
.about-content > .about-text { grid-column: 2; grid-row: 1 / span 2; max-width: 680px; font-size: 1.15rem; line-height: 1.75; margin: 0; }

@media (max-width: 900px) {
  .hhead { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hfacts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hfact:nth-child(3) { border-left: 0; padding-left: 0; }
  .hsvc-panels { grid-template-columns: minmax(0, 1fr); }
  .hsvc-panel { padding: 28px 22px; }
  .pband { height: 380px; min-height: 0; }
  .pband-cap { padding-bottom: 28px; }
  .pview-about { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 36px 0; }
  .pview-gal { grid-template-columns: minmax(0, 1fr); }
  .pview-facts { gap: 18px 32px; }
  .about-content { display: block; }
  .about-content > .about-text { margin-top: 18px; }
}
@media (max-width: 900px) {
  /* on a phone the whole photograph on top, the words under it */
  .pband--frame { height: auto; min-height: 0; display: flex; flex-direction: column; }
  .pband--frame .pband-ph { position: relative; inset: auto; width: 100%; height: auto; }
  .pband--frame .pband-cap { height: auto; padding: 22px 0 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .pband-ph { transform: none; }
  .pband img, .pband.in img, .pband:hover img { transform: none; transition: none; }
  .pband-tag[data-href], .pband-tag .pt-short, .pband-tag .pt-long { transition: none; }
  .pband-cap > * { opacity: 1; transform: none; transition: none; }
}

/* 21 Oct 2026: the hero photograph bright, not dimmed all over; the shade only behind the words on the left and the
   project's name at the foot */
.hero-slide-overlay { background: linear-gradient(90deg, rgba(0, 0, 0, .46) 0%, rgba(0, 0, 0, .2) 42%, rgba(0, 0, 0, 0) 72%),
                                  linear-gradient(to top, rgba(0, 0, 0, .3) 0%, rgba(0, 0, 0, 0) 28%); }
@media (max-width: 767px) { .hero-slide-overlay { background: linear-gradient(to bottom, rgba(0, 0, 0, .18) 0%, rgba(0, 0, 0, .42) 100%); } }

/* Why OKPW: four facts in large type under the words */
.about-facts { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; max-width: 560px; }
.about-facts li { border-top: 2px solid #D3E2B7; padding-top: 14px; }
.about-facts b { display: block; font: 600 clamp(1.7rem, 3vw, 2.4rem) / 1.1 var(--font-display); color: #556B2F; letter-spacing: 0; }
.about-facts span { display: block; margin-top: 6px; font-size: .92rem; line-height: 1.45; color: #555; }
@media (max-width: 767px) { .about-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; } }

/* Services, 21 Oct 2026 (the mock-ups' "Services B"): the nine services beside one large drawing. Pointing at one
   (or tabbing to it) shows its drawing, line and guide price; a click opens its page. A phone gets a plain list, each
   with a small drawing (scripts/build_home_services.py, js/home-services.js). */
.hsp { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 56px; align-items: stretch; margin-top: 8px; }
.hsp-list { display: flex; flex-direction: column; }
.hsp-item { display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 0 14px; border-top: 1px solid #ECEAE3;
            color: #1A1A1A; text-decoration: none; transition: background-color .2s, color .2s; }
.hsp-item:last-child { border-bottom: 1px solid #ECEAE3; }
.hsp-thumb { display: none; }
.hsp-name { flex: 1; font: 700 1.19rem var(--font-display); }
.hsp-price { font-size: .85rem; font-weight: 500; color: #5C5C5C; white-space: nowrap; }
.hsp-item.is-on, .hsp-item:focus-visible { background: #EEF3E3; color: #3F5221; border-radius: 10px; border-color: transparent; }
.hsp-item.is-on + .hsp-item { border-top-color: transparent; }
.hsp-item:focus-visible { outline: 2px solid #556B2F; outline-offset: 2px; }
.hsp-panel { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 32px 40px; border-radius: 20px; background: #F6F8F1; }
.hsp-img { display: block; width: 100%; height: 380px; object-fit: contain; transition: opacity .25s ease; mix-blend-mode: multiply; }   /* (the renewables drawings carry a white ground) */
.hsp-img.is-swapping { opacity: 0; }
.hsp-title { margin: 6px 0 0; font: 600 1.8rem/1.2 var(--font-display); letter-spacing: 0; color: #1A1A1A; }
.hsp-line { margin: 0; font-size: 1.05rem; line-height: 1.6; color: #4A4A4A; max-width: 620px; }
.hsp-guide { margin: 0; font-size: .95rem; color: #4A4A4A; }
.hsp-guide strong { color: #3F5221; }
.hsp-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 4px; }
.hsp-btn { display: inline-flex; align-items: center; min-height: 50px; padding: 0 24px; border-radius: 10px; background: #556B2F; color: #FFFFFF;
           font-weight: 600; text-decoration: none; }
.hsp-btn:hover { background: #3F5221; }
.hsp-alt { color: #3F5221; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.hsp-also { margin: 22px 0 0; font-size: 1rem; line-height: 1.6; color: #4A4A4A; }   /* the two landing pages, under the list */
.hsp-note { margin: 18px 0 0; font-size: .8rem; color: #5C5C5C; }
@media (max-width: 899px) {
    .hsp { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .hsp-panel { display: none; }
    .hsp-item { min-height: 76px; padding: 6px 4px; gap: 14px; }
    .hsp-item.is-on { background: none; color: #1A1A1A; border-radius: 0; border-top-color: #ECEAE3; }
    .hsp-item.is-on + .hsp-item { border-top-color: #ECEAE3; }
    .hsp-thumb { display: block; flex: none; width: 84px; height: 63px; object-fit: contain; mix-blend-mode: multiply; }
    .hsp-name { font-size: 1.1rem; }
    .hsp-price { font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) { .hsp-img { transition: none; } }

/* The case study badge on a project strip (29 Oct 2026, Pavel: "the case study button ... is not working"). On hover the
   short label folds away before the long one opens, so for a moment the badge is narrower than the finger or the
   pointer on it; the tap then landed on the caption behind and opened the project viewer instead. A steady hit area
   round the badge, and js/project-bands.js sends a click beside it to the case study too. */
.pband-tag[data-href] { position: relative; min-width: 9.6em; }   /* never narrower than at rest, while the labels swap */
.pband-tag[data-href]::before { content: ''; position: absolute; inset: -10px -14px; }

/* Phones get the first hero photo at 1200 px, not 1920 (2 Nov 2026, speed audit). Beats the inline style. */
@media (max-width: 768px) {
    .hero-slide:first-child { background-image: image-set(url('/images/opt/lanford-pro-exterior-1200.avif') type('image/avif'), url('/images/opt/lanford-pro-exterior-1200.webp') type('image/webp'), url('/images/lanford-pro-exterior.jpg') type('image/jpeg')) !important; }
}
