/* ==========================================================================
   Knoa Labs LP — shared base styles
   Used by every landing page. Page-specific styles go in /<page>/page.css.
   Bump the ?v= query on the <link> when this file changes (it is cached 1 year).
   ========================================================================== */

/* ---------- Font (self-hosted Inter, 2 weights) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/shared/fonts/inter-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/shared/fonts/inter-latin-700.woff2") format("woff2");
}
/* Metric-matched fallback so the swap to Inter causes no layout shift */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("Helvetica"), local("Roboto");
  size-adjust: 107.1%;
  ascent-override: 90.4%;
  descent-override: 22.5%;
  line-gap-override: 0%;
}

/* ---------- Tokens (Knoa Labs brand, from the live site) ---------- */
:root {
  --kn-dark: #0A3B2A;
  --kn-ink: #12241D;
  --kn-forest: #0E4D37;
  --kn-emerald: #10B981;
  --kn-emerald-deep: #0B8F63;
  --kn-green-text: #087A55; /* emerald-deep darkened to pass WCAG AA for small text */
  --kn-lime: #D9F99D;
  --kn-lime-soft: #F2FBE3;
  --kn-line: #E4EFE7;
  --kn-muted: #4F6259;
  --kn-paper: #FBFDF8;
  --kn-white: #FFFFFF;
  --kn-amber: #FBBF24;
  --kn-danger: #B42318;
  --wa: #25D366;
  --on-dark: #FFFFFF;
  --on-dark-muted: #C3DACB;

  --font: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 10px 30px rgba(10, 59, 42, .12);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .28);
  --gutter: 16px;
  --maxw: 1160px;
  --header-h: 60px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--kn-ink);
  background: var(--kn-paper);
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--kn-amber); outline-offset: 2px; border-radius: 4px; }

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

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--kn-lime); color: var(--kn-ink); padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 700; }
.skip-link:focus { top: 8px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 56px 0; }
.section--dark { background: var(--kn-dark); color: var(--on-dark); }
.section--ink { background: var(--kn-ink); color: var(--on-dark); }
.section--soft { background: var(--kn-lime-soft); }
.section--white { background: var(--kn-white); }
@media (min-width: 768px) { .section { padding: 88px 0; } :root { --gutter: 24px; } }
/* Skip layout/paint of off-screen sections until they are near the viewport (big LCP/TBT win on low-end phones) */
.section { content-visibility: auto; contain-intrinsic-size: auto 1000px; }

/* ---------- Typography ---------- */
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--kn-green-text); margin-bottom: 10px;
}
.section--dark .eyebrow, .section--ink .eyebrow { color: var(--kn-lime); }
.h2 { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.h3 { font-size: 19px; line-height: 1.3; font-weight: 700; }
.lead { font-size: 17px; color: var(--kn-muted); margin-top: 12px; max-width: 62ch; }
.section--dark .lead, .section--ink .lead { color: var(--on-dark-muted); }
.section-head { margin-bottom: 32px; max-width: 760px; }
.section-head--center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head--center .lead { margin-left: auto; margin-right: auto; }
@media (min-width: 768px) { .h2 { font-size: 38px; } .h3 { font-size: 20px; } }

/* Visible content placeholder — client must replace. Listed in CONTENT-CHECKLIST.md */
.ph { background: #FFF3C4; color: #5C3D00; outline: 1px dashed var(--kn-amber); outline-offset: 1px; border-radius: 3px; padding: 0 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 22px; border-radius: 12px; border: 2px solid transparent;
  font-weight: 700; font-size: 17px; line-height: 1.2; text-decoration: none; text-align: center;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn--primary { background: var(--kn-emerald); color: var(--kn-ink); box-shadow: 0 6px 18px rgba(16, 185, 129, .35); }
.btn--primary:hover { background: #22C990; }
.btn--wa { background: var(--wa); color: var(--kn-ink); }
.btn--wa:hover { background: #3BE07A; }
.btn--ghost { background: transparent; color: currentColor; border-color: currentColor; }
.btn--ghost:hover { background: rgba(255, 255, 255, .08); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .7; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn-row .btn { flex: 1 1 220px; }
@media (min-width: 768px) { .btn-row .btn { flex: 0 1 auto; } }

.text-link { font-weight: 700; color: var(--kn-green-text); text-underline-offset: 3px; }
.section--dark .text-link, .section--ink .text-link, .hero .text-link { color: var(--kn-lime); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  background: rgba(10, 59, 42, .96); color: var(--on-dark);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
@supports (backdrop-filter: blur(8px)) { .site-header { background: rgba(10, 59, 42, .88); backdrop-filter: blur(8px); } }
.site-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.site-header__logo { display: block; width: 124px; height: 32px; }
.site-header__logo img { width: 124px; height: 32px; object-fit: contain; }
.site-header__actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  border-radius: 12px; border: 1px solid rgba(255, 255, 255, .22); color: var(--on-dark);
}
.icon-btn svg { width: 22px; height: 22px; }
.site-header .btn { min-height: 44px; padding: 8px 14px; font-size: 15px; }
.site-header .btn svg { width: 20px; height: 20px; }
.site-header__phone-text { display: none; font-weight: 700; text-decoration: none; }
@media (min-width: 768px) {
  .site-header__logo, .site-header__logo img { width: 140px; height: 36px; }
  .site-header__phone-text { display: inline; }
  .site-header .icon-btn { width: auto; padding: 0 14px; gap: 8px; }
}

/* ---------- Live dot ---------- */
.live-dot { position: relative; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #FF4D4F; flex: none; }
.live-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: #FF4D4F;
  animation: live-pulse 1.8s ease-out infinite;
}
@keyframes live-pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.6); opacity: 0; } }

/* ---------- Chips ---------- */
.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chip {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(217, 249, 157, .22);
  font-size: 14px; font-weight: 700; line-height: 1.25;
}
.chip::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--kn-lime) var(--i-check-ink) center / 12px no-repeat; }
:root { --i-check-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312241D' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); --i-check-green: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B8F63' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }

/* ---------- Check list ---------- */
.checklist { display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--kn-lime-soft) var(--i-check-green) center / 14px no-repeat; border: 1px solid #CDE7D6; }

/* ---------- Cards ---------- */
.card { background: var(--kn-white); border: 1px solid var(--kn-line); border-radius: var(--radius); padding: 22px; }
.section--dark .card, .section--ink .card { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); }
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 640px) and (max-width: 959px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Lead form ---------- */
.form-card {
  background: var(--kn-white); color: var(--kn-ink); border-radius: var(--radius-lg);
  padding: 22px 18px; box-shadow: var(--shadow-lg); border: 1px solid var(--kn-line);
}
.form-card__title { font-size: 21px; line-height: 1.25; font-weight: 700; }
.form-card__sub { font-size: 15px; color: var(--kn-muted); margin-top: 4px; }
.lead-form { display: grid; gap: 14px; margin-top: 16px; }
.field label { display: block; font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.field input, .field select {
  display: block; width: 100%; min-height: 50px; padding: 12px 14px; font-size: 16px;
  border: 1.5px solid #B9CCBF; border-radius: 10px; background: var(--kn-white); color: var(--kn-ink);
  -webkit-appearance: none; appearance: none;
}
.field select {
  padding-right: 42px;
  background: var(--kn-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312241D' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 14px center / 18px no-repeat;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--kn-emerald-deep); box-shadow: 0 0 0 3px rgba(16, 185, 129, .3); }
.field input::placeholder { color: #6B7D74; }
.field [aria-invalid="true"] { border-color: var(--kn-danger); }
.field__err { font-size: 14px; color: var(--kn-danger); margin-top: 4px; min-height: 0; }
.field__err:empty { display: none; }
.phone { display: flex; }
.phone__cc {
  display: inline-flex; align-items: center; padding: 0 12px; border: 1.5px solid #B9CCBF; border-right: 0;
  border-radius: 10px 0 0 10px; background: var(--kn-lime-soft); font-weight: 700;
}
.phone input { border-radius: 0 10px 10px 0; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 14px; color: var(--kn-muted); text-align: center; line-height: 1.45; }
.form-status { font-size: 15px; color: var(--kn-danger); text-align: center; }
.form-status:empty { display: none; }
.form-alt { margin-top: 14px; text-align: center; font-size: 16px; }
@media (min-width: 768px) { .form-card { padding: 28px; } }

/* ---------- Modal (opens only on CTA tap) ---------- */
.lead-modal {
  width: min(460px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; border: 0;
  border-radius: var(--radius-lg); background: transparent; overflow: visible;
}
.lead-modal::backdrop { background: rgba(8, 20, 15, .72); }
.lead-modal .form-card { position: relative; max-height: calc(100vh - 24px); overflow-y: auto; }
.lead-modal__close {
  position: absolute; top: 8px; right: 8px; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: transparent; font-size: 28px; line-height: 1; color: var(--kn-muted);
}
.lead-modal__close:hover { background: var(--kn-lime-soft); }
.lead-modal .form-card__title { padding-right: 44px; }

/* ---------- Sticky mobile bar ---------- */
.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(18, 36, 29, .97);
  border-top: 1px solid rgba(255, 255, 255, .1); transform: translateY(110%); transition: transform .25s ease;
}
.sticky-bar.is-visible { transform: translateY(0); }
.sticky-bar .btn { min-height: 50px; font-size: 16px; padding: 10px 12px; }
.sticky-bar .btn--primary { flex: 1 1 auto; }
.sticky-bar .btn--wa { flex: 0 0 auto; }
@media (min-width: 768px) { .sticky-bar { display: none; } }

/* ---------- Accordion (native <details>) ---------- */
.accordion { display: grid; gap: 10px; }
.accordion details { background: var(--kn-white); border: 1px solid var(--kn-line); border-radius: var(--radius); }
.accordion summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 14px 18px; font-weight: 700; font-size: 17px; line-height: 1.35;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--kn-lime-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B8F63' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform .2s ease;
}
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion__body { padding: 0 18px 18px; color: #33463D; }
.accordion__body p + p { margin-top: 10px; }

/* ---------- Video facade (lite YouTube) ---------- */
.yt-facade {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0;
  border-radius: var(--radius); overflow: hidden; background: #000;
}
.yt-facade img { width: 100%; height: 100%; object-fit: cover; }
.yt-facade__play {
  position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%;
  background: rgba(16, 185, 129, .95); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.yt-facade__play svg { width: 30px; height: 30px; margin-left: 4px; fill: var(--kn-ink); }
.yt-facade__label {
  position: absolute; left: 12px; bottom: 12px; padding: 6px 10px; border-radius: 8px;
  background: rgba(0, 0, 0, .72); color: #fff; font-size: 14px; font-weight: 700;
}
.yt-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); }

/* ---------- Footer ---------- */
.site-footer { background: #0B1712; color: var(--on-dark-muted); padding: 40px 0 96px; font-size: 15px; }
.site-footer a { color: var(--on-dark); }
.site-footer__grid { display: grid; gap: 22px; }
.site-footer__brand { color: var(--on-dark); font-weight: 700; font-size: 17px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer__links a { display: inline-block; padding: 10px 0; }
.site-footer__legal { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 24px; padding-top: 18px; font-size: 14px; }
@media (min-width: 768px) {
  .site-footer { padding-bottom: 40px; }
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

/* ---------- Simple content pages (legal) ---------- */
.prose { max-width: 760px; }
.prose h1 { font-size: 32px; line-height: 1.2; margin-bottom: 12px; }
.prose h2 { font-size: 21px; margin: 28px 0 8px; }
.prose p, .prose li { color: #33463D; }
.prose p + p { margin-top: 10px; }
.prose ul { list-style: disc; padding-left: 22px; display: grid; gap: 6px; margin-top: 8px; }
