/* Layout: one reading column with a two-part hero (statement + sample study card), sections numbered like a statute. */
/* Brand v4: gold rings logo on the brand teal #069494.
   Readability rule: white on #069494 is 3.7:1, which passes only for LARGE text (bold >= 19px, or >= 24px).
   So text sitting directly on the teal is bold and >= 19px; anything smaller lives on deeper-teal
   panels (#057A7A, white 5.2:1) - header, footer, cards, labels, legal text. */
:root {
  --paper: #069494;       /* brand teal (exact) */
  --panel: #057A7A;       /* deeper teal for small text: white 5.2:1 */
  --panel-2: #046A6A;     /* card backing / pressed: white 6.4:1 */
  --ink: #FFFFFF;
  --muted: #E6F6F6;       /* 4.6:1 on --panel; use only on panels */
  --rule: #3BB0B0;        /* hairlines on the teal */
  --rule-panel: #2E9696;  /* hairlines inside panels */
  --accent: #FFFFFF;      /* links are white + underlined */
  --btn-bg: #FFFFFF;
  --btn-ink: #04484A;     /* 10.3:1 on white */

  --display: Montserrat, "Helvetica Neue", Arial, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --large: 1.1875rem;     /* 19px: bold at this size counts as large text */
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.7rem;
  --step-3: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem);
  --radius: 6px;
  --measure: 65ch;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--large);
  font-weight: 700;        /* on the teal, body copy is bold and 19px (large text) */
  line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:focus-visible, button:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 3px; border-radius: 3px; }

.wrap {
  width: 100%;
  max-width: 68rem;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Panels: deeper teal surface for any text smaller than 19px bold */
.site-header, .site-footer, .study-card, .app, .contact-list, .eyebrow, .sec-label, .doc .wrap { background: var(--panel); }
.site-header, .site-footer, .study-card, .app, .contact-list, .doc .wrap { font-weight: 400; font-size: var(--step-0); }

/* Header */
.site-header { border-bottom: 1px solid var(--rule-panel); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 0.9rem; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--ink); text-decoration: none; }
.brand img { width: 64px; height: 41px; display: block; }
/* 3D wordmark: polished-gold face over a thin bronze extrusion (matches the gold LexMi in the logo) */
.wm { position: relative; isolation: isolate; font-family: Montserrat, "Helvetica Neue", Arial, sans-serif; font-weight: 800; font-size: 1.55rem; line-height: 1; letter-spacing: -0.01em; white-space: nowrap; }
.wm::before { content: attr(data-text); position: absolute; inset: 0; z-index: -1; color: #9C6B28;
  text-shadow: -0.003em 0.007em 0 #85571C, -0.006em 0.014em 0 #5E3D12, -0.012em 0.045em 0.05em rgba(0,0,0,.45); }
.wm > span { position: relative;
  background: linear-gradient(180deg, #FFF6D8 0%, #F6DE9F 22%, #E0B65E 48%, #F3D48C 62%, #C99643 84%, #EBC77A 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-nav a { color: #FFFFFF; font-weight: 700; text-decoration: none; font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase; }
.site-nav a:hover { text-decoration: underline; }

/* Labels: small, so they sit on a deeper-teal chip */
.eyebrow, .sec-label {
  display: inline-block; font-family: var(--mono); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: #FFFFFF; padding: 0.3rem 0.7rem; border-radius: 12px; margin: 0 0 1rem;
}

/* Hero */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding-block: clamp(3rem, 8vw, 6rem); }
h1 { font-family: var(--display); font-weight: 800; letter-spacing: -0.015em; font-size: var(--step-3); line-height: 1.08; margin: 0 0 1.25rem; text-wrap: balance; }
.lede { font-size: var(--step-1); font-weight: 700; line-height: 1.5; color: #FFFFFF; max-width: 34ch; margin: 0 0 2rem; }
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; padding: 0.7rem 1.25rem; border-radius: var(--radius); font-weight: 700; font-size: var(--large); text-decoration: none; border: 2px solid #FFFFFF; }
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); }
.btn-primary:hover { background: #E6F6F6; }
.btn-quiet { color: #FFFFFF; background: transparent; }
.btn-quiet:hover { background: var(--panel); }

/* Sample study card */
.card-stack { position: relative; padding: 1.25rem 0.5rem 0.5rem 1.25rem; }
.card-stack::before {
  content: ""; position: absolute; inset: 0 1.25rem 1.25rem 0;
  border-radius: 12px; background: var(--panel-2); transform: rotate(-2.5deg);
}
.study-card {
  position: relative; border: 1px solid var(--rule-panel); border-radius: 12px;
  padding: 1.5rem; box-shadow: 0 22px 44px -26px rgba(0, 40, 40, 0.75);
}
.study-card .cite { font-family: var(--mono); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: #FFFFFF; margin: 0 0 0.9rem; }
.study-card .q { font-family: var(--display); font-weight: 700; font-size: 1.45rem; line-height: 1.2; margin: 0 0 1rem; }
.study-card hr { border: 0; border-top: 1px dashed #5FC0C0; margin: 1rem 0; }
.study-card .a { margin: 0; }
.study-card .tag { margin: 1.1rem 0 0; font-size: var(--step--1); color: var(--muted); }

/* Sections, numbered like a statute */
.section { border-top: 1px solid var(--rule); }
.section .wrap { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
h2 { font-family: var(--display); font-weight: 700; font-size: var(--step-2); line-height: 1.2; margin: 0 0 1.5rem; text-wrap: balance; }
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1rem; }

.apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.apps:has(> .app:only-child) { grid-template-columns: minmax(0, 42rem); }
.app {
  display: flex; flex-direction: column; gap: 0.6rem; min-width: 0;
  border: 1px solid var(--rule-panel); border-radius: 12px; padding: 1.5rem;
}
.app-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.app h3 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.15; margin: 0; }
.app .kind { font-size: var(--step--1); color: var(--muted); margin: 0; }
.app p { margin: 0; }
.status {
  font-family: var(--mono); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: #FFFFFF; border: 1px solid currentColor; border-radius: 999px; padding: 0.15rem 0.6rem; white-space: nowrap;
}

.contact-list { list-style: none; padding: 1.25rem 1.5rem; margin: 0; display: grid; gap: 0.6rem; border-radius: 12px; max-width: 42rem; }
.contact-list li { display: flex; gap: 1rem; flex-wrap: wrap; }
.contact-list .k { min-width: 7rem; color: var(--muted); }

/* Legal pages: the whole document sits on a deeper-teal panel so normal-weight text stays readable */
.doc .wrap { max-width: min(68rem, calc(100% - 24px)); border-radius: 14px; margin-block: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.5rem, 4vw, 3rem) clamp(16px, 4vw, 3rem); }
.doc h1 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.8rem); }
.doc .meta { color: var(--muted); margin: 0 0 2.5rem; }
.doc h2 { font-size: var(--step-1); margin: 2.25rem 0 0.75rem; }
.doc ul { padding-left: 1.25rem; margin: 0 0 1rem; }
.doc li { margin-bottom: 0.4rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule-panel); color: var(--muted); font-size: var(--step--1); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.75rem; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer a { color: #FFFFFF; }

@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .apps { grid-template-columns: minmax(0, 1fr); }
  .lede { max-width: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .study-card { animation: settle 700ms ease-out both; }
  @keyframes settle { from { transform: translateY(8px) rotate(1deg); } to { transform: none; } }
}

/* Brand photo in "Who we are" */
.brand-photo { display: block; width: 100%; max-width: 44rem; height: auto; border-radius: 12px; border: 1px solid var(--rule-panel);
  margin: 0 0 1.75rem; box-shadow: 0 24px 48px -28px rgba(0, 40, 40, .8); }
