/* Revera website styles.
   Dark by default, with a light theme behind the toggle in the header.
   The palette comes from the logo: deep navy, electric blue, teal and violet. */

:root {
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #0a0f1d;
  --bg-alt: #0d1425;
  --surface: #111a2e;
  --surface-2: #162038;
  --border: #243150;
  --border-soft: #1b2540;
  --text: #e8edf7;
  --text-dim: #9ba8c3;
  --text-faint: #7d8aa5;
  --focus: #2fd3b5;

  --blue: #5b8cff;
  --teal: #2fd3b5;
  --violet: #a488ff;
  --accent-soft: rgba(91, 140, 255, 0.13);
  --teal-soft: rgba(47, 211, 181, 0.12);
  --grad: linear-gradient(100deg, #6f9bff 0%, #2fd3b5 100%);

  --code-bg: #0b1222;
  --code-text: #d8e1f1;
  --shadow: 0 10px 30px rgba(2, 6, 20, 0.5);
  --shadow-lg: 0 24px 60px rgba(2, 6, 20, 0.55);
  --radius: 14px;
  --radius-sm: 10px;
  --nav-h: 64px;
}

html[data-theme="light"] {
  --bg: #f6f8fc;
  --bg-alt: #edf1f8;
  --surface: #ffffff;
  --surface-2: #f3f6fb;
  --border: #d9e0ee;
  --border-soft: #e5eaf4;
  --text: #141d2f;
  --text-dim: #4b566c;
  --text-faint: #66718a;
  --focus: #2f5fd6;
  --accent-soft: rgba(59, 100, 220, 0.1);
  --teal-soft: rgba(20, 160, 135, 0.12);
  --code-bg: #0f172b;
  --shadow: 0 8px 24px rgba(23, 38, 74, 0.08);
  --shadow-lg: 0 20px 50px rgba(23, 38, 74, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 600; color: var(--text); }
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--accent-soft);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}
pre code { background: none; padding: 0; font-size: inherit; }
pre, code { font-variant-ligatures: none; }

.container { width: min(1160px, 92%); margin: 0 auto; }
.container--narrow { width: min(820px, 92%); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--blue); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
main:focus { outline: none; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.8rem;
}

.section { padding: 5.5rem 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.section__head { max-width: 760px; margin: 0 auto 3rem; text-align: center; }
.section__head--left { margin-left: 0; text-align: left; }
.section__sub { color: var(--text-dim); font-size: 1.06rem; }

/* Buttons */

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 600; font-size: 0.96rem; padding: 0.72rem 1.4rem;
  border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--grad); color: #06101c; box-shadow: 0 6px 20px rgba(91, 140, 255, 0.35); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(47, 211, 181, 0.35); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--blue); background: var(--accent-soft); }
.btn--sm { padding: 0.45rem 0.9rem; font-size: 0.88rem; }
.btn--lg { padding: 0.9rem 1.8rem; font-size: 1.02rem; }

/* Navigation */

.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.nav__inner { display: flex; align-items: center; gap: 1.5rem; height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 800; font-size: 1.12rem; color: var(--text); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand__logo { display: block; width: 30px; height: 30px; border-radius: 7px; }

.nav__links { display: flex; gap: 0.3rem; margin-left: auto; }
.nav__links a {
  color: var(--text-dim); font-size: 0.92rem; font-weight: 500;
  padding: 0.45rem 0.75rem; border-radius: 8px; transition: color 0.15s, background 0.15s;
}
.nav__links a:hover { color: var(--text); background: var(--accent-soft); text-decoration: none; }
.nav__links a.is-active { color: var(--text); background: var(--accent-soft); }

.nav__actions { display: flex; align-items: center; gap: 0.6rem; }
.nav__actions .btn .icon { display: block; }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--border);
  background: transparent; color: var(--text-dim); cursor: pointer; transition: all 0.15s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--blue); }
html[data-theme="dark"] .icon-sun { display: none; }
html[data-theme="light"] .icon-moon { display: none; }

.nav__burger {
  display: none; flex-direction: column; gap: 5px; width: 40px; height: 38px;
  align-items: center; justify-content: center; background: transparent;
  border: 1px solid var(--border); border-radius: 9px; cursor: pointer;
}
.nav__burger span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.2s; }
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */

.hero { position: relative; padding: 5.5rem 0 4.5rem; overflow: hidden; }
.hero__glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(620px 400px at 16% 10%, rgba(91, 140, 255, 0.17), transparent 60%),
    radial-gradient(640px 420px at 88% 24%, rgba(47, 211, 181, 0.12), transparent 60%),
    radial-gradient(500px 360px at 70% 90%, rgba(164, 136, 255, 0.10), transparent 60%);
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3.5rem; align-items: center; }
.hero__inner > * { min-width: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-dim);
  border: 1px solid var(--border); background: var(--surface);
  padding: 0.35rem 0.8rem; border-radius: 999px; margin-bottom: 1.3rem;
}
.eyebrow__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }

.lede { font-size: 1.14rem; color: var(--text-dim); max-width: 36ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.8rem 0 1.6rem; }
.hero__badges { list-style: none; display: flex; flex-wrap: wrap; gap: 1.2rem; padding: 0; margin: 0; }
.hero__badges li { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--text-dim); font-size: 0.9rem; font-weight: 500; }
.hero__badges svg { color: var(--teal); flex: none; }

.hero__visual { position: relative; }

.code-window {
  max-width: 100%;
  background: var(--code-bg); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
}
.code-window__bar { display: flex; align-items: center; gap: 7px; padding: 0.7rem 1rem; background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border-soft); }
.code-window__title { margin-left: 0.5rem; font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-faint); }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot--r { background: #ff5f57; } .dot--y { background: #febc2e; } .dot--g { background: #28c840; }
.code-window__body {
  margin: 0; padding: 1.2rem 1.3rem 2.2rem; overflow-x: auto;
  font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.65; color: var(--code-text);
  white-space: pre; min-width: 0; max-width: 100%;
}

.float-tag {
  position: absolute; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 0.55rem 0.9rem; box-shadow: var(--shadow);
  font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.3;
}
.float-tag span { display: block; font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 0.2rem; }
.float-tag strong { color: var(--teal); font-weight: 600; }
.float-tag--tr { top: -18px; right: -14px; }
.float-tag--bl { bottom: -18px; left: -14px; }

/* Syntax highlighting, shared by every code block */

.tok-kw { color: #7ea6ff; }
.tok-fn { color: #7fd6ff; }
.tok-str { color: #9be7c4; }
.tok-num { color: #f2b96b; }
.tok-cmt { color: #6f7f9e; font-style: italic; }
.tok-out { color: #d7c9ff; }
.tok-key { color: #7ea6ff; }
.tok-prompt { color: var(--teal); }
.tok-dim { color: #6f7f9e; }

/* Strip under the hero */

.strip { border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); background: var(--bg-alt); padding: 1rem 0; }
.strip__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.strip__label { color: var(--text-faint); font-size: 0.9rem; margin: 0; }
.strip__items { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; padding: 0; margin: 0; }
.strip__items li { font-family: var(--font-mono); font-size: 0.86rem; color: var(--text-dim); }

/* Card grids */

.grid { display: grid; gap: 1.2rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid > * { min-width: 0; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem 1.6rem 1.3rem;
}
.card h3 { margin-top: 0; }
.card p { color: var(--text-dim); margin: 0; font-size: 0.98rem; }
.card p + p { margin-top: 0.7rem; }


/* Resource contracts */

.contract { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.contract > * { min-width: 0; }
.contract .section__head { margin: 0 0 1.4rem; text-align: left; }
.contract__lede { color: var(--text-dim); font-size: 1.05rem; }
.checks { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.checks li { position: relative; padding-left: 1.7rem; margin-bottom: 0.85rem; color: var(--text-dim); }
.checks li::before {
  content: ""; position: absolute; left: 0.1rem; top: 0.5rem; width: 9px; height: 5px;
  border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg);
}

.terminal { max-width: 100%; background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.terminal__bar { display: flex; align-items: center; gap: 7px; padding: 0.7rem 1rem; background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border-soft); }
.terminal__body {
  margin: 0; padding: 1.2rem 1.3rem; overflow-x: auto;
  font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.7; color: var(--code-text);
  white-space: pre; min-width: 0; max-width: 100%;
}
.contract__note { color: var(--text-faint); font-size: 0.9rem; margin: 1rem 0 0; }

/* Pipeline diagram */

.pipeline { display: grid; grid-template-columns: 1fr auto 1fr auto 1.15fr; gap: 1rem; align-items: center; }
.pipeline__col { display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; }
.pipeline__box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.95rem 1.1rem; text-align: center;
}
.pipeline__box--src { border-color: rgba(91, 140, 255, 0.55); background: linear-gradient(160deg, var(--surface), rgba(91, 140, 255, 0.09)); }
.pipeline__box--ir { border-color: rgba(164, 136, 255, 0.6); background: linear-gradient(160deg, var(--surface), rgba(164, 136, 255, 0.10)); }
.pipeline__box--proof { border-color: rgba(47, 211, 181, 0.55); background: linear-gradient(160deg, var(--surface), rgba(47, 211, 181, 0.08)); }
.pipeline__label { display: block; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 0.35rem; }
.pipeline__box code { background: none; padding: 0; font-size: 0.86rem; color: var(--text); }
.pipeline__box small { display: block; color: var(--text-dim); font-size: 0.8rem; margin-top: 0.25rem; }
.pipeline__arrow { display: flex; align-items: center; justify-content: center; color: var(--blue); }
.pipeline__arrow svg { width: 26px; height: 26px; }
.pipeline__targets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
.pipeline__targets .pipeline__box { padding: 0.65rem 0.6rem; }
.pipeline__targets .pipeline__box--go { grid-column: 1 / -1; border-color: rgba(91, 140, 255, 0.55); }
.pipeline__note { text-align: center; color: var(--text-dim); margin-top: 2.2rem; font-size: 0.95rem; }

/* Code block with tabs */

.codeblock { max-width: 900px; width: 100%; margin: 0 auto; background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.codeblock__tabs { display: flex; align-items: center; gap: 4px; padding: 0.55rem 0.8rem; background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.codeblock__tab {
  background: transparent; border: 1px solid transparent; color: var(--text-faint);
  font-family: var(--font-mono); font-size: 0.8rem; padding: 0.4rem 0.8rem; border-radius: 8px; cursor: pointer;
}
.codeblock__tab:hover { color: var(--text); }
.codeblock__tab.is-active { color: var(--text); background: var(--surface-2); border-color: var(--border); }
html[data-theme="light"] .codeblock__tab.is-active { color: #fff; background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.14); }
.codeblock__spacer { flex: 1; }
.codeblock__copy { color: var(--text-faint); border-color: var(--border); }
html[data-theme="light"] .codeblock__copy { color: #c9d2e6; border-color: rgba(255,255,255,0.18); }
.codeblock__panes .pane {
  display: none; margin: 0; padding: 1.3rem 1.4rem; overflow-x: auto;
  font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.68; color: var(--code-text);
  white-space: pre; min-width: 0; max-width: 100%;
}
.codeblock__panes .pane.is-active { display: block; }
.codeblock__foot { padding: 0.8rem 1.4rem; border-top: 1px solid var(--border-soft); font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-faint); }
.codeblock__foot code { background: none; padding: 0; color: var(--teal); }

.install {
  max-width: 900px; margin: 1.2rem auto 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.install > div { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; align-items: baseline; padding: 0.7rem 1.1rem; border-top: 1px solid var(--border-soft); }
.install > div:first-child { border-top: none; }
.install dt { font-size: 0.86rem; font-weight: 600; color: var(--text-dim); }
.install dd { margin: 0; min-width: 0; font-size: 0.86rem; color: var(--text-dim); overflow-wrap: anywhere; }
.install code { font-size: 0.8rem; color: var(--text); }

/* Verification layers */

.layers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.layers > * { min-width: 0; }
.fine {
  margin: 2.2rem auto 0; max-width: 860px;
  border-left: 3px solid var(--violet); padding: 0.2rem 0 0.2rem 1.2rem;
  color: var(--text-dim); font-size: 0.95rem;
}
.fine p { margin: 0; }

/* FAQ */

.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.2rem 1.3rem; margin-bottom: 0.8rem; transition: border-color 0.2s; }
.faq details[open] { border-color: rgba(91, 140, 255, 0.5); }
.faq summary { cursor: pointer; list-style: none; font-weight: 600; font-size: 1.02rem; padding: 1rem 0; position: relative; padding-right: 2rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 0.85rem; font-size: 1.5rem; color: var(--blue); transition: transform 0.2s; line-height: 1; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-dim); margin: 0 0 1.1rem; }

/* Closing call to action */

.cta { position: relative; padding: 5rem 0; text-align: center; overflow: hidden; }
.cta__glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(520px 300px at 30% 50%, rgba(91, 140, 255, 0.14), transparent 60%),
    radial-gradient(520px 300px at 72% 50%, rgba(47, 211, 181, 0.10), transparent 60%);
}
.cta__inner { position: relative; }
.cta p { color: var(--text-dim); font-size: 1.08rem; max-width: 60ch; margin: 0 auto 1.8rem; }
.cta__buttons { display: flex; justify-content: center; gap: 0.8rem; flex-wrap: wrap; }

/* Footer */

.footer { border-top: 1px solid var(--border-soft); background: var(--bg-alt); padding: 3.5rem 0 2rem; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.footer__grid > * { min-width: 0; }
.footer__about p { color: var(--text-dim); font-size: 0.92rem; max-width: 34ch; margin: 0.8rem 0 0; }
.footer h4 { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin: 0.3rem 0 0.9rem; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 0.55rem; }
.footer li a { color: var(--text-dim); font-size: 0.94rem; }
.footer li a:hover { color: var(--text); }
.footer__base { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px solid var(--border-soft); color: var(--text-faint); font-size: 0.84rem; }
.footer__base p { margin: 0; }

/* Responsive */

@media (max-width: 1000px) {
  .hero__inner { grid-template-columns: 1fr; gap: 2.6rem; }
  .lede { max-width: 60ch; }
  .float-tag--tr { top: -14px; right: 8px; }
  .float-tag--bl { bottom: -14px; left: 8px; }
  .grid--3, .layers { grid-template-columns: 1fr; }
  .contract { grid-template-columns: 1fr; gap: 2.2rem; }
  .pipeline { grid-template-columns: 1fr; }
  .pipeline__arrow { transform: rotate(90deg); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav__links {
    display: none; position: absolute; left: 0; right: 0; top: var(--nav-h);
    flex-direction: column; gap: 0.2rem; padding: 0.8rem 4%;
    background: var(--bg); border-bottom: 1px solid var(--border-soft);
  }
  .nav__links.is-open { display: flex; }
  .nav__burger { display: inline-flex; }
  .nav__actions .btn span { display: none; }
  .nav__actions { margin-left: auto; }
}

@media (max-width: 640px) {
  .section { padding: 4rem 0; }
  .hero { padding: 3.5rem 0 3rem; }
  .grid--2 { grid-template-columns: 1fr; }
  .install > div { grid-template-columns: 1fr; gap: 0.2rem; }
  .footer__grid { grid-template-columns: 1fr; }
  .float-tag { position: static; display: inline-block; margin: 0.8rem 0.5rem 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .nav__links a, .faq details, .faq summary::after, .nav__burger span { transition: none; }
  .btn--primary:hover { transform: none; }
}
