/* ============================================================
   PHB — Personal Home Builders
   Site framework stylesheet
   Palette: navy / charcoal / chrome silver / cream
   ============================================================ */
:root {
  --navy: #101a26;
  --navy-2: #16233343;
  --charcoal: #1b1b1b;
  --cream: #f5f2ec;
  --paper: #ffffff;
  --silver: #c0c0c0;
  --gray: #6b6b6b;
  --line: #e4e0d8;
  --chrome: linear-gradient(180deg, #f7f7f7 0%, #d2d2d2 38%, #8f8f8f 55%, #c0c0c0 72%, #e9e9e9 100%);
  --max: 1180px;
  --radius: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--charcoal);
  background: var(--paper);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(16, 26, 38, 0.92);
  backdrop-filter: blur(8px);
  transition: background .3s;
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 54px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 34px; }
.main-nav a {
  color: var(--cream); text-decoration: none; font-size: 14px;
  letter-spacing: .12em; text-transform: uppercase; font-weight: 500;
  transition: color .2s;
}
.main-nav a:hover { color: var(--silver); }
.nav-cta {
  border: 1px solid var(--silver); padding: 9px 20px; border-radius: var(--radius);
}
.nav-phone { font-weight: 600; letter-spacing: .06em !important; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--cream); margin: 6px 0; }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
  background:
    linear-gradient(160deg, rgba(16,26,38,.94) 0%, rgba(16,26,38,.82) 55%, rgba(16,26,38,.94) 100%),
    repeating-linear-gradient(45deg, #1a2736 0 2px, #141f2c 2px 26px);
  color: var(--cream);
  text-align: center;
  padding: 140px 0 90px;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg svg { width: 100%; height: 100%; display: block; }
.bp-grid { animation: gridDrift 70s linear infinite alternate; }
@keyframes gridDrift {
  from { transform: translate(0, 0); }
  to   { transform: translate(-48px, -30px); }
}
.bp-static path {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: bpDraw 1.4s ease forwards;
}
@keyframes bpDraw { to { stroke-dashoffset: 0; } }

/* cycling blueprint homes: draw -> hold -> un-draw, six styles on rotation */
.hcyc path {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: bpCycle 24s linear infinite;
}
.hcyc text { opacity: 0; animation: txtCycle 24s linear infinite; }
.hA1 path, .hA1 text { animation-delay: 0s; }
.hB1 path, .hB1 text { animation-delay: 4s; }
.hA2 path, .hA2 text { animation-delay: 8s; }
.hB2 path, .hB2 text { animation-delay: 12s; }
.hA3 path, .hA3 text { animation-delay: 16s; }
.hB3 path, .hB3 text { animation-delay: 20s; }
@keyframes bpCycle {
  0%    { stroke-dashoffset: 1; }
  7%    { stroke-dashoffset: 0; }
  28%   { stroke-dashoffset: 0; }
  33.3% { stroke-dashoffset: 1; }
  100%  { stroke-dashoffset: 1; }
}
@keyframes txtCycle {
  0%, 8%       { opacity: 0; }
  13%          { opacity: .9; }
  27%          { opacity: .9; }
  32%, 100%    { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bp-grid, .hcyc path, .hcyc text { animation: none; }
  .bp-static path { animation: none; stroke-dashoffset: 0; }
  .hA1 path { stroke-dashoffset: 0; }
  .hA1 text { opacity: .9; }
}
/* phones: the wide scene crops to its center, so shift the left house slot
   into view, hide the right slot, and tighten the annotations */
@media (max-width: 740px) {
  .hB1, .hB2, .hB3 { display: none; }
  .hA1, .hA2, .hA3 { transform: translateX(474px); stroke: rgba(170,190,206,.26); }
  .hcyc text { font-size: 15px; letter-spacing: 1.5px; transform: translateY(348px); fill: rgba(170,190,206,.5); }
  .bp-static path:nth-of-type(2), .bp-static path:nth-of-type(3) { display: none; }
}

.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(160deg, rgba(10,14,20,.82) 0%, rgba(10,14,20,.55) 55%, rgba(10,14,20,.85) 100%);
}
.hero .wrap { position: relative; z-index: 2; }

/* keyline frame */
.hero-frame {
  position: absolute; inset: 104px 28px 28px; z-index: 1;
  border: 1px solid rgba(245, 242, 236, .30);
  pointer-events: none;
}
.hero-frame .corner {
  position: absolute; width: 26px; height: 26px;
  border-color: rgba(245, 242, 236, .85); border-style: solid; border-width: 0;
}
.hero-frame .tl { top: -1px; left: -1px; border-top-width: 3px; border-left-width: 3px; }
.hero-frame .tr { top: -1px; right: -1px; border-top-width: 3px; border-right-width: 3px; }
.hero-frame .bl { bottom: -1px; left: -1px; border-bottom-width: 3px; border-left-width: 3px; }
.hero-frame .br { bottom: -1px; right: -1px; border-bottom-width: 3px; border-right-width: 3px; }

.logo-spin { perspective: 1200px; margin: 6px auto 26px; display: inline-block; }
.hero-logo {
  width: min(400px, 68vw); height: auto;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,.45));
  transform-style: preserve-3d;
  animation: logoSpin 10s linear infinite;
}
@keyframes logoSpin {
  0%   { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}
.logo-shadow {
  width: 62%; height: 16px; margin: 10px auto 0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.5) 0%, rgba(0,0,0,0) 70%);
  animation: shadowPulse 10s linear infinite;
}
@keyframes shadowPulse {
  0%, 50%, 100% { transform: scaleX(1); opacity: .9; }
  25%, 75%      { transform: scaleX(.35); opacity: .55; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-logo, .logo-shadow { animation: none; }
}
.hero .eyebrow {
  letter-spacing: .3em; font-size: 13px; text-transform: uppercase;
  color: var(--silver); margin-bottom: 22px; font-weight: 500;
}
.hero h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem); letter-spacing: .02em;
  font-weight: 700; font-style: italic; line-height: 1.12;
  margin-bottom: 22px;
}
.hero h1 .chrome-text {
  background: var(--chrome);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead {
  max-width: 640px; margin: 0 auto 40px; font-weight: 300;
  font-size: 1.1rem; color: #d8d4cb;
}
.lead-short { display: none; }
.eb-short { display: none; }
@media (max-width: 740px) {
  .eb-full { display: none; }
  .eb-short { display: inline; }
}
@media (max-width: 740px) {
  .lead-full { display: none; }
  .lead-short { display: block; margin-bottom: 32px; }
  .hero-logo { width: min(300px, 58vw); }
  .hero .eyebrow { margin-bottom: 16px; font-size: 11px; }
  .hero h1 { margin-bottom: 16px; }
  .logo-spin { margin-bottom: 18px; }
}
.cta-row { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; font-size: 14px;
  padding: 15px 34px; border-radius: var(--radius); transition: all .25s;
}
.btn-solid { background: var(--cream); color: var(--navy); }
.btn-solid:hover { background: var(--silver); }
.btn-ghost { border: 1px solid var(--silver); color: var(--cream); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }

/* ---------- sections ---------- */
section { padding: 96px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-head .kicker {
  letter-spacing: .28em; font-size: 12px; text-transform: uppercase;
  color: var(--gray); font-weight: 600; display: block; margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 700; font-style: italic; }
.section-head .rule {
  width: 74px; height: 3px; background: var(--chrome);
  margin: 20px auto 0; border-radius: 2px;
}
.section-head p { margin-top: 18px; color: var(--gray); font-weight: 300; }

/* promise strip / why phb */
.promise { background: var(--cream); padding: 84px 0; }
.promise-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px; text-align: center; }
.promise-grid h3 { font-size: 1.05rem; letter-spacing: .06em; margin: 14px 0 8px; }
.promise-grid p { color: var(--gray); font-size: .95rem; font-weight: 300; }
.promise-grid svg { display: block; margin: 0 auto; }

/* services */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px 26px; transition: transform .25s, box-shadow .25s;
  background: var(--paper);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(16,26,38,.10); }
.card h3 { font-size: 1.05rem; margin: 18px 0 10px; letter-spacing: .04em; }
.card p { color: var(--gray); font-size: .93rem; font-weight: 300; }

/* gallery */
.gallery { background: var(--navy); }
.gallery .section-head h2, .gallery .section-head .kicker { color: var(--cream); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile {
  aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  display: flex; align-items: flex-end; position: relative;
  background: linear-gradient(150deg, #24344a 0%, #17222f 60%, #101a26 100%);
  border: 1px solid rgba(255,255,255,.07);
}
.tile::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(-45deg, transparent 0 18px, rgba(255,255,255,.025) 18px 36px);
}
.tile .label {
  position: relative; padding: 14px 16px; font-size: .8rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--silver);
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* testimonial */
.testimonial { background: var(--cream); text-align: center; }
.testimonial blockquote {
  max-width: 760px; margin: 0 auto; font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  font-style: italic; font-weight: 300; line-height: 1.6;
}
.testimonial cite {
  display: block; margin-top: 26px; font-style: normal; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; font-size: .8rem; color: var(--gray);
}

/* process */
.process { background: var(--cream); }
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px; }
.step { position: relative; padding-top: 8px; }
.step-num {
  display: block; font-size: 2.6rem; font-weight: 700; font-style: italic;
  background: linear-gradient(180deg, #b9b9b9, #7d7d7d);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1; margin-bottom: 14px;
}
.step h3 { font-size: 1.02rem; letter-spacing: .04em; margin-bottom: 8px; }
.step p { color: var(--gray); font-size: .93rem; font-weight: 300; }
@media (max-width: 900px) { .process-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .process-grid { grid-template-columns: 1fr; } }

/* about / service area */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.about-grid h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-style: italic; margin-bottom: 18px; }
.about-grid p { color: var(--gray); font-weight: 300; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.chip {
  border: 1px solid var(--line); border-radius: 100px; padding: 8px 18px;
  font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--charcoal);
}
.about-visual {
  aspect-ratio: 1; border-radius: var(--radius);
  background: linear-gradient(150deg, #24344a 0%, #17222f 60%, #101a26 100%);
  display: flex; align-items: center; justify-content: center;
}
.about-visual img { width: 72%; height: auto; }

/* contact */
.contact { background: var(--navy); color: var(--cream); }
.contact .section-head h2, .contact .section-head .kicker { color: var(--cream); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contact-info h3 { font-size: 1rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 8px; color: var(--silver); }
.contact-info p { font-weight: 300; color: #d8d4cb; margin-bottom: 28px; }
.contact-info a { color: var(--cream); }
form .field { margin-bottom: 18px; }
form label { display: block; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; color: var(--silver); }
form input, form textarea, form select {
  width: 100%; padding: 13px 16px; border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.05);
  color: var(--cream); font-family: inherit; font-size: .95rem;
}
form select { appearance: none; }
form select option { color: var(--charcoal); }
form input::placeholder { color: rgba(245,242,236,.4); }
form input:focus, form textarea:focus, form select:focus { outline: 1px solid var(--silver); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.big-phone {
  font-size: 1.6rem; font-weight: 700; font-style: italic;
  text-decoration: none; letter-spacing: .02em;
}
.contact-info .btn { margin-top: 6px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
form .btn-solid { border: 0; cursor: pointer; }

/* outro brand moment */
.outro { background: var(--paper); text-align: center; padding: 110px 0 100px; }
.outro-logo {
  width: min(340px, 66vw); margin: 0 auto 22px;
  opacity: 0; transform: scale(.6);
  transition: opacity .8s ease, transform .9s cubic-bezier(.2, .9, .3, 1.15);
}
.outro-tag {
  letter-spacing: .38em; text-transform: uppercase; font-weight: 600;
  font-size: .92rem; color: var(--charcoal);
  opacity: 0; transform: translateY(12px);
  transition: opacity .7s ease .55s, transform .7s ease .55s;
}
.outro.visible .outro-logo { opacity: 1; transform: scale(1); }
.outro.visible .outro-tag { opacity: 1; transform: none; }
.outro.reveal { opacity: 1 !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  .outro-logo, .outro-tag { opacity: 1; transform: none; transition: none; }
}

/* footer */
.site-footer { background: #0b121b; color: #8f9aa8; padding: 54px 0 34px; }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.site-footer img { height: 74px; }
.footer-nav { display: flex; gap: 24px; }
.footer-nav a { color: #8f9aa8; text-decoration: none; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; }
.footer-nav a:hover { color: var(--cream); }
.copyright { width: 100%; text-align: center; font-size: .8rem; margin-top: 34px; font-weight: 300; }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .promise-grid { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 720px) {
  .main-nav {
    position: fixed; top: 76px; right: 0; left: 0;
    background: var(--navy); flex-direction: column; padding: 28px 0;
    display: none;
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .gallery-grid { grid-template-columns: 1fr; }
}
