/* latenthorizons.ai — one stylesheet for the whole site. Brand: paper, ink, one electric blue. */
:root {
  --paper: #ecebe7;
  --card: #f7f6f3;
  --ink: #111111;
  --muted: #5d5d5a;
  --line: rgba(17,17,17,.12);
  --blue: #0a3cff;
  --wide: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--paper); color: var(--ink); font-family: var(--sans);
  -webkit-font-smoothing: antialiased; min-height: 100svh; display: flex; flex-direction: column;
  line-height: 1.6;
}
body.menu-open { overflow: hidden; }
main { flex: 1; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.mark { display: block; color: var(--ink); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand .mark { width: 26px; height: 26px; }
.brand span { font-family: var(--wide); font-weight: 500; letter-spacing: .26em; font-size: 13px; text-transform: uppercase; }

/* Section labels: "01 / RESEARCH" with a short blue rule. */
.label { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; display: inline-block; }
.label::after { content: ""; display: block; width: 52px; height: 3px; background: var(--blue); margin-top: 12px; }

h1, h2, h3 { font-family: var(--wide); font-weight: 500; letter-spacing: .02em; line-height: 1.15; }
.display { font-size: clamp(36px, 6vw, 72px); letter-spacing: .01em; }
.lede { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.7; color: #2e2e2c; max-width: 640px; }
.muted { color: var(--muted); }

/* ---------- top bar (home page only) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; background: rgba(236,235,231,.88);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top);
}
.topbar-in { display: flex; align-items: center; gap: 18px; height: 66px; }
.topnav { display: flex; gap: 4px; margin-left: auto; }
.topnav a {
  font-size: 14px; font-weight: 500; text-decoration: none; padding: 8px 14px; border-radius: 999px; color: var(--ink);
  transition: background .2s;
}
.topnav a:hover { background: rgba(17,17,17,.06); }
.topnav a[aria-current="page"] { background: var(--ink); color: #fff; }

/* Three lines: in the top bar, and as a floating button on every other page. */
/* The menu button is the LH monogram. */
.menu-btn, .menu-fab {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border: 0; background: transparent;
  cursor: pointer; padding: 0; border-radius: 12px; transition: transform .2s var(--ease), background .2s;
}
.menu-btn .mark, .menu-fab .mark { width: 26px; height: 26px; }
.menu-btn:hover .mark, .menu-fab:hover .mark { transform: scale(1.08); transition: transform .2s var(--ease); }
.menu-btn:hover { background: rgba(17,17,17,.06); }
.topbar .brand { margin-left: -4px; }
.menu-fab {
  position: fixed; z-index: 30; top: max(16px, env(safe-area-inset-top)); left: 16px; border-radius: 14px;
  background: rgba(247,246,243,.92); box-shadow: 0 6px 24px rgba(0,0,0,.12), 0 0 0 1px var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.menu-fab:hover { background: #fff; }
.has-fab main { padding-top: 8px; }

/* ---------- slide-in menu ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(17,17,17,.38); opacity: 0; transition: opacity .3s var(--ease); }
.scrim.show { opacity: 1; }
.drawer {
  position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; width: min(340px, 86vw);
  background: var(--card); display: flex; flex-direction: column;
  padding: max(20px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom));
  transform: translateX(-102%); visibility: hidden; transition: transform .35s var(--ease), visibility 0s linear .35s;
  box-shadow: 0 0 60px rgba(0,0,0,.18);
}
.drawer.open { transform: none; visibility: visible; transition: transform .35s var(--ease), visibility 0s; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 36px; }
.drawer-close { width: 40px; height: 40px; border: 0; background: transparent; font-size: 28px; line-height: 1; cursor: pointer; border-radius: 999px; }
.drawer-close:hover { background: rgba(17,17,17,.06); }
.drawer-nav { display: flex; flex-direction: column; }
.drawer-nav a {
  display: flex; align-items: baseline; gap: 16px; text-decoration: none; padding: 14px 4px;
  font-family: var(--wide); font-size: 24px; border-bottom: 1px solid var(--line);
}
.drawer-nav a .n { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.drawer-nav a[aria-current="page"] { color: var(--blue); }
.drawer-nav a:hover { padding-left: 10px; transition: padding .2s; }

/* ---------- home ---------- */
.hero { position: relative; overflow: hidden; background: #d9d6cf; }
.hero img { width: 100%; height: clamp(520px, 78vh, 800px); object-fit: cover; object-position: center top; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(236,235,231,.55) 0%, rgba(236,235,231,.25) 45%, rgba(236,235,231,0) 70%); }
.hero-copy { position: absolute; inset: 0; display: flex; align-items: flex-start; z-index: 1; }
.hero-copy .wrap { padding-top: clamp(40px, 8vh, 96px); }
.hero-copy .display { max-width: 12ch; margin: 22px 0 18px; }
.hero-copy .lede { max-width: 520px; }
/* The text sits on a soft light panel, so the horizon line in the picture never runs through it. */
.hero-card { max-width: 600px; padding: 30px 34px 34px; border-radius: 22px; background: rgba(240,239,235,.97);
  -webkit-backdrop-filter: blur(16px) saturate(1.1); backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: 0 10px 40px rgba(20,20,18,.10); }
.hero-card .display { margin-top: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid var(--ink); transition: transform .15s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn.solid { background: var(--ink); color: #fff; }
.btn.solid:hover { background: var(--blue); border-color: var(--blue); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

.section { padding: clamp(64px, 10vh, 112px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 44px); margin-top: 18px; max-width: 18ch; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.pillar { background: var(--card); border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.pillar img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.pillar .body { padding: 24px 24px 28px; }
.pillar .n { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; color: var(--muted); }
.pillar h3 { font-size: 20px; text-transform: uppercase; letter-spacing: .12em; margin: 12px 0 10px; }
.pillar p { color: var(--muted); font-size: 15px; }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.split img { border-radius: 20px; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split h2 { font-size: clamp(28px, 3.6vw, 44px); margin: 18px 0 16px; }

.night { background: var(--ink); color: #fff; }
.night .label::after { background: var(--blue); }
.night .lede { color: rgba(255,255,255,.78); }
.night .btn { border-color: #fff; color: #fff; }
.night .btn.solid { background: #fff; color: var(--ink); }
.night .btn.solid:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ---------- page heads (sub pages) ---------- */
.page-head { padding: clamp(84px, 14vh, 140px) 0 clamp(36px, 6vh, 56px); }
.page-head h1 { font-size: clamp(36px, 5.4vw, 64px); margin: 22px 0 16px; }

/* ---------- project placards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.card {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s;
}
a.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.10); }
.card .art { aspect-ratio: 16 / 9; background: #151515; position: relative; }
.card .art img { width: 100%; height: 100%; object-fit: cover; }
.card .art .icon { position: absolute; left: 18px; bottom: -26px; width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.card .body { padding: 38px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 22px; }
.card p { color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 12px; }
.tag { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: rgba(17,17,17,.06); color: var(--muted); }
.tag.blue { background: rgba(10,60,255,.10); color: var(--blue); }

/* ---------- ForgeWave ---------- */
.fw-hero { position: relative; background: #0b0b0c; color: #fff; overflow: hidden; }
.fw-hero img { width: 100%; height: clamp(420px, 70vh, 700px); object-fit: cover; opacity: .9; }
.fw-hero .over { position: absolute; inset: 0; display: flex; align-items: flex-end;
  background: linear-gradient(180deg, rgba(11,11,12,0) 30%, rgba(11,11,12,.88) 100%); }
/* A pale picture (the Basic suite's) needs a darker wash so white text stays readable. */
.fw-hero.pale img { opacity: .7; }
.fw-hero.pale .over { background: linear-gradient(180deg, rgba(11,11,12,.25) 0%, rgba(11,11,12,.55) 45%, rgba(11,11,12,.9) 100%); }
.fw-hero .over .wrap { padding-bottom: clamp(36px, 7vh, 72px); }
.fw-hero .icon { width: 84px; height: 84px; border-radius: 20px; margin-bottom: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.fw-hero h1 { font-size: clamp(42px, 7vw, 84px); letter-spacing: .02em; }
.fw-hero .lede { color: rgba(255,255,255,.82); margin-top: 12px; }
.fw-hero .btn { border-color: #fff; color: #fff; }
.fw-hero .btn.solid { background: #fff; color: #111; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.feature { background: var(--card); padding: 28px 26px 30px; }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 15px; }
.feature .k { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; color: var(--blue); text-transform: uppercase; display: block; margin-bottom: 14px; }

/* ---------- download placards (rendered only when downloads exist) ---------- */
.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 18px; }
.dl { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; gap: 18px; align-items: flex-start; }
.dl img { width: 64px; height: 64px; border-radius: 16px; flex: none; }
.dl .info { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.dl h3 { font-size: 20px; }
.dl .v { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.dl p { font-size: 14px; color: var(--muted); }
.dl .files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dl .files .btn { padding: 9px 16px; font-size: 14px; white-space: nowrap; }

/* ---------- about ---------- */
.prose { max-width: 720px; }
.prose p { font-size: 18px; line-height: 1.75; color: #2e2e2c; }
.prose p + p { margin-top: 20px; }
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 48px; }
.principle { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.principle h3 { font-size: 18px; margin-bottom: 8px; }
.principle p { color: var(--muted); font-size: 15px; }

/* ---------- coming soon ---------- */
.soon-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: clamp(32px, 6vw, 56px); text-align: center; max-width: 640px; margin: 0 auto; }
.soon-card h2 { font-size: clamp(24px, 3vw, 32px); margin: 18px 0 10px; }
.soon-card p { color: var(--muted); }
.soon-pill { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; border: 1px solid var(--line); padding: 9px 16px; border-radius: 999px; }
.soon-pill i { width: 8px; height: 8px; background: var(--blue); animation: blink 1.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 34px 0 max(34px, env(safe-area-inset-bottom)); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-foot nav a { text-decoration: none; font-size: 14px; color: var(--muted); }
.site-foot nav a:hover { color: var(--ink); }
.copy { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--muted); }

@media (max-width: 900px) {
  .topnav { display: none; }
  .topbar-in { gap: 10px; }
  .pillars, .features { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, .drawer, .scrim { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

.small { font-size: 14px; }
.prose h2 { font-size: 22px; margin: 34px 0 10px; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: auto 1fr; gap: 10px 28px; margin-top: 26px; font-size: 18px; }
.contact dt { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding-top: 5px; }
.contact a { text-decoration: none; border-bottom: 2px solid var(--blue); }
.contact a:hover { color: var(--blue); }

/* Phones: the hero text runs down past the horizon, so give it a light wash all the way down. */
@media (max-width: 760px) {
  .hero img { height: clamp(620px, 92svh, 820px); object-position: 30% top; }
  .hero::after { background: linear-gradient(180deg, rgba(236,235,231,.72) 0%, rgba(236,235,231,.62) 62%, rgba(236,235,231,.35) 80%, rgba(236,235,231,0) 96%); }
  .hero-copy .lede { color: #1d1d1b; }
  .hero-card { padding: 22px 20px 24px; border-radius: 18px; }
}

/* ---------- Basic suite ---------- */
.suite-art { display: flex; align-items: center; justify-content: center; gap: 18px; background: linear-gradient(135deg, #eceae4, #dcd9d1); }
.suite-art img { width: 26%; height: auto; border-radius: 22%; box-shadow: 0 10px 24px rgba(0,0,0,.15); object-fit: contain; }
.suite { display: flex; flex-direction: column; gap: 22px; }
.suite-app { display: flex; gap: 26px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
.suite-app > img { width: 96px; height: 96px; border-radius: 22px; flex: none; box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.suite-app h2 { font-size: 26px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.suite-app .lede { margin: 6px 0 12px; }
.points { margin: 0 0 6px 18px; color: var(--muted); font-size: 15px; display: grid; gap: 4px; }
.dl-group { font-size: 22px; margin: 8px 0 16px; }
.downloads + .dl-group { margin-top: 40px; }
@media (max-width: 700px) { .suite-app { flex-direction: column; padding: 22px; } }
.dl .files .btn.ghost { background: transparent; }
.card .art.suite-art { background: linear-gradient(135deg, #eceae4, #d9d5cc); }
.card .art.suite-art img { width: 24%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 22%; }
.downloads { grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); }
.cards { grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); }
@media (max-width: 600px) {
  .dl { flex-direction: column; padding: 20px; }
  .dl .files .btn { white-space: normal; }
}
.app-head { display: flex; align-items: center; gap: 22px; }
.app-head img { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 8px 20px rgba(0,0,0,.14); flex: none; }
.app-head h1 { margin: 14px 0 0; }
.page-head .actions { margin-top: 24px; }
.note-block { margin-top: 28px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; }
.note-block h3 { font-size: 18px; margin-bottom: 10px; }
.card .art .icons { position: absolute; left: 18px; bottom: -26px; display: flex; gap: 8px; }
.card .art .icons img { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.22); }

/* ForgeWave hero: the picture fills behind the text and grows with it, so nothing spills under the menu button,
   and it starts at the very top (no light strip above). */
.has-fab main > .fw-hero:first-child { margin-top: -8px; }
.fw-hero img:not(.icon) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fw-hero .over { position: relative; inset: auto; min-height: clamp(460px, 70vh, 700px); padding-top: 92px; }

/* Phones: the picture is a banner on top; the title and text sit below it on solid dark, never over the glow. */
@media (max-width: 760px) {
  .fw-hero img:not(.icon) { position: static; height: 260px; opacity: 1; object-position: 45% 40%; }
  .fw-hero .over { background: #0b0b0c; min-height: 0; padding-top: 0; }
  .fw-hero .over .wrap { padding-top: 0; padding-bottom: 40px; }
  .fw-hero .icon { margin-top: -42px; position: relative; }
}
/* Button labels are centred, including full-width form buttons. */
.btn { justify-content: center; text-align: center; }

/* Demo players on the project pages (no autoplay) */
.demo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 900px; }
.demo-audio { width: min(100%, 560px); height: 44px; }
.demo-video { width: 100%; height: auto; border-radius: 12px; background: #000; display: block; }
