/* ==========================================================================
   Global Recovery Group
   House style shared with the operating firms: same tokens, same faces,
   same deficit line. The group site itself uses ink and paper only.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Faces (self-hosted variable fonts, latin subset)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("assets/fonts/source-serif-4-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/instrument-sans-latin.woff2") format("woff2");
}

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --ink: #10202E;
  --slate: #33424F;
  --paper: #F7F5F0;
  --bronze: #A67C44;
  --bronze-light: #C09A62;
  --mist: #DDD9D0;
  --fog: #B9C2C9;

  --font-display: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --fs-hero: clamp(2.5rem, 5.4vw + 0.9rem, 5.6rem);
  --fs-h2: clamp(1.9rem, 2.6vw + 1rem, 3.1rem);
  --fs-h3: clamp(1.2rem, 0.4vw + 1.05rem, 1.4rem);
  --fs-body: clamp(1.0625rem, 0.15vw + 1rem, 1.125rem);
  --fs-small: 0.9375rem;
  --fs-label: 0.72rem;

  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 4.5rem;
  --s-7: 6.5rem;
  --s-8: 9rem;

  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --margin: clamp(1.25rem, 6vw, 5.5rem);
  --measure: 65ch;
  --header-h: 4.5rem;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-tap-highlight-color: rgba(166, 124, 68, 0.15);
}

a,
button {
  touch-action: manipulation;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 430;
  letter-spacing: -0.012em;
  line-height: 1.14;
  font-optical-sizing: auto;
}

h3 {
  font-weight: 520;
  line-height: 1.25;
}

p {
  max-width: var(--measure);
}

a {
  color: inherit;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

::selection {
  background: var(--bronze);
  color: var(--paper);
}

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

.on-dark :focus-visible,
.on-dark:focus-visible {
  outline-color: var(--bronze-light);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--margin);
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1.1rem;
  font-size: var(--fs-small);
  text-decoration: none;
}

.skip-link:focus-visible {
  top: 0.75rem;
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.container {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--margin);
}

.section {
  padding-block: var(--s-7);
}

.section-deep {
  padding-block: var(--s-8);
}

.eyebrow {
  display: block;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: var(--s-3);
}

.on-dark .eyebrow {
  color: var(--bronze-light);
}

.rule-motif {
  border: 0;
  height: 1px;
  background: var(--mist);
  position: relative;
  margin: 0;
}

.rule-motif::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 3rem;
  height: 3px;
  background: var(--bronze);
}

.on-dark .rule-motif {
  background: var(--slate);
}

.on-dark {
  background: var(--ink);
  color: var(--paper);
}

.on-dark p {
  color: var(--fog);
}

.on-dark h1,
.on-dark h2,
.on-dark h3 {
  color: var(--paper);
}

/* --------------------------------------------------------------------------
   4. Buttons and links
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.85rem 1.75rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: border-color 180ms ease-out, background-color 180ms ease-out,
    color 180ms ease-out;
}

.btn:hover {
  border-color: var(--bronze);
}

.btn-on-dark {
  border-color: var(--paper);
  color: var(--paper);
}

.btn-on-dark:hover {
  border-color: var(--bronze-light);
  color: var(--paper);
}

.text-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--mist);
  text-underline-offset: 0.25em;
  transition: text-decoration-color 180ms ease-out;
  padding-block: 0.8rem;
}

.text-link:hover {
  text-decoration-color: var(--bronze);
}

.on-dark .text-link {
  color: var(--paper);
  text-decoration-color: var(--slate);
}

.on-dark .text-link:hover {
  text-decoration-color: var(--bronze-light);
}

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease-out;
}

.site-header.is-scrolled {
  border-bottom-color: var(--mist);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: var(--s-2);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 540;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
  padding-block: 0.65rem;
  margin-block: -0.65rem;
}

.header-link {
  font-size: var(--fs-small);
  font-weight: 500;
  text-decoration: none;
  color: var(--slate);
  padding-block: 0.8rem;
  border-bottom: 1px solid transparent;
  transition: color 180ms ease-out, border-color 180ms ease-out;
  white-space: nowrap;
}

.header-link:hover {
  color: var(--ink);
  border-bottom-color: var(--bronze);
}

/* --------------------------------------------------------------------------
   6. Hero and the deficit line
   -------------------------------------------------------------------------- */
.hero {
  padding-block: var(--s-8) var(--s-7);
}

.hero h1 {
  font-size: var(--fs-hero);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.02em;
  max-width: 13em;
  margin-bottom: var(--s-5);
}

.hero .lede {
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 36em;
  margin-bottom: var(--s-5);
}

.deficit {
  margin-top: var(--s-7);
  max-width: 46rem;
}

.deficit-track {
  position: relative;
  height: 5.25rem;
}

.deficit-base {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--slate);
}

.deficit-gap {
  position: absolute;
  left: 58%;
  right: 0;
  top: calc(50% - 1px);
  height: 3px;
  background: var(--bronze);
}

.deficit-band {
  position: absolute;
  left: 58%;
  right: 0;
  top: calc(50% - 0.9rem);
  height: 1.8rem;
  background: rgba(166, 124, 68, 0.1);
}

.deficit-point {
  position: absolute;
  top: 50%;
  width: 1px;
}

.deficit-point i {
  position: absolute;
  left: 0;
  top: -0.45rem;
  width: 1px;
  height: 0.9rem;
  background: var(--paper);
}

.deficit-point-paid {
  left: 58%;
}

.deficit-point-billed {
  right: 0;
}

.deficit-label {
  position: absolute;
  top: 1rem;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fog);
  white-space: nowrap;
}

.deficit-point-paid .deficit-label {
  left: 0;
  transform: translateX(-50%);
}

.deficit-point-billed .deficit-label {
  right: 0;
}

.deficit-caption {
  position: absolute;
  left: 58%;
  right: 0;
  bottom: calc(50% + 1.4rem);
  text-align: center;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze-light);
  white-space: nowrap;
}

.deficit-note {
  margin-top: var(--s-3);
  font-size: var(--fs-small);
  color: var(--fog);
  max-width: 40em;
}

/* --------------------------------------------------------------------------
   7. Sections
   -------------------------------------------------------------------------- */
.section-head {
  margin-bottom: var(--s-6);
}

.section-head h2 {
  font-size: var(--fs-h2);
  max-width: 18em;
}

.section-head .section-intro {
  margin-top: var(--s-3);
  color: var(--slate);
}

.on-dark .section-head .section-intro {
  color: var(--fog);
}

/* Method: three hairline-topped blocks */
.block-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: var(--gutter);
  row-gap: var(--s-5);
}

.block {
  border-top: 1px solid var(--mist);
  padding-top: var(--s-3);
}

.block h3 {
  font-size: var(--fs-h3);
  margin-bottom: var(--s-2);
}

.block p {
  font-size: var(--fs-small);
  line-height: 1.7;
  color: var(--slate);
}

/* Firms: ledger rows on ink */
.firm-list > div {
  padding-block: var(--s-5);
  border-top: 1px solid var(--slate);
}

.firm-list > div:last-child {
  border-bottom: 1px solid var(--slate);
}

.firm-row {
  display: grid;
  grid-template-columns: 8rem 1fr auto;
  column-gap: var(--gutter);
  row-gap: var(--s-3);
  align-items: start;
}

.firm-sector {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze-light);
  padding-top: 0.4rem;
}

.firm-row h3 {
  font-size: clamp(1.3rem, 1vw + 1rem, 1.7rem);
  margin-bottom: var(--s-2);
}

.firm-row p {
  font-size: var(--fs-small);
  line-height: 1.7;
  max-width: 48ch;
}

.firm-pending p {
  color: var(--fog);
  font-size: var(--fs-small);
  max-width: 48ch;
}

/* --------------------------------------------------------------------------
   8. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding-block: var(--s-7) var(--s-5);
}

.footer-grid {
  display: grid;
  grid-template-columns: 6fr 6fr;
  column-gap: var(--gutter);
  row-gap: var(--s-5);
  margin-bottom: var(--s-6);
}

.monogram {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 540;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--bronze-light);
  border: 1px solid var(--slate);
  padding: 0.35rem 0.55rem;
  margin-bottom: var(--s-3);
}

.footer-wordmark {
  font-family: var(--font-display);
  font-weight: 450;
  font-size: 1.3rem;
  color: var(--paper);
  margin-bottom: var(--s-2);
}

.footer-tag {
  font-size: var(--fs-small);
}

.footer-contact .eyebrow {
  margin-bottom: var(--s-2);
}

.footer-contact p {
  font-size: var(--fs-small);
}

.footer-legal {
  margin-top: var(--s-4);
  font-size: 0.85rem;
  color: var(--fog);
  max-width: none;
}

/* --------------------------------------------------------------------------
   9. Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal,
  html.js .reveal-group > * {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 400ms ease-out, transform 400ms ease-out;
  }

  html.js .reveal.is-visible,
  html.js .reveal-group.is-visible > * {
    opacity: 1;
    transform: none;
  }

  html.js .reveal-group > *:nth-child(2) {
    transition-delay: 40ms;
  }

  html.js .reveal-group > *:nth-child(3) {
    transition-delay: 80ms;
  }

  html.js .deficit-track {
    clip-path: inset(-3rem 100% -3rem 0);
    transition: clip-path 800ms cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  html.js .deficit-track.is-drawn {
    clip-path: inset(-3rem 0 -3rem 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   10. Responsive
   -------------------------------------------------------------------------- */
@media (min-width: 1440px) {
  .container {
    max-width: 1320px;
  }
}

@media (max-width: 1023px) {
  .block-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767px) {
  .section {
    padding-block: var(--s-5);
  }

  .section-deep {
    padding-block: var(--s-6);
  }

  .hero {
    padding-block: var(--s-6) var(--s-5);
  }

  .hero h1 {
    margin-bottom: var(--s-4);
  }

  .hero .lede {
    margin-bottom: var(--s-4);
  }

  .deficit {
    margin-top: var(--s-5);
  }

  .deficit-note {
    font-size: 0.875rem;
  }

  .eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.15em;
  }

  .section-head {
    margin-bottom: var(--s-5);
  }

  .block-row {
    grid-template-columns: 1fr;
  }

  .firm-row {
    grid-template-columns: 1fr;
  }

  .firm-sector {
    padding-top: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    row-gap: var(--s-4);
    margin-bottom: var(--s-5);
  }

  .site-footer {
    padding-block: var(--s-6) var(--s-4);
  }

  .deficit-point-paid .deficit-label {
    transform: none;
  }
}

@media (max-width: 479px) {
  .wordmark {
    font-size: clamp(0.8rem, 4.6vw, 0.95rem);
    letter-spacing: 0;
  }

  .header-inner {
    gap: 0.75rem;
  }
}

@media (max-width: 419px) {
  .deficit-caption {
    letter-spacing: 0.1em;
    font-size: 0.65rem;
  }
}

/* --------------------------------------------------------------------------
   11. Header actions
   -------------------------------------------------------------------------- */
.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.header-btn {
  padding: 0.75rem 1.25rem;
  white-space: nowrap;
}

@media (max-width: 679px) {
  .header-link {
    display: none;
  }
}

@media (max-width: 479px) {
  .header-btn {
    padding: 0.6rem 0.8rem;
    min-height: 44px;
  }
}

/* --------------------------------------------------------------------------
   12. Image band (ink and paper duotone)
   -------------------------------------------------------------------------- */
.duotone {
  position: relative;
  background: var(--ink);
  overflow: hidden;
  isolation: isolate;
  margin: 0;
}

.duotone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.04);
  mix-blend-mode: screen;
}

.duotone::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.image-bleed {
  aspect-ratio: 21 / 9;
}

@media (max-width: 767px) {
  .image-bleed {
    aspect-ratio: 3 / 2;
  }
}

/* --------------------------------------------------------------------------
   13. Statement
   -------------------------------------------------------------------------- */
.statement {
  font-family: var(--font-display);
  font-weight: 410;
  font-size: clamp(1.9rem, 3vw + 0.9rem, 3.6rem);
  line-height: 1.18;
  letter-spacing: -0.012em;
  max-width: 20em;
  font-optical-sizing: auto;
}

.statement::before {
  content: "";
  display: block;
  width: 3.5rem;
  height: 3px;
  background: var(--bronze);
  margin-bottom: var(--s-4);
}

.statement em {
  font-style: normal;
  color: var(--bronze);
}

.statement-support {
  margin-top: var(--s-4);
  color: var(--slate);
  max-width: 40em;
}

/* --------------------------------------------------------------------------
   14. Contact and form
   -------------------------------------------------------------------------- */
:root {
  --field: #FCFBF8;
}

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

.contact-layout {
  display: grid;
  grid-template-columns: 5fr 7fr;
  column-gap: var(--s-6);
  row-gap: var(--s-6);
}

.contact-aside p {
  color: var(--slate);
}

.contact-aside .eyebrow {
  margin-bottom: var(--s-2);
}

.contact-aside > * + .eyebrow {
  margin-top: var(--s-5);
}

.aside-small {
  font-size: var(--fs-small);
}

.contact-form {
  display: grid;
  row-gap: var(--s-4);
}

.field label {
  display: block;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: var(--s-1);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--slate);
  border-radius: 0;
  padding: 0.8rem 0.9rem;
  transition: border-color 180ms ease-out;
}

.field select {
  min-height: 44px;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--ink);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 2px;
  border-color: var(--bronze);
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.required-note {
  font-size: var(--fs-small);
  color: var(--slate);
}

.gdpr-note {
  font-size: var(--fs-small);
  color: var(--slate);
  line-height: 1.6;
  max-width: 56ch;
}

.consent-row {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.75rem;
  align-items: start;
}

.consent-row input[type="checkbox"] {
  width: 1.4rem;
  height: 1.4rem;
  margin-top: 0.55rem;
  accent-color: var(--bronze);
}

/* The label is the primary tap target for the checkbox */
.consent-row label {
  font-size: var(--fs-small);
  color: var(--slate);
  line-height: 1.6;
  padding-block: 0.5rem;
  cursor: pointer;
}

.form-status {
  font-size: var(--fs-small);
  font-weight: 500;
  max-width: 56ch;
}

.form-success {
  color: #1E3B32;
}

.form-error {
  color: var(--ink);
}

.hp-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.footer-small {
  font-size: 0.85rem;
}

@media (max-width: 767px) {
  .contact-layout {
    grid-template-columns: 1fr;
    row-gap: var(--s-5);
  }

  .contact-form button[type="submit"] {
    width: 100%;
  }
}

.btn-label-short {
  display: none;
}

@media (max-width: 599px) {
  .btn-label-long {
    display: none;
  }

  .btn-label-short {
    display: inline;
  }
}

h1,
h2 {
  text-wrap: balance;
}
