/* Cairnmark Labs — corporate light theme.
   Layout: sticky white header, dark navy hero band, alternating white / light-grey
   sections with card grids, CTA band, four-column navy footer. */

@font-face { font-family: "Plus Jakarta Sans"; src: url("fonts/jakarta-var.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --navy: #0B1D33;
  --navy-2: #12294A;
  --ink: #15212F;
  --muted: #4A5768;
  --line: #E2E8EF;
  --bg: #FFFFFF;
  --bg-alt: #F4F7FA;
  --accent: #0E7A5A;
  --accent-dark: #0A5F46;
  --accent-bright: #45D3A3;
  --accent-tint: #E5F4EE;
  --on-dark: #FFFFFF;
  --on-dark-muted: #B9C6D6;
  --focus: #2563EB;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 75rem;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(11, 29, 51, 0.06), 0 8px 24px rgba(11, 29, 51, 0.06);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.65 var(--font); }
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: -999px; top: 0; background: #fff; color: var(--ink); padding: 0.6rem 1rem; z-index: 50; }
.skip:focus { left: 16px; top: 16px; }

h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.6rem); font-weight: 750; }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); font-weight: 720; }
h3 { font-size: 1.2rem; font-weight: 680; letter-spacing: -0.005em; }
p { margin: 0; }
/* Body text is fully justified with hyphenation (founder preference); short UI text stays left-aligned. */
p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
/* Captions too short or narrow to justify cleanly. */
.small, .status, .role, .footer-bottom p, .contact-detail, .cta-band p, .sector p, .steps p, .leader p { text-align: left; hyphens: manual; }

.eyebrow { display: inline-block; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.04em; color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; padding: 0.75rem 1.4rem; border-radius: 999px; font: 650 1rem/1 var(--font); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--accent-tint); color: var(--navy); }
.btn-outline-light { border-color: rgba(255,255,255,0.45); color: #fff; }
.btn-outline-light:hover { border-color: #fff; color: #fff; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,0.97); border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(11, 29, 51, 0.08); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--navy); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name { font-size: 1.3rem; font-weight: 780; letter-spacing: -0.02em; }
.brand-name span { font-weight: 450; color: var(--accent); }
.nav { display: flex; align-items: center; gap: 2rem; }
.nav ul { display: flex; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 560; font-size: 0.98rem; }
.nav a:not(.btn):hover { color: var(--accent); }
.nav .btn { min-height: 42px; padding: 0.6rem 1.15rem; font-size: 0.95rem; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; color: var(--navy); }
.menu-toggle svg { width: 22px; height: 22px; }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 85% -10%, #1C3D66 0%, transparent 60%), linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); color: var(--on-dark); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 3rem; align-items: center; padding-block: clamp(3.5rem, 2rem + 6vw, 6.5rem); }
.hero-copy { display: grid; gap: 1.5rem; min-width: 0; }
.hero .eyebrow { color: var(--accent-bright); }
.hero .lead { color: var(--on-dark-muted); max-width: 40rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 0.5rem; }
.hero-visual { min-width: 0; display: flex; justify-content: center; }
.hero-visual svg { width: 100%; max-width: 440px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; list-style: none; margin: 0.5rem 0 0; padding: 0; color: var(--on-dark-muted); font-size: 0.95rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 0.45rem; }
.hero-points svg { width: 18px; height: 18px; color: var(--accent-bright); flex: none; }

/* Sections */
.section { padding-block: clamp(3.5rem, 2.5rem + 4vw, 6rem); }
.section-alt { background: var(--bg-alt); }
.section-head { display: grid; gap: 0.8rem; max-width: 46rem; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem); }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; display: grid; gap: 0.85rem; align-content: start; min-width: 0; box-shadow: var(--shadow); }
.card p { color: var(--muted); }
.icon { width: 48px; height: 48px; border-radius: 12px; background: var(--accent-tint); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.icon svg { width: 26px; height: 26px; }

.sector { display: flex; gap: 1rem; align-items: flex-start; padding: 1.4rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.sector .icon { flex: none; width: 44px; height: 44px; }
.sector h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.sector p { color: var(--muted); font-size: 0.97rem; }

.why { display: flex; gap: 1.25rem; align-items: flex-start; padding: 1.75rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.why .icon { flex: none; }
.why h3 { margin-bottom: 0.45rem; }
.why p { color: var(--muted); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; counter-reset: step; }
.steps li { position: relative; counter-increment: step; display: grid; gap: 0.6rem; align-content: start; padding: 1.75rem; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); min-width: 0; }
.steps li::before { content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; }
.steps p { color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; margin: 0; padding: 0; }
.chips li { padding: 0.55rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 600; font-size: 0.95rem; color: var(--ink); }

.about { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 3rem; align-items: start; }
.about-copy { display: grid; gap: 1.1rem; min-width: 0; }
.about-copy p { color: var(--muted); }
.leaders { display: grid; gap: 1rem; min-width: 0; }
.leader { display: flex; gap: 1rem; align-items: center; padding: 1.25rem 1.4rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; letter-spacing: 0.02em; }
.leaders-title { font-size: 1.05rem; color: var(--muted); font-weight: 650; }
.leader h4 { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.leader .role { color: var(--accent); font-weight: 650; font-size: 0.92rem; }
.leader p { color: var(--muted); font-size: 0.93rem; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--accent) 0%, #0B6A6E 100%); color: #fff; }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem); }
.cta-band h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
.cta-band p { color: rgba(255,255,255,0.88); margin-top: 0.4rem; }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 3rem; align-items: start; }
.contact-copy { display: grid; gap: 1.1rem; min-width: 0; }
.contact-copy p { color: var(--muted); }
.contact-detail { display: flex; gap: 0.75rem; align-items: center; font-weight: 600; color: var(--ink); }
.contact-detail .icon { width: 42px; height: 42px; }
form { display: grid; gap: 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); min-width: 0; }
.field { display: grid; gap: 0.4rem; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
label { font-weight: 650; font-size: 0.95rem; }
.hint { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid #CBD5E1; border-radius: 10px; padding: 0.7rem 0.85rem; width: 100%; min-height: 48px; }
textarea { min-height: 9rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--focus); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.small { font-size: 0.9rem; color: var(--muted); }
.status { min-height: 1.5em; font-weight: 650; }
.status[data-state="ok"] { color: var(--accent); }
.status[data-state="error"] { color: #B42318; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* Legal pages */
.page-hero { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; }
.page-hero .wrap { padding-block: clamp(2.5rem, 2rem + 3vw, 4rem); display: grid; gap: 0.6rem; }
.page-hero p { color: var(--on-dark-muted); }
.legal { max-width: 46rem; display: grid; gap: 1rem; }
.legal h2 { font-size: 1.35rem; margin-top: 1.25rem; }
.legal ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.4rem; }
.legal dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.5rem 1.5rem; margin: 0; }
.legal dt { font-weight: 650; }
.legal dd { margin: 0; color: var(--muted); overflow-wrap: anywhere; }

/* Footer */
.site-footer { background: var(--navy); color: var(--on-dark-muted); font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 2.5rem; padding-block: 3.5rem 2.5rem; }
.footer-grid h2 { color: #fff; font-size: 0.95rem; letter-spacing: 0; margin-bottom: 0.9rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-grid a { color: var(--on-dark-muted); text-decoration: none; }
.footer-grid a:hover { color: #fff; }
.footer-brand { display: grid; gap: 1rem; align-content: start; justify-items: start; }
.footer-brand .brand { color: #fff; }
.footer-brand .brand-name span { color: var(--accent-bright); }
.footer-brand p { text-align: left; hyphens: manual; max-width: 22rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-block: 1.25rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; font-size: 0.88rem; }
.footer-bottom a { color: var(--on-dark-muted); }

.mark .s1 { fill: #0B1D33; } .mark .s2 { fill: #3E5A7A; } .mark .s3 { fill: #8FA3B8; } .mark .s4 { fill: #0E7A5A; }
.site-footer .mark .s1 { fill: #FFFFFF; } .site-footer .mark .s2 { fill: #B9C6D6; } .site-footer .mark .s3 { fill: #7F93AA; } .site-footer .mark .s4 { fill: #45D3A3; }

@media (max-width: 1000px) {
  .grid-4, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero .wrap, .about, .contact { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(11,29,51,0.08); flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem max(20px, env(safe-area-inset-left, 0px)) 1.25rem; display: none; }
  .nav.is-open { display: flex; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a { display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 1rem; }
}
@media (max-width: 600px) {
  .grid-3, .grid-4, .grid-2, .steps, .field-row, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  form { padding: 1.4rem; }
  .legal dl { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
  .legal dd { margin-bottom: 0.6rem; }
  .card { padding: 1.4rem; }
}
