/* virsva — marketing site stylesheet
 *
 * Materials: graphite, steel, warm paper, concrete, brass.
 * Brass is an instrument signal (datum marks, labels, active states, links),
 * never decoration. Most of the page is graphite or paper.
 *
 * Type: DM Sans (the logo face) for everything; JetBrains Mono only for
 * annotation labels (section indices, timestamps, metadata).
 *
 * Contrast (WCAG AA, checked): ink/paper 15.7 · steel/paper 5.4 ·
 * steel/concrete 4.8 · brass-ink/paper 5+ · paper/graphite 14.9 ·
 * steel-light/graphite 7.0 · brass/graphite 8.1.
 */

:root {
  --graphite:     #141518;   /* dark sections */
  --graphite-2:   #1C1D21;   /* dark surfaces / cards */
  --line-dark:    #2C2D32;
  --ink:          #17181B;   /* text on light */
  --paper:        #F4F1EA;   /* light sections */
  --concrete:     #E9E5DC;   /* alternate light sections */
  --surface:      #FBFAF6;   /* cards on light */
  --line-light:   #D9D4C9;
  --steel:        #5E636B;   /* secondary text on light */
  --steel-light:  #9DA1A8;   /* secondary text on dark */
  --on-dark:      #ECE8DF;   /* primary text on dark */
  --brass:        #C9A86A;   /* accent on dark */
  --brass-ink:    #7A5C24;   /* accent text on light */

  --max:   1120px;
  --read:  680px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --sans:  "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.read { max-width: var(--read); }

/* ---------- Sections and rhythm ---------- */

section { padding: clamp(4rem, 9vw, 7rem) 0; position: relative; }
.dark     { background: var(--graphite); color: var(--on-dark); }
.light    { background: var(--paper); }
.concrete { background: var(--concrete); }

/* Architectural annotation label: "01 / CAPTURE" */
.label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-ink);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}
.label::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}
.dark .label { color: var(--brass); }

h1, h2, h3 { font-weight: 400; letter-spacing: -0.02em; margin: 0; }

h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.12;
  max-width: 22ch;
}
h3 { font-size: 1.2rem; line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; }

p { margin: 0 0 1rem; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--steel); max-width: 40rem; }
.dark .lede { color: var(--steel-light); }
.section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head .lede { margin-top: 1.25rem; }

/* ---------- Datum rule: a line with measurement ticks ---------- */

.datum {
  position: relative;
  height: 14px;
  border-top: 1px solid var(--line-light);
  margin: 0;
}
.datum::before, .datum::after {
  content: "";
  position: absolute;
  top: -1px;
  width: 1px;
  height: 10px;
  background: var(--brass-ink);
}
.datum::before { left: 0; }
.datum::after  { right: 0; }
.dark .datum { border-color: var(--line-dark); }
.dark .datum::before, .dark .datum::after { background: var(--brass); }

/* ---------- Header ---------- */

.site-header { background: var(--graphite); color: var(--on-dark); }
.site-header.on-light { background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line-light); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 30px; width: auto; }

.nav { display: flex; align-items: center; gap: 1.75rem; font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--steel-light); transition: color 0.15s ease-out; }
.nav a:hover { color: var(--on-dark); }
.on-light .nav a { color: var(--steel); }
.on-light .nav a:hover { color: var(--ink); }
.nav .nav-cta {
  color: var(--on-dark);
  border: 1px solid var(--line-dark);
  padding: 0.55rem 1rem;
  border-radius: 6px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.on-light .nav .nav-cta { color: var(--ink); border-color: var(--line-light); }
.nav .nav-cta:hover { border-color: var(--brass); }

@media (max-width: 820px) {
  .nav .nav-link { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.8rem 1.4rem;
  border-radius: 6px;
  font: 500 1rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out;
}
.btn-primary { background: var(--brass); color: var(--ink); }
.btn-primary:hover { background: #D8BC86; }
.btn-ghost { color: var(--on-dark); border-color: var(--line-dark); }
.btn-ghost:hover { border-color: var(--steel-light); }
.light .btn-primary, .concrete .btn-primary, .on-paper .btn-primary { background: var(--ink); color: var(--paper); }
.light .btn-primary:hover, .concrete .btn-primary:hover, .on-paper .btn-primary:hover { background: #2C2E33; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Hero ---------- */

.hero { padding: clamp(3.5rem, 9vw, 7.5rem) 0 clamp(3.5rem, 8vw, 6rem); overflow: hidden; }
.hero h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.9rem);
  line-height: 1.04;
  font-weight: 300;
  letter-spacing: -0.025em;
  max-width: 16ch;
  margin-bottom: 1.5rem;
}
.hero .lede { margin-bottom: 2.25rem; }

/* Hero datum: a measured line that extends into view */
.hero-datum { margin-top: clamp(3rem, 7vw, 5rem); color: var(--brass); }
.hero-datum svg { width: 100%; height: 40px; overflow: visible; }
.hero-datum .line { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 1.6s cubic-bezier(.2,.7,.2,1) 0.2s forwards; }
.hero-datum .tick { opacity: 0; animation: fade 0.5s ease-out forwards; }
.hero-datum .tick:nth-of-type(2) { animation-delay: 0.9s; }
.hero-datum .tick:nth-of-type(3) { animation-delay: 1.1s; }
.hero-datum .tick:nth-of-type(4) { animation-delay: 1.3s; }
.hero-datum .tick:nth-of-type(5) { animation-delay: 1.5s; }
.hero-datum .tick:nth-of-type(6) { animation-delay: 1.7s; }
.hero-datum text {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  fill: var(--steel-light);
  opacity: 0;
  animation: fade 0.5s ease-out 1.9s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

/* ---------- Problem: scattered sources ---------- */

.sources {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line-light);
  margin-top: 1rem;
}
@media (min-width: 720px) { .sources { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sources li {
  list-style: none;
  padding: 1.1rem 0 1.1rem 0;
  border-bottom: 1px solid var(--line-light);
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}
.sources { padding: 0; }
.sources .n { font-family: var(--mono); font-size: 0.72rem; color: var(--brass-ink); letter-spacing: 0.08em; }

/* ---------- Value system: three outcomes ---------- */

.outcomes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line-light);
}
@media (min-width: 860px) {
  .outcomes { grid-template-columns: repeat(3, 1fr); }
  .outcome + .outcome { border-left: 1px solid var(--line-light); }
  .outcome { padding: 2rem 2rem 0.5rem; }
  .outcome:first-child { padding-left: 0; }
}
.outcome { padding: 1.75rem 0 0.75rem; position: relative; }
@media (max-width: 859px) { .outcome + .outcome { border-top: 1px solid var(--line-light); } }
.outcome .idx { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; color: var(--brass-ink); display: block; margin-bottom: 1.25rem; }
.outcome h3 { font-size: 1.45rem; font-weight: 400; margin-bottom: 0.75rem; }
.outcome p { color: var(--steel); }

/* ---------- Product: project timeline ---------- */

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 900px) { .product-grid { grid-template-columns: 1.25fr 1fr; gap: 1.5rem; align-items: start; } }

.panel {
  background: var(--graphite-2);
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  min-width: 0;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line-dark);
}
.panel-head strong { font-weight: 500; font-size: 1.05rem; }
.meta { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--steel-light); text-transform: uppercase; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line-dark);
}
.timeline li {
  position: relative;
  padding: 0 0 1.35rem 1.6rem;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 9px;
  height: 9px;
  border: 1px solid var(--brass);
  background: var(--graphite-2);
  transform: rotate(45deg);
}
.timeline .when { display: block; margin-bottom: 0.2rem; }
.timeline .what { color: var(--on-dark); font-size: 0.98rem; overflow-wrap: anywhere; }
.timeline .note { display: block; color: var(--steel-light); font-size: 0.9rem; margin-top: 0.15rem; }

.update ul { list-style: none; margin: 0; padding: 0; }
.update li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line-dark);
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}
.update li:last-child { border-bottom: 0; }
.update li::before {
  content: "";
  flex: 0 0 6px;
  height: 6px;
  margin-top: 0.5rem;
  background: var(--brass);
}
.update .pending { color: var(--brass); }
.example-note { margin-top: 1rem; color: var(--steel-light); font-size: 0.85rem; }

/* Reveal timeline items as they scroll in (JS adds .in). No JS: always visible. */
.js .reveal { opacity: 0; transform: translateY(6px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Built for construction ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; align-items: start; } }

.terms-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-light);
}
.terms-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line-light);
  font-size: 1rem;
}
.terms-list li:nth-child(odd) { padding-right: 1rem; }

/* ---------- Field section: section-drawing graphic ---------- */

.field-drawing { color: var(--steel); }
.field-drawing svg { width: 100%; height: auto; }
.field-drawing text { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; fill: var(--steel); }

/* ---------- White-label ---------- */

.whitelabel {
  background: var(--surface);
  border: 1px solid var(--line-light);
  border-radius: 10px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
}
.whitelabel .company { font-size: clamp(1.4rem, 3vw, 1.8rem); letter-spacing: -0.02em; }
.whitelabel .facing { color: var(--steel); font-size: 0.95rem; margin-top: 0.35rem; }
.whitelabel .divider { margin: 1.5rem 0 1rem; }
.powered-by {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--brass-ink);
}

/* ---------- Trust ---------- */

.mantra {
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 300;
  margin: 1.5rem 0 0;
}
.mantra em { font-style: normal; color: var(--brass-ink); }

.checks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-light); }
.checks li {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line-light);
}
.checks .idx { font-family: var(--mono); font-size: 0.72rem; color: var(--brass-ink); padding-top: 0.25rem; }
.checks strong { font-weight: 500; display: block; }
.checks span { color: var(--steel); font-size: 0.95rem; }

/* ---------- Final CTA ---------- */

.final h2 { font-size: clamp(2.2rem, 5.2vw, 3.8rem); font-weight: 300; letter-spacing: -0.03em; margin-bottom: 1.25rem; }
.final .lede { margin-bottom: 2rem; }

/* ---------- Footer ---------- */

.site-footer { background: var(--graphite); color: var(--steel-light); border-top: 1px solid var(--line-dark); font-size: 0.9rem; }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.site-footer .brand img { height: 24px; }
.site-footer .legal { margin: 0.6rem 0 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.site-footer nav a { text-decoration: none; color: var(--steel-light); min-height: 44px; display: inline-flex; align-items: center; }
.site-footer nav a:hover { color: var(--on-dark); }

/* ---------- Inner pages (legal, request access) ---------- */

.page { padding: clamp(3rem, 7vw, 5rem) 0 clamp(4rem, 8vw, 6rem); }
.page h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 300; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 1rem; }
.page h2 { font-size: 1.45rem; font-weight: 500; letter-spacing: -0.01em; max-width: none; margin: 2.75rem 0 0.9rem; }
.page h3 { font-size: 1.05rem; margin: 1.75rem 0 0.5rem; }
.page p, .page li { color: #2E3035; }
.page ul, .page ol { padding-left: 1.25rem; margin: 0 0 1.25rem; }
.page li { margin-bottom: 0.5rem; }
.page a { color: var(--brass-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.page a:hover { color: var(--ink); }
.page strong { font-weight: 600; }
.updated {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--steel);
  border: 1px solid var(--line-light);
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  margin-bottom: 2rem;
}

/* Request-access form */
.form-card {
  background: var(--surface);
  border: 1px solid var(--line-light);
  border-radius: 10px;
  padding: clamp(1.25rem, 4vw, 2rem);
  margin: 1.75rem 0 1rem;
}
.form-card label { display: block; font-weight: 500; font-size: 0.95rem; margin: 1.1rem 0 0.4rem; }
.form-card label:first-child { margin-top: 0; }
.form-card input[type="text"],
.form-card input[type="email"],
.form-card input[type="tel"],
.form-card textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line-light);
  border-radius: 6px;
  font: inherit;
  font-size: 1rem;
  background: var(--paper);
  color: var(--ink);
}
.form-card textarea { resize: vertical; }
.form-card input:focus, .form-card textarea:focus {
  outline: 2px solid var(--brass-ink);
  outline-offset: 1px;
  border-color: var(--brass-ink);
}
.form-card .opt { font-weight: 400; color: var(--steel); font-size: 0.85rem; }
.form-card .choice { display: flex; flex-direction: column; gap: 0.5rem; }
.form-card .radio { display: flex; align-items: center; gap: 0.6rem; font-weight: 400; margin: 0; cursor: pointer; min-height: 32px; }
.form-card .consent {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  background: var(--paper);
  border-left: 2px solid var(--brass-ink);
  border-radius: 4px;
  font-size: 0.9rem;
}
.form-card .consent label { display: flex; align-items: flex-start; gap: 0.65rem; font-weight: 400; margin: 0.5rem 0 0; cursor: pointer; }
.form-card .consent input { margin-top: 0.3rem; flex-shrink: 0; }
.form-card .fine { margin-top: 1.25rem; font-size: 0.82rem; color: var(--steel); }
.form-card button { width: 100%; margin-top: 1.5rem; }
.form-card button:disabled { opacity: 0.55; cursor: not-allowed; }
.form-error { color: #9B3B2E; margin-top: 1rem; font-size: 0.9rem; }

/* Consent demo note */
.note-box {
  border: 1px solid var(--line-light);
  border-left: 2px solid var(--brass-ink);
  background: var(--surface);
  border-radius: 6px;
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-datum .line { stroke-dashoffset: 0; }
  .hero-datum .tick, .hero-datum text { opacity: 1; }
  .js .reveal { opacity: 1; transform: none; }
}

.datum-labels { display: flex; justify-content: space-between; margin-top: 0.35rem; }
h2 + .lede, h2 + .mantra { margin-top: 1.25rem; }

/* Hero reference drawing: wide screens only */
.hero-wrap { position: relative; }
.hero-drawing { display: none; }
@media (min-width: 1000px) {
  .hero-drawing {
    display: block;
    position: absolute;
    right: var(--gutter);
    top: -1.5rem;
    width: min(400px, 34vw);
    pointer-events: none;
  }
}
