/* ==========================================================================
   2see2know Design System
   A healthcare innovation holding company. Clinical precision, human warmth.

   Palette is derived from brand marks, not invented:
     #454A4D  2see2know wordmark slate   -> slate scale
     #34ADBF  2see2know device teal      -> teal scale
     #102F4C  established site navy      -> navy scale
     #73A161  liveably sage              -> sage scale
     #BFC173  liveably olive             -> olive scale

   Every text/background pair below is contrast-tested. Ratios are noted
   inline. Do not use --c-teal or --c-olive for text on light surfaces.
   ========================================================================== */

/* --- 1. Tokens ----------------------------------------------------------- */
:root {
  /* Primary — Deep Trust Navy */
  --navy-900: #08192A;
  --navy-800: #0B2338;
  --navy-700: #102F4C;   /* brand navy      13.70:1 on white */
  --navy-600: #1A4570;
  --navy-500: #255C93;

  /* Primary accent — Clinical Teal */
  --teal-800: #0E5A66;
  --teal-700: #127683;   /* text + buttons   5.32:1 on white */
  --teal-600: #1793A3;   /* large text only  3.66:1 on white */
  --teal-500: #34ADBF;   /* BRAND MARK. decorative on light; text on navy only */
  --teal-300: #7FCFDB;   /* text on navy     7.73:1 */
  --teal-100: #D6F0F4;
  --teal-50:  #EEF9FB;

  /* Secondary — Innovation Slate */
  --slate-900: #23282B;
  --slate-800: #343A3D;  /* body text       11.55:1 on white */
  --slate-700: #454A4D;  /* brand mark slate */
  --slate-500: #6B7276;  /* muted text       4.89:1 on white */
  --slate-400: #8E9599;
  --slate-300: #C3CACE;
  --slate-200: #DDE4E8;  /* borders */
  --slate-100: #EDF1F3;  /* clinical grey */
  --slate-50:  #F7F9FA;  /* clinical grey, lightest */

  /* Secondary — Soft Sage (sustainability + accessibility accents) */
  --sage-700: #3F6A34;
  --sage-600: #52803F;   /* text             4.65:1 on white */
  --sage-500: #73A161;   /* liveably mark. decorative */
  --sage-100: #E4EEDD;
  --olive-600: #8A8C3E;  /* large text only  3.56:1 */
  --olive-500: #BFC173;  /* liveably mark. decorative */
  --olive-100: #F2F3DF;

  --white: #FFFFFF;

  /* Semantic assignment — components reference these, never raw scale */
  --c-bg:            var(--white);
  --c-bg-subtle:     var(--slate-50);
  --c-bg-muted:      var(--slate-100);
  --c-bg-inverse:    var(--navy-700);
  --c-bg-accent:     var(--teal-50);
  --c-bg-sage:       var(--sage-100);

  --c-text:          var(--slate-800);
  --c-text-strong:   var(--navy-700);
  --c-text-muted:    var(--slate-500);
  --c-text-inverse:  var(--white);
  --c-text-on-dark-muted: var(--slate-300);

  --c-accent:        var(--teal-700);
  --c-accent-hover:  var(--teal-800);
  --c-accent-bright: var(--teal-500);
  --c-accent-on-dark:var(--teal-300);
  --c-sage:          var(--sage-600);

  --c-border:        var(--slate-200);
  --c-border-strong: var(--slate-300);
  --c-focus:         var(--teal-700);

  /* Type */
  --font-heading: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --t-display: clamp(2.5rem, 1.6rem + 3.6vw, 4rem);      /* 40 -> 64 */
  --t-h1:      clamp(2rem, 1.45rem + 2.2vw, 3rem);       /* 32 -> 48 */
  --t-h2:      clamp(1.5rem, 1.25rem + 1vw, 2rem);       /* 24 -> 32 */
  --t-h3:      clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem);
  --t-lead:    clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --t-body:    1.0625rem;   /* 17px — generous for accessibility */
  --t-sm:      0.9375rem;
  --t-xs:      0.8125rem;

  --lh-tight: 1.15;
  --lh-snug:  1.3;
  --lh-body:  1.7;    /* generous line-height, per brief */
  --lh-loose: 1.8;

  --track-tight: -0.02em;
  --track-eyebrow: 0.09em;

  /* Spacing — 8pt grid, 4px half-steps */
  --s-1: 0.25rem;  --s-2: 0.5rem;   --s-3: 0.75rem;  --s-4: 1rem;
  --s-5: 1.5rem;   --s-6: 2rem;     --s-7: 2.5rem;   --s-8: 3rem;
  --s-9: 4rem;     --s-10: 5rem;    --s-11: 6rem;    --s-12: 8rem;

  /* Radii — soft, 8–12px, per brief */
  --r-sm: 6px;
  --r-md: 8px;    /* buttons, inputs, tags */
  --r-lg: 12px;   /* cards, media, panels */
  --r-xl: 16px;   /* large feature panels */
  --r-pill: 999px;

  /* Elevation — restrained. Clinical, not glossy. */
  --e-1: 0 1px 2px rgba(16, 47, 76, 0.05);
  --e-2: 0 2px 8px rgba(16, 47, 76, 0.06), 0 1px 2px rgba(16, 47, 76, 0.04);
  --e-3: 0 8px 24px rgba(16, 47, 76, 0.09), 0 2px 6px rgba(16, 47, 76, 0.05);

  /* Structure */
  --container: 1200px;
  --container-narrow: 760px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --section-y: clamp(3.5rem, 7vw, 7rem);

  --transition: 160ms cubic-bezier(0.32, 0.72, 0, 1);
}

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

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

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
ul, ol { padding: 0; list-style: none; }

:where(a, button, input, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

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

/* --- 3. Type ------------------------------------------------------------- */
h1, h2, h3, h4,
.t-display, .t-h1, .t-h2, .t-h3 {
  font-family: var(--font-heading);
  color: var(--c-text-strong);
  font-weight: 700;
  letter-spacing: var(--track-tight);
  text-wrap: balance;
}

.t-display { font-size: var(--t-display); line-height: var(--lh-tight); font-weight: 800; }
h1, .t-h1   { font-size: var(--t-h1);   line-height: var(--lh-tight); }
h2, .t-h2   { font-size: var(--t-h2);   line-height: var(--lh-snug); }
h3, .t-h3   { font-size: var(--t-h3);   line-height: var(--lh-snug); }

.t-lead {
  font-size: var(--t-lead);
  line-height: var(--lh-loose);
  color: var(--c-text-muted);
  font-weight: 400;
  text-wrap: pretty;
}

p { text-wrap: pretty; }
p + p { margin-top: var(--s-4); }

.t-sm { font-size: var(--t-sm); }
.t-muted { color: var(--c-text-muted); }
.t-strong { font-weight: 600; color: var(--c-text-strong); }

/* Eyebrow — the system's orienting device. Teal rule + tracked caps. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-heading);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--s-4);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--c-accent-bright);
  flex: none;
}

/* Headline accent. Picks up the teal that the surface behind it can carry:
   teal-700 on light (5.3:1), teal-300 on navy (7.7:1). */
.hl { color: var(--c-accent); font-weight: inherit; font-style: normal; }
.section--inverse .hl,
.hero .hl,
.site-footer .hl { color: var(--c-accent-on-dark); }

a { color: var(--c-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--c-accent-hover); }

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

.section { padding-block: var(--section-y); }
.section--subtle  { background: var(--c-bg-subtle); }
.section--muted   { background: var(--c-bg-muted); }
.section--inverse { background: var(--c-bg-inverse); color: var(--c-text-inverse); }
.section--inverse :where(h1,h2,h3,h4) { color: var(--c-text-inverse); }
.section--inverse .t-lead { color: var(--c-text-on-dark-muted); }
.section--inverse .eyebrow { color: var(--c-accent-on-dark); }
.section--inverse a:not(.btn) { color: var(--c-accent-on-dark); }

/* 12-column grid — strict alignment, per brief */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-6);
}
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

.stack > * + * { margin-top: var(--s-4); }
.stack-lg > * + * { margin-top: var(--s-6); }
.section-head { max-width: 720px; margin-bottom: var(--s-8); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }

.rule { height: 1px; background: var(--c-border); border: 0; }

@media (max-width: 900px) {
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8 { grid-column: span 12; }
}

/* --- 5. Components ------------------------------------------------------- */

/* 5.1 Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-family: var(--font-heading);
  font-size: var(--t-sm);
  font-weight: 700;
  letter-spacing: 0.005em;
  line-height: 1;
  padding: 0.875rem 1.5rem;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--c-accent); color: var(--white); }
.btn--primary:hover { background: var(--c-accent-hover); color: var(--white); }

.btn--secondary { background: transparent; color: var(--c-text-strong); border-color: var(--c-border-strong); }
.btn--secondary:hover { border-color: var(--c-accent); color: var(--c-accent); background: var(--teal-50); }

.btn--inverse { background: var(--white); color: var(--navy-700); }
.btn--inverse:hover { background: var(--teal-50); color: var(--navy-800); }

.btn--ghost-inverse { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.35); }
.btn--ghost-inverse:hover { background: rgba(255,255,255,0.1); color: var(--white); border-color: rgba(255,255,255,0.6); }

/* 5.2 Cards */
.card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--e-1);
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.card--raised { box-shadow: var(--e-2); }
.card--interactive:hover { box-shadow: var(--e-3); border-color: var(--teal-100); transform: translateY(-2px); }
.card--accent { border-top: 3px solid var(--c-accent-bright); }
.card--sage { background: var(--c-bg-sage); border-color: transparent; }
.card--sage .card__body { color: var(--slate-800); }   /* 10.3:1 on sage-100 */
.card--tint { background: var(--c-bg-accent); border-color: transparent; }
.card__title { font-size: var(--t-h3); margin-bottom: var(--s-3); }
.card__body { color: var(--c-text-muted); font-size: var(--t-body); }

/* Numbered card — the index sits in the corner, quiet but structural */
.card__index {
  font-family: var(--font-heading);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: var(--track-eyebrow);
  color: var(--c-accent);
  display: block;
  margin-bottom: var(--s-4);
}

/* 5.3 Tags */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.375rem 0.75rem;
  border-radius: var(--r-pill);
  background: var(--teal-50);
  color: var(--teal-800);
  border: 1px solid var(--teal-100);
}
.tag--sage { background: var(--sage-100); color: var(--sage-700); border-color: transparent; }
.tag--neutral { background: var(--slate-100); color: var(--slate-700); border-color: transparent; }
.tag--on-dark { background: rgba(255,255,255,0.12); color: var(--white); border-color: rgba(255,255,255,0.25); }

/* 5.4 Stat / metric */
.stat__value {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 1.5rem + 1.6vw, 2.75rem);
  font-weight: 800;
  line-height: 1;
  color: var(--c-text-strong);
  letter-spacing: var(--track-tight);
}
.stat__label {
  font-size: var(--t-sm);
  color: var(--c-text-muted);
  margin-top: var(--s-2);
}
.section--inverse .stat__value,
.hero .stat__value { color: var(--c-accent-on-dark); }
.section--inverse .stat__label,
.hero .stat__label { color: var(--c-text-on-dark-muted); }   /* 8.3:1 on navy */

/* 5.5 Media frame */
.frame {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--c-border);
  background: var(--c-bg-subtle);
}
.frame--plain { border: 0; background: transparent; }
.frame img { width: 100%; }
.frame--pad { padding: var(--s-5); }

/* 5.6 Checklist — sage marks accessibility + sustainability commitments */
.checklist { display: grid; gap: var(--s-3); }
.checklist li {
  display: grid;
  grid-template-columns: 1.375rem 1fr;
  gap: var(--s-3);
  align-items: start;
  font-size: var(--t-body);
}
.checklist li::before {
  content: "";
  width: 1.375rem; height: 1.375rem;
  margin-top: 0.22em;
  border-radius: var(--r-pill);
  background: var(--sage-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6A34' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/0.8rem no-repeat;
}
.section--inverse .checklist li::before {
  background-color: rgba(127, 207, 219, 0.16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237FCFDB' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

/* 5.7 Site header */
.site-header {
  position: sticky;
  top: 0;
  /* Opaque and above everything: the page scrolls UNDER the bar rather than
     showing through it, which read as the content riding over the nav. */
  z-index: 200;
  background: var(--white);
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 1px 0 rgba(16, 47, 76, 0.04);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  min-height: 72px;
  padding-block: var(--s-3);
}
.site-header__logo img { height: 26px; width: auto; }
.site-nav { display: flex; align-items: center; gap: var(--s-5); }
.site-nav a:not(.btn) {
  font-family: var(--font-heading);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--c-text);
  text-decoration: none;
}
.site-nav a:not(.btn):hover { color: var(--c-accent); }
@media (max-width: 760px) { .site-nav__links { display: none; } }

/* 5.8 Hero — navy over the header photograph, brand continuity */
.hero {
  position: relative;
  isolation: isolate;
  background: var(--navy-700);
  color: var(--c-text-inverse);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background: url('../header-image.jpg') center/cover no-repeat;
}
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, rgba(8,25,42,0.94) 0%, rgba(16,47,76,0.88) 55%, rgba(16,47,76,0.72) 100%);
}
.hero__inner { padding-block: clamp(4rem, 9vw, 8.5rem); }
.hero__logo { width: min(260px, 68%); margin-bottom: var(--s-7); }
.hero :where(h1, h2, h3) { color: var(--white); }
.hero h1 { max-width: 16ch; }
.hero__lead { color: var(--slate-200); font-size: var(--t-lead); line-height: var(--lh-loose); max-width: 58ch; }
.hero .eyebrow { color: var(--c-accent-on-dark); }
.hero a:not(.btn) { color: var(--c-accent-on-dark); }
.hero .eyebrow::before { background: var(--c-accent-bright); }

/* 5.9 Venture panel */
.venture {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(var(--s-6), 4vw, var(--s-9));
  align-items: center;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: clamp(var(--s-5), 3vw, var(--s-8));
  box-shadow: var(--e-2);
}
.venture__logo { width: 190px; margin-bottom: var(--s-5); }
@media (max-width: 900px) { .venture { grid-template-columns: 1fr; } }

/* 5.10 Footer */
.site-footer {
  background: var(--navy-900);
  color: var(--slate-300);
  padding-block: var(--s-8) var(--s-6);
  font-size: var(--t-sm);
}
.site-footer a { color: var(--teal-300); }
.site-footer__logo { width: 168px; margin-bottom: var(--s-5); }
.site-footer__grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-6);
  justify-content: space-between;
  align-items: flex-end;
}
.site-footer__legal {
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid rgba(255,255,255,0.12);
  color: var(--slate-400);
  font-size: var(--t-xs);
}

/* 5.11 Skip link */
.skip-link {
  position: absolute;
  left: var(--s-4); top: var(--s-4);
  transform: translateY(-200%);
  z-index: 100;
  background: var(--white);
  color: var(--navy-700);
  font-weight: 700;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  box-shadow: var(--e-3);
  text-decoration: none;
  transition: transform var(--transition);
}
.skip-link:focus { transform: translateY(0); }
