/* Novus Inceptum: shared styles for the company pages.
   Lies vs Truth has its own sheet (lvt.css) in the app's colours. */

@font-face {
  font-family: "Bricolage";
  src: url("/assets/fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Martian";
  src: url("/assets/fonts/martian-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #0d0d0b;
  --bone: #eeeae0;
  --paper: #f6f3ec;
  --ultra: #2a35d8;
  --ultra-deep: #161d86;
  --glow: #7e89ff;
  --muted: #5d5a52;
  --rule: #cfc9bb;
  --display: "Bricolage", "Helvetica Neue", Arial, sans-serif;
  --mono: "Martian", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(1rem, 4vw, 3rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--display);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ultra); outline-offset: 3px; border-radius: 2px; }
.on-ultra :focus-visible, .contact :focus-visible { outline-color: var(--bone); }

.skip {
  position: absolute; left: -999px; top: 0.5rem; z-index: 50;
  background: var(--ink); color: var(--bone); padding: 0.6rem 1rem;
}
.skip:focus { left: 0.5rem; }

.mono {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.5;
}

/* ---------- Header ---------- */
.bar {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem var(--gutter);
}
.mark {
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 700; font-stretch: 80%; font-size: 1.05rem; letter-spacing: -0.01em;
  text-decoration: none;
}
.mark svg { width: 1.6rem; height: 1.6rem; }
.nav { display: flex; gap: clamp(0.9rem, 2.5vw, 2rem); flex-wrap: wrap; justify-content: flex-end; }
.nav a { text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--ultra);
  color: var(--bone);
  overflow: hidden;
  isolation: isolate;
}
.hero::before { /* dawn glow that follows the pointer */
  content: "";
  position: absolute; inset: -20%;
  z-index: -1;
  background:
    radial-gradient(38rem 30rem at var(--gx, 70%) var(--gy, 85%), rgba(126, 137, 255, 0.55), transparent 65%),
    radial-gradient(60rem 40rem at 10% 0%, var(--ultra-deep), transparent 70%);
  transition: background-position 0.4s;
}
.hero::after { /* grain */
  content: "";
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.22; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.hero-body {
  align-self: end;
  padding: 0 var(--gutter) clamp(2rem, 6vh, 4rem);
  position: relative;
}
.hero .eyebrow { margin: 0 0 clamp(1rem, 3vh, 2rem); max-width: 30ch; opacity: 0.85; }
.headline {
  margin: 0;
  font-weight: 760;
  font-stretch: 75%;
  font-size: clamp(4.4rem, 19.5vw, 19rem);
  line-height: 0.8;
  letter-spacing: -0.012em;
}
.headline .line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.headline .line + .line { padding-left: clamp(0rem, 9vw, 9rem); }
.headline .ch {
  display: inline-block;
  transform: translateY(105%);
  animation: rise 1.1s var(--ease-out) forwards;
  animation-delay: calc(0.08s + var(--i) * 0.045s);
}
@keyframes rise { to { transform: none; } }

.hero-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1.5rem;
  padding: 0 var(--gutter) 1.4rem;
}
.gloss { margin: 0; max-width: 34ch; font-size: clamp(1.05rem, 1.6vw, 1.35rem); line-height: 1.35; }
.gloss em { font-style: normal; font-stretch: 80%; font-weight: 650; }
.scroll-cue { text-decoration: none; display: inline-flex; gap: 0.6rem; align-items: center; }
.scroll-cue span:last-child { display: inline-block; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }

/* the beginning line */
.horizon {
  position: relative;
  height: 1px;
  margin: 0 var(--gutter) 1.1rem;
  background: rgba(238, 234, 224, 0.35);
  transform-origin: left;
  transform: scaleX(0);
  animation: draw 1.6s 0.5s var(--ease-out) forwards;
}
.horizon::before {
  content: "";
  position: absolute; left: 0; top: -4px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bone);
  box-shadow: 0 0 0 0 rgba(238, 234, 224, 0.6);
  animation: pulse 2.8s 1.8s ease-out infinite;
}
@keyframes draw { to { transform: scaleX(1); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(238, 234, 224, 0.55); } 100% { box-shadow: 0 0 0 18px rgba(238, 234, 224, 0); } }

.seal {
  position: absolute;
  right: var(--gutter);
  top: clamp(5rem, 14vh, 9rem);
  width: clamp(7.5rem, 15vw, 12rem);
  aspect-ratio: 1;
  color: var(--bone);
}
.seal svg { width: 100%; height: 100%; overflow: visible; }
.seal .ring { animation: spin 48s linear infinite; transform-origin: 50% 50%; }
.seal text { font: 400 8.2px var(--mono); letter-spacing: 0.1em; fill: currentColor; text-transform: uppercase; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 11vw, 9rem) var(--gutter); }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1rem 2rem;
  align-items: baseline;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section-head h2 {
  margin: 0;
  font-weight: 720; font-stretch: 78%;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  line-height: 0.9; letter-spacing: -0.012em;
}
.section-head p { margin: 0; max-width: 46ch; color: var(--muted); }

/* catalog */
.catalog { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.entry { border-bottom: 1px solid var(--ink); }
.entry > a, .entry > div {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, 15rem) 2.5rem;
  gap: 1rem;
  align-items: center;
  padding: clamp(1.3rem, 3vw, 2.2rem) 0.75rem;
  text-decoration: none;
  position: relative;
  transition: color 0.45s var(--ease-out), padding 0.45s var(--ease-out);
}
.entry .no { align-self: start; padding-top: 0.6em; }
.entry .name {
  font-weight: 700; font-stretch: 80%;
  font-size: clamp(2rem, 6vw, 4.6rem);
  line-height: 0.95; letter-spacing: -0.03em;
}
.entry .meta { color: var(--muted); transition: color 0.45s; }
.entry .meta b { display: block; font-weight: 400; color: var(--ink); transition: color 0.45s; }
.entry .go { font-size: 1.8rem; justify-self: end; transition: transform 0.45s var(--ease-out); }

/* Lies vs Truth row borrows the app's night and rubric on hover */
.entry--lvt > a { isolation: isolate; }
.entry--lvt > a::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: #0b0a09;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.6s var(--ease-out);
}
.entry--lvt .lie { position: relative; display: inline-block; }
.entry--lvt .lie::after {
  content: ""; position: absolute; left: -0.04em; right: -0.04em; top: 52%;
  height: 0.07em; background: #b3362f;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.45s 0.15s var(--ease-out);
}
.entry--lvt > a:hover, .entry--lvt > a:focus-visible { color: #fcfbf7; padding-left: 1.5rem; }
.entry--lvt > a:hover::before, .entry--lvt > a:focus-visible::before { clip-path: inset(0 0 0 0); }
.entry--lvt > a:hover .lie::after, .entry--lvt > a:focus-visible .lie::after { transform: none; }
.entry--lvt > a:hover .meta, .entry--lvt > a:hover .meta b,
.entry--lvt > a:focus-visible .meta, .entry--lvt > a:focus-visible .meta b { color: #b9b3a9; }
.entry--lvt > a:hover .go, .entry--lvt > a:focus-visible .go { transform: translateX(-0.4rem) rotate(-45deg); }
.entry--lvt .icon { width: 3.2rem; height: 3.2rem; border-radius: 22%; grid-column: 4; justify-self: end; display: none; }

.entry--soon > div { color: var(--muted); }
.entry--soon .name { color: transparent; -webkit-text-stroke: 1px var(--muted); }

/* statement */
.statement {
  background: var(--paper);
  border-top: 1px solid var(--rule);
}
.statement p {
  margin: 0;
  max-width: 22ch;
  font-weight: 560; font-stretch: 85%;
  font-size: clamp(1.9rem, 5.2vw, 4.2rem);
  line-height: 1.02; letter-spacing: -0.03em;
}
.statement p .soft { color: var(--muted); }
.statement .mono { margin-top: 2rem; color: var(--muted); }

/* contact block */
.contact {
  background: var(--ink);
  color: var(--bone);
}
.contact .section-head p { color: #a7a397; }
.mail {
  display: inline-block;
  font-weight: 700; font-stretch: 75%;
  font-size: clamp(1.9rem, 8.2vw, 7.5rem);
  line-height: 1; letter-spacing: -0.012em;
  text-decoration: none;
  background: linear-gradient(var(--glow), var(--glow)) 0 100% / 0 0.08em no-repeat;
  transition: background-size 0.6s var(--ease-out), color 0.3s;
  word-break: break-word;
}
.mail:hover, .mail:focus-visible { background-size: 100% 0.08em; color: #fff; }
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  color: #a7a397;
}
.contact-grid h3 { margin: 0 0 0.5rem; color: var(--bone); font-weight: 400; }
.contact-grid p { margin: 0; }

/* footer */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem;
  padding: 1.6rem var(--gutter) 2rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
}
.foot nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.contact + .foot { background: var(--ink); color: #8f8b80; border-top-color: #2a2926; }

/* ---------- Document pages (privacy, terms, support, contact) ---------- */
.doc-head {
  background: var(--ultra); color: var(--bone);
  position: relative; overflow: hidden; isolation: isolate;
}
.doc-head::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.18; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.doc-title { padding: clamp(2.5rem, 8vw, 6rem) var(--gutter) clamp(2rem, 5vw, 3.5rem); }
.doc-title h1 {
  margin: 0.8rem 0 0;
  font-weight: 740; font-stretch: 75%;
  font-size: clamp(3.2rem, 11vw, 9rem); line-height: 0.88; letter-spacing: -0.012em;
}
.doc-title p { margin: 1.4rem 0 0; max-width: 52ch; opacity: 0.88; }

.doc {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 44rem);
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter) clamp(4rem, 8vw, 7rem);
}
.toc { position: sticky; top: 1.5rem; align-self: start; }
.toc ol { list-style: none; margin: 0.8rem 0 0; padding: 0; border-left: 1px solid var(--rule); }
.toc a { display: block; padding: 0.32rem 0 0.32rem 0.9rem; text-decoration: none; color: var(--muted); font-size: 0.95rem; line-height: 1.3; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.prose { max-width: 44rem; }
.prose h2 {
  margin: 3rem 0 0.8rem;
  font-weight: 700; font-stretch: 82%;
  font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.1; letter-spacing: -0.02em;
  scroll-margin-top: 1.5rem;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.8rem 0 0.5rem; font-size: 1.1rem; font-weight: 650; }
.prose p, .prose li { max-width: 68ch; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li + li { margin-top: 0.35rem; }
.prose .lead { font-size: 1.2rem; line-height: 1.5; }
.prose address { font-style: normal; }
.prose .caps { text-transform: uppercase; font-size: 0.95rem; line-height: 1.55; }
.card {
  border: 1px solid var(--ink);
  padding: 1.3rem 1.4rem;
  margin: 1.6rem 0;
  background: var(--paper);
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.summary { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: 0.98rem; }
.summary th, .summary td { text-align: left; vertical-align: top; padding: 0.8rem 0.8rem 0.8rem 0; border-bottom: 1px solid var(--rule); }
.summary th { font: 400 0.6875rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--ink); }
.faq details { border-top: 1px solid var(--rule); padding: 0.9rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); transition: transform 0.3s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0.7rem 0 0.2rem; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .section-head { grid-template-columns: 1fr; }
  .entry > a, .entry > div { grid-template-columns: 2.6rem minmax(0, 1fr) 1.8rem; }
  .entry .meta { grid-column: 2 / 3; grid-row: 2; }
  .entry .go { grid-row: 1; grid-column: 3; }
  .doc { grid-template-columns: 1fr; }
  .toc { position: static; }
  .seal { top: 6.5rem; opacity: 0.9; }
  .hero-foot { grid-template-columns: 1fr; }
  .scroll-cue { display: none; }
}
@media (max-width: 520px) {
  .nav { gap: 0.9rem; flex-wrap: nowrap; }
  .nav .opt, .nav a[href="#apps"], .nav a[href="/#apps"] { display: none; }
  .headline { font-size: 22.5vw; }
  .headline .line + .line { padding-left: 0; }
  .seal { width: 6.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-delay: 0s !important; transition-duration: 0.001s !important; scroll-behavior: auto !important; }
  .seal .ring { animation: none; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .hero, .doc-head { background: none; color: var(--ink); }
  .toc, .nav, .seal, .horizon { display: none; }
  .doc { display: block; }
}
.contact-grid h2 { margin: 0 0 0.5rem; color: var(--bone); font-weight: 400; }
.contact-grid address { font-style: normal; }
.doc-head + main > .contact { padding-top: clamp(3rem, 8vw, 6rem); }
