/* ============================================================
   Phillip Smith General Contractor — shared stylesheet
   Used by: index, process, portfolio, about, contact, careers, project
   (thank-you.html stays self-contained — its nav/footer diverge)
   Page-specific styles live in each page's inline <style> block,
   which loads AFTER this file and wins ties.
   ============================================================ */

:root {
  --canvas: #F8F8F8;
  --ink: #1A1A1A;
  --ink-60: rgba(26,26,26,.62);
  --ink-30: rgba(26,26,26,.28);
  --accent: #4682B4;
  --accent-deep: #2E5A80;
  --nautilus: #57A0D3;
  --serif: 'Lora', Georgia, serif;
  --sans: 'DM Sans', -apple-system, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html.no-lenis { scroll-behavior: smooth; }
body { background: var(--canvas); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }

/* ---------- type ---------- */
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 500; letter-spacing: .01em; }
.eyebrow { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px; }
.eyebrow.on-dark { color: rgba(255,255,255,.85); }
.section-head { font-size: clamp(30px, 4.4vw, 54px); line-height: 1.12; text-transform: uppercase; letter-spacing: .015em; max-width: 18em; }
.section-head em { font-style: italic; text-transform: none; letter-spacing: 0; }
.section-sub { font-size: 17px; color: var(--ink-60); max-width: 34em; margin-top: 18px; }

/* ---------- buttons ---------- */
.btn { display: inline-block; font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; padding: 17px 34px; border: 1px solid currentColor; transition: background .35s cubic-bezier(.22,1,.36,1), color .35s cubic-bezier(.22,1,.36,1), border-color .35s; cursor: pointer; }
.btn-solid { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost-light { color: #fff; border-color: rgba(255,255,255,.6); }
.btn-ghost-light:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-ghost-dark, .btn-ghost { color: var(--ink); border-color: var(--ink-30); }
.btn-ghost-dark:hover, .btn-ghost:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.text-link { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; border-bottom: 1px solid var(--ink-30); padding-bottom: 6px; transition: border-color .3s, color .3s; }
.text-link:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- nav (transparent over hero/banner, solid on scroll) ---------- */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter); height: 84px; transition: background .4s, box-shadow .4s, height .4s; }
nav.scrolled { background: rgba(248,248,248,.92); backdrop-filter: blur(14px); height: 66px; box-shadow: 0 1px 0 rgba(26,26,26,.08); }
nav.scrolled .nav-logo, nav.scrolled .nav-links a, nav.scrolled .nav-meta { color: var(--ink); }
nav.scrolled .nav-cta { border-color: var(--ink); color: var(--ink); }
nav.scrolled .nav-cta:hover { background: var(--ink); color: #fff; }
.nav-logo { color: #fff; line-height: 1.15; transition: color .4s; display: flex; align-items: center; gap: 12px; }
.nav-logo .mark { width: 42px; height: 42px; object-fit: contain; flex: 0 0 auto; transition: width .4s, height .4s; }
nav.scrolled .nav-logo .mark { width: 34px; height: 34px; }
.nav-logo .name { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: .06em; }
.nav-logo .sub { font-size: 8.5px; font-weight: 700; letter-spacing: .34em; text-transform: uppercase; opacity: .75; }
.nav-links { display: flex; gap: 34px; align-items: center; }
.nav-links a { color: #fff; font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; transition: color .4s, opacity .3s; }
.nav-links a:hover { opacity: .6; }
.nav-links a.active { border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.nav-cta { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 11px 22px; border: 1px solid rgba(255,255,255,.7); color: #fff; transition: all .35s; }
.nav-cta:hover { background: #fff; color: var(--ink); }
.nav-meta { display: none; color: #fff; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; opacity: .75; transition: color .4s; }
@media (min-width: 1200px) { .nav-meta { display: block; } }
@media (max-width: 900px) { .nav-links a:not(.nav-cta) { display: none; } }

/* ---------- page banner (interior pages; index hero is page-local)
     height/min-height set per page in its inline block ---------- */
.banner { position: relative; height: 62svh; min-height: 440px; display: flex; align-items: flex-end; overflow: hidden; }
.banner-media { position: absolute; inset: -8% 0; z-index: 0; will-change: transform; }
.banner-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(97deg, rgba(13,22,31,.82) 0%, rgba(13,22,31,.55) 40%, rgba(13,22,31,.2) 70%), linear-gradient(to bottom, rgba(13,22,31,.3) 0%, rgba(13,22,31,.1) 45%, rgba(13,22,31,.72) 100%); }
.banner-inner { position: relative; z-index: 1; width: 100%; padding: 0 var(--gutter) clamp(48px, 8vh, 90px); color: #fff; }
.banner-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: rgba(255,255,255,.85); margin-bottom: 24px; text-shadow: 0 1px 12px rgba(13,22,31,.7); opacity: 0; animation: fadeUp 1s .05s cubic-bezier(.22,1,.36,1) forwards; }
.banner-eyebrow::before { content: ''; display: inline-block; width: 44px; height: 1px; background: rgba(255,255,255,.6); vertical-align: middle; margin-right: 16px; }
.banner h1 { font-size: clamp(34px, 5vw, 68px); line-height: 1.14; font-weight: 400; max-width: 13em; text-shadow: 0 2px 30px rgba(13,22,31,.65), 0 1px 6px rgba(13,22,31,.4); }
.banner h1 .line { display: block; overflow: hidden; padding-bottom: .16em; margin-bottom: -.16em; padding-right: .1em; }
.banner h1 .line span { display: block; transform: translateY(110%); animation: lineUp 1.1s cubic-bezier(.22,1,.36,1) forwards; }
.banner h1 .line:nth-child(2) span { animation-delay: .12s; }
.banner h1 em { font-style: italic; font-weight: 400; }
@keyframes lineUp { to { transform: translateY(0); } }
.banner-sub { font-size: clamp(15px, 1.6vw, 18px); max-width: 32em; margin-top: 24px; color: #fff; text-shadow: 0 1px 18px rgba(13,22,31,.75); opacity: 0; animation: fadeUp 1s .5s cubic-bezier(.22,1,.36,1) forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- sections (index/contact/careers override padding per page) ---------- */
section { padding: clamp(80px, 11vw, 150px) var(--gutter); }

/* ---------- testimonial band ---------- */
.testimonial-band { position: relative; color: #fff; text-align: center; overflow: hidden; padding: clamp(110px, 15vw, 200px) var(--gutter); }
.testimonial-band .band-media { position: absolute; inset: -10% 0; z-index: 0; will-change: transform; }
.testimonial-band .band-media::after { content: ''; position: absolute; inset: 0; background: rgba(18,28,38,.72); }
.testimonial-band .inner { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; }
.testimonial-band blockquote { font-family: var(--serif); font-size: clamp(24px, 3.4vw, 42px); line-height: 1.35; font-weight: 400; }
.testimonial-band blockquote em { font-style: italic; }
.testimonial-band cite { display: block; font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; margin-top: 34px; color: rgba(255,255,255,.8); }

/* ---------- final cta ---------- */
.final-cta { text-align: center; padding: clamp(110px, 14vw, 190px) var(--gutter); }
.final-cta h2 { font-size: clamp(32px, 5vw, 64px); text-transform: uppercase; line-height: 1.1; max-width: 14em; margin: 0 auto; }
.final-cta p { max-width: 36em; margin: 26px auto 0; color: var(--ink-60); font-size: 17px; }
.final-cta .btn { margin-top: 44px; }

/* ---------- footer ---------- */
footer { background: var(--ink); color: rgba(255,255,255,.75); padding: clamp(64px, 8vw, 100px) var(--gutter) 40px; font-size: 13.5px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 44px; }
.foot-logo .name { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: .06em; color: #fff; }
.foot-logo .sub { font-size: 8.5px; font-weight: 700; letter-spacing: .34em; text-transform: uppercase; opacity: .65; }
.foot-logo p { margin-top: 18px; max-width: 24em; }
footer h4 { font-size: 10.5px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #fff; margin-bottom: 18px; }
footer li { list-style: none; margin-bottom: 10px; }
footer a:hover { color: #fff; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: clamp(48px, 6vw, 72px); padding-top: 28px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 11.5px; opacity: .65; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- form controls (contact + careers; .form-card look is per-page) ---------- */
form { margin-top: 32px; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 560px) { .frow { grid-template-columns: 1fr; gap: 0; } }
.field { margin-bottom: 26px; }
label { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-60); margin-bottom: 8px; }
label .req { color: var(--accent); }
input, select, textarea { width: 100%; font-family: var(--sans); font-size: 15.5px; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid rgba(26,26,26,.22); padding: 10px 2px; border-radius: 0; transition: border-color .3s; -webkit-appearance: none; appearance: none; }
select { cursor: pointer; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%231A1A1A' stroke-width='1.4'/></svg>"); background-repeat: no-repeat; background-position: right 4px center; padding-right: 22px; }
textarea { min-height: 100px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { outline: none; border-bottom-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--ink-30); }
.form-card .fhead { font-family: var(--serif); font-size: clamp(21px, 2.2vw, 27px); }
.form-card .fsub { font-size: 14px; color: var(--ink-60); margin-top: 8px; }
.form-card .btn { width: 100%; margin-top: 8px; }
/* honeypot — visually gone, still in the DOM for bots */
.hp-field { display: none !important; }
/* submit-failure fallback line (hidden unless the AJAX post fails) */
.form-err { display: none; text-align: center; font-size: 13.5px; color: #C0392B; margin-top: 16px; }
.form-err a { color: inherit; border-bottom: 1px solid currentColor; }
/* success state (careers uses in-card state; contact redirects to thank-you) */
.sent { display: none; text-align: center; padding: clamp(40px, 6vw, 80px) 0; }
.sent .serif { font-size: clamp(24px, 2.6vw, 32px); }
.sent p { color: var(--ink-60); margin-top: 14px; }
.form-card.is-sent form, .form-card.is-sent .fhead, .form-card.is-sent .fsub { display: none; }
.form-card.is-sent .sent { display: block; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.22,1,.36,1), transform .9s cubic-bezier(.22,1,.36,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }
/* big shadowed cards fade without moving — moving a large shadow repaints every frame */
.reveal.fade-only { transform: none !important; }

/* ---------- review mode (#flat): static render for full-page screenshots
     (flat banner/hero HEIGHTS are per-page) ---------- */
body.flat .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
body.flat .banner h1 .line span { animation: none; transform: none; }
body.flat .banner-sub, body.flat .banner-eyebrow { animation: none; opacity: 1; }

/* ---------- prefers-reduced-motion: everything lands instantly (WCAG 2.3.3 / QA rule 4)
     JS side: site.js skips Lenis, parallax, and count-up under the same query ---------- */
@media (prefers-reduced-motion: reduce) {
  html.no-lenis { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .banner h1 .line span { animation: none; transform: none; }
  .banner-sub, .banner-eyebrow { animation: none; opacity: 1; }
  .banner-media, .testimonial-band .band-media { will-change: auto; }
  .btn, .text-link, .nav-cta, nav, .nav-logo, .nav-logo .mark, .nav-links a { transition: none; }
}
