/* ============================================================================
   Beyond Words Legislative Systems — production stylesheet
   Recreated from the hi-fi handoff prototype. Values are lifted into tokens so
   the brand can be adjusted in one place.

   Sizing convention: type, spacing and widths are in `rem` (relative to the
   browser's default font size, so they scale with a visitor's preference).
   Kept in px on purpose: hairline borders and 1px grid lines (crisp single
   pixels), corner radii and focus outlines (cosmetic), and all media-query
   breakpoints/overrides.
   ========================================================================== */

/* ------------------------------- Fonts ----------------------------------- */
/* Self-hosted Noto Sans, Latin-subset variable fonts built from the upstream
   Noto source. One file per style covers every weight via the `wght` axis
   (Regular 400 → Extra-bold 800) and retains the OpenType figure/case features
   the design uses (oldstyle-nums, tabular-nums, slashed-zero, case).

   Noto Sans © The Noto Project Authors, licensed under the SIL Open Font
   License 1.1. Full license: fonts/OFL.txt (https://scripts.sil.org/OFL). */
@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 100 900;      /* variable weight range */
  font-display: swap;
  src: url('fonts/NotoSans.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/NotoSans-Italic.woff2') format('woff2');
}

:root {
  /* Colour */
  --bg: #ffffff;            /* page background (off-white)   */
  --surface: #FFFFFF;       /* raised surfaces / hover        */
  --ink: #0B0B0B;           /* primary text                   */
  --black: #000000;         /* pure black (footer / logo)     */
  --slate: #5A6470;         /* secondary text                 */
  --muted: #9AA3AD;         /* muted text / placeholder quote */
  --hairline: #E9E7E2;      /* 1px rules & grid lines         */
  --input-border: #D8D4CC;  /* form control borders           */
  --bronze: #B3854D;        /* accent                         */
  --navy: #1F3A54;          /* link colour                    */

  /* Type */
  --font: 'Noto Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Layout */
  --gutter: 4.5rem;         /* horizontal page padding (72px @16) */
  --maxw: 77.5rem;          /* desktop reference width (1240px)   */
  --radius-card: 8px;       /* cosmetic — kept in px              */
  --radius-pill: 999px;

  /* Motion */
  --t: 150ms ease;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'liga' 1, 'clig' 1, 'kern' 1;
}

h1, h2, h3, p, figure, blockquote, ul { margin: 0; }
ul { list-style: none; padding: 0; }

/* The `hidden` attribute must win over component `display` values
   (e.g. .success-card { display: flex }). Without this the JS form/card
   swap and the initial hidden state silently break. */
[hidden] { display: none !important; }

a { color: var(--navy); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--bronze); }

img, svg { display: block; }

input, textarea, button { font: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* --------------------------- Accessibility helpers ----------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: #fff;
  border-radius: 0 0 var(--radius-card) 0;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 2px;
  border-radius: 3px;
}

/* --------------------------- Shared layout parts ------------------------- */
.section { padding: 0 var(--gutter) 6rem; max-width: var(--maxw); margin: 0 auto; }

.eyebrow {
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
  font-feature-settings: 'case' 1, 'cpsp' 1;
}

/* eyebrow + horizontal rule row (services, process) */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  margin-bottom: 2.75rem;
}
.section-head__rule { height: 1px; flex: 1; background: var(--hairline); }

/* ------------------------------- Buttons --------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;              /* accessible hit target */
  padding: 0.93rem 1.87rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--t), color var(--t), border-color var(--t);
}

.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--bronze); color: #fff; }

.btn--outline { border-color: var(--input-border); color: var(--ink); background: transparent; }
.btn--outline:hover { border-color: var(--ink); color: var(--ink); }

/* header CTA — smaller, ink border, inverts on hover */
.btn--nav {
  min-height: 0;
  padding: 0.68rem 1.37rem;
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn--nav:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ------------------------------- Header ---------------------------------- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.62rem var(--gutter);
  border-bottom: 1px solid var(--hairline);
  max-width: var(--maxw);
  margin: 0 auto;
}

.brand { display: inline-flex; align-items: center; }
.brand__lockup { display: block; height: 2.12rem; width: auto; }   /* ~34px tall */

.site-nav {
  display: flex;
  align-items: center;
  gap: 2.12rem;
  font-size: 0.90rem;
  font-weight: 500;
  white-space: nowrap;
}
.site-nav > a:not(.btn) { color: var(--slate); }
.site-nav > a:not(.btn):hover { color: var(--bronze); }
.site-nav > a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* -------------------------------- Hero ----------------------------------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.75rem;
  padding: 6.87rem var(--gutter) 6rem;
  max-width: var(--maxw);
  margin: 0 auto;
}
.hero__title {
  font-size: 3.87rem;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 53.75rem;
  text-wrap: balance;
}
.hero__sub {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--slate);
  max-width: 42.5rem;
  text-wrap: pretty;
}
.hero__actions { display: flex; gap: 1rem; margin-top: 0.5rem; flex-wrap: wrap; justify-content: center; }

/* ------------------------------ Services --------------------------------- */
.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;                         /* grid-line trick */
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
.service {
  display: flex;
  flex-direction: column;
  gap: 0.87rem;
  padding: 2.5rem 2.5rem 2.75rem;
  background: var(--bg);
  transition: background-color var(--t);
}
.service:hover { background: var(--surface); }
.service__index {
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1;
  color: var(--bronze);
  font-variant-numeric: tabular-nums lining-nums slashed-zero;
}
.service__title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.service__body {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--slate);
  text-wrap: pretty;
}

/* -------------------------------- About ---------------------------------- */
.about__intro {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 47.5rem;     /* comfortable reading measure */
  margin-bottom: 3.5rem;
}
.about__title {
  font-size: 2.37rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
  font-variant-numeric: oldstyle-nums proportional-nums;
}
.about__body {
  font-size: 1.06rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--slate);
  text-wrap: pretty;
}
.about__note {
  font-size: 0.93rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--slate);
}

/* Team — headshot cards in a row */
.team {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;   
  gap: 1.5rem;
}
.team-card {
  flex: 0 1 13.5rem;         
  max-width: 13.5rem;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--surface);
}
/* Photo area (object-fit: cover, absolutely positioned) paints over the initials. */
.team-card__photo {
  position: relative;
  aspect-ratio: 1 / 1;
  background: rgba(179, 133, 77, 0.10);   /* bronze wash */
}
.team-card__photo::after {
  content: attr(data-initials);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.87rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--bronze);
  font-variant-numeric: normal;
}
.team-card__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-card__text {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  padding: 1.12rem 1.25rem 1.25rem;
}
.team-card__name { font-size: 1.12rem; font-weight: 600; line-height: 1.25; }
.team-card__role { font-size: 0.90rem; font-weight: 400; line-height: 1.35; color: var(--slate); }

/* ------------------------------ Portfolio -------------------------------- */
/* portfolio.html — project cards: anchor image, headline, paragraph. */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.project-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--surface);
}
/* Anchor image. Shows a placeholder label until a real <img> is added; the
   :has() rule hides the label automatically once an image is present. */
.project-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: rgba(179, 133, 77, 0.10);   /* bronze wash */
  border-bottom: 1px solid var(--hairline);
}
.project-card__media::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 1.5rem;
  text-align: center;
  font-size: 0.81rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze);
}
.project-card__media:has(img)::after { display: none; }
.project-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.62rem;
  padding: 1.75rem 1.87rem 1.87rem;
}
.project-card__tag {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze);
  font-feature-settings: 'case' 1;
}
.project-card__title {
  font-size: 1.37rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.project-card__text {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--slate);
  text-wrap: pretty;
}

/* ------------------------------- Process --------------------------------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.25rem;
}
.step { display: flex; flex-direction: column; gap: 0.75rem; }
.step__head { display: flex; align-items: center; gap: 0.62rem; }
.step__chevron { flex: none; }
.step__title { font-size: 1.18rem; font-weight: 700; line-height: 1.2; }
.step__body {
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--slate);
  text-wrap: pretty;
}

/* ----------------------------- Testimonial ------------------------------- */
.quote {
  display: flex;
  flex-direction: column;
  gap: 1.12rem;
  padding: 3.25rem 3.5rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--surface);
}
.quote__glyph { flex: none; }
.quote__text {
  font-size: 1.37rem;
  font-weight: 500;
  line-height: 1.5;
  font-style: italic;
  color: var(--muted);           /* real quote: change to var(--ink)/var(--slate) */
  text-wrap: pretty;
}
.quote__by { font-size: 0.93rem; font-weight: 600; line-height: 1; color: var(--slate); }

/* ------------------------------- Contact --------------------------------- */
.contact { padding-bottom: 6.87rem; }
.contact__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 4rem;
  align-items: start;
}
.contact__intro { display: flex; flex-direction: column; gap: 1.5rem; }
.contact__title {
  font-size: 2.37rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.contact__body {
  font-size: 1.06rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--slate);
  text-wrap: pretty;
}
.contact__details {
  display: flex;
  flex-direction: column;
  gap: 0.62rem;
  margin-top: 0.5rem;
  font-size: 0.96rem;
  line-height: 1.5;
  color: var(--slate);
  font-variant-numeric: oldstyle-nums slashed-zero;
}
.contact__details a { color: var(--navy); font-weight: 600; }
.contact__details a:hover { color: var(--bronze); }

/* Form */
.form { display: flex; flex-direction: column; gap: 1.12rem; }
.honeypot { display: none; }   /* spam-trap field; never shown to people */
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field__label { font-size: 0.84rem; font-weight: 600; line-height: 1; color: var(--ink); }
.field__input {
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-card);
  padding: 0.87rem 1rem;
  font-size: 0.96rem;
  color: var(--ink);
  background: var(--surface);
  transition: border-color var(--t);
}
.field__input::placeholder { color: var(--muted); }
.field__input:focus { outline: none; border-color: var(--bronze); }
.field__textarea { line-height: 1.5; resize: vertical; min-height: 8.25rem; }

.field__input[aria-invalid="true"] { border-color: #C0492F; }
.field__error { font-size: 0.84rem; line-height: 1.4; color: #C0492F; }

.form .btn { align-self: flex-start; padding: 0.93rem 2rem; }
.form__status { font-size: 0.90rem; line-height: 1.5; color: var(--slate); }
.form__status[data-state="error"] { color: #C0492F; }
.form__noscript { font-size: 0.93rem; line-height: 1.6; color: var(--slate); }

.success-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.87rem;
  padding: 3.5rem 3rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--surface);
}
.success-card__icon { flex: none; }
.success-card__title { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.success-card__body {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--slate);
  text-wrap: pretty;
}

/* -------------------------------- Footer --------------------------------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 2.25rem var(--gutter);
  background: var(--black);
}
.site-footer .brand__lockup { height: 1.87rem; }   /* ~30px tall */
.site-footer__legal {
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1;
  color: var(--muted);
  font-variant-numeric: oldstyle-nums;
}

/* ============================================================================
   Responsive — reference is desktop >=1240px; the rules below are the
   implementer's judgement noted in the handoff.
   Breakpoints and their overrides are intentionally kept in px.
   ========================================================================== */

/* Tablet / small laptop */
@media (max-width: 1024px) {
  :root { --gutter: 48px; }
  .hero__title { font-size: 52px; }
}

/* Stack two-column sections; collapse nav to logo + CTA */
@media (max-width: 820px) {
  .site-nav > a:not(.btn) { display: none; }

  .contact__grid { grid-template-columns: 1fr; gap: 40px; }
  .process-grid { grid-template-columns: 1fr 1fr; gap: 32px; }

  .hero { padding-top: 80px; }
  .hero__title { font-size: 46px; }
  .hero__sub { font-size: 18px; }
}

/* Phone */
@media (max-width: 640px) {
  :root { --gutter: 24px; }

  /* Keep the collapsed header (logo + CTA) on one line on narrow phones. */
  .site-header { padding-left: 20px; padding-right: 20px; }
  .btn--nav { padding: 9px 16px; font-size: 13.5px; }
  .brand__word { font-size: 17px; }

  .service-grid { grid-template-columns: 1fr; }
  .service { padding: 32px 28px 34px; }

  .hero { padding: 64px var(--gutter) 72px; gap: 22px; }
  .hero__title { font-size: 38px; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1 1 auto; }

  .about__title, .contact__title { font-size: 30px; }
  .portfolio-grid { grid-template-columns: 1fr; }

  .quote { padding: 36px 28px; }
  .quote__text { font-size: 20px; }
  .success-card { padding: 40px 28px; }

  .site-footer { flex-direction: column; align-items: flex-start; gap: 18px; }
}
