/* ===========================================================================
   REGISIA PUBLIC SITE
   ---------------------------------------------------------------------------
   One stylesheet, no JavaScript, no webfonts, no third-party origin.

   The palette is the six approved Regisia brand colours and nothing else —
   the same set frontend/chat-ui/src/styles/tokens.css documents, with the
   same measured roles:

     NAVY  #08264F  deep chrome and dark bands; white on it is 14.99:1
     BLUE  #0F4A75  the one brand colour legible as text on white (9.31:1),
                    so it is the link and primary-action colour on light
     TEAL  #37A6AE  the distinctive accent. 2.91:1 on white, so it is NEVER
                    text on a light surface — rules, icons on dark, and a
                    button ground with navy ink (5.16:1)
     MINT  #ABCBBF  a tinted surface with navy ink (8.59:1), and secondary
                    text on navy (8.59:1)
     SLATE #5D6773  secondary text on light surfaces (5.75:1 on white)
     WHITE #FFFFFF

   No gradients: the brand does not use them.
   ======================================================================== */

:root {
  --navy: #08264f;
  --navy-raised: #0a2c5a;
  --blue: #0f4a75;
  --teal: #37a6ae;
  --mint: #abcbbf;
  --slate: #5d6773;
  --paper: #ffffff;
  --page: #f7f9fc;
  --sunken: #eef2f7;
  --ink: #16233b;               /* body text: navy-family, 13.9:1 on white */
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --rule-on-dark: rgba(171, 203, 191, 0.25);
  --shadow-card: 0 1px 2px rgba(8, 38, 79, 0.05);
  --shadow-raised: 0 1px 3px rgba(8, 38, 79, 0.09), 0 1px 2px rgba(8, 38, 79, 0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --container: 72rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

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

img, svg { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  color: var(--navy);
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin: 0 0 0.75em;
  font-weight: 650;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.15rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.05rem); }
h3 { font-size: 1.185rem; letter-spacing: -0.008em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--navy); }

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 2px;
}
/* Dark surfaces flip the ring to white — 17.28:1 on navy. */
.on-dark :focus-visible,
.site-footer :focus-visible,
.hero :focus-visible,
.cta-band :focus-visible {
  outline-color: var(--paper);
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.75rem;
  z-index: 50;
  background: var(--navy);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
}
.skip-link:focus-visible { left: 0.75rem; }

/* ---------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}
.btn-sm { min-height: 44px; padding: 0.4rem 1.1rem; font-size: 0.95rem; }
.btn-navy { background: var(--navy); color: var(--paper); }
.btn-navy:hover { background: var(--navy-raised); color: var(--paper); }
.btn-outline-navy { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline-navy:hover { background: var(--sunken); color: var(--navy); }
/* Teal ground carries NAVY ink — 5.16:1. White on teal (2.91:1) is a fail. */
.btn-teal { background: var(--teal); color: var(--navy); }
.btn-teal:hover { background: var(--mint); color: var(--navy); }
.btn-outline-light { border-color: rgba(255, 255, 255, 0.65); color: var(--paper); background: transparent; }
.btn-outline-light:hover { border-color: var(--paper); background: rgba(255, 255, 255, 0.08); color: var(--paper); }
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

/* ---------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------ */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--border-subtle);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 4.5rem;
}
.header-logo { display: inline-flex; align-items: center; }
.header-logo img { width: auto; height: 2.1rem; display: block; }
.header-nav { margin-left: auto; }
.header-nav ul {
  display: flex;
  gap: clamp(1rem, 2.2vw, 1.9rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.header-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.99rem;
  padding: 0.35rem 0.1rem;
  border-bottom: 2px solid transparent;
}
.header-nav a:hover { color: var(--navy); border-bottom-color: var(--mint); }
.header-nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--teal); }
.header-actions { display: flex; align-items: center; gap: 1.1rem; }
.header-signin {
  color: var(--blue);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
}
.header-signin:hover { color: var(--navy); text-decoration: underline; }

/* Mobile navigation: a native <details>, so it needs no script. */
.mobile-nav { display: none; position: relative; margin-left: auto; }
.mobile-nav summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--navy);
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav[open] summary { background: var(--sunken); }
.mobile-nav-icon,
.mobile-nav-icon::before,
.mobile-nav-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: var(--navy);
}
.mobile-nav-icon { position: relative; }
.mobile-nav-icon::before, .mobile-nav-icon::after { content: ""; position: absolute; left: 0; }
.mobile-nav-icon::before { top: -5.5px; }
.mobile-nav-icon::after { top: 5.5px; }
.mobile-nav nav {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 40;
  min-width: 14rem;
  background: var(--paper);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(8, 38, 79, 0.16);
  padding: 0.5rem;
}
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav nav a {
  display: block;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  font-weight: 550;
}
.mobile-nav nav a:hover { background: var(--sunken); color: var(--navy); }

@media (max-width: 899px) {
  .header-nav, .header-actions { display: none; }
  .mobile-nav { display: block; }
}

/* ---------------------------------------------------------------------------
   Hero and dark bands
   ------------------------------------------------------------------------ */
.hero {
  background: var(--navy);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.hero .container {
  position: relative;
  padding-block: clamp(4rem, 9vw, 6.75rem);
  max-width: 60rem;
}
.eyebrow {
  display: block;
  color: var(--teal);
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.hero h1 { color: var(--paper); max-width: 21ch; }
.hero .lede {
  color: var(--mint);
  font-size: clamp(1.1rem, 2vw, 1.28rem);
  line-height: 1.6;
  max-width: 52ch;
  margin-bottom: 2.1rem;
}
.hero .btn-row { margin-bottom: 1.4rem; }
.hero-signin { color: var(--mint); font-size: 0.98rem; }
.hero-signin a { color: var(--paper); }
.hero-signin a:hover { color: var(--mint); }

/* Page heroes (interior pages): shorter, same chrome. */
.page-hero { background: var(--navy); color: var(--paper); }
.page-hero .container { padding-block: clamp(3rem, 6vw, 4.5rem); max-width: 60rem; }
.page-hero h1 { color: var(--paper); }
.page-hero .lede { color: var(--mint); font-size: 1.16rem; max-width: 56ch; margin: 0; }

/* ---------------------------------------------------------------------------
   Sections
   ------------------------------------------------------------------------ */
.section { padding-block: clamp(3.25rem, 7vw, 5.5rem); }
.section-alt { background: var(--page); border-block: 1px solid var(--border-subtle); }
.section-head { max-width: 46rem; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section-head .eyebrow { color: var(--blue); letter-spacing: 0.12em; }
.section-head p { color: var(--slate); font-size: 1.1rem; }

.grid {
  display: grid;
  gap: 1.25rem;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(13.5rem, 100%), 1fr)); }

.card {
  background: var(--paper);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.6rem;
}
.card h3 { margin-bottom: 0.45em; }
.card p { color: var(--slate); font-size: 0.99rem; }

a.card {
  display: block;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
a.card:hover { border-color: var(--teal); box-shadow: var(--shadow-raised); }
a.card .card-more { color: var(--blue); font-weight: 600; font-size: 0.95rem; }
a.card:hover .card-more { text-decoration: underline; }

.icon { width: 24px; height: 24px; flex: none; }
.icon-well {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(171, 203, 191, 0.28);
  color: var(--navy);
  margin-bottom: 1rem;
}

.badge {
  display: inline-block;
  padding: 0.18rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-available { background: rgba(171, 203, 191, 0.4); color: var(--navy); }
/* Over the navy hero the translucent mint composites too dark for navy ink;
   the opaque mint carries it at 8.59:1. */
.page-hero .badge-available, .section-head .badge-available { background: var(--mint); }
.badge-dev { background: var(--sunken); color: var(--slate); border: 1px dashed var(--border-strong); }

/* Checklist */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.checklist li { display: flex; gap: 0.7rem; align-items: baseline; }
.checklist .icon { width: 20px; height: 20px; color: var(--teal); position: relative; top: 3px; }
.checklist strong { color: var(--navy); }

/* Definition cards on module pages */
.capability { border-left: 3px solid var(--teal); padding-left: 1.1rem; }
.capability h3 { font-size: 1.02rem; margin-bottom: 0.25em; }
.capability p { color: var(--slate); font-size: 0.97rem; margin: 0; }

/* Prose block */
.prose { max-width: 46rem; }
.prose p { margin-bottom: 1.15em; }
.prose-wide { max-width: 56rem; }

/* Numbered steps */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.steps li { counter-increment: step; display: flex; gap: 1.15rem; }
.steps li::before {
  content: counter(step);
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--paper);
  font-weight: 650;
}
.steps h3 { margin-bottom: 0.25em; }
.steps p { color: var(--slate); margin: 0; }

/* ---------------------------------------------------------------------------
   Module chip wall (home)
   ------------------------------------------------------------------------ */
.chip-wall { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--navy);
  font-weight: 550;
  font-size: 0.95rem;
  text-decoration: none;
}
a.chip:hover { border-color: var(--teal); background: rgba(171, 203, 191, 0.18); }
.chip .icon { width: 18px; height: 18px; color: var(--blue); }
.chip-dev { border-style: dashed; color: var(--slate); }
.chip-dev .icon { color: var(--slate); }

/* ---------------------------------------------------------------------------
   Dark info band (security summary on home) and CTA band
   ------------------------------------------------------------------------ */
.dark-band { background: var(--navy); color: var(--paper); }
.dark-band .container { padding-block: clamp(3.25rem, 7vw, 5rem); }
.dark-band h2 { color: var(--paper); }
.dark-band .section-head p { color: var(--mint); }
.dark-band .card {
  background: var(--navy-raised);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}
.dark-band .card h3 { color: var(--paper); }
.dark-band .card p { color: var(--mint); }
.dark-band .icon-well { background: rgba(55, 166, 174, 0.18); color: var(--teal); }
.dark-band a { color: var(--paper); }
/* On navy the light-surface eyebrow blue (2.0:1 there) is illegible; the
   teal measures 5.16:1 on the navy and is the accent's home ground. */
.dark-band .eyebrow { color: var(--teal); }

.cta-band {
  background: var(--navy);
  color: var(--paper);
  text-align: center;
}
.cta-band .container { padding-block: clamp(3.5rem, 7vw, 5.25rem); max-width: 46rem; }
.cta-band h2 { color: var(--paper); }
.cta-band p { color: var(--mint); font-size: 1.12rem; margin-bottom: 1.9rem; }
.cta-band .btn-row { justify-content: center; }

/* ---------------------------------------------------------------------------
   Breadcrumb
   ------------------------------------------------------------------------ */
.breadcrumb { font-size: 0.92rem; margin-bottom: 1.4rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.5rem; color: var(--rule-on-dark); }
.page-hero .breadcrumb a { color: var(--mint); }
.page-hero .breadcrumb a:hover { color: var(--paper); }
.page-hero .breadcrumb li[aria-current] { color: var(--paper); }

/* ---------------------------------------------------------------------------
   Industry sections
   ------------------------------------------------------------------------ */
.industry { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 800px) {
  .industry { grid-template-columns: 16rem minmax(0, 1fr); gap: 2.5rem; }
}
.industry-head h2 { margin-bottom: 0.3em; }
.industry-head p { color: var(--slate); font-size: 0.98rem; }
.industry + .industry { border-top: 1px solid var(--border-subtle); padding-top: clamp(2rem, 5vw, 3rem); margin-top: clamp(2rem, 5vw, 3rem); }

/* ---------------------------------------------------------------------------
   Contact page
   ------------------------------------------------------------------------ */
.contact-grid { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 3rem; } }
.contact-panel {
  background: var(--page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.contact-panel h2 { font-size: 1.25rem; }

.form-grid { display: grid; gap: 1.1rem; }
.form-field label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 0.35rem; font-size: 0.98rem; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}
.form-field textarea { min-height: 8rem; resize: vertical; }
.form-field input:focus-visible, .form-field select:focus-visible, .form-field textarea:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 1px;
}

/* ---------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------ */
.site-footer {
  background: var(--navy);
  color: var(--mint);
  margin-top: 0;
}
.site-footer .container { padding-block: clamp(2.75rem, 6vw, 4rem) 1.75rem; }
.footer-grid {
  display: grid;
  gap: 2.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr));
  margin-bottom: 2.5rem;
}
.footer-brand { grid-column: span 1; max-width: 18rem; }
.footer-brand img { width: 12.5rem; height: auto; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.95rem; }
.footer-col h2 {
  color: var(--paper);
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-col a { color: var(--mint); text-decoration: none; font-size: 0.97rem; }
.footer-col a:hover { color: var(--paper); text-decoration: underline; }
.footer-legal {
  border-top: 1px solid var(--rule-on-dark);
  padding-top: 1.5rem;
  font-size: 0.9rem;
}
.footer-legal p { margin: 0; }

/* ---------------------------------------------------------------------------
   Error page
   ------------------------------------------------------------------------ */
.error-page { text-align: center; }
.error-page .container { padding-block: clamp(4rem, 12vw, 8rem); max-width: 38rem; }

@media (prefers-contrast: more) {
  .hero .lede, .page-hero .lede, .cta-band p, .site-footer, .footer-col a, .dark-band .card p { color: var(--paper); }
  .card p, .section-head p, .capability p, .steps p, .industry-head p { color: var(--ink); }
}

@media print {
  .site-header, .site-footer, .cta-band, .mobile-nav { display: none; }
}
