/* ==========================================================================
   C7 — reset, self-hosted faces, base typography, shared utilities
   ========================================================================== */

/* --- Fonts ---------------------------------------------------------------
   Self-hosted rather than pulled from a font CDN: the site must render its own
   typography on a shared host with no outbound requests, and a blocked CDN must
   never leave the page in a fallback face. `swap` keeps text visible while the
   variable file loads, which protects LCP. */
@font-face {
  font-family: "Plus Jakarta Sans Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../../fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations");
  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+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Plus Jakarta Sans Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../../fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("../../fonts/source-serif-4-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("../../fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

* {
  margin: 0;
}

/* Every component below sets its own `display`, and any author rule beats the
   browser's own `[hidden] { display: none }`. Without this line an element the
   markup has explicitly hidden is still drawn — which is exactly what happened:
   the success panel under the contact and consultation forms carries `hidden`,
   but `.c7-notice { display: flex }` won, so every visitor was shown an empty
   green confirmation box before they had submitted anything. The admin reset has
   carried this rule since it hit the same bug; the public sheet never did. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchored sections must not slide under the sticky header. */
  scroll-padding-top: calc(var(--c7-header-height) + var(--c7-space-4));
}

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

body {
  min-height: 100vh;
  background: var(--c7-canvas);
  color: var(--c7-text);
  font-family: var(--c7-font);
  font-size: var(--c7-text-base);
  font-weight: var(--c7-weight-regular);
  line-height: var(--c7-leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* A <picture> only ever wraps one image; letting it size itself from the image's
   intrinsic width is never what a layout wants. */
picture {
  width: 100%;
}

img {
  height: auto;
  /* An image that has not loaded should read as paper, not as a black hole. */
  background-color: var(--c7-ink-100);
}

/* …except a picture with its own transparency — the logo, flags, icons. The
   placeholder tint showed through them as a grey box behind the logo. */
img[src*="/uploads/branding/"],
img[src*=".png"],
img[src*=".svg"] {
  background-color: transparent;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

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

a {
  color: var(--c7-brand);
  text-decoration-color: color-mix(in srgb, var(--c7-brand) 35%, transparent);
  text-underline-offset: 0.18em;
  transition: color var(--c7-duration-fast) var(--c7-ease);
}

a:hover {
  color: var(--c7-brand-hover);
}

::selection {
  background: var(--c7-selection-bg);
  color: var(--c7-meridian-950);
}

/* A visible, branded focus ring everywhere — never `outline: none`. */
:focus-visible {
  outline: 2px solid var(--c7-focus);
  outline-offset: 2px;
  border-radius: var(--c7-radius-xs);
}

/* --- Base typography ------------------------------------------------------ */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--c7-text-strong);
  font-weight: var(--c7-weight-bold);
  line-height: var(--c7-leading-tight);
  letter-spacing: var(--c7-tracking-heading);
  text-wrap: balance;
}

h1 {
  font-size: var(--c7-text-display-2);
  letter-spacing: var(--c7-tracking-display);
}

h2 {
  font-size: var(--c7-text-display-3);
}

h3 {
  font-size: var(--c7-text-2xl);
  line-height: var(--c7-leading-snug);
}

h4 {
  font-size: var(--c7-text-xl);
  line-height: var(--c7-leading-snug);
}

h5,
h6 {
  font-size: var(--c7-text-lg);
  line-height: var(--c7-leading-snug);
}

p {
  text-wrap: pretty;
}

strong,
b {
  font-weight: var(--c7-weight-semibold);
  color: var(--c7-text-strong);
}

/* --- Layout primitives ---------------------------------------------------- */
.c7-container {
  width: 100%;
  max-width: var(--c7-container);
  margin-inline: auto;
  padding-inline: var(--c7-gutter);
}

.c7-container--narrow {
  max-width: var(--c7-container-narrow);
}

.c7-container--wide {
  max-width: var(--c7-container-wide);
}

.c7-section {
  padding-block: var(--c7-section-y);
  position: relative;
}

.c7-section--tight {
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
}

.c7-section--surface {
  background: var(--c7-surface);
}

.c7-section--sunken {
  background: var(--c7-canvas-alt);
}

.c7-section--warm {
  background: var(--c7-canvas-warm);
}

.c7-section--inverse {
  background: var(--c7-surface-inverse);
  color: var(--c7-text-inverse-muted);
}

.c7-section--inverse h1,
.c7-section--inverse h2,
.c7-section--inverse h3,
.c7-section--inverse h4,
.c7-section--inverse h5,
.c7-section--inverse h6 {
  color: var(--c7-text-inverse);
}

.c7-stack > * + * {
  margin-block-start: var(--c7-space-4);
}

.c7-grid {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

/* Auto-fit grids: cards find their own column count, and a lone card never
   stretches to full width because the track is capped by the max-width. */
.c7-grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
}

.c7-grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
}

.c7-grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
}

/* --- Gap-free grid --------------------------------------------------------
   A CSS grid lays its last row out in the same tracks as the rest, so five
   items in a three-column grid leave a visible hole in the bottom-right. The
   client treats that hole as a defect.

   Flexbox does not work that way: the items on the final row grow to share
   whatever width is left, so the block always ends flush. `--c7-grid-min` sets
   the point at which a row wraps, and the row count follows from it. */
.c7-grid--fill {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.c7-grid--fill > * {
  flex: 1 1 var(--c7-grid-min, 17rem);
  /* Without this a long word inside a card can push its flex base past the
     container and take the row with it. */
  min-width: 0;
}

/* A lone item would otherwise stretch to the full width and read as a banner
   rather than a card. */
.c7-grid--fill > :only-child {
  flex-grow: 0;
  max-width: min(28rem, 100%);
}

/* --- Section headers ------------------------------------------------------ */
.c7-section-head {
  max-width: 44rem;
  margin-block-end: clamp(2rem, 4vw, 3.25rem);
}

.c7-section-head--center {
  margin-inline: auto;
  text-align: center;
}

.c7-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--c7-space-2);
  margin-block-end: var(--c7-space-3);
  color: var(--c7-gold-700);
  font-size: var(--c7-text-xs);
  font-weight: var(--c7-weight-bold);
  letter-spacing: var(--c7-tracking-caps);
  text-transform: uppercase;
}

.c7-eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  border-radius: var(--c7-radius-pill);
  background: var(--c7-gradient-accent);
}

.c7-section-head--center .c7-eyebrow::before {
  display: none;
}

.c7-section--inverse .c7-eyebrow {
  color: var(--c7-gold-400);
}

.c7-section-head__title {
  font-size: var(--c7-text-display-3);
}

.c7-section-head__lede {
  margin-block-start: var(--c7-space-4);
  color: var(--c7-text-muted);
  font-size: var(--c7-text-lg);
  line-height: var(--c7-leading-relaxed);
}

.c7-section--inverse .c7-section-head__lede {
  color: var(--c7-text-inverse-muted);
}

/* --- Rich text (Quill output) --------------------------------------------
   Scoped so editor HTML gets real typography without leaking these rules onto
   designed components elsewhere on the page. */
.c7-prose {
  color: var(--c7-text);
  font-size: var(--c7-text-base);
  line-height: var(--c7-leading-relaxed);
}

.c7-prose > * + * {
  margin-block-start: var(--c7-space-4);
}

.c7-prose h2 {
  margin-block-start: var(--c7-space-10);
  font-size: var(--c7-text-2xl);
}

.c7-prose h3 {
  margin-block-start: var(--c7-space-8);
  font-size: var(--c7-text-xl);
}

.c7-prose h4 {
  margin-block-start: var(--c7-space-6);
  font-size: var(--c7-text-lg);
}

.c7-prose > :first-child {
  margin-block-start: 0;
}

.c7-prose ul,
.c7-prose ol {
  padding-inline-start: var(--c7-space-6);
}

.c7-prose li + li {
  margin-block-start: var(--c7-space-2);
}

.c7-prose ul {
  list-style: none;
  padding-inline-start: 0;
}

.c7-prose ul > li {
  position: relative;
  padding-inline-start: var(--c7-space-6);
}

.c7-prose ul > li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0.6em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--c7-gold-500);
}

/* The editor's indent buttons write these classes onto the list item. Without a
   rule here the client presses Indent, sees the change in the admin panel, and
   the published page renders it flat — a control that quietly does nothing. */
.c7-prose li.ql-indent-1 {
  margin-inline-start: var(--c7-space-6);
}

.c7-prose li.ql-indent-2 {
  margin-inline-start: calc(var(--c7-space-6) * 2);
}

.c7-prose li.ql-indent-3 {
  margin-inline-start: calc(var(--c7-space-6) * 3);
}

/* A nested bullet reads as a sub-point, so it is drawn hollow rather than
   competing with the solid gold dot of the level above it. */
.c7-prose ul > li[class*="ql-indent-"]::before {
  background: transparent;
  border: 1px solid var(--c7-gold-500);
}

.c7-prose a {
  font-weight: var(--c7-weight-medium);
  text-decoration: underline;
}

.c7-prose blockquote {
  margin-inline: 0;
  padding: var(--c7-space-5) var(--c7-space-6);
  border-inline-start: 3px solid var(--c7-gold-500);
  background: var(--c7-canvas-warm);
  border-radius: 0 var(--c7-radius-md) var(--c7-radius-md) 0;
  color: var(--c7-text-strong);
  font-family: var(--c7-font-serif);
  font-size: var(--c7-text-lg);
}

.c7-prose img {
  border-radius: var(--c7-radius-md);
}

.c7-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--c7-text-sm);
}

.c7-prose th,
.c7-prose td {
  padding: var(--c7-space-3);
  border: 1px solid var(--c7-border);
  text-align: start;
}

.c7-prose th {
  background: var(--c7-surface-sunken);
  color: var(--c7-text-strong);
  font-weight: var(--c7-weight-semibold);
}

/* A wide table must scroll inside its own container, never push the page sideways. */
.c7-prose-scroll {
  overflow-x: auto;
}

/* --- Utilities ------------------------------------------------------------ */
.c7-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.c7-skip-link {
  position: absolute;
  inset-inline-start: var(--c7-space-4);
  inset-block-start: -100%;
  z-index: var(--c7-z-skip);
  padding: var(--c7-space-3) var(--c7-space-5);
  border-radius: var(--c7-radius-sm);
  background: var(--c7-meridian-900);
  color: var(--c7-white);
  font-weight: var(--c7-weight-semibold);
  text-decoration: none;
}

.c7-skip-link:focus {
  inset-block-start: var(--c7-space-4);
  color: var(--c7-white);
}

.c7-serif {
  font-family: var(--c7-font-serif);
}

.c7-text-muted {
  color: var(--c7-text-muted);
}

.c7-no-scroll {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Scrollbars — slim, navy with a gold hover, instead of the browser's grey
   default. Firefox takes the two standard properties; Chrome, Edge and
   Safari the ::-webkit-scrollbar parts.
   -------------------------------------------------------------------------- */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--c7-meridian-700) var(--c7-ink-100);
}

html * {
  scrollbar-width: thin;
  scrollbar-color: rgb(19 43 72 / 0.55) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

html::-webkit-scrollbar-track {
  background: var(--c7-ink-100);
}

::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--c7-meridian-600), var(--c7-meridian-800)) padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--c7-gold-500), var(--c7-gold-700)) padding-box;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* A table inside an article fits the screen on a phone: its cells wrap
   instead of the table scrolling sideways. */
@media (max-width: 40rem) {
  .c7-prose-scroll {
    overflow-x: visible;
  }

  .c7-prose table {
    width: 100%;
    table-layout: fixed;
    font-size: var(--c7-text-sm);
  }

  .c7-prose th,
  .c7-prose td {
    overflow-wrap: anywhere;
    word-break: normal;
  }
}

/* A narrow reading column inside a full container (a page's own text, the
   privacy policy, How We Work) sits in the middle of the page, not against its
   left edge with the right half empty. */
.c7-prose.c7-container--narrow {
  margin-inline: auto;
}
