/* Shared public-site polish layer. Page-specific chart/layout styles remain inline. */
:root {
  --bg: #070b0d;
  --bg-2: #0a1114;
  --panel: #0e171b;
  --panel-2: #132025;
  --border: rgba(154, 184, 188, 0.13);
  --border-strong: rgba(167, 197, 201, 0.24);
  --text: #f3f5f1;
  --muted: #9aa7a8;
  --faint: #7b888a;
  --accent: #f9751d;
  --accent-2: #ffad61;
  --teal: #4b929b;
  --teal-deep: #2e6f79;
  --mono: 'IBM Plex Mono', Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --shadow-lg: 0 32px 90px rgba(0, 0, 0, .42);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 520px at 82% -8%, rgba(46, 111, 121, .13), transparent 68%),
    radial-gradient(700px 440px at 7% 22%, rgba(249, 117, 29, .055), transparent 72%),
    var(--bg);
}
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button { border: 0; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { color: #fff; background: rgba(249, 117, 29, .36); }

.skip-link {
  position: fixed;
  z-index: 3000;
  top: 12px;
  left: 16px;
  padding: 10px 14px;
  color: #081013;
  background: var(--accent-2);
  border-radius: 10px;
  font-weight: 750;
  transform: translateY(-160%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: none; }

.scroll-progress {
  position: fixed;
  z-index: 2200;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--teal), var(--accent), var(--accent-2));
  box-shadow: 0 0 14px rgba(249, 117, 29, .55);
}

.ambient-cursor {
  position: fixed;
  z-index: -1;
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;
  border-radius: 50%;
  pointer-events: none;
  opacity: .22;
  background: radial-gradient(circle, rgba(75, 146, 155, .18), transparent 68%);
  transform: translate3d(var(--cursor-x, 50vw), var(--cursor-y, 20vh), 0);
  transition: opacity .3s ease;
}

/* Floating navigation */
nav {
  position: fixed;
  z-index: 2000;
  right: 0;
  left: 0;
  top: 0;
  padding: 14px 18px;
  border: 0;
  background: transparent;
  animation-duration: .8s;
  transition: padding .35s var(--ease-out);
}
.nav-inner {
  position: relative;
  width: min(100%, 1240px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  height: 62px;
  padding: 0 14px 0 18px;
  border: 1px solid rgba(180, 205, 208, .13);
  border-radius: 17px;
  background: rgba(8, 13, 16, .68);
  box-shadow: 0 12px 45px rgba(0, 0, 0, .16);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  transition: height .35s var(--ease-out), background .35s ease, border-color .35s ease, box-shadow .35s ease;
}
nav.is-scrolled { padding-top: 8px; }
nav.is-scrolled .nav-inner {
  height: 58px;
  background: rgba(7, 11, 13, .9);
  border-color: rgba(180, 205, 208, .2);
  box-shadow: 0 14px 50px rgba(0, 0, 0, .32);
}
.logo { display: flex; align-items: center; }
.cqr-logo { height: 36px; transition: transform .35s var(--ease-out), filter .35s ease; }
.cqr-logo { display: block; width: auto; }
.logo:hover .cqr-logo, nav > .nav-inner > a:hover .cqr-logo { transform: translateY(-1px); filter: brightness(1.08); }
.nav-links { display: flex; align-items: center; gap: 3px; color: var(--muted); font-size: 14px; font-weight: 500; }
.nav-links > a:not(.book-cta) {
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--muted);
  transition: color .2s ease, background .2s ease;
}
.nav-links > a:not(.book-cta):hover { color: var(--text); background: rgba(255, 255, 255, .045); }
.nav-links > a.active:not(.book-cta) { color: var(--text); background: rgba(75, 146, 155, .12); }
.nav-client { white-space: nowrap; }
.nav-links .book-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-left: 7px;
  padding: 9px 17px;
  border: 1px solid rgba(255, 173, 97, .48);
  border-radius: 11px;
  color: #10100e;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 8px 25px rgba(249, 117, 29, .19);
  font-weight: 750;
  white-space: nowrap;
  transition: transform .25s var(--ease-out), box-shadow .25s ease, filter .25s ease;
}
.nav-links .book-cta:hover { color: #080a09; transform: translateY(-2px); filter: brightness(1.04); box-shadow: 0 12px 32px rgba(249, 117, 29, .3); }
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, .035);
  cursor: pointer;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  display: block;
  width: 18px;
  height: 1.5px;
  margin: 4px auto;
  border-radius: 2px;
  background: currentColor;
  content: "";
  transition: transform .28s var(--ease-out), opacity .2s ease;
}
body.nav-open .nav-toggle span { opacity: 0; }
body.nav-open .nav-toggle::before { transform: translateY(5.5px) rotate(45deg); }
body.nav-open .nav-toggle::after { transform: translateY(-5.5px) rotate(-45deg); }

/* Hero and product frames */
.hero, .page-hero { isolation: isolate; }
.hero { min-height: min(900px, 96vh); padding: 176px 0 126px; }
.page-hero { padding: 176px 0 92px; }
.hero-grid-bg, .grid-bg, .portal-shell::before {
  background-size: 52px 52px;
  opacity: .85;
}
.hero-glow, .page-hero .glow, main > .glow {
  background: radial-gradient(ellipse, rgba(249, 117, 29, .11), rgba(46, 111, 121, .045) 45%, transparent 70%);
  filter: blur(2px);
}
.hero-inner { grid-template-columns: minmax(0, 1.02fr) minmax(430px, .98fr); gap: clamp(42px, 6vw, 82px); }
h1 { text-wrap: balance; }
.hero h1 { font-size: clamp(44px, 5vw, 66px); line-height: 1.01; letter-spacing: -.052em; }
.page-hero h1, main .center > h1 { font-size: clamp(42px, 4.8vw, 60px); line-height: 1.04; letter-spacing: -.046em; }
h2 { text-wrap: balance; }
.hero-sub, .page-sub, .sub { color: #a7b2b2; }
.badge {
  padding: 7px 13px;
  border-color: rgba(75, 146, 155, .36);
  color: #b6dadd;
  background: rgba(46, 111, 121, .1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .015);
}
.badge .dot { background: #66c5bb; box-shadow: 0 0 12px rgba(102, 197, 187, .8); }
.amber { background-image: linear-gradient(105deg, var(--accent-2), var(--accent) 58%, #f06116) !important; }
.hero-ctas { align-items: center; }
.btn-primary, .email.primary-book {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 187, 123, .24);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 10px 32px rgba(249, 117, 29, .2);
  transition: transform .3s var(--ease-out), box-shadow .3s ease, filter .3s ease;
}
.email.primary-book { color: #100e0c; font-weight: 750; }
.btn-primary::after, .email.primary-book::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 25%, rgba(255, 255, 255, .35), transparent 65%);
  content: "";
  transform: translateX(-140%);
  transition: transform .65s var(--ease-out);
}
.btn-primary:hover::after, .email.primary-book:hover::after { transform: translateX(140%); }
.btn-primary:hover, .email.primary-book:hover { transform: translateY(-3px); filter: brightness(1.04); box-shadow: 0 16px 42px rgba(249, 117, 29, .3); }
.btn-ghost {
  border-color: rgba(167, 197, 201, .22);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
  transition: transform .25s var(--ease-out), border-color .25s ease, background .25s ease;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(75, 146, 155, .6); background: rgba(75, 146, 155, .09); transform: translateY(-2px); }
.term, .shot, .arch, .bespoke-panel, .contact-card {
  border-color: rgba(167, 197, 201, .2);
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(16, 27, 32, .97), rgba(7, 11, 14, .98));
  box-shadow: var(--shadow-lg), inset 0 1px rgba(255, 255, 255, .025);
}
.term { position: relative; transform: perspective(1100px) rotateY(-1.5deg) rotateX(.5deg); }
.term::after, .shot::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .035), transparent 28%);
  content: "";
}
.term-bar, .shot-bar { background: rgba(255, 255, 255, .018); }
.arch { padding: 30px; }
.arch-node { border-radius: 12px; background: rgba(5, 10, 12, .62); transition: transform .3s var(--ease-out), border-color .3s ease; }
.arch-node:hover { border-color: rgba(75, 146, 155, .42); transform: translateY(-3px); }

/* Cards and section rhythm */
section { position: relative; }
.cards, .feat-grid, .eng-grid, .models { gap: 18px; }
.card, .feat, .eng, .model {
  position: relative;
  border-color: var(--border);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(16, 27, 32, .84), rgba(9, 15, 18, .92));
  box-shadow: inset 0 1px rgba(255, 255, 255, .018);
  transition: transform .35s var(--ease-out), border-color .35s ease, box-shadow .35s ease;
}
.card::before, .feat::before, .eng::before, .model::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(75, 146, 155, .12), transparent 66%);
  content: "";
  transition: opacity .3s ease;
}
.card.has-pointer::before, .feat.has-pointer::before, .eng.has-pointer::before, .model.has-pointer::before { opacity: 1; }
.card:hover, .feat:hover, .eng:hover, .model:hover {
  border-color: rgba(75, 146, 155, .42);
  transform: translateY(-5px);
  box-shadow: 0 22px 55px rgba(0, 0, 0, .25), inset 0 1px rgba(255, 255, 255, .03);
}
.card .tag, .model .m-tag { color: #7f9295; }
.card .go { color: var(--accent-2); }
.feat .ic { border-color: rgba(75, 146, 155, .32); background: rgba(46, 111, 121, .1); }
.feat .ic svg { stroke: #71b2ba; }
.eng h4::before { background: linear-gradient(135deg, var(--teal), var(--accent)); }
.stats { background: rgba(9, 16, 19, .72); }
.stat { transition: background .25s ease; }
.stat:hover { background: rgba(75, 146, 155, .045); }
.workflow { background: rgba(9, 16, 19, .72); }
.module { gap: clamp(38px, 6vw, 72px); }
.contact-actions { display: flex; justify-content: center; gap: 11px; flex-wrap: wrap; margin-top: 27px; }
.contact-actions .email { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; margin-top: 0; padding: 13px 20px; font-family: var(--sans); font-size: 13px; }
.contact-actions .email-secondary { color: var(--text); border-color: var(--border-strong); background: rgba(255, 255, 255, .025); }
.contact-actions .email-secondary:hover { color: var(--accent-2); border-color: rgba(249, 117, 29, .42); background: rgba(249, 117, 29, .06); }

.cta-band {
  margin: 0 22px 42px;
  border: 1px solid rgba(167, 197, 201, .17);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(18, 33, 39, .9), rgba(10, 15, 18, .96));
  box-shadow: 0 30px 85px rgba(0, 0, 0, .25);
}
.cta-inner { padding-block: 82px; }
footer { padding: 44px 0; border-top: 1px solid rgba(167, 197, 201, .1); background: rgba(5, 9, 11, .82); }
.foot-inner { width: min(100%, 1180px); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; margin: 0 auto; padding: 0 32px; color: var(--faint); font-size: 12.5px; }
.foot-links { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; }
.foot-inner a, .foot-links a { transition: color .2s ease; }
.foot-inner a:hover, .foot-links a:hover { color: var(--accent-2); }

/* Progressive, fail-safe motion */
.reveal { opacity: 1; transform: none; filter: none; }
.js .reveal {
  opacity: 0;
  filter: blur(7px);
  transform: translateY(24px) scale(.992);
  transition: opacity .78s var(--ease-out), transform .78s var(--ease-out), filter .7s ease;
  transition-delay: var(--d, 0s);
}
.js .reveal.vis { opacity: 1; filter: none; transform: none; }
.js.intro-playing .reveal[data-load].vis { opacity: 0; filter: blur(7px); transform: translateY(18px) scale(.992); }

/* One-time opening sequence */
.site-intro { display: none; }
.intro-playing body { overflow: hidden; }
.intro-playing nav { opacity: 0 !important; animation: none !important; }
.intro-playing .site-intro {
  position: fixed;
  z-index: 5000;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--text);
  background: #060a0c;
  clip-path: inset(0 0 0 0);
  animation: intro-curtain .62s var(--ease-out) 1.08s forwards;
}
.intro-playing .site-intro::before {
  position: absolute;
  inset: 0;
  opacity: .35;
  background-image: linear-gradient(rgba(126, 165, 170, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(126, 165, 170, .07) 1px, transparent 1px);
  background-size: 52px 52px;
  content: "";
  animation: intro-grid 1s ease both;
}
.intro-playing .site-intro::after {
  position: absolute;
  width: 520px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 111, 121, .19), rgba(249, 117, 29, .06) 46%, transparent 70%);
  filter: blur(12px);
  content: "";
  animation: intro-halo 1.4s ease both;
}
.intro-lockup { position: relative; z-index: 2; width: min(74vw, 360px); text-align: center; }
.intro-graph { width: 100%; height: auto; overflow: visible; }
.intro-graph path { fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 410; stroke-dashoffset: 410; animation: intro-line .72s var(--ease-out) .08s forwards; }
.intro-graph circle { fill: var(--teal); opacity: 0; transform-box: fill-box; transform-origin: center; animation: intro-dot .28s var(--ease-out) forwards; }
.intro-graph circle:nth-of-type(1) { animation-delay: .18s; }
.intro-graph circle:nth-of-type(2) { animation-delay: .3s; }
.intro-graph circle:nth-of-type(3) { animation-delay: .42s; }
.intro-graph circle:nth-of-type(4) { animation-delay: .54s; }
.intro-graph circle:nth-of-type(5) { animation-delay: .66s; }
.intro-letters { display: flex; justify-content: center; gap: 18px; margin-top: -74px; font: 500 clamp(50px, 8vw, 78px)/1 Georgia, 'Times New Roman', serif; color: var(--accent); }
.intro-letters span { opacity: 0; transform: translateY(20px); animation: intro-letter .55s var(--ease-out) forwards; }
.intro-letters span:nth-child(1) { animation-delay: .3s; }
.intro-letters span:nth-child(2) { animation-delay: .42s; }
.intro-letters span:nth-child(3) { animation-delay: .54s; }
.intro-label { margin-top: 36px; color: #819295; font: 500 10px/1.4 var(--mono); letter-spacing: .24em; text-transform: uppercase; opacity: 0; animation: intro-label .4s ease .62s forwards; }
@keyframes intro-line { to { stroke-dashoffset: 0; } }
@keyframes intro-dot { to { opacity: 1; transform: scale(1); } from { opacity: 0; transform: scale(.3); } }
@keyframes intro-letter { to { opacity: 1; transform: none; } }
@keyframes intro-label { to { opacity: 1; } }
@keyframes intro-grid { from { opacity: 0; transform: scale(1.08); } }
@keyframes intro-halo { 50% { transform: scale(1.08); } }
@keyframes intro-curtain { to { clip-path: inset(0 0 100% 0); visibility: hidden; } }

@media (max-width: 1040px) {
  .hero-inner { grid-template-columns: 1fr; }
  .term { width: min(100%, 720px); transform: none; }
}

@media (max-width: 900px) {
  body.nav-open { overflow: hidden; }
  nav { padding: 10px 12px; }
  .nav-inner { height: 58px; padding-inline: 15px 8px; }
  .cqr-logo { height: 33px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    left: 0;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 3px;
    padding: 10px;
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    background: #070c0f;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .44);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px) scale(.985);
    transform-origin: top;
    transition: opacity .22s ease, transform .3s var(--ease-out);
  }
  body.nav-open .nav-links { opacity: 1; pointer-events: auto; transform: none; }
  .nav-links > a, .nav-links > a.hide-m, .nav-links > a:not(.nav-cta) { display: flex; min-height: 44px; align-items: center; }
  .nav-links .book-cta { margin: 5px 0 0; }
  .hero { min-height: auto; padding: 150px 0 94px; }
  .page-hero { padding: 148px 0 76px; }
  .arch-flow { display: grid; grid-template-columns: 1fr; }
  .arch-sep { justify-content: center; height: 14px; transform: rotate(90deg); }
  .cta-band { margin-inline: 12px; border-radius: 22px; }
}

@media (max-width: 620px) {
  .wrap, .stats-inner, .cta-inner, .foot-inner, .disclaimer { padding-inline: 20px; }
  .hero h1 { font-size: clamp(40px, 12vw, 52px); }
  .page-hero h1, main .center > h1 { font-size: clamp(38px, 11vw, 49px); }
  .hero-sub, .page-sub, .sub { font-size: 16px; line-height: 1.68; }
  .hero-ctas { display: grid; grid-template-columns: 1fr; }
  .hero-ctas a, .cta-inner > a { width: 100%; text-align: center; }
  .contact-actions { display: grid; grid-template-columns: 1fr; }
  .badge { max-width: 100%; white-space: normal; }
  .term { overflow-x: auto; }
  .term table { min-width: 560px; }
  .stats-inner { grid-template-columns: 1fr; }
  .stat { border-top: 1px solid var(--border); border-left: 0; }
  .stat:first-child { border-top: 0; }
  .cta-inner { padding-block: 62px; }
  .foot-inner .cols { width: 100%; gap: 38px; }
  .intro-lockup { width: min(82vw, 320px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .site-intro, .ambient-cursor, .scroll-progress { display: none !important; }
  .js .reveal { opacity: 1; filter: none; transform: none; }
}
