/* Template: Keystone. Layout only: colours come from the theme tokens.
   Bold by default: the headline sits on a full brand-colour panel beside the client's
   own photo (text never sits on the photo, so contrast is always the checked
   brand/brand-ink pair). */
.hero { padding: 0 0 clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--border); background: var(--surface); }
.hero-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: clamp(420px, 52vw, 640px); }
.hero-copy { background: var(--brand); color: var(--brand-ink); display: flex; align-items: center; justify-content: flex-end; }
.hero-copy-inner { width: 100%; max-width: calc(var(--maxw) / 2); padding: clamp(40px, 6vw, 80px) clamp(20px, 4vw, 56px) clamp(56px, 7vw, 96px) 20px; }
.hero .eyebrow, .hero-copy .hero-lede { color: var(--brand-ink); }
.hero-copy .hero-lede { opacity: 1; }
.hero h1 { color: var(--brand-ink); max-width: 14ch; font-size: clamp(2.2rem, 1.2rem + 3.6vw, 3.8rem); }
.hero-copy .btn-primary { background: var(--brand-ink); color: var(--brand); }
.hero-copy .btn-ghost { color: var(--brand-ink); border-color: var(--brand-ink); }
.hero-actions .btn { font-size: 1.05rem; padding: 14px 24px; }
.hero-proof { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 8px; }
.hero-proof li { position: relative; padding-left: 26px; font-weight: 700; }
.hero-proof li::before { content: ""; position: absolute; left: 2px; top: 0.38em; width: 12px; height: 7px; border-left: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: rotate(-45deg); }
.hero-photo { margin: 0; position: relative; background: var(--border); }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.hero-card-wrap { position: relative; margin-top: clamp(-72px, -6vw, -40px); display: flex; justify-content: flex-end; }
.hero-card { width: min(100%, 460px); background: var(--bg); border: 1px solid var(--border); border-top: 6px solid var(--accent); border-radius: var(--radius); padding: clamp(20px, 3vw, 28px); box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--text) 45%, transparent); }
.hero-card-title { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 1.3rem; margin: 0 0 8px; }
.hero-card p { margin: 0 0 16px; color: var(--text-soft); }
.hero-facts { margin: 0 0 16px; display: grid; gap: 10px; }
.hero-facts div { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.hero-facts dt { font-weight: 700; color: var(--text-dim); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.hero-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.hero-card-link { font-weight: 700; text-underline-offset: 3px; }

/* Wide screens: the card becomes a full-width strip under the hero, so nothing hangs off one side */
@media (min-width: 900px) {
  .hero-card { width: 100%; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; grid-template-areas: "title facts link" "text facts link"; gap: 4px 36px; align-items: center; }
  .hero-card-title { grid-area: title; }
  .hero-card p { grid-area: text; margin: 0; }
  .hero-facts { grid-area: facts; margin: 0; }
  .hero-card-link { grid-area: link; }
}

/* Services: sturdy cards with a working-colour edge */
#services .card { border-left: 5px solid var(--accent); }
#services .card h3 { font-size: 1.25rem; }

/* Phones: photo under the headline, and a call button that stays put */
.call-bar { display: none; }
@media (max-width: 760px) {
  .hero-split { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { justify-content: flex-start; }
  .hero-copy-inner { max-width: none; padding: 36px 20px 40px; }
  /* Phones: the photo leads, so the first screen is never just a block of text. */
  .hero-photo { order: -1; aspect-ratio: 16 / 10; }
  .hero-copy-inner { padding-top: 28px; }
  .hero-card-wrap { margin-top: -28px; }
}
@media (max-width: 700px) {
  .call-bar { display: block; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; text-align: center; font-weight: 700; font-size: 1.05rem; padding: 14px; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); text-decoration: none; box-shadow: 0 8px 24px -10px var(--text); }
  body { padding-bottom: 84px; }
  /* With the script running, it waits until the hero's own call button has scrolled away. */
  .call-bar-ready .call-bar { transform: translateY(calc(100% + 24px)); visibility: hidden; transition: transform 0.25s ease, visibility 0s linear 0.25s; }
  .call-bar-ready.call-bar-on .call-bar { transform: none; visibility: visible; transition: transform 0.25s ease; }
}
@media (max-width: 700px) and (prefers-reduced-motion: reduce) { .call-bar-ready .call-bar, .call-bar-ready.call-bar-on .call-bar { transition: none; } }
