/*
Theme Name: Coastline
Theme URI: https://example.com/coastline
Author: Howard Kessa
Description: A block theme for a South Florida custom home builder. Dusk photography carried full bleed behind a light didone headline, with the warm interior light of the house doing the work that an accent colour usually does. Built to sell a house you cannot photograph in daylight without losing what makes it worth the money.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: coastline
*/

*, *::before, *::after { box-sizing: border-box; }

:root {
  --cb-ground: var(--wp--preset--color--ground);
  --cb-deep:   var(--wp--preset--color--deep);
  --cb-raised: var(--wp--preset--color--raised);
  --cb-ink:    var(--wp--preset--color--ink);
  --cb-muted:  var(--wp--preset--color--muted);
  --cb-accent: var(--wp--preset--color--accent);
  --cb-gold:   var(--wp--preset--color--gold);
  --cb-line:   var(--wp--preset--color--line);
}

html, body { max-width: 100%; overflow-x: hidden; }
body { background: var(--cb-ground); color: var(--cb-ink); }
h1, h2, h3 { text-wrap: balance; }

.cb-wrap { max-width: 1320px; margin: 0 auto; }

.cb-skip { position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--cb-accent); color: #0a0c10; padding: 0.7rem 1.1rem; font-weight: 500; }
.cb-skip:focus { left: 0; }
:where(a, button, [tabindex]):focus-visible { outline: 2px solid var(--cb-accent); outline-offset: 3px; }

/* ────────────────────────────────────────────────────────────────── header */

/* Sits over the photograph rather than above it, which is why it has no
   background of its own and why the hero carries top padding instead. */
.cb-head { position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  padding: 0 clamp(1.25rem, 5vw, 4.5rem); }
.cb-bar { max-width: 1320px; margin: 0 auto; display: flex; align-items: center;
  justify-content: space-between; gap: 2rem; min-height: 6.2rem; }
.cb-logo { display: block; flex: none; }
.cb-logo img { display: block; width: clamp(150px, 15vw, 200px); height: auto; }
.cb-nav { display: flex; align-items: center; gap: 0.5rem 2.4rem; flex-wrap: wrap; }
.cb-nav a { color: var(--cb-ink); text-decoration: none; font-size: 0.9375rem;
  font-weight: 300; letter-spacing: 0.045em; opacity: 0.86; }
.cb-nav a:hover, .cb-nav a[aria-current="page"] { opacity: 1; color: var(--cb-gold); }
.cb-quote { border: 1px solid var(--cb-accent); border-radius: 2px;
  padding: 0.72rem 1.5rem; font-size: 0.9375rem; letter-spacing: 0.04em;
  opacity: 1 !important; }
.cb-quote:hover { background: var(--cb-accent); color: #0a0c10 !important; }
@media (max-width: 980px) {
  .cb-bar { min-height: 0; padding: 1.1rem 0; flex-direction: column; align-items: stretch; }
  .cb-nav { width: 100%; gap: 0.6rem 1.5rem; }
}

/* ──────────────────────────────────────────────────────────────────── hero */

/* The photograph is the argument, so it runs the full width and the type sits
   inside it. The gradient is a real element rather than an overlay filter:
   filters on a full viewport image are what make a page like this stutter. */
.cb-hero { position: relative; min-height: min(92vh, 900px); display: flex;
  align-items: flex-end; overflow: hidden; }
.cb-hero-img { position: absolute; inset: 0; }
.cb-hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; display: block; }
.cb-hero-veil { position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10,12,16,0.94) 0%, rgba(10,12,16,0.82) 34%, rgba(10,12,16,0.22) 62%, rgba(10,12,16,0.05) 100%),
    linear-gradient(0deg, rgba(10,12,16,0.85) 0%, rgba(10,12,16,0) 42%); }
.cb-hero-in { position: relative; z-index: 2; width: 100%; max-width: 1320px;
  margin: 0 auto; padding: 10rem clamp(1.25rem, 5vw, 4.5rem) clamp(3rem, 6vw, 5rem); }
.cb-hero h1 { margin: 0; max-width: 13ch; }
.cb-hero-sub { margin: 1.7rem 0 0; max-width: 26rem; font-size: 1.0625rem;
  line-height: 1.7; color: var(--cb-ink); opacity: 0.82; }
.cb-hero-acts { margin-top: 2.4rem; }

.cb-btn { display: inline-flex; align-items: center; gap: 0.85rem;
  border: 1px solid var(--cb-accent); border-radius: 2px; padding: 0.95rem 1.7rem;
  color: var(--cb-ink); text-decoration: none; font-size: 0.9375rem; letter-spacing: 0.06em; }
.cb-btn:hover { background: var(--cb-accent); color: #0a0c10; }
.cb-btn svg { width: 1.1em; height: 1.1em; flex: none; }
.cb-btn-solid { background: var(--cb-accent); color: #0a0c10; border-color: var(--cb-accent); }
.cb-btn-solid:hover { background: var(--cb-gold); border-color: var(--cb-gold); color: #0a0c10; }

/* ─────────────────────────────────────────────────────────────────── stats */

/* Three facts on hairlines, the way a builder's letterhead would set them. */
.cb-stats { border-top: 1px solid var(--cb-line); border-bottom: 1px solid var(--cb-line);
  background: var(--cb-deep); }
.cb-stats-in { max-width: 1320px; margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 4.5rem);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cb-stat { display: flex; align-items: center; gap: 1.1rem; padding: 2.1rem 0 2.2rem; }
.cb-stat + .cb-stat { border-left: 1px solid var(--cb-line); padding-left: clamp(1.5rem, 4vw, 3.5rem); }
.cb-stat svg { width: 1.9rem; height: 1.9rem; flex: none; stroke: var(--cb-accent);
  fill: none; stroke-width: 1.1; }
.cb-stat b { display: block; font-family: var(--wp--preset--font-family--display);
  font-weight: 400; font-size: 1.45rem; line-height: 1.1; letter-spacing: 0.01em; }
.cb-stat span { display: block; margin-top: 0.28rem; font-size: 0.8125rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--cb-muted); }
@media (max-width: 820px) {
  .cb-stats-in { grid-template-columns: 1fr; }
  .cb-stat + .cb-stat { border-left: 0; border-top: 1px solid var(--cb-line); padding-left: 0; }
}

/* ─────────────────────────────────────────────────────────────── sections */

.cb-sec { padding: clamp(4.5rem, 9vw, 8rem) clamp(1.25rem, 5vw, 4.5rem); }
.cb-eyebrow { margin: 0 0 1.4rem; font-size: 0.75rem; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--cb-accent); }
.cb-lede { margin: 1.5rem 0 0; max-width: 40rem; font-size: 1.0625rem;
  line-height: 1.75; color: var(--cb-muted); }
.cb-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
@media (max-width: 900px) { .cb-split { grid-template-columns: 1fr; } }

/* ──────────────────────────────────────────────────────────────── projects */

.cb-projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.4rem, 2.5vw, 2.2rem); margin-top: 3.4rem; }
@media (max-width: 980px) { .cb-projects { grid-template-columns: 1fr; } }
.cb-proj figure { margin: 0; overflow: hidden; background: var(--cb-raised); }
.cb-proj img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.cb-proj h3 { margin: 1.2rem 0 0.35rem; }
.cb-proj p { margin: 0; font-size: 0.9375rem; color: var(--cb-muted); }
.cb-proj-meta { margin-top: 0.7rem; font-size: 0.75rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--cb-accent); }

/* ───────────────────────────────────────────────────────────────── process */

.cb-steps { margin-top: 3.4rem; border-top: 1px solid var(--cb-line); }
.cb-step { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem); padding: 2.2rem 0;
  border-bottom: 1px solid var(--cb-line); }
.cb-step > .cb-step-n { font-family: var(--wp--preset--font-family--display);
  font-weight: 300; font-size: 2.3rem; line-height: 1; color: var(--cb-accent);
  font-variant-numeric: tabular-nums; }
.cb-step h3 { margin: 0 0 0.5rem; }
.cb-step p { margin: 0; font-size: 0.9688rem; color: var(--cb-muted); max-width: 46rem; }
@media (max-width: 640px) { .cb-step { grid-template-columns: 1fr; gap: 0.8rem; } }

/* ───────────────────────────────────────────────────────────────── closing */

.cb-quote-block { border-left: 1px solid var(--cb-accent); padding-left: clamp(1.5rem, 3vw, 2.5rem);
  font-family: var(--wp--preset--font-family--display); font-weight: 300;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.38; margin: 0; }
.cb-quote-block cite { display: block; margin-top: 1.2rem; font-style: normal;
  font-family: var(--wp--preset--font-family--body); font-size: 0.8125rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--cb-muted); }

.cb-cta { background: var(--cb-deep); border-top: 1px solid var(--cb-line); }
.cb-contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; background: var(--cb-line); border: 1px solid var(--cb-line); margin-top: 2.8rem; }
.cb-contact > a, .cb-contact > div { background: var(--cb-deep); padding: 1.6rem 1.7rem 1.8rem;
  text-decoration: none; display: block; }
.cb-contact > a:hover { background: var(--cb-raised); }
.cb-contact small { display: block; font-size: 0.6875rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--cb-muted); margin-bottom: 0.6rem; }
.cb-contact b { display: block; font-family: var(--wp--preset--font-family--display);
  font-weight: 400; font-size: 1.25rem; color: var(--cb-ink); }
@media (max-width: 700px) { .cb-contact { grid-template-columns: 1fr; } }

/* ────────────────────────────────────────────────────────────────── footer */

.cb-foot { border-top: 1px solid var(--cb-line); padding: 3.4rem clamp(1.25rem, 5vw, 4.5rem) 2.6rem; }
.cb-foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 760px) { .cb-foot-grid { grid-template-columns: 1fr 1fr; }
  .cb-foot-grid > :first-child { grid-column: 1 / -1; } }
.cb-foot img { width: 190px; height: auto; display: block; }
.cb-foot h5 { margin: 0 0 0.9rem; font-size: 0.6875rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--cb-muted); font-weight: 400; }
.cb-foot ul { margin: 0; padding: 0; list-style: none; }
.cb-foot li { margin-bottom: 0.55rem; }
.cb-foot a { color: var(--cb-ink); text-decoration: none; font-size: 0.9375rem; opacity: 0.86; }
.cb-foot a:hover { opacity: 1; color: var(--cb-gold); }
.cb-legal { margin: 2.8rem 0 0; font-size: 0.8125rem; line-height: 1.6; color: var(--cb-muted); max-width: 54rem; }

/* ────────────────────────────────────────────────────────────────── motion */

.cb-in { opacity: 0; transform: translateY(12px); }
.cb-in.is-in { opacity: 1; transform: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1); }
@media (prefers-reduced-motion: reduce) {
  .cb-in, .cb-in.is-in { opacity: 1; transform: none; transition: none; }
}

/* Inner pages have no photograph behind the masthead, so the first section has
   to clear the absolutely positioned header itself. */
.cb-top { padding-top: clamp(9rem, 14vw, 12rem); }
.cb-page-lede { margin: 1.8rem 0 0; max-width: 44rem;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.7; color: var(--cb-muted); }
.cb-facts { margin: 0; display: grid; grid-template-columns: auto minmax(0,1fr);
  gap: 0.7rem 1.6rem; font-size: 0.9688rem; }
.cb-facts dt { color: var(--cb-muted); font-size: 0.8125rem; letter-spacing: 0.14em;
  text-transform: uppercase; padding-top: 0.22rem; white-space: nowrap; }
.cb-facts dd { margin: 0; }

.cb-body { padding: 9rem clamp(1.25rem, 5vw, 4.5rem) 5rem; }
