/* =========================================================
   Jo Brown — one-page site
   Palette drawn from the street render and Jo's portrait.
   Signature: the townhouse gable frame in the hero.
   ========================================================= */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --navy: #16263A;       /* Jo's top */
  --navy-2: #213A56;
  --brick: #A3452F;      /* brick facade */
  --brick-dark: #86361F;
  --sky: #E4EEF6;        /* render sky, tinted */
  --stone: #EEEEEB;
  --eucalypt: #4E6B57;   /* landscaping */
  --slate: #4A5663;
  --line: #D3D8DD;
  --white: #FFFFFF;

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;

  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lede: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
  --fs-h3: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
  --fs-h2: clamp(2rem, 1.35rem + 2.5vw, 3.1rem);
  --fs-h1: clamp(3.2rem, 1.9rem + 5.2vw, 6.25rem);

  --wrap: 1200px;
  --gutter: max(clamp(1.25rem, 4vw, 3rem), env(safe-area-inset-left), env(safe-area-inset-right));
  --section: clamp(3.75rem, 9vw, 8rem);
  --header-h: 76px;
  --radius: 8px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  font-family: var(--body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul[class] { list-style: none; padding: 0; }
p, li, blockquote { text-wrap: pretty; }

h1, h2, h3 {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: 800; font-stretch: 90%; letter-spacing: -0.035em; line-height: 0.95; }
h2 { font-size: var(--fs-h2); font-stretch: 92%; letter-spacing: -0.025em; }
h3 { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -0.005em; }
.lede { font-size: var(--fs-lede); line-height: 1.55; }
.prose > * + * { margin-top: 1.1em; }
.muted { color: var(--slate); }

a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--brick); outline-offset: 3px; }
.contact :focus-visible { outline-color: var(--white); }
.contact .form-card :focus-visible { outline-color: var(--brick); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--navy); color: var(--white); padding: 0.75rem 1rem; }
.skip:focus { top: 1rem; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--section); }
.section--stone { background: var(--stone); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3.25rem; padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--brick);
  background: var(--brick); color: var(--white);
  font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btns { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { height: var(--header-h); display: flex; align-items: center; gap: 2rem; }
.wordmark {
  font-family: var(--display); font-weight: 800; font-stretch: 90%;
  font-size: 1.6rem; letter-spacing: -0.03em; text-decoration: none; margin-right: auto;
}
.nav { display: flex; gap: 1.75rem; }
.nav a { text-decoration: none; font-weight: 500; padding-block: 0.4rem; }
.header-actions { display: flex; align-items: center; gap: 1rem; }
.header-phone { font-weight: 600; text-decoration: none; white-space: nowrap; }
.header-actions .btn { min-height: 2.75rem; padding: 0.55rem 1.1rem; }
.header-call { display: none; }

@media (max-width: 999px) { .nav { display: none; } }

/* ---------- Hero ---------- */
.hero { background: var(--sky); overflow: hidden; }
.hero__grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
}
.hero__text { align-self: center; padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.hero__text .lede { margin-top: 1.5rem; max-width: 34em; color: #2B3B4E; }
.hero__text .btns { margin-top: 2rem; }
.hero__note { margin-top: 1.25rem; font-size: var(--fs-sm); color: var(--slate); }

/* the gable: a townhouse roofline framing the street, Jo standing in front */
.gable {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 5 / 6;
  margin-left: auto;
  margin-top: 4rem;
}
.gable__house {
  position: absolute; inset: 0;
  clip-path: polygon(50% 0, 100% 26%, 100% 100%, 0 100%, 0 26%);
  background: #C9D8E5;
}
.gable__house img { width: 100%; height: 100%; object-fit: cover; object-position: 44% 60%; }
.gable__jo {
  position: absolute; bottom: 0; left: 50%;
  height: 114%; width: auto; max-width: none;
  translate: -50% 0;
  filter: drop-shadow(0 12px 24px rgb(22 38 58 / 0.25));
}
@media (prefers-reduced-motion: no-preference) {
  .gable__house img { animation: settle 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .gable__jo { animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.25, 1) 0.25s both; }
  @keyframes settle { from { scale: 1.08; } }
  @keyframes rise { from { opacity: 0; translate: -50% 28px; } }
}

@media (max-width: 859px) {
  .hero__grid { grid-template-columns: 1fr; gap: 0; }
  .hero__text { padding-bottom: 1rem; }
  .gable { margin-inline: auto; width: min(86%, 420px); margin-top: 3.5rem; }
}

/* ---------- About ---------- */
.about__grid { display: grid; gap: clamp(2.5rem, 5vw, 5rem); align-items: start; }
@media (min-width: 900px) { .about__grid { grid-template-columns: 7fr 5fr; } }
.about__main h2 { max-width: 16ch; }
.about__main .prose { margin-top: 1.75rem; max-width: 62ch; }

.aside-card {
  background: var(--stone);
  border-radius: 12px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 5px solid var(--eucalypt);
}
.aside-card h3 { margin-bottom: 0.75rem; }
.aside-card p { color: var(--slate); }

.record {
  margin-top: clamp(3.5rem, 7vw, 6rem);
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
}
.record__intro { display: grid; gap: 1.25rem 3rem; align-items: start; }
@media (min-width: 900px) { .record__intro { grid-template-columns: 5fr 7fr; } }
.record__title {
  font-size: clamp(1.6rem, 1.15rem + 1.7vw, 2.4rem);
  font-stretch: 92%; letter-spacing: -0.022em; line-height: 1.1;
  max-width: 15ch;
}
.record__intro .lede { max-width: 50ch; }

.media-strip { margin-top: clamp(2.25rem, 4vw, 3rem); padding-top: 1.5rem; border-top: 1px solid var(--line); }
.media-strip > p { color: var(--slate); font-size: var(--fs-sm); }
.media { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.75rem; margin-top: 0.85rem; }
.media li {
  font-family: var(--display); font-weight: 700; font-stretch: 92%;
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem); letter-spacing: -0.01em;
  color: var(--navy);
}
.media__last { white-space: nowrap; }
.media__more { margin-left: 0.6rem; font-family: var(--body); font-weight: 500; font-size: var(--fs-sm); letter-spacing: 0; color: var(--slate); }

.statement {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  background: var(--sky);
  border-radius: 14px;
  padding: clamp(1.75rem, 4vw, 3rem);
  display: grid; gap: 1.5rem 3rem; align-items: center;
}
@media (min-width: 760px) { .statement { grid-template-columns: 1fr auto; } }
.statement__text {
  font-family: var(--display); font-weight: 600; font-stretch: 95%;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); line-height: 1.25; letter-spacing: -0.015em;
  max-width: 34ch;
}

/* ---------- Expertise ---------- */
.expertise__grid { display: grid; gap: clamp(2.5rem, 5vw, 5rem); align-items: start; }
@media (min-width: 900px) {
  .expertise__grid { grid-template-columns: 5fr 7fr; }
  .expertise__aside { position: sticky; top: calc(var(--header-h) + 2rem); }
}
.expertise__photos { display: grid; gap: 1rem; margin-top: 2rem; }
.expertise__photos img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
@media (min-width: 600px) and (max-width: 899px) { .expertise__photos { grid-template-columns: 1fr 1fr; } }

.expertise__list li { position: relative; padding: 1.75rem 0 1.75rem 2.5rem; border-top: 1px solid #CFD2D4; }
.expertise__list li:last-child { border-bottom: 1px solid #CFD2D4; }
/* small gable marker, echoing the hero frame */
.expertise__list li::before {
  content: ""; position: absolute; left: 0; top: 2.05rem;
  width: 1.1rem; height: 1.25rem; background: var(--eucalypt);
  clip-path: polygon(50% 0, 100% 32%, 100% 100%, 0 100%, 0 32%);
}
.expertise__list h3 { max-width: 38ch; }
.expertise__list p { margin-top: 0.6rem; color: var(--slate); max-width: 62ch; }

/* ---------- Testimonials ---------- */
.clients__head { max-width: 40rem; }
.clients__head p { margin-top: 1rem; }
.quotes { display: grid; gap: 1.25rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
@media (min-width: 900px) { .quotes { grid-template-columns: repeat(3, 1fr); } }
.quote {
  display: flex; flex-direction: column;
  background: var(--sky);
  border-radius: 12px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.quote::before {
  content: "\201C"; font-family: var(--display); font-weight: 800;
  font-size: 4.5rem; line-height: 0.7; color: var(--brick); height: 2.1rem;
}
.quote blockquote { margin-top: 0.75rem; font-size: 1.0625rem; line-height: 1.6; }
.quote figcaption { margin-top: auto; padding-top: 1.5rem; font-size: var(--fs-sm); color: var(--slate); }
.quote figcaption strong { display: block; color: var(--navy); font-weight: 600; font-size: var(--fs-base); }

/* ---------- Contact ---------- */
.contact { background: var(--navy); color: #D5DDE6; }
.contact h2 { color: var(--white); max-width: 17ch; }
.contact__grid { display: grid; gap: clamp(2.5rem, 5vw, 5rem); align-items: start; }
@media (min-width: 960px) { .contact__grid { grid-template-columns: 6fr 5fr; } }
.contact__text .lede { margin-top: 1.5rem; max-width: 40ch; }
.office { display: grid; grid-template-columns: repeat(2, max-content); gap: 1.25rem 3rem; margin-top: 2.5rem; }
.office dt { font-size: var(--fs-sm); color: #9FB0C2; }
.office dd { color: var(--white); font-weight: 500; font-size: 1.125rem; line-height: 1.45; }
.office a { color: var(--white); }
@media (max-width: 479px) { .office { grid-template-columns: 1fr; } }

.form-card { background: var(--white); color: var(--navy); border-radius: 14px; padding: clamp(1.5rem, 4vw, 2.5rem); }
.form-card h3 { font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.7rem); font-stretch: 94%; letter-spacing: -0.02em; line-height: 1.15; }
.form-card > p { margin-top: 0.5rem; color: var(--slate); font-size: var(--fs-sm); }
.form { display: grid; gap: 1.1rem; margin-top: 1.75rem; }
.form__row { display: grid; gap: 1.1rem; }
@media (min-width: 480px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 600; font-size: var(--fs-sm); }
.field .optional { font-weight: 400; color: var(--slate); }
.field input {
  width: 100%; min-height: 3.15rem; padding: 0.7rem 0.9rem;
  border: 1.5px solid #B7C0C9; border-radius: 6px; background: var(--white);
}
.field input:focus-visible { outline: 3px solid var(--brick); outline-offset: 0; border-color: var(--brick); }
.field [aria-invalid="true"] { border-color: #B3261E; }
.field__error { color: #B3261E; font-size: 0.875rem; font-weight: 600; }
.field__error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { width: 100%; margin-top: 0.25rem; }
.form button[aria-busy="true"] { opacity: 0.7; pointer-events: none; }
.form__status { padding: 0.9rem 1rem; border-radius: 6px; font-weight: 600; font-size: var(--fs-sm); }
.form__status:empty { display: none; }
.form__status[data-state="ok"] { background: #E5EFE8; color: #24452F; border-left: 4px solid var(--eucalypt); }
.form__status[data-state="error"] { background: #FBE9E7; color: #7A1A12; border-left: 4px solid #B3261E; }
.form__fine { font-size: 0.875rem; color: var(--slate); }

/* ---------- Footer ---------- */
.site-footer { background: #0F1B2A; color: #9FB0C2; padding-block: 2rem; font-size: var(--fs-sm); }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
.site-footer a { color: #C9D4DF; }
.disclaimer { margin-top: 1.25rem; max-width: 90ch; font-size: 0.8125rem; line-height: 1.55; }
.site-footer a[href^="tel"], .office a { white-space: nowrap; }

/* =========================================================
   Hover only where hover exists (no sticky hover on touch)
   ========================================================= */
@media (hover: hover) {
  .btn:hover { background: var(--brick-dark); border-color: var(--brick-dark); }
  .btn--ghost:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
  .nav a:hover { text-decoration: underline; text-decoration-color: var(--brick); }
  .header-phone:hover { text-decoration: underline; }
  .field input:hover { border-color: var(--slate); }
}

/* ---------- Touch feedback ---------- */
html { -webkit-tap-highlight-color: transparent; }
.btn:active { transform: translateY(1px); }
.site-footer a, .office a { display: inline-block; padding-block: 0.5rem; margin-block: -0.5rem; }

/* =========================================================
   Phones and small tablets
   ========================================================= */
.action-bar { display: none; }

@media (max-width: 859px) {
  :root { --header-h: 64px; }
  html { scroll-padding-top: 1rem; }

  /* header scrolls away; the bottom bar carries the actions */
  .site-header { position: relative; background: var(--white); backdrop-filter: none; }
  .header-phone, .header-actions .btn { display: none; }
  .header-call {
    display: inline-flex; width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center;
    border: 1.5px solid var(--navy); border-radius: var(--radius);
  }
  .header-call svg { width: 1.15rem; height: 1.15rem; }
  .wordmark { font-size: 1.4rem; }

  /* hero: one row of actions, Jo stays close to the fold */
  .hero__grid { padding-top: 2rem; }
  .hero__text .lede { margin-top: 1.1rem; }
  .hero__text .btns { display: grid; grid-template-columns: 1fr auto; margin-top: 1.5rem; }
  .hero__note { margin-top: 1rem; }
  .gable { margin-top: 4.75rem; }
  .hide-sm { display: none; }

  /* testimonials: swipe instead of a long stack; the next card peeks in */
  .quotes {
    grid-auto-flow: column; grid-auto-columns: min(84%, 380px);
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 0.75rem;
    scrollbar-width: none;
  }
  .quotes::-webkit-scrollbar { display: none; }
  .quote { scroll-snap-align: start; }
  .quotes:focus-visible { outline-offset: -3px; }

  /* bottom action bar in the thumb zone */
  .action-bar {
    display: grid; grid-template-columns: auto 1fr; gap: 0.6rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 0.7rem var(--gutter) calc(0.7rem + env(safe-area-inset-bottom));
    background: rgb(255 255 255 / 0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgb(22 38 58 / 0.08);
    transform: translateY(110%);
    transition: transform 0.25s ease;
  }
  .action-bar.is-visible { transform: none; }
  .action-bar .btn { min-height: 3rem; }
  .site-footer { padding-bottom: calc(2rem + 4.5rem + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .action-bar { transition: none; } }

@media (max-width: 599px) {
  .expertise__photos { grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1.5rem; }
  .expertise__photos img { aspect-ratio: 1; }
  .expertise__list li { padding: 1.5rem 0 1.5rem 2.1rem; }
  .expertise__list li::before { top: 1.75rem; }
  .media { gap: 0.35rem 1.5rem; }
  .statement .btn { width: 100%; }
  .form-card { border-radius: 12px; }
}
@media (max-width: 359px) {
  .hero__text .btns { grid-template-columns: 1fr; }
  .action-bar { grid-template-columns: 1fr 1.6fr; }
}

/* landscape phones: side by side so Jo and the actions share the screen */
@media (orientation: landscape) and (max-height: 520px) {
  .hero__grid { grid-template-columns: 1.35fr 0.65fr; gap: 1.5rem; padding-top: 1.5rem; }
  .hero__text { padding-bottom: 2rem; }
  .hero h1 { font-size: clamp(2.4rem, 1rem + 7vh, 3.4rem); }
  .gable { width: min(100%, 260px); margin: 3.25rem 0 0 auto; }
}
