/*
 * LexNova Guild design tokens — single source of truth for colour and type.
 * The member app (src/index.css) and the public directory (find/public/styles.css)
 * both consume these values. A parity test fails if the find site drifts.
 *
 * The find site sits next to the Squarespace marketing site. Page grounds
 * use that site's three backgrounds: #D2BAA7, #C0904C and #34384D.
 * Pale teal is not a section background. Body type stays Source Sans 3.
 * Poster headlines use Climate Crisis. Gold from the token file is a rule
 * and a border, not small text.
 */

@font-face {
  font-family: "Josefin Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("/fonts/JosefinSans-variable.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/SourceSans3-variable.woff2") format("woff2");
}
@font-face {
  font-family: "Climate Crisis";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ClimateCrisis-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Climate Crisis";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ClimateCrisis-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Core brand colours */
  --pristine: 23 45% 82%;     /* #e8d5c9 - Warm beige background */
  --parlour: 194 42% 32%;     /* #2f6373 - Professional teal */
  --deco: 226 18% 26%;        /* #363c50 - Sophisticated navy */
  --gatsby: 38 48% 52%;       /* #bf924d - Elegant gold */
  --champagne: 37 32% 73%;    /* #cebea4 - Soft champagne */

  /* Type */
  --font-display: "Josefin Sans", "Source Sans 3", system-ui, sans-serif;
  --font-poster: "Climate Crisis", "Josefin Sans", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;

  /* Squarespace page colours. These are backgrounds, not replacements of the five brand tokens. */
  --ground: #D2BAA7;
  --field: #34384D;
  --band-gold: #C0904C;

  /* Marketing display scale — extensions of the app type ramp */
  --display-xl: 4.5rem;
  --display-lg: 3.25rem;
  --display-md: 2.25rem;
  --display-leading: 1.05;

  /* Marketing space */
  --space-section: 5rem;
  --measure: 68ch;

  --background: var(--pristine);
  --foreground: var(--deco);
  --card: 23 40% 85%;
  --card-foreground: var(--deco);
  --primary: var(--parlour);
  --primary-foreground: 0 0% 100%;
  --secondary: var(--champagne);
  --secondary-foreground: var(--deco);
  --muted: 37 25% 82%;
  --muted-foreground: var(--parlour);
  --accent: var(--gatsby);
  --border: 194 25% 45%;
  --input: 0 0% 100%;
  --ring: var(--gatsby);
  --radius: 0.5rem;
  --document: 0 0% 100%;
  --document-foreground: var(--deco);
  --primary-dark: 194 42% 25%;
  --danger-strong: 0 62% 34%;

  --ink: hsl(var(--foreground));
  --paper: hsl(var(--background));
  --teal: hsl(var(--primary));
  --gold: hsl(var(--gatsby));
  --sand: hsl(var(--secondary));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--field);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--field); text-underline-offset: 0.18em; }
a:hover { color: var(--field); }
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--gold);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: white;
  padding: 0.5rem 1rem;
  z-index: 5;
}
.skip:focus { top: 1rem; }

.wrap, .bar { width: min(80rem, calc(100% - 2rem)); margin-inline: auto; }
.site-header {
  background: var(--ground);
  border-bottom: 0;
  box-shadow: inset 0 -3px 0 var(--gold);
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
  position: relative;
}
.brand {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0;
  line-height: 0;
  text-decoration: none;
}
.brand img { display: block; height: 32px; width: auto; }
.brand-on-navy img { height: 22px; }
.nav-check {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.nav-toggle { display: none; }
.nav {
  display: flex;
  gap: 0.25rem 1.25rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a, .nav a:hover {
  color: var(--field);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.35rem 0;
}
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--gold); }

.hero, .band, .section { padding: var(--space-section) 0; }
.hero { padding-top: 3.5rem; }
.band .hero { padding: 0; }
.kicker {
  font-family: var(--font-display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--field);
  margin: 0 0 0.75rem;
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: var(--field);
}
h1 {
  font-family: var(--font-poster);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  max-width: 14ch;
}
h2 { font-size: clamp(1.5rem, 3vw, 1.875rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
.hero h1::after {
  content: "";
  display: block;
  width: 4rem;
  height: 2px;
  margin-top: 1rem;
  background: var(--gold);
}
.band-gold .hero h1::after { background: var(--field); }
.lede {
  font-size: 1.25rem;
  line-height: 1.5;
  max-width: var(--measure);
  margin-top: 0;
  color: var(--field);
}

.paths { display: grid; gap: 1.5rem; margin-top: 2.5rem; }
.path {
  display: block;
  text-decoration: none;
  padding: 1.5rem;
  min-height: 11rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
}
.path strong {
  display: block;
  font-family: var(--font-poster);
  font-size: clamp(1.7rem, 2.4vw, 2.15rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 0.65rem;
  color: inherit;
}
.path p { margin: 0; color: inherit; }
.path-client, .path-client:hover, .path-client:focus-visible {
  background: var(--teal);
  color: white;
}
.path-member, .path-member:hover, .path-member:focus-visible {
  background: var(--field);
  color: var(--ground);
}
.path:hover { box-shadow: inset 0 0 0 2px var(--gold); }
.path-client:focus-visible { outline-color: white; }
.path-member:focus-visible { outline-color: hsl(var(--pristine)); }

.band { padding: var(--space-section) 0; }
.band + .band { box-shadow: inset 0 3px 0 var(--gold); }
.band-navy { background: var(--field); color: var(--ground); }
.band-sand, .band-champagne { background: var(--ground); color: var(--field); }
.band-gold {
  background: var(--band-gold);
  color: var(--field);
}
.band + .band-gold { box-shadow: inset 0 3px 0 var(--field); }
.band-gold h1, .band-gold h2, .band-gold .lede { color: var(--field); }
.band-gold .lede { font-size: 1.5rem; line-height: 1.45; }
.band-teal { background: var(--teal); color: white; }
.band-navy h1, .band-navy h2, .band-teal h1, .band-teal h2,
.band-sand h1, .band-sand h2, .band-sand .lede, .band-sand .kicker,
.band-gold h1, .band-gold h2,
.band-champagne h1, .band-champagne h2, .band-champagne .lede, .band-champagne .kicker { color: inherit; }
.band-navy .lede, .band-navy .kicker, .band-teal .lede { color: inherit; }
.band-navy a:not(.button), .band-navy a:not(.button):hover,
.band-teal a:not(.button), .band-teal a:not(.button):hover { color: inherit; }
.poster { max-width: 12ch; }

.grid { display: grid; gap: 1.5rem; }
.card {
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: 0 1px 2px hsl(var(--deco) / 0.08);
  padding: 1.5rem;
}
.card h3 { margin-bottom: 0.35rem; }
.card h3 a, .card h3 a:hover { color: var(--ink); text-decoration: none; }
.card h3 a:hover { box-shadow: inset 0 -2px 0 var(--gold); }
.card p { margin: 0.35rem 0 0; }
.member-card { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.meta { color: var(--field); font-size: 0.95rem; }
.pills { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0.75rem 0 0; list-style: none; }
.pills li, .badge {
  background: var(--sand);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.pills a, .pills a:hover { color: var(--ink); text-decoration: none; }
.empty { color: var(--ink); }

.filters { display: grid; gap: 0.75rem; margin: 1.5rem 0 2rem; }
.filters button { width: auto; justify-self: start; }
label { display: grid; gap: 0.35rem; font-size: 0.875rem; font-weight: 600; }
input, select, textarea {
  font: inherit;
  color: var(--ink);
  background: hsl(var(--input));
  border: 1px solid hsl(var(--deco) / 0.25);
  border-radius: calc(var(--radius) - 2px);
  padding: 0.55rem 0.75rem;
  width: 100%;
}
textarea { min-height: 9rem; resize: vertical; }
.button, a.button, a.button:hover, button, button:hover {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  background: var(--teal);
  color: white;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
a.button:hover, button:hover { background: hsl(var(--primary-dark)); color: white; }
button.linkish, button.linkish:hover, button.linkish:focus-visible {
  background: transparent;
  color: var(--field);
  border: 0;
  border-radius: 0;
  min-height: 0;
  padding: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  box-shadow: none;
}
.button.secondary, a.button.secondary, a.button.secondary:hover, button.secondary, button.secondary:hover {
  background: transparent;
  color: var(--ink);
  border: 1px solid hsl(var(--border));
}
a.button.secondary:hover, button.secondary:hover { background: var(--sand); color: var(--ink); }
.hint, .form-note { font-size: 0.85rem; line-height: 1.45; max-width: var(--measure); color: var(--field); }
.form-note { margin: 0; }
.form-note a, .form-note a:hover { color: var(--field); }
.check { display: flex; gap: 0.7rem; align-items: flex-start; font-weight: 500; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
fieldset { border: 1px solid hsl(var(--border)); border-radius: var(--radius); padding: 0.75rem 1rem; }
legend { font-weight: 600; padding: 0 0.35rem; }

.profile-head { display: grid; gap: 1.25rem; align-items: center; grid-template-columns: auto minmax(0, 1fr); }
.profile-layout { display: grid; gap: 2rem; align-items: start; }
.profile-page h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: none;
}
.profile-story .firm { margin: 0 0 0.75rem; font-size: 1.15rem; font-weight: 600; }
.profile-story .meta { margin: 0.35rem 0; }
.profile-links { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin: 0.75rem 0 0; }
.profile-block { margin-top: 1.75rem; }
.profile-block h2 { margin-bottom: 0.4rem; }
.profile-block p { margin: 0; white-space: pre-wrap; max-width: 68ch; }
.profile-contact {
  background: hsl(var(--document));
  color: var(--ink);
  border-radius: var(--radius);
  border-top: 4px solid var(--field);
  padding: 1.25rem 1.25rem 1.5rem;
}
.profile-contact h2 { margin-bottom: 0.4rem; }
.profile-contact > p { margin-top: 0; }
.profile-contact form { display: grid; gap: 0.85rem; }
.avatar, .portrait {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--sand);
}
.portrait { width: 8rem; height: 8rem; }
.avatar-mark, .portrait.avatar-mark { object-fit: contain; background: transparent; }

.site-footer {
  width: 100%;
  background: var(--field);
  color: var(--ground);
  border-top: 3px solid var(--gold);
}
.site-footer .bar {
  padding: 2.5rem 0;
  align-items: flex-start;
  flex-wrap: wrap;
}
.site-footer p { margin: 0; max-width: 42rem; font-size: 0.95rem; color: var(--ground); }
.site-footer nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.site-footer a, .site-footer a:hover { color: var(--ground); }
.site-footer a:focus-visible { outline-color: var(--ground); }
.banner {
  background: var(--field);
  color: var(--ground);
  text-align: center;
  margin: 0;
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  border-bottom: 3px solid var(--gold);
}
.finder {
  display: grid;
  gap: 1.25rem;
  margin: 2rem 0 2.5rem;
  align-items: stretch;
}
.finder .filters { margin: 0; grid-template-columns: 1fr; }
.match-block {
  background: var(--field);
  color: var(--ground);
  border-radius: var(--radius);
  padding: 1.5rem;
  border-top: 4px solid var(--band-gold);
}
.match-block h2, .match-block p { color: var(--ground); }
.match-block h2 { font-size: clamp(1.5rem, 2vw, 1.75rem); }
.match-block p { margin: 0 0 1.1rem; }
button.cta, a.cta, button.cta:hover, a.cta:hover, button.cta:focus-visible, a.cta:focus-visible {
  background: var(--band-gold);
  color: var(--field);
  border: 2px solid var(--field);
  border-radius: 999px;
  font-size: 1.25rem;
  font-weight: 700;
  min-height: 3.25rem;
  padding: 0.65rem 1.25rem;
  box-shadow: none;
  text-transform: none;
}
button.cta:hover, a.cta:hover { background: #a87c3a; color: var(--field); }
.results { font-weight: 700; margin: 0 0 1.25rem; }
.empty-state {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
}
.empty-state p { max-width: var(--measure); }
.card-action { margin: 1rem 0 0; }
.with-tip { display: flex; align-items: center; gap: 0.4rem; }
.tip { position: relative; display: inline-flex; }
button.tip-button, button.tip-button:hover, button.tip-button:focus-visible {
  width: 1.35rem;
  height: 1.35rem;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  background: var(--sand);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
}
.tip-bubble {
  display: none;
  position: absolute;
  z-index: 3;
  left: 0;
  top: calc(100% + 0.4rem);
  width: min(18rem, 70vw);
  padding: 0.75rem 0.85rem;
  background: hsl(var(--document));
  color: var(--ink);
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  box-shadow: 0 8px 24px hsl(var(--deco) / 0.16);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
}
.tip:hover .tip-bubble, .tip:focus-within .tip-bubble { display: block; }
.why h3 { margin-bottom: 0.35rem; }
.why p { margin: 0; }
.page-note { padding-top: 0; }
.page-note p { margin: 0; font-size: 0.95rem; max-width: 46rem; color: var(--field); }
.page-note a, .page-note a:hover { color: var(--field); }
dialog.match-panel {
  width: min(32rem, calc(100vw - 2rem));
  max-height: min(40rem, calc(100dvh - 2rem));
  margin: auto;
  overflow: auto;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.5rem;
  background: hsl(var(--document));
  color: var(--ink);
}
dialog.match-panel::backdrop { background: hsl(var(--deco) / 0.45); }
.match-panel-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.match-panel h2 { margin: 0; font-size: 1.35rem; }
.match-panel form { display: grid; gap: 0.85rem; }
.error { color: hsl(var(--danger-strong)); }

@media (max-width: 799px) {
  .band, .section { padding: 1.25rem 0; }
  .paths { margin-top: 1rem; gap: 0.75rem; }
  .path { min-height: 0; padding: 1rem; }
}

@media (max-width: 560px) {
  .profile-head { grid-template-columns: 1fr; }
}
@media (min-width: 960px) {
  .finder { grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr); }
  .profile-layout { grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.8fr); }
  .profile-contact { position: sticky; top: 1rem; }
}
@media (min-width: 800px) {
  .paths, .grid.two, .filters { grid-template-columns: 1fr 1fr; }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
  .filters.three { grid-template-columns: 1fr 1fr auto; align-items: end; }
}

@media (min-width: 1024px) {
  .nav-check, .nav-toggle { display: none; }
  .nav { display: flex; position: static; background: transparent; padding: 0; border: 0; box-shadow: none; width: auto; }
}

@media (max-width: 1023px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    background: transparent;
    color: var(--ink);
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    min-height: 2.5rem;
    padding: 0 0.9rem;
  }
  .nav-check:focus-visible + .nav-toggle {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px var(--gold);
  }
  .nav {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    background: hsl(var(--document));
    color: var(--ink);
    padding: 0.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: 0 8px 24px hsl(var(--deco) / 0.12);
    flex-direction: column;
    align-items: stretch;
    z-index: 2;
    width: min(18rem, calc(100vw - 2rem));
  }
  .nav-check:checked ~ .nav { display: flex; }
}

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.6s ease both; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { animation: none; }
}
