/* ==========================================================================
   Courtside Advisory — site stylesheet
   Values are carried over 1:1 from the approved mockup's inline styles.
   Breakpoints: 1100 / 1000 / 880 (mobile menu) / 820 / 600
   ========================================================================== */

:root {
  --navy: #1B2440;
  --navy-hover: #2A3557;
  --copper: #A9552F;          /* brand copper: buttons, rules, fills */
  --copper-hover: #934826;
  /* Darker copper for small copper TEXT only. Brand #A9552F is 4.10:1 on
     --bg-alt (fails WCAG AA); this shade is 4.76:1 there and 5.26:1 on --bg. */
  --copper-text: #9A4D2B;
  --accent-stroke: #C0663B;   /* illustration stroke color (inside the SVG files) */
  --bg: #F1EFE9;
  --bg-alt: #E7E4DC;
  --line: #D9D5CB;
  --muted: #4A5068;
  --on-dark-muted: #C9CDDA;
  --error-on-dark: #FFB4A1;   /* 8.96:1 on navy */
  --white: #FFFFFF;

  --serif: "Source Serif 4", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  /* 1120px content + 2 x 24px side padding. The mockup's max-width:1120px was content-box;
     with the border-box reset below, the padding has to be included here. */
  --max: 1168px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--navy);
  font-family: var(--sans);
}
img { max-width: 100%; }
a { color: var(--navy); }
a:hover { color: var(--copper); }

:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.contact :focus-visible { outline-color: var(--bg); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 10;
  background: var(--navy);
  color: var(--white);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { top: 16px; color: var(--white); outline-color: var(--copper); }

/* Footer placeholders that must be filled before launch. Deliberately loud. */
mark.todo { background: #FFE9A8; color: var(--navy); padding: 0 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  padding: 14px 22px;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}
.btn--sm { font-size: 14px; padding: 12px 18px; }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-hover); color: var(--white); }
.btn--copper { background: var(--copper); color: var(--white); }
.btn--copper:hover { background: var(--copper-hover); color: var(--white); }
/* Outline buttons use 13px vertical padding so the 1px border keeps height equal */
.btn--outline { border: 1px solid var(--navy); padding: 13px 22px; color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--white); }
.btn--outline-light { border: 1px solid var(--on-dark-muted); padding: 13px 22px; color: var(--white); }
.btn--outline-light:hover { background: rgba(255, 255, 255, .08); color: var(--white); }
.btn[disabled] { opacity: .7; cursor: progress; }

/* ---------- Header / navigation ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand:hover { color: var(--navy); }
.brand__name { font-family: var(--serif); font-weight: 600; font-size: 18px; }
/* margin-left:auto pushes links + CTA right; CTA's 8px + the 16px gap = the mockup's 24px */
.nav__links { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 24px; font-size: 14px; }
.nav__links a { text-decoration: none; }
.nav__links a[aria-current] { font-weight: 600; border-bottom: 2px solid var(--copper); padding-bottom: 2px; }
.nav__cta { margin-left: 8px; }
.nav__toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--navy);
  color: var(--navy);
  font: 500 14px var(--sans);
  cursor: pointer;
}
.nav__toggle-icon,
.nav__toggle-icon::before,
.nav__toggle-icon::after {
  display: block;
  width: 16px; height: 2px;
  background: currentColor;
}
.nav__toggle-icon { position: relative; }
.nav__toggle-icon::before,
.nav__toggle-icon::after { content: ""; position: absolute; left: 0; }
.nav__toggle-icon::before { top: -5px; }
.nav__toggle-icon::after { top: 5px; }
.nav.is-open .nav__toggle-icon { background: transparent; }
.nav.is-open .nav__toggle-icon::before { top: 0; transform: rotate(45deg); }
.nav.is-open .nav__toggle-icon::after { top: 0; transform: rotate(-45deg); }

/* Mobile menu. Without JS, css/noscript.css undoes this so links show wrapped. */
@media (max-width: 880px) {
  .nav__toggle { display: inline-flex; }
  .nav__cta { order: 2; margin-left: auto; }
  .nav__toggle { order: 3; }
  .nav__links {
    order: 4;
    display: none;
    flex-basis: 100%;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    font-size: 16px;
    border-top: 1px solid var(--line);
  }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav__links a[aria-current] { border-bottom: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--copper); padding: 14px 0 14px 12px; }
}
/* Too narrow for brand + CTA + Menu on one row: the CTA moves below the open menu. */
@media (max-width: 560px) {
  .nav__cta { order: 5; flex-basis: 100%; margin-left: 0; text-align: center; }
  .nav__toggle { margin-left: auto; }
  .nav:not(.is-open) .nav__cta { display: none; }
}

/* ---------- Layout ---------- */
.section { border-bottom: 1px solid var(--line); }
.section--alt { background: var(--bg-alt); }
.section--ruled-top { border-top: 1px solid var(--line); }
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.container--gapless { gap: 0; }
.container--capabilities { padding-bottom: 44px; }
.container--services { padding: 24px 24px 40px; }

.h2 { margin: 0 0 24px; font-family: var(--serif); font-weight: 600; font-size: 34px; color: var(--copper); }
.section-text { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted); max-width: 620px; }
.section-text--wide { line-height: 1.65; max-width: 720px; }
.section-cta { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 12px; }

.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-24 { margin-bottom: 24px; }
.mb-40 { margin-bottom: 40px; }

/* ---------- Hero ---------- */
.hero { max-width: var(--max); margin: 0 auto; padding: 88px 24px 80px; display: flex; flex-wrap: wrap; align-items: center; gap: 32px 48px; }
.hero-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero-title { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(36px, 5vw, 56px); line-height: 1.08; max-width: 820px; color: var(--copper); }
.hero-lede { margin: 0; font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 660px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.hero-art { flex: 0 1 300px; display: flex; justify-content: flex-end; align-items: center; }
.hero-art img { display: block; width: 100%; max-width: 300px; height: auto; }

/* ---------- Cards (Who we serve, Packages, Engagements) ---------- */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
/* Tax engagements: 3 cards on top, the last 2 centred beneath them */
.grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid--6 > * { grid-column: span 2; }
.grid--6 > :nth-child(4) { grid-column: 2 / span 2; }
.grid--6 > :nth-child(5) { grid-column: 4 / span 2; }

.card { position: relative; background: var(--white); border-top: 3px solid var(--navy); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.card--copper { border-top-color: var(--copper); }
.card__title { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 22px; }
.card__title--sm { font-size: 21px; }
.card__title--xs { font-size: 18px; }
.card--compact { padding: 20px 22px; gap: 8px; }
.grid--tight { gap: 12px; }
.card__meta { font-size: 13px; font-weight: 600; color: var(--copper); }  /* 5.21:1 on white */
.card__text { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.sport { position: absolute; top: 22px; right: 24px; height: 50px; width: auto; }

/* ---------- Split rows (How we help, Legal and Tax sections) ---------- */
.split { display: flex; flex-wrap: wrap; gap: 24px 56px; padding: 36px 0; }
.split--rule-top { border-top: 1px solid var(--line); }
.split--rule-bottom { border-bottom: 1px solid var(--line); }
.split__head { flex: 1 1 220px; max-width: 280px; border-top: 3px solid var(--navy); padding-top: 14px; align-self: flex-start; }
.split__head--copper { border-top-color: var(--copper); }
.split__title { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 22px; }
.split__body { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.split__text { margin: 0; font-size: 16px; line-height: 1.65; color: var(--muted); }
.split__note { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
/* Underlined in-text links to partner sites (Insurance page) */
.text-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.more { align-self: flex-start; text-decoration: none; font-size: 14px; font-weight: 600; color: var(--copper-text); }

/* Team cards (About): photo beside the bio, stacked on phones */
.team { display: flex; flex-direction: column; gap: 20px; }
.member { flex-direction: row; align-items: flex-start; gap: 24px; }
.member__photo { flex: none; width: 180px; aspect-ratio: 9 / 11; background: var(--bg-alt); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.member__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.member__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }

/* Bulleted white boxes (Home, How we help) */
.boxes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; font-size: 15px; line-height: 1.55; }
.boxes--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.boxes li { background: var(--white); padding: 14px 18px; display: flex; gap: 12px; }
.boxes .dot { flex: none; width: 7px; height: 7px; background: var(--copper); margin-top: 8px; }

/* Text cards (Legal and Tax pages) */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; font-size: 15px; line-height: 1.55; }
.cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards li { background: var(--white); padding: 20px 22px; color: var(--muted); }
.cards strong { color: var(--navy); font-weight: 600; }

/* ---------- What to expect ---------- */
.steps { display: flex; flex-wrap: wrap; gap: 32px; }
.step { flex: 1 1 280px; border-top: 3px solid var(--copper); padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.step__label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--copper-text); font-weight: 600; }
.step__title { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 20px; }
.step__text { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }

/* ---------- Contact section + form ---------- */
.contact { background: var(--navy); color: var(--white); }
.contact .container { gap: 18px; }
.contact__title { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 4vw, 40px); line-height: 1.15; max-width: 560px; }
.contact__lede { margin: 0; font-size: 17px; line-height: 1.6; color: var(--on-dark-muted); max-width: 520px; }

.form { max-width: 760px; padding-top: 8px; }
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 500; color: var(--white); }
.field .req { color: var(--on-dark-muted); }
.field input,
.field select,
.field textarea {
  width: 100%;
  font: 400 15px/1.4 var(--sans);
  color: var(--navy);
  background: var(--white);
  border: 2px solid var(--white);
  border-radius: 0;
  padding: 10px 12px;
}
.field textarea { min-height: 140px; resize: vertical; }
.field select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231B2440' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline: 2px solid var(--bg); outline-offset: 2px; }
.field [aria-invalid="true"] { border-color: var(--error-on-dark); }
.field__error { margin: 0; font-size: 14px; color: var(--error-on-dark); }
.form__note { margin: 0 0 18px; font-size: 14px; color: var(--on-dark-muted); }
.form__actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 24px; }
.form__status { margin: 16px 0 0; font-size: 15px; color: var(--error-on-dark); }
.form__disclaimer { margin: 18px 0 0; font-size: 13px; line-height: 1.6; color: var(--on-dark-muted); max-width: 640px; }
.form__disclaimer a { color: var(--white); }
.form-success { max-width: 640px; border-top: 3px solid var(--copper); padding-top: 18px; }
.form-success:focus { outline: none; }
.form-success__title { margin: 0 0 8px; font-family: var(--serif); font-weight: 600; font-size: 24px; }
.form-success p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--on-dark-muted); }

/* Honeypot: off-screen for people, still present for bots that fill every field */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { max-width: var(--max); margin: 0 auto; padding: 36px 24px 48px; display: flex; flex-direction: column; gap: 12px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.site-footer p { margin: 0; }
.footer__legal { max-width: 760px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--copper-text); }

/* ---------- Simple pages (privacy, 404, thanks) ---------- */
.prose { max-width: 720px; font-size: 16px; line-height: 1.65; color: var(--muted); }
.prose h2 { margin: 40px 0 12px; font-family: var(--serif); font-weight: 600; font-size: 24px; color: var(--navy); }
.prose p, .prose ul { margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }
.draft-banner { margin: 0 0 32px; padding: 14px 18px; background: #FFE9A8; color: var(--navy); font-size: 14px; line-height: 1.5; border-left: 4px solid var(--copper); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 6-col layout becomes 2 cards per row; the 5th card sits centred */
  .grid--6 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid--6 > *,
  .grid--6 > :nth-child(4) { grid-column: span 2; }
  .grid--6 > :nth-child(5) { grid-column: 2 / span 2; }
}
@media (max-width: 1000px) {
  /* Drop the section body under its heading earlier, so card rows keep a usable width */
  .split__body { flex-basis: 100%; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .cards, .cards--2 { grid-template-columns: 1fr; }
  .hero-art { flex: 1 1 100%; justify-content: flex-start; }
  .hero-art img { max-width: 200px; }
  .sport { height: 36px; top: 20px; right: 20px; }
}
@media (max-width: 600px) {
  .grid--2, .grid--3, .grid--4, .boxes, .boxes--2, .form__grid { grid-template-columns: 1fr; }
  .grid--6 { grid-template-columns: 1fr; }
  .grid--6 > *,
  .grid--6 > :nth-child(4),
  .grid--6 > :nth-child(5) { grid-column: auto; }
  .hero { padding: 56px 24px 48px; }
  .container { padding-top: 56px; padding-bottom: 56px; }
  .container--services { padding: 8px 24px 32px; }
  .container--capabilities { padding-bottom: 32px; }
  .h2 { font-size: 30px; }
  .member { flex-direction: column; }
  .member__photo { width: 160px; }
}
