/* ==========================================================================
   Jae Labs main stylesheet
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --site-primary: #173F8A;
  --site-secondary: #101D36;
  --site-background: light-dark(#F5F7FB, #0C1629);
  --site-on-primary: #FFFFFF;
  --site-on-secondary: #FFFFFF;
  --site-on-background: light-dark(#14213A, #F1F5FC);
  --site-font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --site-font-heading: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --site-heading-scale: 1;
  --site-spacing-scale: 1;
  --site-radius-scale: 1;
  --site-decoration-opacity: 1;
  --surface: light-dark(#FFFFFF, #17243B);
  --surface-soft: light-dark(#EDF2FA, #1C2B45);
  --text: light-dark(#14213A, #F1F5FC);
  --muted: light-dark(#5D6B82, #B0BDD1);
  --line: light-dark(#DCE4F0, #34445F);
  --link: light-dark(#173F8A, #8EB8FF);
  --accent: #6EA8FF;
  --accent-2: #8C7CFF;
  color-scheme: light dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--site-font-body); background: var(--site-background); color: var(--site-on-background); }
#app { min-height: 100vh; width: 100%; padding-top: 76px; background-color: var(--site-background); color: var(--text); border-radius: 0; overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.container { width: min(1160px, calc(100% - 44px)); margin: 0 auto; }
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 20; background: light-dark(rgba(255,255,255,.92), rgba(16,29,54,.92)); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--site-font-heading); font-weight: 850; letter-spacing: -.055em; font-size: 22px; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: white; background: linear-gradient(140deg, var(--site-primary), #6B8FFF 75%, #9C83FF); box-shadow: 0 7px 20px rgba(23,63,138,.22); }
.brand small { display: block; font-size: 8px; letter-spacing: .19em; font-weight: 700; margin-top: 1px; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 25px; color: var(--muted); font-size: 13px; font-weight: 650; }
.nav-links a:hover, .text-link:hover { color: var(--link); }
.nav-cta, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 18px; border-radius: calc(12px * var(--site-radius-scale)); background: var(--site-primary); color: var(--site-on-primary); font-size: 13px; font-weight: 750; border: 1px solid var(--site-primary); transition: transform .2s, box-shadow .2s; cursor: pointer; }
.nav-cta:hover, .btn:hover { transform: translateY(-2px); box-shadow: 0 12px 25px rgba(23,63,138,.2); }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--line); }
.menu-toggle { display: none; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 10px; padding: 9px 12px; }
.hero { position: relative; isolation: isolate; background: var(--site-secondary); color: #F7FAFF; padding: calc(100px * var(--site-spacing-scale)) 0 calc(92px * var(--site-spacing-scale)); overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; pointer-events: none; opacity: var(--site-decoration-opacity); border-radius: 50%; filter: blur(2px); }
.hero::before { width: 620px; height: 620px; right: -130px; top: -290px; background: radial-gradient(circle, rgba(77,123,255,.30), transparent 68%); }
.hero::after { width: 520px; height: 520px; left: 30%; bottom: -420px; background: radial-gradient(circle, rgba(140,124,255,.22), transparent 68%); }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 55px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: #AFC9FF; text-transform: uppercase; letter-spacing: .16em; font-size: 10px; font-weight: 800; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: #79A9FF; }
h1,h2,h3,h4 { font-family: var(--site-font-heading); letter-spacing: -.045em; margin: 0; line-height: 1.08; }
h1 { font-size: calc(clamp(43px, 6vw, 72px) * var(--site-heading-scale)); max-width: 700px; margin: 22px 0; }
h1 span { color: #8EB8FF; }
.hero-copy { color: #C4D0E3; font-size: 17px; line-height: 1.75; max-width: 600px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero .btn.secondary { color: #F7FAFF; border-color: #53627B; }
.hero-note { margin-top: 27px; color: #9EADC4; font-size: 11px; letter-spacing: .02em; }
.visual { position: relative; min-height: 390px; display: grid; place-items: center; }
.orbit { position: absolute; width: min(100%, 420px); aspect-ratio: 1; border: 1px solid rgba(140,177,255,.24); border-radius: 50%; opacity: var(--site-decoration-opacity); }
.orbit.two { width: 78%; border-style: dashed; transform: rotate(28deg); }
.core { width: 210px; height: 210px; border-radius: 42px; display: grid; place-items: center; background: radial-gradient(circle at 35% 25%, #7BAEFF, #315EC2 48%, #252C70); box-shadow: 0 0 90px rgba(77,123,255,.4), inset 0 1px 0 rgba(255,255,255,.4); transform: rotate(-8deg); }
.core img { display: block; width: 112px; height: 112px; transform: rotate(8deg); }
.float-card { position: absolute; border: 1px solid rgba(173,198,255,.23); background: rgba(20,39,75,.88); backdrop-filter: blur(14px); padding: 13px 15px; border-radius: 14px; box-shadow: 0 14px 35px rgba(0,0,0,.18); color: #EDF4FF; font-size: 11px; }
.float-card strong { display: block; font-size: 13px; margin-bottom: 4px; }
.float-card.one { top: 45px; left: -5px; }
.float-card.two { bottom: 48px; right: -8px; }
.float-card.three { bottom: 22px; left: 8px; }
.section { padding: calc(88px * var(--site-spacing-scale)) 0; }
.section-head { max-width: 700px; margin-bottom: 38px; }
.kicker { color: var(--link); text-transform: uppercase; letter-spacing: .15em; font-size: 10px; font-weight: 850; margin-bottom: 13px; }
h2 { font-size: calc(clamp(32px, 4vw, 47px) * var(--site-heading-scale)); color: var(--text); }
.section-head p, .body-copy { color: var(--muted); line-height: 1.75; font-size: 15px; }
.page-hero { position: relative; isolation: isolate; overflow: hidden; padding: 82px 0 76px; background: var(--site-secondary); color: #F7FAFF; }
.page-hero::after { content: ""; position: absolute; z-index: -1; width: 580px; height: 580px; right: -180px; top: -350px; border-radius: 50%; background: radial-gradient(circle, rgba(77,123,255,.3), transparent 68%); pointer-events: none; }
.page-hero h1 { max-width: 800px; }
.page-hero .hero-copy { max-width: 740px; }
.page-hero .btn.secondary { color: #F7FAFF; border-color: #53627B; }
.pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 17px; }
.pillar { background: var(--surface); border: 1px solid var(--line); border-radius: calc(19px * var(--site-radius-scale)); padding: 27px; transition: transform .2s, border-color .2s; }
.pillar:hover { transform: translateY(-4px); border-color: #91B4F4; }
.icon-box { width: 47px; height: 47px; border-radius: 14px; display: grid; place-items: center; background: light-dark(#E9F0FF, #263A5B); color: var(--link); margin-bottom: 23px; }
.icon-box svg { width: 23px; height: 23px; }
.pillar h3 { font-size: 21px; margin-bottom: 11px; }
.pillar p { color: var(--muted); line-height: 1.7; font-size: 13px; margin: 0 0 17px; }
.text-link { color: var(--link); font-size: 12px; font-weight: 800; }
.audience { background: var(--surface-soft); }
.audience-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.audience-card { padding: 23px 19px; border-radius: calc(15px * var(--site-radius-scale)); background: var(--surface); border: 1px solid var(--line); }
.audience-card .num { color: var(--link); font-size: 11px; font-weight: 850; letter-spacing: .12em; }
.audience-card h3 { font-size: 17px; margin: 15px 0 8px; }
.audience-card p { font-size: 12px; color: var(--muted); line-height: 1.65; margin: 0; }
.audience-card .text-link { display: inline-block; margin-top: 14px; }
.teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.teaser-card { padding: 25px; border: 1px solid var(--line); border-radius: calc(17px * var(--site-radius-scale)); background: var(--surface); }
.teaser-card .num { color: var(--link); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.teaser-card h3 { font-size: 19px; margin: 16px 0 9px; }
.teaser-card p { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0; }
.section-more { margin: 23px 0 0; }
.split { display: grid; grid-template-columns: .92fr 1.08fr; gap: 58px; align-items: center; }
.research-art { min-height: 350px; border-radius: 22px; position: relative; overflow: hidden; background: radial-gradient(circle at 70% 20%, rgba(104,146,255,.7), transparent 30%), linear-gradient(140deg, #101D36, #1D3C75 65%, #252A67); display: grid; place-items: center; }
.research-art img { display: block; width: 75%; max-width: 360px; height: auto; opacity: .9; }
.research-art::after { content: "APPLIED AI • EXPERIMENTS • PROTOTYPES"; position: absolute; bottom: 22px; left: 22px; color: #B9D0FF; font-size: 9px; letter-spacing: .16em; font-weight: 800; }
.check-list { display: grid; gap: 13px; margin: 24px 0 0; padding: 0; list-style: none; }
.check-list li { display: flex; gap: 11px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.check-list li::before { content: "✓"; display: grid; place-items: center; flex: 0 0 21px; height: 21px; border-radius: 50%; background: light-dark(#E6F0FF, #263A5B); color: var(--link); font-weight: 900; font-size: 11px; }
.academy { background: var(--site-secondary); color: white; }
.academy h2 { color: white; }
.academy .section-head p { color: #B9C6DA; }
.programmes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.programme { border: 1px solid #3C4D69; background: rgba(255,255,255,.045); padding: 24px; border-radius: 17px; }
.programme-light { background: var(--surface); border-color: var(--line); }
.programme-light h3 { color: var(--text); }
.programme-light p, .programme-light .check-list li { color: var(--muted); }
.programme-light .check-list { margin: 18px 0 20px; }
.programme-light .text-link { color: var(--link); }
.programme small { color: #8EB8FF; font-weight: 850; letter-spacing: .13em; font-size: 9px; }
.programme h3 { margin: 17px 0 10px; font-size: 20px; }
.programme p { color: #B9C6DA; line-height: 1.7; font-size: 12px; }
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.service-list { display: grid; gap: 16px; }
.service-block { display: grid; grid-template-columns: 52px minmax(0, 1.4fr) minmax(190px, .8fr); gap: 24px; align-items: start; padding: 29px; border: 1px solid var(--line); border-radius: calc(19px * var(--site-radius-scale)); background: var(--surface); }
.service-number { color: var(--link); font-size: 21px; font-weight: 850; letter-spacing: -.05em; }
.service-block .kicker { margin-bottom: 10px; }
.service-block h3 { font-size: 24px; margin-bottom: 12px; }
.service-block p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.service-block .check-list { margin-top: 18px; }
.service-examples { padding: 19px; border-radius: 13px; background: var(--surface-soft); }
.service-examples strong { font-size: 12px; }
.service-examples p { margin: 8px 0 14px; font-size: 12px; }
.academy-callout { padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.academy-callout h3 { font-size: 22px; }
.academy-callout p { color: var(--muted); font-size: 13px; line-height: 1.75; }
.contact-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 50px; align-items: start; }
.contact-information h2 { font-size: clamp(30px, 4vw, 42px); }
.contact-detail { display: grid; gap: 4px; padding: 17px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.contact-detail strong { color: var(--text); font-size: 12px; }
.contact-detail a { color: var(--link); }
.contact-page-form { margin-top: 0; padding: 25px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.product { background: var(--surface); border: 1px solid var(--line); padding: 21px; border-radius: 15px; }
.product .product-mark { color: var(--link); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.product h3 { margin: 16px 0 7px; font-size: 18px; }
.product p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0; }
.product { position: relative; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s, border-color .2s; }
.product:hover { transform: translateY(-3px); border-color: var(--link); box-shadow: 0 14px 30px rgba(23,63,138,.14); }
.product-link { color: inherit; }
.product-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.product-link:focus-visible { outline: none; }
.product-link:focus-visible::after { outline: 3px solid var(--link); outline-offset: 3px; }
.product:hover .product-link { color: var(--link); }
.product-cta { margin-top: auto; padding-top: 16px; color: var(--link); font-size: 12px; font-weight: 800; }
.audience-cta { background: linear-gradient(115deg, #173F8A, #283A83 58%, #5545A0); color: white; border-radius: 23px; padding: 43px; display: flex; justify-content: space-between; align-items: center; gap: 30px; }
.audience-cta h2 { color: white; max-width: 570px; }
.audience-cta p { color: #D5E2FA; max-width: 580px; font-size: 13px; line-height: 1.7; }
.audience-cta .btn { background: white; color: #173F8A; border-color: white; white-space: nowrap; }
.footer { background: var(--site-secondary); color: white; padding: 54px 0 25px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 35px; }
.footer p, .footer a { color: #B6C3D8; font-size: 12px; line-height: 1.8; }
.footer h4 { font-size: 13px; margin-bottom: 16px; letter-spacing: 0; }
.footer-links { display: grid; gap: 8px; }
.footer-bottom { border-top: 1px solid #34445F; margin-top: 38px; padding-top: 19px; display: flex; justify-content: space-between; gap: 15px; color: #91A1BA; font-size: 10px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(7,15,31,.65); display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal-backdrop.open { display: flex; }
.modal { width: min(520px, 100%); background: var(--surface); color: var(--text); border-radius: 20px; padding: 27px; box-shadow: 0 25px 80px rgba(0,0,0,.3); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.modal-head h3 { font-size: 22px; }
.close { border: 0; background: var(--surface-soft); color: var(--text); width: 34px; height: 34px; border-radius: 10px; cursor: pointer; }
.form-grid { display: grid; gap: 12px; margin-top: 18px; }
.form-grid label { font-size: 12px; font-weight: 700; color: var(--muted); display: grid; gap: 7px; }
.form-grid input, .form-grid select, .form-grid textarea {
  --field-bg: light-dark(#F7F9FD, #0F1A30);
  --field-text: light-dark(#14213A, #F1F5FC);
  width: 100%; margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  background-color: var(--field-bg); color: var(--field-text); -webkit-text-fill-color: var(--field-text); caret-color: var(--site-primary);
  font-size: 14px; font-weight: 500; line-height: 1.4; outline: none; appearance: none; -webkit-appearance: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.form-grid input::placeholder, .form-grid textarea::placeholder { color: light-dark(#8C98AD, #7C8AA3); -webkit-text-fill-color: light-dark(#8C98AD, #7C8AA3); opacity: 1; }
.form-grid input:hover, .form-grid select:hover, .form-grid textarea:hover { border-color: light-dark(#B9C7DD, #4A5B78); }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--accent); background-color: var(--surface); box-shadow: 0 0 0 3px rgba(110,168,255,.28); }
.form-grid input:user-invalid, .form-grid textarea:user-invalid { border-color: #E5484D; box-shadow: 0 0 0 3px rgba(229,72,77,.18); }
.form-grid select {
  cursor: pointer; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%236EA8FF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px;
}
.form-grid select option { background-color: var(--surface); color: var(--text); }
.form-grid input:-webkit-autofill, .form-grid input:-webkit-autofill:hover, .form-grid input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--field-text); box-shadow: 0 0 0 1000px var(--field-bg) inset; transition: background-color 9999s ease-out 0s;
}
.form-grid textarea { min-height: 110px; resize: vertical; }
.form-note { color: var(--muted); font-size: 10px; line-height: 1.6; }
/* ---------- Utilities & component extras ---------- */
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--site-primary); color: var(--site-on-primary); font-size: 13px; font-weight: 750; transition: top .2s; }
.skip-link:focus { top: 12px; }
.research-cta { margin-top: 24px; }
.academy .kicker, .academy .text-link { color: #9CC2FF; }
.products-note { margin-top: 15px; }
.section.cta-section { padding-top: 10px; }
.footer .brand { color: white; }
.footer .brand small { color: #9EADC4; }
.footer-address { color: #B6C3D8; font-size: 12px; line-height: 1.8; }
.modal-intro { font-size: 13px; margin: 8px 0; }
.hp-field { display: none !important; }
.form-status { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 12px; line-height: 1.5; font-weight: 650; }
.form-status.is-pending { background: var(--surface-soft); color: var(--muted); }
.form-status.is-success { background: light-dark(#E6F6EC, #183B2A); color: light-dark(#17663A, #8FE0B0); }
.form-status.is-error { background: light-dark(#FDECEC, #4A1F25); color: light-dark(#A12A2A, #FFB4B4); }
.btn:disabled { opacity: .7; cursor: progress; transform: none; box-shadow: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { gap: 14px; font-size: 11px; }
  .hero-grid { gap: 20px; }
  .visual { min-height: 330px; }
  .audience-grid { grid-template-columns: repeat(2, 1fr); }
  .teaser-grid { grid-template-columns: repeat(2, 1fr); }
  .service-block { grid-template-columns: 42px minmax(0, 1fr); }
  .service-examples { grid-column: 2; }
  .contact-layout { gap: 30px; }
  .products { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  #app { padding-top: 66px; }
  .container { width: min(100% - 32px, 560px); }
  .nav { min-height: 66px; }
  .menu-toggle { display: inline-flex; }
  .nav-cta { display: none; }
  .nav-links { display: none; position: absolute; top: 66px; left: 0; right: 0; padding: 18px 22px 22px; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 17px; font-size: 14px; }
  .nav-links.open { display: flex; }
  .hero { padding: 72px 0 54px; }
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-grid { gap: 18px; }
  .hero-copy { font-size: 15px; }
  .visual { min-height: 300px; }
  .core { width: 160px; height: 160px; border-radius: 34px; }
  .core img { width: 85px; height: 85px; }
  .float-card.one { left: 0; top: 24px; }
  .float-card.two { right: 0; bottom: 35px; }
  .float-card.three { left: 0; bottom: 8px; }
  .section { padding: 65px 0; }
  .page-hero { padding: 64px 0 56px; }
  .pillars { grid-template-columns: 1fr; }
  .teaser-grid, .contact-layout { grid-template-columns: 1fr; }
  .service-block { grid-template-columns: 35px minmax(0, 1fr); gap: 14px; padding: 21px; }
  .service-block h3 { font-size: 21px; }
  .service-examples { grid-column: 1 / -1; }
  .split { gap: 30px; }
  .research-art { min-height: 260px; }
  .programmes { grid-template-columns: 1fr; }
  .products { grid-template-columns: 1fr 1fr; }
  .audience-cta { padding: 29px 23px; flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 18px; }
  .footer-bottom { flex-direction: column; }
}
@media (max-width: 390px) { .products, .audience-grid, .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Legal pages ---------- */
.legal-head { max-width: 760px; margin: 0 auto; text-align: center; }
.legal-head h1 { font-size: calc(clamp(34px, 5vw, 54px) * var(--site-heading-scale)); color: var(--text); max-width: none; margin: 0; }
.legal-intro { color: var(--muted); font-size: 16px; line-height: 1.75; margin: 20px 0 0; }
.legal-meta { color: var(--muted); font-size: 13px; margin: 14px 0 0; }
.legal-body { max-width: 760px; margin: 52px auto 0; display: grid; gap: 38px; }
.legal-body h2 { font-size: 21px; letter-spacing: -.02em; margin: 0 0 14px; }
.legal-body p, .legal-body li { color: var(--muted); font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.legal-body p { margin: 0 0 14px; }
.legal-body ul { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer .footer-legal a { color: #91A1BA; font-size: 11px; line-height: 1.6; }
.footer .footer-legal a:hover, .footer .footer-legal a[aria-current="page"] { color: white; }
