/* CHERT Research public site — owner-approved marketing homepage (docs/audit/mlflowtheme/homepage).
 * Tokens come from chert-tokens.css (I3); the few page-specific shades below are
 * declared once here as --site-* aliases. Logical properties only (I2/R4). */
@import url("./chert-tokens.css");
:root {
  --site-ink: var(--chert-ink); --site-deep: var(--chert-dark); --site-ink-soft: var(--chert-dark-border);
  --site-paper: var(--chert-surface-alt); --site-surface: var(--chert-surface); --site-line: var(--chert-border);
  --site-muted: var(--chert-muted); --site-orange: var(--chert-orange); --site-orange-deep: var(--chert-orange-deep); --site-sand: var(--chert-tan);
  --site-mint: var(--chert-success-bg); --site-green: #087B55; --site-blue: #346DA8; --site-red: #B34848;
  --site-stack-bg: #EADDC6; --site-roadmap-bg: #EFE5D2; --site-radius: 22px; --site-max: 1200px;
  --site-shadow: 0 22px 60px rgba(48,35,25,.11);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--site-paper); color: var(--site-ink); font-family: var(--font-body, var(--font-en)); font-size: 16px; line-height: 1.55; }
html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.75; letter-spacing: normal; }
a { color: inherit; text-decoration: none; } a:hover { text-decoration: underline; text-decoration-color: var(--site-orange-deep); }
button { font: inherit; }
svg { display: block; }
.container { width: min(var(--site-max), calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: absolute; inset-inline-start: 10px; top: 8px; background: #fff; color: var(--site-ink); padding: 10px 14px; z-index: 100; border-radius: 8px; transform: translateY(-300%); }
.skip-link:focus { transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ltr, .ltr-num { direction: ltr; unicode-bidi: isolate; display: inline-block; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--site-orange); outline-offset: 3px; }
/* --- header ------------------------------------------------------------------ */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(24,22,20,.94); backdrop-filter: blur(14px); color: #fff; border-bottom: 1px solid rgba(255,255,255,.1); }
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.12rem; color: inherit; } .brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 50%; }
.site-nav { display: flex; align-items: center; gap: 28px; flex: 1; justify-content: flex-end; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; font-size: .95rem; color: #E7DFD6; }
.nav-links a:hover { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 11px 18px; border: 1px solid transparent; font-weight: 600; cursor: pointer; min-height: 44px; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--site-orange); color: #1C1714; } .btn-primary:hover { background: var(--site-orange-deep); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; background: transparent; }
.btn-light { background: var(--site-surface); border-color: var(--site-line); color: var(--site-ink); }
.lang-toggle { min-width: 88px; }
.session { display: inline-flex; align-items: center; gap: 10px; } .session .session-user { color: #fff; font-weight: 600; }
/* session.js swaps the sign-in for a plain link once it knows the session state; keep it a button */
.session .session-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 11px 18px; border-radius: 999px; background: var(--site-orange); color: #1C1714; font-weight: 600; }
.session .session-link:hover { background: var(--site-orange-deep); color: #fff; text-decoration: none; }
.session .session-user + .session-link { background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; }
.menu-btn { display: none; background: none; border: 1px solid rgba(255,255,255,.35); color: #fff; padding: 8px 12px; border-radius: 10px; min-height: 44px; min-width: 44px; }
/* --- hero -------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: 92px 0 72px; }
.hero::before { content: ""; position: absolute; width: 680px; height: 680px; border-radius: 50%; inset-inline-end: -210px; top: -300px; background: radial-gradient(circle, rgba(255,121,75,.22), rgba(255,121,75,0) 68%); pointer-events: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: .78rem; color: var(--site-green); }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--site-green); }
html[lang="ar"] .eyebrow, html[lang="ar"] .kicker, html[lang="ar"] .arch-label, html[lang="ar"] .footer-col h4 { letter-spacing: normal; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 68px; align-items: center; }
.hero h1 { font-size: clamp(2.8rem, 5.6vw, 5.4rem); line-height: 1; letter-spacing: -.045em; margin: 18px 0 24px; max-width: 760px; }
html[lang="ar"] .hero h1 { letter-spacing: normal; line-height: 1.25; font-size: clamp(2.5rem, 4.8vw, 4.6rem); }
.hero h1 em { font-style: normal; color: var(--site-orange-deep); }
.lead { font-size: 1.2rem; color: var(--site-muted); max-width: 650px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.trust { display: flex; align-items: center; gap: 12px; margin-top: 28px; color: var(--site-muted); font-size: .95rem; }
.trust-icons { display: flex; } .trust-icons span { width: 30px; height: 30px; border-radius: 50%; background: var(--site-ink); color: #fff; display: grid; place-items: center; border: 2px solid var(--site-paper); margin-inline-start: -7px; font-size: .68rem; font-weight: 700; }
.trust-icons span:first-child { margin-inline-start: 0; }
.journey-card { background: var(--site-ink); color: #fff; border-radius: 32px; padding: 32px; box-shadow: var(--site-shadow); position: relative; min-height: 500px; overflow: hidden; }
.journey-card::after { content: ""; position: absolute; width: 240px; height: 240px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; inset-inline-end: -90px; bottom: -80px; }
.journey-top { display: flex; justify-content: space-between; align-items: center; color: #BFB5AD; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; }
html[lang="ar"] .journey-top { letter-spacing: normal; }
.illustrative { text-transform: none; letter-spacing: 0; color: #F1C7B6; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 4px 10px; font-size: .8rem; }
.journey-title { font-size: 1.5rem; font-weight: 700; margin: 28px 0 8px; } .journey-sub { color: #BFB5AD; margin: 0 0 28px; }
.path { position: relative; list-style: none; margin: 0; padding: 0; }
.path::before { content: ""; position: absolute; top: 20px; bottom: 20px; inset-inline-start: 18px; width: 1px; background: linear-gradient(var(--site-orange), rgba(255,255,255,.15)); }
.path-item { position: relative; display: grid; grid-template-columns: 38px 1fr auto; gap: 15px; align-items: center; margin: 19px 0; }
.node { height: 38px; width: 38px; border-radius: 12px; background: #37312D; border: 1px solid #574C44; display: grid; place-items: center; z-index: 1; color: #D9CCC2; font-size: .8rem; font-weight: 700; }
.path-item.active .node { background: var(--site-orange); border-color: var(--site-orange); color: var(--site-ink); }
.path-item strong { font-size: .96rem; } .path-item small { display: block; color: #92877E; }
.state { font-size: .74rem; color: #91E6C5; background: rgba(8,123,85,.18); padding: 4px 8px; border-radius: 999px; }
/* --- proof bar ----------------------------------------------------------------- */
.proofbar { border-top: 1px solid var(--site-line); border-bottom: 1px solid var(--site-line); background: rgba(255,253,248,.54); }
.proof-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.proof { padding: 23px 28px; border-inline-end: 1px solid var(--site-line); } .proof:last-child { border-inline-end: 0; }
.proof b { display: block; font-size: 1.45rem; } .proof span { font-size: .9rem; color: var(--site-muted); }
/* --- sections ------------------------------------------------------------------ */
main > section { padding: 104px 0; }
.section-head { display: flex; justify-content: space-between; gap: 48px; align-items: end; margin-bottom: 46px; }
.kicker { color: var(--site-orange-deep); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.section-head h2 { font-size: clamp(2rem, 3.8vw, 3.8rem); line-height: 1.06; letter-spacing: -.035em; margin: 10px 0 0; max-width: 700px; }
html[lang="ar"] .section-head h2 { letter-spacing: normal; line-height: 1.35; }
.section-head p { max-width: 440px; color: var(--site-muted); margin: 0; }
/* open stack */
.open-stack { background: var(--site-stack-bg); }
.stack-lead { display: grid; grid-template-columns: .7fr 1.3fr; gap: 42px; margin-bottom: 28px; }
.stack-number { background: var(--site-orange); color: var(--site-ink); border-radius: 24px; padding: 30px; display: flex; flex-direction: column; justify-content: space-between; min-height: 240px; }
.stack-number b { font-size: clamp(5rem, 10vw, 8rem); line-height: .85; letter-spacing: -.06em; } .stack-number span { font-weight: 700; max-width: 220px; }
.stack-summary { background: var(--site-ink); color: #fff; border-radius: 24px; padding: 38px; }
.stack-summary h3 { font-size: clamp(1.5rem, 2.8vw, 2.4rem); line-height: 1.15; margin: 0 0 18px; max-width: 700px; } .stack-summary p { color: #BFB4AB; max-width: 760px; }
.strength-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 30px 0 0; padding: 0; list-style: none; }
.strength-pill { border-top: 1px solid #554C46; padding-top: 14px; } .strength-pill b { display: block; color: #FF9A75; } .strength-pill small { color: #AAA099; font-size: .9rem; }
.layer-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; counter-reset: layer; }
.layer-card { min-width: 0; background: var(--site-surface); border: 1px solid rgba(33,29,26,.12); border-radius: 18px; padding: 22px; min-height: 300px; }
.layer-card--researcher { border-color: var(--site-orange); box-shadow: 0 0 0 3px rgba(255,121,75,.15); }
.layer-top { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 8px; } .layer-top h3 { margin: 0; font-size: 1.05rem; }
.layer-count { background: var(--site-ink); color: #fff; border-radius: 999px; padding: 3px 8px; font-size: .74rem; white-space: nowrap; }
.layer-kind { display: inline-block; font-size: .74rem; font-weight: 700; color: var(--site-muted); margin-bottom: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--site-line); }
.layer-card--researcher .layer-kind { color: #8D472D; border-color: var(--site-orange); background: var(--chert-orange-tint); }
.layer-card > p { color: var(--site-muted); font-size: .88rem; min-height: 58px; }
.tech-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 0; padding: 0; list-style: none; }
.tech { max-width: 100%; overflow-wrap: anywhere; border: 1px solid var(--site-line); background: #fff; border-radius: 9px; padding: 7px 8px; font-size: .8rem; line-height: 1.25; }
.tech small { display: block; color: var(--site-muted); font-size: .68rem; margin-top: 3px; } .tech-role { display: block; color: var(--site-muted); font-size: .72rem; margin-top: 3px; }
.stack-foot { display: flex; justify-content: space-between; gap: 28px; align-items: center; margin: 26px 0 0; padding-top: 22px; border-top: 1px solid rgba(33,29,26,.16); color: var(--site-muted); font-size: .9rem; }
.stack-foot strong { color: var(--site-ink); }
/* services */
.services { background: var(--site-surface); }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.service-card { min-height: 265px; padding: 25px; border: 1px solid var(--site-line); border-radius: 18px; background: #fff; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s, border-color .25s; }
.service-card:hover, .service-card:focus-within { transform: translateY(-5px); box-shadow: 0 16px 30px rgba(41,31,24,.08); border-color: var(--site-sand); }
.service-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--site-paper); display: grid; place-items: center; color: var(--site-orange-deep); margin-bottom: 30px; } .service-icon svg { width: 24px; }
.service-card h3 { margin: 0 0 8px; font-size: 1.17rem; } .service-card p { margin: 0; color: var(--site-muted); font-size: .95rem; }
.service-link { margin-top: auto; padding-top: 20px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: .9rem; color: var(--site-orange-deep); }
.service-link .arrow { transition: transform .2s; } .service-card:hover .service-link .arrow { transform: translateX(4px); } html[dir="rtl"] .service-card:hover .service-link .arrow { transform: translateX(-4px) scaleX(-1); } html[dir="rtl"] .service-link .arrow { display: inline-block; transform: scaleX(-1); }
/* journey */
.story-grid { display: grid; grid-template-columns: .88fr 1.12fr; gap: 70px; align-items: start; }
.sticky { position: sticky; top: 115px; }
.story-copy h2 { font-size: clamp(2.2rem, 3.8vw, 4rem); line-height: 1.05; letter-spacing: -.035em; margin: 12px 0 24px; } html[lang="ar"] .story-copy h2 { letter-spacing: normal; line-height: 1.35; }
.story-copy p { color: var(--site-muted); font-size: 1.05rem; }
.steps { border-top: 1px solid var(--site-line); list-style: none; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: 64px 1fr; gap: 24px; padding: 30px 0; border-bottom: 1px solid var(--site-line); }
.step-no { font-size: .8rem; color: var(--site-orange-deep); font-weight: 700; } .step h3 { font-size: 1.25rem; margin: 0 0 7px; } .step p { margin: 0; color: var(--site-muted); }
/* architecture */
.architecture { background: var(--site-ink); color: #fff; overflow: hidden; } .architecture .section-head p { color: #BDB2A9; }
.arch-map { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 15px; align-items: stretch; }
.arch-col { display: flex; flex-direction: column; gap: 12px; }
.arch-label { color: #978A80; font-size: .74rem; text-transform: uppercase; letter-spacing: .11em; margin-bottom: 3px; }
.arch-card { border: 1px solid #4A423D; background: #292522; border-radius: 16px; padding: 18px; } .arch-card strong { display: block; margin-bottom: 4px; } .arch-card span { color: #AAA099; font-size: .88rem; }
.arch-core { background: linear-gradient(145deg, #F27549, #BD4B29); color: #1E1714; border: 0; display: flex; flex-direction: column; justify-content: center; min-height: 100%; }
.arch-core .arch-label, .arch-core span { color: #3E2118; } .arch-core h3 { font-size: 2rem; line-height: 1.1; margin: 14px 0; }
.arch-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0 0; padding: 0; list-style: none; } .arch-tags li { font-size: .76rem; padding: 5px 9px; background: rgba(255,255,255,.32); border-radius: 999px; }
/* principles + roadmap */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; list-style: none; margin: 0; padding: 0; }
.principle { padding: 28px; border-top: 3px solid var(--site-ink); background: rgba(255,253,248,.55); } .principle b { font-size: 1.08rem; } .principle p { color: var(--site-muted); margin-bottom: 0; }
.roadmap { margin-top: 70px; background: var(--site-roadmap-bg); border-radius: 26px; padding: 36px; display: grid; grid-template-columns: 1fr 1.6fr; gap: 50px; }
.roadmap h3 { font-size: 1.7rem; margin: 8px 0; } .roadmap p { color: var(--site-muted); margin: 0; }
.roadmap-items { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.roadmap-item { background: var(--site-surface); border-radius: 14px; padding: 15px 17px; display: grid; grid-template-columns: 1fr auto; gap: 12px; border: 1px dashed var(--site-line); }
.roadmap-item small { display: block; color: var(--site-muted); }
.road-state { font-size: .76rem; border-radius: 999px; padding: 4px 9px; align-self: center; font-weight: 700; white-space: nowrap; }
.is-planned .road-state { background: #F8DFD4; color: #8C381E; } .is-uat .road-state { background: #EFE7DC; color: #5A4A3E; border: 1px solid var(--site-sand); }
/* cta + footer */
.cta { padding-top: 40px; }
.cta-box { position: relative; overflow: hidden; border-radius: 30px; background: var(--site-orange); padding: 70px; color: #211914; display: grid; grid-template-columns: 1.2fr .8fr; gap: 50px; align-items: end; }
.cta-box::after { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; border: 1px solid rgba(33,25,20,.18); inset-inline-end: -90px; top: -110px; }
.cta h2 { font-size: clamp(2.3rem, 4.6vw, 4.6rem); line-height: 1.02; margin: 0; letter-spacing: -.04em; position: relative; z-index: 1; } html[lang="ar"] .cta h2 { letter-spacing: normal; line-height: 1.3; }
.cta-side { position: relative; z-index: 1; } .cta-side p { margin-top: 0; } .cta .btn { background: var(--site-ink); color: #fff; }
.site-footer { background: #171412; color: #fff; margin-top: 100px; padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 50px; }
.footer-brand p { color: #A99E96; max-width: 320px; }
.footer-col h4 { font-size: .78rem; color: #8E827A; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 16px; }
.footer-col a { display: block; color: #D7CEC7; margin: 9px 0; font-size: .95rem; }
.footer-bottom { display: flex; justify-content: space-between; color: #8E827A; border-top: 1px solid #332D29; margin-top: 50px; padding-top: 25px; font-size: .85rem; } .footer-bottom a { color: #D7CEC7; }
/* inner pages (legal, 404) */
.is-page main { padding: 60px 0; } .is-page .hero { padding: 0; } .is-page .hero::before { display: none; }
.is-page .hero h1 { font-size: clamp(2rem, 4vw, 3.2rem); } .is-page .hero p { max-width: 70ch; color: var(--site-muted); font-size: 1.05rem; }
/* motion */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } .service-card:hover { transform: none; } }
/* responsive */
@media (max-width: 1000px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav { display: none; flex-direction: column; align-items: stretch; gap: 14px; width: 100%; padding: 6px 0 16px; }
  .site-nav.is-open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 4px; } .nav-links a { display: block; padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .nav-actions { justify-content: space-between; }
  .hero-grid, .story-grid, .stack-lead { grid-template-columns: 1fr; } .hero { padding-top: 56px; } .journey-card { max-width: 660px; }
  .proof-grid { grid-template-columns: repeat(2, 1fr); } .proof:nth-child(2) { border-inline-end: 0; } .proof:nth-child(-n+2) { border-bottom: 1px solid var(--site-line); }
  .service-grid { grid-template-columns: repeat(2, 1fr); } .layer-grid { grid-template-columns: repeat(2, 1fr); } .layer-card:last-child { grid-column: span 2; }
  .sticky { position: static; } .arch-map { grid-template-columns: 1fr; } .arch-core { min-height: 270px; }
  .cta-box { grid-template-columns: 1fr; } .footer-grid { grid-template-columns: 1fr 1fr; } .roadmap { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 28px, var(--site-max)); } .nav { min-height: 64px; }
  .hero { padding: 44px 0; } .hero h1 { font-size: 2.6rem; } html[lang="ar"] .hero h1 { font-size: 2.3rem; } .lead { font-size: 1.05rem; }
  .journey-card { padding: 23px; min-height: auto; border-radius: 24px; } .path-item { grid-template-columns: 38px 1fr; } .state { grid-column: 2; justify-self: start; }
  .proof { padding: 18px; border-inline-end: 0; border-bottom: 1px solid var(--site-line); } .proof-grid, .service-grid, .principles, .footer-grid, .layer-grid, .strength-row { grid-template-columns: 1fr; } .layer-card:last-child { grid-column: auto; }
  main > section { padding: 72px 0; } .section-head { display: block; } .section-head p { margin-top: 20px; }
  .stack-summary { padding: 28px; } .stack-foot { display: block; } .stack-foot strong { display: block; margin-top: 8px; }
  .service-card { min-height: 230px; } .roadmap, .cta-box { padding: 28px; } .cta h2 { font-size: 2.4rem; }
  .footer-bottom { display: block; } .footer-bottom span { display: block; margin-top: 8px; }
  .hero-actions .btn { flex: 1 1 100%; }
}
