/* ==========================================================================
   TRUST Lab — production stylesheet
   Single file, no build step. Tokens mirror the TRUST Lab design system.
   ========================================================================== */

/* ─── Webfonts (Sora, SIL OFL) ─── */
@font-face { font-family: 'Sora'; src: url('../fonts/Sora-Light.ttf') format('truetype'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Sora'; src: url('../fonts/Sora-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Sora'; src: url('../fonts/Sora-Medium.ttf') format('truetype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Sora'; src: url('../fonts/Sora-SemiBold.ttf') format('truetype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Sora'; src: url('../fonts/Sora-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Sora'; src: url('../fonts/Sora-ExtraBold.ttf') format('truetype'); font-weight: 800; font-style: normal; font-display: swap; }

/* ─── Tokens ─── */
:root {
  --tl-blue-600: #1625EE;
  --tl-blue-700: #111CC5;
  --tl-blue-800: #0D149B;
  --tl-blue-100: #DFE2FD;
  --tl-blue-50: #F0F1FE;
  --tl-cyan-400: #02EEF0;
  --tl-cyan-300: #67F5F6;
  --tl-yellow-300: #FFDF2B;
  --tl-ink-950: #0D0D0D;
  --tl-midnight-950: #070B2E;
  --tl-gray-50: #F5F6F9;
  --tl-gray-100: #ECEDF3;
  --tl-gray-200: #DEE0E9;
  --tl-gray-300: #C4C7D4;
  --tl-gray-400: #979CB0;
  --tl-gray-500: #6B7086;
  --tl-gray-600: #4C5166;
  --tl-status-ok: #1D9E62;
  --tl-status-critical: #D93036;
  --text-secondary: var(--tl-gray-600);
  --text-inverse-secondary: #A9AECB;
  --border-default: var(--tl-gray-200);
  --border-inverse: rgba(255, 255, 255, 0.16);
  --font-sans: 'Sora', 'Segoe UI', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --container: 1200px;
  --pad: 24px;
}

/* ─── Base ─── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--tl-ink-950);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--tl-cyan-400); color: var(--tl-ink-950); }
img { max-width: 100%; }
a { color: var(--tl-blue-600); }
.container { max-width: var(--container); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { padding: 96px 0; }
.section--subtle { background: var(--tl-gray-50); }
.section--midnight { background: var(--tl-midnight-950); color: #fff; }
.grid-bg {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 24px 24px;
}
:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--tl-blue-600); }
.section--midnight :focus-visible { box-shadow: 0 0 0 2px var(--tl-midnight-950), 0 0 0 4px var(--tl-cyan-400); }

/* ─── Type ─── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--tl-blue-600); line-height: 1.3;
}
.eyebrow::before { content: ''; width: 8px; height: 8px; background: currentColor; flex: none; }
.eyebrow--inverse { color: var(--tl-cyan-400); }
.display { font-size: clamp(38px, 5vw, 64px); line-height: 1.04; font-weight: 400; letter-spacing: -0.02em; margin: 0; }
.h1 { font-size: clamp(30px, 3.5vw, 44px); line-height: 1.08; font-weight: 700; letter-spacing: -0.015em; margin: 0; }
.h2 { font-size: clamp(25px, 2.6vw, 32px); line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.h3 { font-size: 22px; line-height: 1.35; font-weight: 700; margin: 0; }
.lede { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; font-weight: 300; }
.micro { font-size: 11px; line-height: 1.4; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.mono { font-family: var(--font-mono); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-sans); font-weight: 600; font-size: 15px;
  height: 48px; padding: 0 26px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--tl-blue-600); color: #fff; white-space: nowrap;
  transition: background 120ms var(--ease-out), color 120ms var(--ease-out),
    transform 120ms var(--ease-out), box-shadow 120ms var(--ease-out), border-color 120ms var(--ease-out);
}
.btn:hover { background: var(--tl-blue-700); }
.btn:active { background: var(--tl-blue-800); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn--offset { box-shadow: 6px 6px 0 0 var(--tl-cyan-400); }
.btn--offset:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 0 var(--tl-cyan-400); }
.btn--offset:active { transform: translate(6px, 6px); box-shadow: 0 0 0 0 var(--tl-cyan-400); }
.btn--outline { background: transparent; color: var(--tl-ink-950); border: 2px solid var(--tl-ink-950); }
.btn--outline:hover { background: var(--tl-gray-50); }
.btn--outline:active { background: var(--tl-gray-100); }
.btn--outline-inverse { background: transparent; color: #fff; border: 2px solid #fff; }
.btn--outline-inverse:hover { background: rgba(255, 255, 255, 0.1); }
.btn--outline-inverse:active { background: rgba(255, 255, 255, 0.16); }
.btn--cyan { background: var(--tl-cyan-400); color: var(--tl-ink-950); }
.btn--cyan:hover { background: var(--tl-cyan-300); }
.btn--cyan:active { background: var(--tl-cyan-300); }
.btn--sm { height: 38px; padding: 0 18px; font-size: 13.5px; }
.link-ghost { font-weight: 600; font-size: 14.5px; color: var(--tl-blue-600); text-decoration: none; border-bottom: 2px solid transparent; padding-bottom: 2px; transition: border-color 120ms var(--ease-out); }
.link-ghost:hover { border-bottom-color: var(--tl-cyan-400); }

/* ─── Header / nav ─── */
.site-header {
  position: sticky; top: 0; z-index: 500;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border-default);
}
.site-header__inner { display: flex; align-items: center; gap: 36px; height: 72px; }
.site-header__logo img { height: 26px; width: auto; display: block; }
.site-nav { display: flex; gap: 28px; margin-left: auto; }
.site-nav a {
  font-size: 14.5px; font-weight: 500; text-decoration: none; color: var(--text-secondary);
  border-bottom: 2px solid transparent; padding-bottom: 2px; transition: color 120ms var(--ease-out);
}
.site-nav a:hover { color: var(--tl-ink-950); }
.site-nav a.active { color: var(--tl-ink-950); font-weight: 600; border-bottom-color: var(--tl-cyan-400); }
.site-header__right { display: flex; align-items: center; gap: 18px; }
.lang { display: flex; gap: 2px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; }
.lang a { text-decoration: none; color: var(--tl-gray-400); padding: 3px 6px; }
.lang a:hover { color: var(--tl-ink-950); }
.lang a.active { color: var(--tl-ink-950); background: var(--tl-cyan-400); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border-default); width: 42px; height: 42px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { display: block; }

/* ─── Hero ─── */
.hero { position: relative; overflow: hidden; }
.hero__inner { padding-top: 96px; padding-bottom: 80px; }
.hero h1 { max-width: 820px; color: #fff; margin-top: 24px; }
.hero h1 .accent { color: var(--tl-cyan-400); }
.hero .lede { max-width: 620px; color: var(--text-inverse-secondary); margin: 28px 0 0; }
.hero__ctas { display: flex; gap: 20px; margin-top: 40px; flex-wrap: wrap; }
.hero__proof { display: flex; gap: 64px; margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--border-inverse); align-items: flex-end; flex-wrap: wrap; }
.hero__fund { margin-left: auto; text-align: right; color: var(--text-inverse-secondary); }

/* ─── Stats ─── */
.stat__value { font-size: clamp(40px, 4vw, 56px); line-height: 1; font-weight: 300; letter-spacing: -0.02em; }
.stat__value .suffix { color: var(--tl-blue-600); }
.section--midnight .stat__value .suffix { color: var(--tl-cyan-400); }
.stat__bar { width: 28px; height: 6px; background: var(--tl-cyan-400); margin-top: 10px; }
.stat__bar--blue { background: var(--tl-blue-600); }
.stat__bar--yellow { background: var(--tl-yellow-300); }
.stat__label { font-size: 13px; line-height: 1.45; color: var(--text-secondary); margin-top: 8px; max-width: 180px; }
.section--midnight .stat__label { color: var(--text-inverse-secondary); }

/* ─── Cards / pillars ─── */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 56px; }
.card { background: #fff; border: 1px solid var(--border-default); padding: 32px; display: flex; flex-direction: column; transition: border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out), transform 180ms var(--ease-out); }
.card:hover { border-color: var(--tl-ink-950); box-shadow: 0 8px 24px rgba(13, 13, 13, 0.1); transform: translateY(-2px); }
.card--feature { border: 2px solid var(--tl-ink-950); box-shadow: 6px 6px 0 0 var(--tl-cyan-400); }
.card--feature:hover { border-color: var(--tl-ink-950); box-shadow: 8px 8px 0 0 var(--tl-cyan-400); transform: translate(-2px, -2px); }
.card__top { display: flex; justify-content: space-between; align-items: flex-start; }
.card__top img { height: 60px; width: auto; }
.card__num { font-family: var(--font-mono); font-size: 13px; color: var(--tl-gray-400); }
.card h3 { margin-top: 24px; }
.card p { margin: 12px 0 0; font-size: 14.5px; line-height: 1.65; color: var(--text-secondary); }
.card .link-ghost { margin-top: auto; padding-top: 20px; align-self: flex-start; }

/* ─── Split sections ─── */
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
.split--rev { grid-template-columns: 7fr 5fr; }
.photo-offset { position: relative; }
.photo-offset img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; display: block; box-shadow: 6px 6px 0 0 var(--tl-cyan-400); }
.photo-offset__cap { position: absolute; left: 0; bottom: 0; background: var(--tl-ink-950); color: #fff; padding: 10px 16px; }
.photo-offset__cap b { display: block; font-size: 14px; }
.photo-offset__cap span { font-size: 12px; color: var(--text-inverse-secondary); }
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.badge { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; background: var(--tl-blue-50); color: var(--tl-blue-700); }
.badge::before { content: ''; width: 7px; height: 7px; background: var(--tl-blue-600); }

/* ─── Collaboration ─── */
.checklist { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checklist li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.checklist li::before { content: ''; width: 8px; height: 8px; background: var(--tl-cyan-400); flex: none; }
.duotone { position: relative; }
.duotone img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; display: block; filter: saturate(0.9); }
.duotone::after { content: ''; position: absolute; inset: 0; background: var(--tl-blue-600); opacity: 0.25; mix-blend-mode: multiply; }
.partner-wall { margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--border-inverse); }
.partner-wall .micro { color: var(--text-inverse-secondary); }
.partner-wall__strip { background: #fff; padding: 18px 24px; margin-top: 20px; }
.partner-wall__strip img { width: 100%; display: block; }

/* ─── Blog ─── */
.blog-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 48px; }
.post { border: 1px solid var(--border-default); background: #fff; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out), transform 180ms var(--ease-out); }
.post:hover { border-color: var(--tl-ink-950); box-shadow: 0 8px 24px rgba(13, 13, 13, 0.1); transform: translateY(-2px); }
.post__img { position: relative; }
.post__img img { width: 100%; aspect-ratio: 16 / 9.5; object-fit: cover; display: block; }
.post__img::before { content: ''; position: absolute; left: 0; top: 0; width: 10px; height: 10px; background: var(--tl-cyan-400); z-index: 1; }
.post__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.post__meta { display: flex; align-items: center; gap: 12px; }
.post__tag { display: inline-flex; height: 26px; align-items: center; padding: 0 10px; font-size: 12px; font-weight: 500; background: var(--tl-gray-100); color: var(--tl-gray-600); }
.post__date { font-family: var(--font-mono); font-size: 11.5px; color: var(--tl-gray-400); }
.post h3 { margin: 14px 0 0; font-size: 17px; line-height: 1.4; letter-spacing: -0.005em; }
.post p { margin: 10px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--text-secondary); }
.post__more { margin-top: auto; padding-top: 14px; font-weight: 600; font-size: 13.5px; color: var(--tl-blue-600); }

/* ─── Newsletter ─── */
.newsletter { display: grid; grid-template-columns: 6fr 6fr; gap: 64px; align-items: center; }
.newsletter h2 { color: #fff; margin-top: 16px; }
.newsletter p { color: var(--text-inverse-secondary); margin: 16px 0 0; max-width: 480px; }
.newsletter-form { display: flex; gap: 0; margin-top: 8px; }
.newsletter-form input[type='email'] {
  flex: 1; height: 56px; padding: 0 18px; font-family: var(--font-sans); font-size: 15px;
  border: 2px solid #fff; background: #fff; color: var(--tl-ink-950); min-width: 0;
}
.newsletter-form input[type='email']:focus { outline: none; border-color: var(--tl-cyan-400); }
.newsletter-form .btn { height: 56px; box-shadow: none; }
.newsletter__hint { font-size: 12.5px; color: var(--text-inverse-secondary); margin-top: 14px; }
.form-status { display: none; margin-top: 14px; font-size: 14px; font-weight: 600; padding: 10px 14px; }
.form-status.ok { display: block; background: rgba(29, 158, 98, 0.15); color: #7BE0AE; }
.form-status.error { display: block; background: rgba(217, 48, 54, 0.15); color: #FF9BA0; }
.section--subtle .form-status.ok, .contact .form-status.ok { background: #E7F6EE; color: #14713F; }
.section--subtle .form-status.error, .contact .form-status.error { background: #FBE9EA; color: #A3242A; }

/* ─── Contact form ─── */
.contact-form { background: #fff; border: 1px solid var(--border-default); padding: 32px; display: grid; gap: 18px; }
.contact-form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13.5px; font-weight: 600; }
.field label .req { color: var(--tl-status-critical); }
.field input, .field select, .field textarea {
  font-family: var(--font-sans); font-size: 15px; color: var(--tl-ink-950);
  height: 44px; padding: 0 14px; background: #fff; border: 1px solid var(--tl-gray-300); width: 100%;
  transition: border-color 120ms var(--ease-out);
}
.field textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.55; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--tl-gray-500); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--tl-blue-600); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--tl-blue-600); }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230D0D0D' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; cursor: pointer; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.5; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--tl-blue-600); margin: 2px 0 0; flex: none; }
.contact-aside address { font-style: normal; font-size: 14px; color: var(--text-secondary); line-height: 1.8; margin-top: 32px; }
.contact-aside address a { font-weight: 600; text-decoration: none; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

/* ─── Footer ─── */
.site-footer { background: var(--tl-midnight-950); color: #fff; }
.site-footer__inner { padding: 64px 0 32px; }
.site-footer__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.site-footer__addr { font-size: 13.5px; color: var(--text-inverse-secondary); margin-top: 20px; line-height: 1.8; }
.site-footer__nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer__nav a { font-size: 13.5px; color: var(--text-inverse-secondary); text-decoration: none; }
.site-footer__nav a:hover { color: #fff; }
.socials { display: flex; gap: 14px; }
.socials a { display: inline-flex; padding: 8px; background: rgba(255, 255, 255, 0.08); transition: background 120ms var(--ease-out); }
.socials a:hover { background: rgba(255, 255, 255, 0.18); }
.socials img { width: 16px; height: 16px; filter: invert(1); display: block; }
.site-footer__bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border-inverse); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-inverse-secondary); }
.site-footer__bottom a { color: var(--text-inverse-secondary); text-decoration: none; }
.site-footer__bottom a:hover { color: #fff; }

/* ─── Responsive ─── */
@media (max-width: 1000px) {
  .section { padding: 72px 0; }
  .cards-3, .posts { grid-template-columns: 1fr; }
  .split, .split--rev, .newsletter { grid-template-columns: 1fr; gap: 40px; }
  .hero__proof { gap: 36px; }
  .hero__fund { margin-left: 0; text-align: left; }
  .checklist { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .site-nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border-default);
    flex-direction: column; gap: 0; padding: 8px 0; margin: 0;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px var(--pad); border-bottom: 0; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 560px) {
  .section { padding: 56px 0; }
  .hero__inner { padding-top: 64px; padding-bottom: 56px; }
  .contact-form { padding: 22px; }
  .contact-form .row-2 { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; gap: 12px; }
  .newsletter-form .btn { width: 100%; }
  .btn { width: 100%; }
  .hero__ctas .btn { width: 100%; }
  .site-header__right .btn { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
