/* ClarityAILab — design option D, "Golden Field": warm dark ground, wheat-gold accent,
   Instrument Serif display over DM Sans text. Dark only. */
:root {
  --bg: #120e09;
  --surface: #1b150e;
  --line: #2b2217;
  --text: #f4ecdc;
  --soft: #c9bda6;
  --muted: #b8ab94;
  --faint: #8f836d;
  --accent: #e9c46a;
  --accent-hover: #f3dc9f;
  --serif: "Instrument Serif", "Noto Serif", Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans", "Noto Sans Arabic", "Noto Sans Hebrew", sans-serif;
  --wrap: 1360px;
  --gutter: clamp(16px, 3vw, 32px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--accent); color: var(--bg); padding: 10px 16px; border-radius: 999px; z-index: 20; }
.skip:focus { top: 8px; }

/* Header */
.site-header { position: relative; z-index: 5; }
.site-header--over { position: absolute; top: 0; inset-inline: 0; }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--serif); font-size: 24px; line-height: 1; }
.brand svg { color: var(--accent); }
.brand--footer { font-size: 20px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 24px; list-style: none; margin: 0; padding: 0; font-size: 15px; }
.nav a { color: var(--text); text-decoration: none; padding-block: 6px; }
.nav a:hover, .nav a[aria-current] { color: var(--accent); }
.header-tools { display: flex; align-items: center; gap: 12px; }
.langs { position: relative; font-size: 14px; }
.langs summary { list-style: none; cursor: pointer; padding: 8px 10px; border-radius: 999px; color: var(--text); }
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: " ▾"; color: var(--faint); }
.langs ul { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 8px; min-width: 160px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; z-index: 10; }
.langs li a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; }
.langs li a:hover, .langs li a[aria-current] { background: var(--line); }

/* Buttons and small type */
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 12px 24px; border-radius: 999px; background: var(--accent); color: var(--bg); font-weight: 600; text-decoration: none; }
.btn:hover { background: var(--accent-hover); color: var(--bg); }
.btn--ghost { background: rgba(18, 14, 9, 0.55); color: var(--text); font-weight: 500; }
.btn--ghost:hover { background: rgba(18, 14, 9, 0.8); color: var(--text); }
.btn--small { min-height: 40px; padding: 8px 18px; font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.eyebrow { margin: 0; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.eyebrow a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); font-weight: 300; }
.accent { color: var(--accent); text-decoration: none; }
.caption { font-size: 13px; color: var(--faint); margin: 12px 0 0; }

/* Hero (home): the live field fills the screen, text overlays the left */
.hero { position: relative; min-height: min(92vh, 860px); display: flex; align-items: center; overflow: hidden; }
.scene { display: block; width: 100%; height: 100%; }
.hero-scene { position: absolute; inset: 0; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(18, 14, 9, 0.82) 0%, rgba(18, 14, 9, 0.35) 42%, rgba(18, 14, 9, 0) 65%); }
[dir="rtl"] .hero-scene { transform: scaleX(-1); }
[dir="rtl"] .hero-shade { background: linear-gradient(260deg, rgba(18, 14, 9, 0.82) 0%, rgba(18, 14, 9, 0.35) 42%, rgba(18, 14, 9, 0) 65%); }
.hero-copy { position: relative; width: 100%; padding-top: 80px; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 6.4vw, 96px); line-height: 0.98; max-width: 11ch; }
h1 em, .hero h1 em { font-style: italic; color: var(--accent); }

/* Inner page banner and intro */
.banner { height: clamp(180px, 26vw, 340px); position: relative; overflow: hidden; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(18, 14, 9, 0) 55%, var(--bg)); }
.page-intro { padding-block: clamp(32px, 5vw, 64px) 16px; display: flex; flex-direction: column; gap: 18px; max-width: calc(860px + 2 * var(--gutter)); margin-inline: 0; margin-inline-start: max(0px, calc((100vw - var(--wrap)) / 2)); }
.page-intro h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 5vw, 72px); line-height: 1.02; }
.lead { margin: 0; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.6; color: var(--soft); font-weight: 300; }

/* Sections */
section.wrap { padding-block: clamp(40px, 5vw, 72px); }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px 64px; }
.quote { margin: 0; font-family: var(--serif); font-size: clamp(28px, 3vw, 40px); line-height: 1.2; }
.section-title { margin: 0 0 24px; font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4vw, 56px); line-height: 1.05; }
.section-title--small { font-size: clamp(26px, 2.6vw, 36px); }
.section-lead { margin: -8px 0 24px; max-width: 40em; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.cards--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card { padding: clamp(28px, 4vw, 48px); border: 1px solid var(--line); border-radius: 4px; display: flex; flex-direction: column; gap: 16px; text-decoration: none; color: var(--text); transition: background 0.2s; }
.card:hover { background: var(--surface); color: var(--text); }
.card-title { font-family: var(--serif); font-size: clamp(32px, 3.4vw, 50px); line-height: 1.04; }
.card-title--small { font-size: 28px; }
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows--grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); column-gap: 32px; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px 32px; padding: 20px 8px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; transition: background 0.2s; }
.row:hover { background: var(--surface); color: var(--text); }
.row--post { justify-content: flex-start; flex-wrap: wrap; }
.row-meta { width: 170px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.row-title { flex: 1 1 420px; font-family: var(--serif); font-size: clamp(23px, 2.3vw, 31px); line-height: 1.18; }
.band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); }
.band p { margin: 0; font-size: 18px; color: var(--soft); font-weight: 300; max-width: 50em; }
.band strong { color: var(--text); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 8px 0; }
.chip { min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Long-form text */
.prose { max-width: calc(760px + 2 * var(--gutter)); margin-inline-start: max(0px, calc((100vw - var(--wrap)) / 2)); }
.prose--wide { max-width: var(--wrap); margin-inline: auto; columns: 2 420px; column-gap: 64px; }
.prose--wide h2 { break-after: avoid; }
.prose--wide ul { break-inside: avoid; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 2.8vw, 38px); line-height: 1.15; margin: 40px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 20px; font-weight: 600; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--soft); font-weight: 300; }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-inline-start: 1.2em; }
.prose li { margin-bottom: 8px; }
.prose blockquote { margin: 24px 0; padding-inline-start: 20px; border-inline-start: 2px solid var(--accent); font-family: var(--serif); font-size: 24px; color: var(--text); }
.prose code { font-size: 0.9em; background: var(--surface); padding: 2px 6px; border-radius: 4px; }
.table { overflow-x: auto; margin: 24px 0; }
.table table { border-collapse: collapse; width: 100%; font-size: 15px; }
.table th, .table td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--text); font-weight: 600; }
.article { padding-block: clamp(32px, 5vw, 64px); }
.article > h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4.6vw, 64px); line-height: 1.05; margin: 16px 0; max-width: 20ch; }
.article > .lead, .article > .byline, .article > .eyebrow, .article > h1 { margin-inline-start: max(0px, calc((100vw - var(--wrap)) / 2)); }
.article .prose { margin-inline-start: max(0px, calc((100vw - var(--wrap)) / 2)); padding-inline: 0; }
.byline { margin: 16px 0 40px; font-size: 14px; color: var(--faint); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-block: 36px; font-size: 14px; color: var(--faint); }
.footer-row a { color: var(--faint); text-decoration: none; }
.footer-row a:hover { color: var(--text); }

/* Phones: the headline moves below the field so the scene stays visible */
@media (max-width: 760px) {
  .site-header--over { position: relative; background: var(--bg); }
  .nav { gap: 2px 16px; font-size: 14px; }
  .hero { display: block; min-height: 0; }
  .hero-scene { position: relative; aspect-ratio: 4 / 3; }
  .hero-shade { display: none; }
  .hero-copy { padding-top: 28px; }
  .row-meta { width: 100%; }
  .prose--wide { columns: 1; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Contact form */
.contact-form { display: grid; gap: 10px; max-width: 640px; margin-inline-start: max(0px, calc((100vw - var(--wrap)) / 2)); }
.contact-form label { font-size: 14px; color: var(--muted); margin-top: 8px; }
.contact-form input, .contact-form textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; min-height: 44px; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); outline: none; }
.contact-form button { justify-self: start; margin-top: 12px; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.contact-form button[disabled] { opacity: 0.6; }
.form-status { min-height: 1.6em; color: var(--soft); margin: 0; }

/* Breadcrumbs, article images, citations */
.crumbs { padding-block: 20px 0; font-size: 14px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40ch; }
.article-image { margin: 0 0 40px; margin-inline-start: max(0px, calc((100vw - var(--wrap)) / 2)); max-width: 980px; }
.article-image img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; }
.cite { font-size: 15px; color: var(--muted); }

/* Second button with an outline, product videos, small demo cards */
.btn--line { border: 1px solid var(--line); background: transparent; }
.video { margin: 0; max-width: 1100px; }
.video video { display: block; width: 100%; height: auto; border-radius: 4px; background: #000; }
.video figcaption { margin-top: 12px; color: var(--soft); font-weight: 300; max-width: 60em; }
.video figcaption strong { color: var(--text); font-weight: 600; }
.card--small { padding: 24px 28px; gap: 10px; }
.prose a, .prose code { overflow-wrap: anywhere; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
