/* ==========================================================================
   S.P. Collins & Company — stylesheet
   Palette derives from the firm's mark: deep navy wordmark, azure cube.
   ========================================================================== */

:root {
  /* Ground + ink */
  --paper:      #ffffff;
  --mist:       #f1f5f9;
  --panel:      #ffffff;
  --ink:        #0b1f33;
  --slate:      #55677a;
  --line:       #d7e1ea;
  --line-soft:  #e7eef4;

  /* Brand */
  --navy:       #123a62;
  --navy-deep:  #071827;
  --azure:      #2e8fd4;
  --azure-ink:  #1b6ba8;

  /* Roles */
  --btn-fg:     #ffffff;
  --logo-plate: transparent;
  --logo-pad:   0;
  --logo-pad-sm: 0;
  --shade:      rgba(11, 31, 51, .08);

  /* Type */
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Measure */
  --wrap:   1140px;
  --gutter: clamp(20px, 5vw, 56px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #081521;
    --mist:       #0c1f2f;
    --panel:      #0f2434;
    --ink:        #e8f0f7;
    --slate:      #9db0c2;
    --line:       #1d3a50;
    --line-soft:  #162c3e;
    --navy:       #cfe2f2;
    --navy-deep:  #04101a;
    --azure:      #58aeec;
    --azure-ink:  #8cc9f5;
    --btn-fg:     #06121d;
    --logo-plate: #ffffff;
    --logo-pad:   10px 14px;
    --logo-pad-sm: 4px 9px;
    --shade:      rgba(0, 0, 0, .45);
  }
}

:root[data-theme="dark"] {
  --paper:      #081521;
  --mist:       #0c1f2f;
  --panel:      #0f2434;
  --ink:        #e8f0f7;
  --slate:      #9db0c2;
  --line:       #1d3a50;
  --line-soft:  #162c3e;
  --navy:       #cfe2f2;
  --navy-deep:  #04101a;
  --azure:      #58aeec;
  --azure-ink:  #8cc9f5;
  --btn-fg:     #06121d;
  --logo-plate: #ffffff;
  --logo-pad:   10px 14px;
  --logo-pad-sm: 4px 9px;
  --shade:      rgba(0, 0, 0, .45);
}

/* --------------------------------------------------------------- base --- */

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

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
  letter-spacing: -.012em;
}

p { margin: 0; }

a { color: var(--azure-ink); }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 12px 18px;
  z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* Shared section rhythm */
.section { padding-block: clamp(56px, 7vw, 96px); }
.section--mist { background: var(--mist); }

.eyebrow {
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--azure-ink);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
  max-width: 140px;
}

.section-title { font-size: clamp(1.75rem, 3.2vw, 2.4rem); }

.lede {
  color: var(--slate);
  font-size: 1.0625rem;
  max-width: 62ch;
}

/* --------------------------------------------------------- top banner --- */
/* Affiliated firms sit above the masthead: present, but subordinate to
   the firm's own mark. Scrolls away; the masthead below it stays.        */

.topbar {
  background: var(--mist);
  border-bottom: 1px solid var(--line-soft);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 24px);
  padding-block: 11px;
  flex-wrap: wrap;
}

.topbar__label {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--slate);
  margin-left: auto;
}

.topbar__firm {
  display: inline-flex;
  align-items: center;
  background: var(--logo-plate);
  padding: var(--logo-pad-sm);
  border-radius: 2px;
  opacity: .72;
  transition: opacity .18s ease;
}
.topbar__firm:hover,
.topbar__firm:focus-visible { opacity: 1; }
.topbar__firm img { height: 46px; width: auto; }
.topbar__firm--ca img { height: 42px; }

.topbar__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line);
  flex: 0 0 auto;
}

@media (max-width: 560px) {
  .topbar__label { display: none; }
  .topbar__inner { justify-content: center; gap: 14px; }
  .topbar__firm img { height: 34px; }
  .topbar__firm--ca img { height: 31px; }
}

/* ------------------------------------------------------------- header --- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding-block: 14px;
}

@media (max-width: 680px) {
  .masthead__inner { justify-content: flex-start; }
  .masthead__right { width: 100%; justify-content: space-between; gap: 12px; }
  .actions .btn { padding: 10px 14px; font-size: .75rem; }
}

.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img {
  width: clamp(158px, 30vw, 232px);
  background: var(--logo-plate);
  padding: var(--logo-pad);
  border-radius: 3px;
}

.masthead__right {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav {
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding-block: 6px;
  border-bottom: 2px solid transparent;
  transition: border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.nav a:hover { color: var(--azure-ink); border-bottom-color: var(--azure); }
.nav a[aria-current="page"] { border-bottom-color: var(--azure); }

.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* -------------------------------------------------------------- button --- */

.btn {
  --btn-bg: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 11px 20px;
  border: 1px solid var(--btn-bg);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-radius: 2px;
  transition: transform .16s ease, background .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); --btn-bg: var(--azure-ink); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { background: transparent; color: var(--azure-ink); border-color: var(--azure); }

.btn--light {
  background: transparent;
  border-color: rgba(255, 255, 255, .42);
  color: #fff;
}
.btn--light:hover { background: rgba(255, 255, 255, .1); border-color: #fff; color: #fff; }

.btn--azure { --btn-bg: var(--azure-ink); color: #fff; }
.btn--azure:hover { --btn-bg: #15588c; color: #fff; }

.btn .ext { font-size: .9em; line-height: 1; opacity: .75; }

/* ---------------------------------------------------------------- hero --- */

.hero {
  position: relative;
  background: var(--navy-deep);
  color: #eaf2f9;
  isolation: isolate;
  overflow: hidden;
}

.hero__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--navy-deep);
}
.hero__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 34%;
}
.hero__art--low img { object-position: center 46%; }

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg,
      rgba(4, 16, 26, .94) 0%,
      rgba(4, 16, 26, .89) 34%,
      rgba(4, 16, 26, .60) 62%,
      rgba(4, 16, 26, .30) 100%),
    linear-gradient(to bottom,
      rgba(4, 16, 26, .58) 0%,
      rgba(4, 16, 26, .05) 32%,
      rgba(4, 16, 26, .48) 100%);
}

@media (max-width: 760px) {
  .hero__scrim {
    background: linear-gradient(to bottom,
      rgba(4, 16, 26, .82) 0%,
      rgba(4, 16, 26, .74) 52%,
      rgba(4, 16, 26, .60) 100%);
  }
}

.hero__inner {
  padding-block: clamp(72px, 12vw, 132px) clamp(150px, 22vw, 240px);
  max-width: 720px;
}

.hero__eyebrow {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #8fc6ec;
  margin: 0 0 22px;
}

.hero h1 {
  font-size: clamp(2rem, 6.2vw, 3.85rem);
  color: #fff;
  letter-spacing: -.026em;
  line-height: 1.03;
  display: grid;
  gap: 0;
  width: max-content;
  max-width: 100%;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .22);
}
.hero h1 span { display: block; }
.hero h1 span + span { color: #d4e4f1; }
.hero h1 span + span + span { color: #bcd6e8; }

.hero__sub {
  margin-top: 22px;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #bed3e4;
  max-width: 50ch;
}

.hero__cta {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__meta {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 34px;
  font-size: .875rem;
  color: #a9c2d6;
}
.hero__meta a { color: #dceaf5; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 3px; }
.hero__meta a:hover { color: #fff; }
.hero__meta .tel { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* ------------------------------------------------------- appointments --- */
/* Three routes to one action — a typed list, not three identical cards.    */

.appointments { border-bottom: 1px solid var(--line-soft); }

.appt-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: clamp(26px, 4vw, 40px);
}

.appt-list { border-top: 1px solid var(--line); }

.appt {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px clamp(18px, 3vw, 36px);
  padding-block: clamp(22px, 3vw, 30px);
  border-bottom: 1px solid var(--line);
}

.appt__idx {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--azure);
  font-variant-numeric: tabular-nums;
  align-self: start;
  padding-top: .2em;
}

.appt__body { min-width: 0; }
.appt h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
.appt p { margin-top: 7px; color: var(--slate); font-size: .9375rem; max-width: 56ch; }

.appt__cta { justify-self: end; }

@media (max-width: 720px) {
  .appt { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .appt__cta { grid-column: 2; justify-self: start; margin-top: 14px; }
}

/* --------------------------------------------------------------- about --- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 860px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); }
}

.about__name { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.about__role {
  margin-top: 10px;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--slate);
}

.creds {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.creds li {
  padding-block: 13px;
  border-bottom: 1px solid var(--line-soft);
  font-size: .9375rem;
  display: grid;
  gap: 3px;
}
.creds dt, .creds .k {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--slate);
}

.bio p + p { margin-top: 1.05em; }
.bio { max-width: 68ch; }

.brokercheck {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .8125rem;
  color: var(--slate);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 9px 15px;
  border-radius: 2px;
  transition: border-color .18s ease, color .18s ease;
}
.brokercheck:hover { border-color: var(--azure); color: var(--azure-ink); }

/* ------------------------------------------------------------ services --- */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: clamp(28px, 4vw, 44px);
}

.service {
  background: var(--panel);
  padding: clamp(26px, 3.2vw, 38px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.service__icon { color: var(--azure); }
.service__icon svg { width: 30px; height: 30px; display: block; }

.service h3 { font-size: 1.3rem; }
.service p { color: var(--slate); font-size: .9375rem; }

/* --------------------------------------------------------------- firms --- */

.firms {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(26px, 5vw, 64px);
  margin-top: 30px;
}

.firm {
  display: inline-flex;
  align-items: center;
  background: var(--logo-plate);
  padding: var(--logo-pad);
  border-radius: 3px;
  opacity: .82;
  transition: opacity .2s ease, transform .2s ease;
}
.firm:hover { opacity: 1; transform: translateY(-2px); }
.firm img { width: clamp(168px, 22vw, 228px); }
.firm--ca img { width: clamp(150px, 19vw, 200px); }

/* ------------------------------------------------------------- refunds --- */

.refund-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(18px, 2.4vw, 26px);
  margin-top: clamp(28px, 4vw, 40px);
}

.refund {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--azure);
  padding: clamp(26px, 3.2vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}
.refund h3 { font-size: 1.35rem; }
.refund p { color: var(--slate); font-size: .9375rem; }
.refund .btn { margin-top: 6px; }

.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  max-width: 62ch;
}
.checklist li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  font-size: .9375rem;
  color: var(--slate);
}
.checklist li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border: 1.5px solid var(--azure);
  transform: rotate(45deg);
  align-self: center;
}

/* Statutory dates — real, specific, and useful */
.dates {
  margin: 0;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.dates > div {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 4px 20px;
  padding-block: 13px;
  border-bottom: 1px solid var(--line-soft);
  align-items: baseline;
}
.dates dt {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  font-weight: 600;
}
.dates dd { margin: 0; font-size: .9125rem; color: var(--slate); }
@media (max-width: 520px) {
  .dates > div { grid-template-columns: minmax(0, 1fr); }
}

/* -------------------------------------------------------------- footer --- */

.contact-bar {
  background: var(--navy-deep);
  color: #dfeaf4;
}
.contact-bar .wrap {
  padding-block: clamp(46px, 6vw, 70px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(26px, 4vw, 54px);
}
.contact-bar h2 { color: #fff; font-size: clamp(1.6rem, 2.8vw, 2.1rem); }
.contact-bar .eyebrow { color: #7fbde8; }
.contact-bar .eyebrow::after { background: rgba(255, 255, 255, .2); }

.contact-list { display: grid; gap: 6px; font-size: .9375rem; color: #b9cfe1; }
.contact-list a { color: #fff; text-decoration-color: rgba(255, 255, 255, .4); text-underline-offset: 3px; }
.contact-list .tel { font-variant-numeric: tabular-nums; font-size: 1.35rem; font-family: var(--serif); }

.sitefoot {
  background: #050f19;
  color: #7f95a8;
  font-size: .8125rem;
  line-height: 1.65;
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.sitefoot .wrap { padding-block: 32px; display: grid; gap: 18px; }
.sitefoot a { color: #a9c0d3; }
.sitefoot .disclosure { max-width: 92ch; }
.sitefoot .rule { height: 1px; background: rgba(255, 255, 255, .08); }
.sitefoot .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  align-items: center;
}
