/* Carr Ventures — engagement layer styles (pairs with enhance.js; injected by
 * build.mjs). Theme-aware via the design's CSS variables plus a few of our
 * own, scoped under the exported [data-theme] attributes. Attribute selectors
 * against rendered inline-style strings follow the same contract as the
 * responsive layer in build.mjs. */

[data-theme="dark"] {
  --cv-panel-bg: rgba(10, 12, 22, .62);
  --cv-panel-border: rgba(255, 255, 255, .12);
  --cv-panel-inner: rgba(255, 255, 255, .05);
  --cv-ok: #5bff9b;
  --cv-spot: rgba(140, 160, 255, .13);
  --cv-card-border: rgba(140, 150, 255, .38);
  --cv-card-shadow: 0 10px 44px rgba(91, 123, 255, .12);
  --cv-src-bg: rgba(91, 123, 255, .10);
  --cv-panel-shadow: 0 18px 60px rgba(7, 8, 13, .35);
}
[data-theme="light"] {
  --cv-panel-bg: rgba(255, 255, 255, .78);
  --cv-panel-border: #DADDE6;
  --cv-panel-inner: rgba(10, 12, 20, .04);
  --cv-ok: #0d9f5a;
  --cv-spot: rgba(59, 91, 255, .07);
  --cv-card-border: rgba(59, 91, 255, .35);
  --cv-card-shadow: 0 10px 34px rgba(59, 91, 255, .10);
  --cv-src-bg: rgba(59, 91, 255, .07);
  --cv-panel-shadow: 0 18px 50px rgba(30, 40, 90, .12);
}

/* ---------------------------------------------- hero: simulated console */
.cv-demo {
  position: relative; /* positioned so it paints above the hero's grid overlay */
  margin: 56px auto 0;
  width: 100%;
  max-width: 560px;
  border: 1px solid var(--cv-panel-border);
  border-radius: 16px;
  background: var(--cv-panel-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--cv-panel-shadow);
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1);
}
.cv-demo.in { opacity: 1; transform: none; }
@media (min-width: 1280px) {
  /* Side-by-side hero: narrow the text column, dock the console right. */
  div[style*="max-width: 880px"] { max-width: 720px !important; }
  .cv-demo {
    position: absolute;
    top: 148px;
    right: 64px;
    margin: 0;
    width: clamp(380px, 30vw, 440px);
  }
}
.cv-demo-hd {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--cv-panel-border);
  font-size: 11px;
  color: var(--text-3);
}
.cv-demo-dot { width: 9px; height: 9px; border-radius: 50%; opacity: .85; }
.cv-demo-hd .t { margin-left: 7px; letter-spacing: .05em; }
.cv-demo-hd .sim {
  margin-left: auto;
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--cv-panel-border);
  border-radius: 999px;
}
.cv-demo-bd {
  padding: 16px 16px 18px;
  height: 318px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
  overflow: hidden;
  transition: opacity .32s ease;
}
.cv-demo-sc {
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-3);
}
.cv-l { font-size: 12.5px; line-height: 1.55; color: var(--text-2); }
.cv-l.user { color: var(--text); }
.cv-l.user::before { content: 'you ▸ '; color: var(--accent-soft); }
.cv-l.ai {
  color: var(--text);
  background: var(--cv-panel-inner);
  border: 1px solid var(--cv-panel-border);
  border-radius: 10px;
  padding: 10px 12px;
}
.cv-l.ai::before { content: 'cv-agent ▸ '; color: var(--accent-soft2); }
.cv-l.sys { font-size: 12px; color: var(--text-3); }
.cv-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.cv-chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--cv-panel-border);
  color: var(--cv-ok);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .3s ease, transform .3s ease;
}
.cv-chip.in { opacity: 1; transform: none; }
.cv-src {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--cv-src-bg);
  border: 1px solid var(--chip-border);
  color: var(--chip-text);
}
.cv-fade { opacity: 0; transform: translateY(4px); transition: opacity .35s ease, transform .35s ease; }
.cv-fade.in { opacity: 1; transform: none; }
.cv-caret {
  display: inline-block;
  width: 7px;
  height: 13px;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--accent-soft);
  animation: cvBlink 1s steps(1) infinite;
}
@keyframes cvBlink { 50% { opacity: 0; } }

/* -------------------------------------------- headline word-by-word */
.cv-w {
  display: inline-block;
  opacity: 0;
  transform: translateY(.55em);
  transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1);
}
.cv-w.in { opacity: 1; transform: none; }

/* ------------------------------------- cards: hover glow + spotlight */
.cv-card:hover {
  border-color: var(--cv-card-border) !important;
  box-shadow: var(--cv-card-shadow);
}
.cv-spot {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), var(--cv-spot), transparent 70%);
}
.cv-card:hover > .cv-spot { opacity: 1; }

/* --------------------------------------------------- case notes */
.cv-more {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--hair-strong);
  border-radius: 999px;
  transition: color .25s ease, border-color .25s ease;
}
.cv-more:hover { color: var(--text); border-color: var(--cv-card-border); }
.cv-more svg { transition: transform .35s ease; }
.cv-more[aria-expanded="true"] svg { transform: rotate(45deg); }
.cv-notes {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s cubic-bezier(.2, .7, .2, 1);
}
.cv-notes.open { grid-template-rows: 1fr; }
.cv-notes > div { overflow: hidden; }
.cv-note {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  padding-top: 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
}
.cv-note b {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-top: 2px;
}

/* ------------------------------------------------- scroll progress */
.cv-prog {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, #5b7bff, #b14bf4);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

/* ---------------------------------------------- hero aurora cloud */
/* The export ships three blurred blobs drifting on cv-drift1..3. The
 * overrides below (inside the no-preference query so the reduced-motion
 * rules further down keep winning) give them wider, livelier paths plus a
 * slow hue cycle, and speed up the conic sheen a touch. enhance.js adds two
 * extra blobs (.cv-blob-a/-b) lower in the hero and drives cursor + scroll
 * parallax on all five. cvHue animates the whole filter, so it carries the
 * blur; the inline blur() remains the reduced-motion fallback. */
[data-theme="dark"] {
  --cv-glow-cyan: rgba(91, 200, 255, .20);
  --cv-glow-magenta: rgba(244, 91, 199, .15);
}
[data-theme="light"] {
  --cv-glow-cyan: rgba(14, 165, 233, .12);
  --cv-glow-magenta: rgba(219, 39, 119, .08);
}
.cv-cloud { position: absolute; inset: 0; pointer-events: none; }
.cv-blob { position: absolute; border-radius: 50%; }
.cv-blob-a {
  top: 120px; left: 58%; width: 500px; height: 500px;
  background: radial-gradient(circle, var(--cv-glow-cyan), transparent 62%);
  filter: blur(30px);
}
.cv-blob-b {
  top: 240px; left: 10%; width: 440px; height: 440px;
  background: radial-gradient(circle, var(--cv-glow-magenta), transparent 62%);
  filter: blur(32px);
}
@media (prefers-reduced-motion: no-preference) {
  div[style*="cv-drift1"] { animation: cvDriftA 13s ease-in-out infinite, cvHue 9s ease-in-out -3s infinite alternate !important; }
  div[style*="cv-drift2"] { animation: cvDriftB 16s ease-in-out infinite, cvHue 12s ease-in-out infinite alternate !important; }
  div[style*="cv-drift3"] { animation: cvDriftC 11s ease-in-out infinite, cvHue 10s ease-in-out -6s infinite alternate-reverse !important; }
  .cv-blob-a { animation: cvDriftD 14s ease-in-out -4s infinite, cvHue 11s ease-in-out -1s infinite alternate; }
  .cv-blob-b { animation: cvDriftE 17s ease-in-out -9s infinite, cvHue 13s ease-in-out -5s infinite alternate-reverse; }
  div[style*="cv-spin"] { animation-duration: 26s !important; }
}
@keyframes cvDriftA {
  0%   { transform: translate(0, 0) scale(1); opacity: .55; }
  25%  { transform: translate(230px, 90px) scale(1.32); opacity: 1; }
  50%  { transform: translate(-80px, 170px) scale(1.08); opacity: .7; }
  75%  { transform: translate(-210px, 30px) scale(.8); opacity: .5; }
  100% { transform: translate(0, 0) scale(1); opacity: .55; }
}
@keyframes cvDriftB {
  0%   { transform: translate(0, 0) scale(1); opacity: .5; }
  30%  { transform: translate(-250px, 120px) scale(1.28); opacity: 1; }
  55%  { transform: translate(190px, -70px) scale(.85); opacity: .45; }
  80%  { transform: translate(70px, 140px) scale(1.15); opacity: .8; }
  100% { transform: translate(0, 0) scale(1); opacity: .5; }
}
@keyframes cvDriftC {
  0%   { transform: translate(0, 0) scale(1); opacity: .5; }
  33%  { transform: translate(150px, 130px) scale(1.42); opacity: 1; }
  66%  { transform: translate(-130px, -50px) scale(.85); opacity: .55; }
  100% { transform: translate(0, 0) scale(1); opacity: .5; }
}
@keyframes cvDriftD {
  0%   { transform: translate(0, 0) scale(1); opacity: .5; }
  30%  { transform: translate(-160px, -90px) scale(1.3); opacity: .95; }
  60%  { transform: translate(120px, 60px) scale(.9); opacity: .55; }
  100% { transform: translate(0, 0) scale(1); opacity: .5; }
}
@keyframes cvDriftE {
  0%   { transform: translate(0, 0) scale(1); opacity: .45; }
  35%  { transform: translate(180px, -110px) scale(1.25); opacity: .9; }
  70%  { transform: translate(-140px, 70px) scale(.85); opacity: .5; }
  100% { transform: translate(0, 0) scale(1); opacity: .45; }
}
@keyframes cvHue {
  from { filter: blur(28px) hue-rotate(-24deg); }
  to   { filter: blur(28px) hue-rotate(26deg); }
}

/* ------------------------------------------- micro-interactions */
[style*="cv-marquee"]:hover { animation-play-state: paused !important; }
.cv-status { transition: opacity .3s ease; }

/* ------------------------------------------------ reduced motion */
/* Quiet the export's ambient animations too — only the logo spin was
 * previously gated. All base transforms live outside the keyframes, so
 * killing the animation leaves elements correctly placed. */
@media (prefers-reduced-motion: reduce) {
  [style*="cv-drift"],
  [style*="cv-spin"],
  [style*="cv-marquee"],
  [style*="cv-grad"],
  [style*="cv-pulse"] { animation: none !important; }
  .cv-w, .cv-chip, .cv-fade { opacity: 1; transform: none; transition: none; }
  .cv-demo { opacity: 1; transform: none; transition: none; }
  .cv-notes, .cv-more svg, .cv-spot, .cv-status { transition: none; }
  .cv-caret { animation: none; }
}
