/* ==========================================================================
   Quentin Technologies — site additions
   Loaded after style.css (the official style sheet, unmodified).
   Fonts are hosted here; licences are in /assets/fonts/OFL-*.txt.
   ========================================================================== */

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-var.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

[hidden] { display: none !important; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  background: var(--surface);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
}
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.brand,
.nav a { white-space: nowrap; }
@media (min-width: 721px) and (max-width: 900px) {
  .nav { gap: 18px; }
  .nav a.nav-cta { display: none; }
}

/* ---------- Brand ---------- */
.brand img {
  width: 38px;
  height: 38px;
}
.footer-brand .brand img {
  width: 32px;
  height: 32px;
}

/* ---------- Hero ---------- */
.hero-logo {
  width: 132px;
  height: 132px;
  margin: 0 auto 20px;
}
.hero-def {
  max-width: 640px;
  margin: 28px auto 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.4;
  color: var(--text);
}

/* ---------- Text blocks ---------- */
.prose {
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.prose p { font-size: 1.05rem; }
.prose strong { color: var(--text); font-weight: 600; }

.sim-gap { margin-top: 64px; }
.sim-gap .sim-note { margin-top: 0; text-transform: uppercase; letter-spacing: 0.08em; color: var(--blue); }

.sim-note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  letter-spacing: 0.02em;
  margin-top: 40px;
}

/* ---------- Demo cards (home) ---------- */
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.demo-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.demo-card-media {
  aspect-ratio: 16 / 9;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.demo-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}
.demo-card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 26px 30px 30px;
  flex: 1;
}
.demo-card-body h3 { margin: 0; font-size: 1.2rem; }
.demo-card-body .card-link {
  margin-top: auto;
  padding-top: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--teal);
}
.demo-card-body .card-link:hover { text-decoration: underline; }

/* ---------- Status pill ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 5px 12px;
}
.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
}
[data-state="online"] .status-pill {
  color: var(--teal);
  border-color: rgba(0, 245, 196, 0.3);
}
[data-state="online"] .status-pill::before {
  background: var(--teal);
  box-shadow: 0 0 6px 1px rgba(0, 245, 196, 0.6);
}

/* ---------- Demo pages ---------- */
.demo-hero {
  padding: 88px 0 40px;
}
.demo-hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  max-width: 820px;
}
.demo-hero .hero-sub {
  margin: 20px 0 0;
  max-width: 680px;
}
.back-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  margin-bottom: 28px;
}
.back-link:hover { color: var(--teal); }

.demo-body {
  padding: 16px 0 110px;
}
.demo-layout {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 48px;
  align-items: start;
}

.media-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
}
.media-frame img,
.media-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  object-position: top left;
}
.media-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(10, 14, 20, 0.82);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 7px 14px;
}
.media-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  background: rgba(10, 14, 20, 0.25);
  border: 0;
  cursor: pointer;
  transition: background var(--transition);
}
.media-play:hover { background: rgba(10, 14, 20, 0.1); }
.media-play span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 6px 24px -6px rgba(0, 245, 196, 0.5);
}
.media-play span::before {
  content: "";
  margin-left: 6px;
  border-style: solid;
  border-width: 14px 0 14px 24px;
  border-color: transparent transparent transparent #04140f;
}

.demo-points {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  max-width: 680px;
}
.demo-points li {
  position: relative;
  padding-left: 22px;
  color: var(--text-dim);
  font-size: 1.02rem;
}
.demo-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 8px;
  height: 2px;
  background: var(--accent-grad);
}

/* ---------- Launch panel ---------- */
.launch {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 28px 30px 30px;
}
.launch[data-state="online"] { border-top-color: var(--teal); }
.launch h2 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
}
.launch-msg { font-size: 0.98rem; }
.launch[data-state="offline"] .launch-msg { color: var(--text); }
.launch-note {
  font-size: 0.88rem;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
  padding-top: 16px;
  width: 100%;
}

/* ---------- Cards with a link ---------- */
.card { display: flex; flex-direction: column; }
.card p + p { margin-top: 12px; }
.card-link {
  display: inline-block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--teal);
}
.card-link::after { content: " \2192"; }
.card-link:hover { text-decoration: underline; }
.card > .card-link { margin-top: auto; padding-top: 20px; align-self: flex-start; }

/* ---------- Detail pages ---------- */
.detail { padding: 84px 0; }
.detail .section-head { max-width: 720px; margin-bottom: 44px; }
.detail-list { max-width: 760px; }
.detail-list .approach-item p { margin-top: 10px; font-size: 1rem; }
section[id],
.detail [id] { scroll-margin-top: 96px; }
.detail-cols {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 64px;
  align-items: start;
}
.detail-cols .approach-list { gap: 22px; }
.detail-cols .approach-item p { font-size: 0.98rem; }
.list-label {
  margin: 0 0 22px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.detail-actions { justify-content: flex-start; margin-top: 44px; }
.pull {
  margin: 6px 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--teal);
}
.pull p {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--text);
}
.pull cite {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.74rem;
  color: var(--text-faint);
}
@media (max-width: 900px) {
  .detail-cols { grid-template-columns: 1fr; gap: 44px; }
}
@media (max-width: 720px) {
  .detail { padding: 60px 0; }
}

/* ---------- Contact ---------- */
.contact-form { max-width: none; }
.contact-form .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form .btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.form-note-error { color: #ffb4a8; }
.contact-address {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--teal);
}
.contact-address:hover { text-decoration: underline; }
.contact-panel { max-width: 520px; }

/* ---------- Terms ---------- */
.legal { max-width: 760px; }
.legal p, .legal li { font-size: 1rem; color: var(--text-dim); }
.legal p + p, .legal ul + p { margin-top: 14px; }
.legal strong { color: var(--text); font-weight: 600; }
.legal h2 {
  font-family: var(--font-sans);
  font-size: 1.12rem;
  font-weight: 600;
  margin: 40px 0 12px;
}
.legal ul { margin: 12px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.legal a.accent:hover { text-decoration: underline; }
.footer-bottom a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom a:hover { color: var(--teal); }
.footer-bottom a + a { margin-left: 12px; }
.launch-note a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 3px; }
.launch-terms { font-size: 0.86rem; color: var(--text-faint); }
.launch-terms a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 404 ---------- */
.notfound {
  padding: 160px 0;
  text-align: center;
}
.notfound h1 { font-size: clamp(2rem, 4vw, 3rem); }
.notfound p { margin: 16px 0 36px; }

/* ---------- Footer ---------- */
.footer-brand .brand { font-size: 1.1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .demo-layout { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
  .demo-hero { padding: 64px 0 32px; }
  .hero-logo { width: 104px; height: 104px; }
  .brand span { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- Chat demo ---------- */
.demo-card-quote {
  display: grid;
  place-items: center;
  padding: 26px;
  background:
    radial-gradient(circle at 30% 0%, rgba(0, 245, 196, 0.10), transparent 60%),
    var(--bg-alt);
}
.demo-card-quote span {
  font-family: var(--font-display);
  font-size: 1.12rem;
  line-height: 1.4;
  color: var(--text);
  border-left: 2px solid var(--teal);
  padding-left: 16px;
}
.chat-examples {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 28px 30px 30px;
}
.chat-examples ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chat-examples li {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 0.97rem;
}
@media (max-width: 1000px) {
  #demos .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  #demos .grid-3 { grid-template-columns: 1fr; }
}

/* ---------- Questions ---------- */
.faq {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px 56px;
  max-width: 980px;
}
.faq h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 10px; }
.faq p { font-size: 0.98rem; }
.sim-note a.accent:hover,
.prose a.accent:hover { text-decoration: underline; }
@media (max-width: 720px) {
  .faq { grid-template-columns: 1fr; }
}

/* ---------- Hero footnote ---------- */
.fn-ref {
  color: var(--teal);
  font-weight: 600;
  margin-left: 1px;
  text-decoration: none;
}
.fn-ref:hover { text-decoration: underline; }
.hero-note {
  max-width: 640px;
  margin: 14px auto 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--text-faint);
}

/* ---------- Blog ---------- */
.journal-archive .pub-list { margin-bottom: 8px; }
.post-head h1 { font-size: clamp(2rem, 4.2vw, 3rem); max-width: 820px; }
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}
.post h2 { font-family: var(--font-display); font-size: 1.5rem; margin: 44px 0 14px; }
.post h3 { font-size: 1.12rem; margin: 32px 0 10px; }
.post p, .post li { font-size: 1.04rem; line-height: 1.7; }
.post img { margin: 24px 0; border: 1px solid var(--border-strong); border-radius: var(--radius); }
.post pre {
  margin: 20px 0;
  padding: 16px 18px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
}
.post code { font-family: var(--font-mono); font-size: 0.92em; color: var(--text); }
.post .pull { margin: 24px 0; }
.post-table { margin: 24px 0; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.post-table table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.post-table th, .post-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); color: var(--text-dim); }
.post-table th { background: var(--surface); color: var(--text); font-weight: 600; }
.post-table tr:last-child td { border-bottom: 0; }
.sim-note a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 3px; }

.post-video { margin: 28px 0; }
.post-video .media-frame img { margin: 0; border: 0; border-radius: 0; }
.post-video figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-faint);
}
