:root {
  --bg: #141414;
  --grid: rgba(255, 255, 255, 0.07);
  --ink: #ffffff;
  --muted: #9ca3af;
  --soft: #6b7280;
  --faint: #4b5563;
  --line: rgba(255, 255, 255, 0.1);
  --panel: #141414;
  --accent: #ffffff;
  --brand-black: #141414;
  --brand-dark: #0f0f0f;
  --brand-gray: #1a1a1a;
  --serif: "Playfair Display", Georgia, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --bar-h: 52px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; cursor: pointer; }

/* ---------- Toolbar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--bar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 18px; background: rgba(20, 20, 20, 0.86); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.bar-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.bar-sub { color: var(--soft); font-weight: 400; }
.bar-sections { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.bar-sections::-webkit-scrollbar { display: none; }
.bar-sections button {
  border: 0; background: transparent; color: var(--muted); padding: 7px 11px; border-radius: 6px;
  font-size: 13px; white-space: nowrap;
}
.bar-sections button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.bar-controls { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.bar-controls button {
  border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 6px;
  padding: 6px 12px; font-size: 13px;
}
.bar-controls button:hover { background: rgba(255, 255, 255, 0.08); }
.toggle[aria-pressed="true"] { background: var(--ink); color: #000; border-color: var(--ink); }
.zoom { font-family: var(--mono); font-size: 12px; color: var(--muted); min-width: 44px; text-align: right; }
.site-field { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--soft); }
.site-field input {
  width: 200px; border: 1px solid var(--line); background: var(--brand-dark); color: var(--ink);
  border-radius: 6px; padding: 6px 9px; font: 12px var(--mono); outline: none;
}
.site-field input:focus { border-color: rgba(255, 255, 255, 0.4); }
.site-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.site-dot.ok { background: #22c55e; }
.site-dot.bad { background: #ef4444; }

.hint {
  position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 50;
  color: var(--soft); font-size: 12px; padding: 7px 14px; border-radius: 20px;
  background: rgba(20, 20, 20, 0.8); border: 1px solid var(--line); pointer-events: none;
  transition: opacity 0.6s;
}
.hint.gone { opacity: 0; }

/* ---------- Canvas ---------- */
.viewport {
  position: absolute; inset: 0; overflow: hidden; cursor: grab;
  touch-action: none; overscroll-behavior: none;
  background-color: var(--bg);
  background-image: radial-gradient(var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
}
.viewport.dragging { cursor: grabbing; }
.world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }

.section-title {
  position: absolute; font-family: var(--serif); font-weight: 400; color: var(--ink);
  font-size: 88px; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; margin: 0;
}
.section-note {
  position: absolute; color: var(--muted); font-size: 22px; line-height: 1.5; width: 1100px; margin: 0;
}
.section-note b { color: var(--ink); font-weight: 500; }
.section-note a { color: var(--ink); text-underline-offset: .2em; }

.frame { position: absolute; }
.frame-label {
  position: absolute; left: 0; bottom: 100%; margin-bottom: 14px; display: flex; gap: 14px; align-items: baseline;
  font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; letter-spacing: 0.02em;
}
.frame-label strong { color: var(--ink); font-weight: 600; }
.frame-label .tag { color: var(--faint); }
.frame-label .warn { color: #f59e0b; }
.frame-body {
  position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--brand-black);
  outline: 1px solid rgba(255, 255, 255, 0.14); border-radius: 2px;
}
.frame.moving .frame-body { outline-color: rgba(255, 255, 255, 0.6); }
.frame[hidden] { display: none; }
.preview-placeholder::after { content: "Zoom in to preview"; display: grid; place-items: center; height: 100%; color: var(--soft); font-size: 28px; }
.movable { cursor: move; }
.frame-label { cursor: move; }
.world.interact .frame-body { cursor: default; }
.frame.rounded .frame-body { border-radius: 12px; }

/* Site pages */
.frame-body iframe {
  display: none; width: 100%; height: 100%; border: 0; background: var(--brand-black); pointer-events: none;
}
.site-preview { object-fit: cover; object-position: top; }
.world.interact .frame-body iframe { display: block; pointer-events: auto; }
.world.interact .site-preview { display: none; }
.frame-body video { pointer-events: none; }
.world.interact .frame-body video { pointer-events: auto; }
.page-offline {
  position: absolute; inset: 0; display: none; place-items: center; text-align: center; color: var(--muted);
  font-size: 22px; line-height: 1.5; padding: 40px; background: var(--brand-black);
}
.page-offline code { font-family: var(--mono); color: var(--ink); }
.offline .page-offline { display: grid; }

/* Brand cards */
.card { padding: 48px; height: 100%; display: flex; flex-direction: column; gap: 28px; background: var(--brand-black); }
.card h3 { margin: 0; font: 400 34px/1.1 var(--serif); }
.card .eyebrow { font: 12px var(--mono); color: var(--soft); text-transform: uppercase; letter-spacing: 0.14em; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.swatch { border-radius: 10px; border: 1px solid var(--line); overflow: hidden; }
.swatch i { display: block; height: 96px; }
.swatch span { display: block; padding: 10px 12px; font: 12px var(--mono); color: var(--muted); }
.swatch span b { display: block; color: var(--ink); font-weight: 500; margin-bottom: 2px; font-family: var(--sans); }
.type-specimen { display: grid; gap: 22px; }
.type-specimen .hero { font: 400 92px/0.9 var(--serif); letter-spacing: -0.02em; }
.type-specimen .h2 { font: 400 40px/1.15 var(--serif); }
.type-specimen .body { font: 400 18px/1.6 var(--sans); color: var(--muted); max-width: 720px; }
.type-specimen .label { font: 12px var(--mono); color: var(--soft); text-transform: uppercase; letter-spacing: 0.2em; }
.logo-grid { display: flex; align-items: center; gap: 64px; flex-wrap: wrap; }
.logo-grid .lockup { display: flex; align-items: center; gap: 16px; padding: 28px 36px; border-radius: 12px; }
.logo-grid .lockup.on-dark { background: var(--brand-black); border: 1px solid var(--line); }
.logo-grid .lockup.on-light { background: #fff; color: #050505; }
.logo-grid .lockup span { font: 500 44px/1 var(--serif); }
.logo-grid img { width: 52px; height: 52px; }
.media { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }

/* Copy sheet */
.copy-sheet { padding: 56px; height: 100%; display: grid; grid-template-rows: auto 1fr auto; gap: 32px; background: var(--brand-black); }
.copy-sheet .eyebrow { font: 12px var(--mono); color: var(--soft); text-transform: uppercase; letter-spacing: 0.14em; }
.copy-sheet h3 { margin: 0; font: 400 56px/1 var(--serif); letter-spacing: -0.02em; }
.copy-sheet dl { margin: 0; display: grid; gap: 22px; align-content: start; }
.copy-sheet dt { font: 12px var(--mono); color: var(--soft); text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 6px; }
.copy-sheet dd { margin: 0; font-size: 22px; line-height: 1.45; color: var(--ink); }
.copy-sheet dd.muted { color: var(--muted); font-size: 18px; }
.copy-sheet .foot { font-size: 15px; line-height: 1.5; color: var(--soft); border-top: 1px solid var(--line); padding-top: 22px; }
.copy-sheet .foot b { color: #f59e0b; font-weight: 500; }

/* Search ad preview */
.serp { background: #fff; color: #1f1f1f; height: 100%; padding: 40px 44px; font-family: Arial, var(--sans); }
.serp .sp { font-weight: 700; font-size: 14px; margin-bottom: 18px; color: #1f1f1f; }
.serp .adv { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.serp .adv i { width: 28px; height: 28px; border-radius: 50%; background: #141414; display: grid; place-items: center; }
.serp .adv i img { width: 16px; height: 16px; }
.serp .adv b { display: block; font-weight: 400; font-size: 14px; }
.serp .adv span { display: block; font-size: 12px; color: #4d5156; }
.serp h4 { margin: 0 0 8px; font-weight: 400; font-size: 20px; line-height: 1.3; color: #1a0dab; }
.serp p { margin: 0; font-size: 14px; line-height: 1.58; color: #4d5156; }
.serp .links { display: flex; gap: 22px; margin-top: 16px; font-size: 14px; color: #1a0dab; }
.serp .rsa-note { margin-top: 26px; padding-top: 18px; border-top: 1px solid #e8eaed; font: 12px var(--mono); color: #70757a; }

/* Storyboard */
.board { height: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--brand-black); }
.board .shot { position: relative; background: var(--brand-gray); display: grid; grid-template-rows: 1fr auto; }
.board .shot .pic { position: relative; background: #111 center/cover; display: grid; place-items: center; color: var(--soft); font: 12px var(--mono); text-align: center; padding: 20px; }
.board .shot .pic.placeholder::after { content: "shoot needed"; position: absolute; top: 12px; right: 12px; font: 10px var(--mono); color: #f59e0b; border: 1px solid #f59e0b; padding: 3px 7px; border-radius: 4px; letter-spacing: 0.08em; text-transform: uppercase; }
.board .shot .pic .desc { color: #d1d5db; font: 400 16px/1.45 var(--sans); max-width: 300px; }
.board .shot .meta { padding: 18px 20px 22px; border-top: 1px solid var(--line); }
.board .shot .t { font: 12px var(--mono); color: var(--soft); margin-bottom: 8px; }
.board .shot .vo { font: 400 22px/1.3 var(--serif); }

/* ---------- Export mode (?frame=id) ---------- */
body.export { background: transparent; overflow: visible; }
body.export .bar, body.export .hint { display: none; }
body.export .viewport { position: static; overflow: visible; background: none; }
body.export .world { position: static; transform: none !important; }
body.export .section-title, body.export .section-note, body.export .frame-label { display: none; }
body.export .frame { position: static; }
body.export .frame-body { outline: 0; border-radius: 0; }

/* Hero section replica (src/components/Hero.tsx) */
.hero-sec { position: relative; width: 100%; height: 100%; overflow: hidden; background: #050505; display: grid; place-items: center; }
.hero-sec .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; }
.hero-shade, .hero-grad { position: absolute; inset: 0; display: none; }
.hero--site .hero-sec .hero-video { opacity: 0.7; }
.hero--site .hero-shade { display: block; background: rgba(0, 0, 0, 0.3); }
.hero--site .hero-grad { display: block; background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), transparent, rgba(0, 0, 0, 0.5)); }
.hero-nav { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 22px 40px; }
.hero-nav .mark { display: flex; align-items: center; gap: 10px; font: 500 22px/1 var(--serif); color: #fff; }
.hero-nav .mark img { width: 24px; height: 24px; }
.hero-nav-cta { font: 500 13px var(--sans); color: #fff; border: 1px solid rgba(255,255,255,0.4); border-radius: 999px; padding: 9px 16px; }
.hero-sec h1 { position: relative; margin: 0; max-width: 1024px; padding: 0 24px; text-align: center; font: 400 128px/1.1 var(--serif); letter-spacing: -0.025em; color: #fff; text-wrap: balance; }
.hero-sec > :not(video) { pointer-events: none; }

/* Product page art (app/[insurance]/page.tsx) */
.product-art { width: 100%; height: 100%; padding: 40px; background: var(--brand-black); }
.product-art img { width: 100%; height: 100%; object-fit: contain; opacity: 0.7; }

/* Fleet roster cards (src/components/FleetRoster.tsx) */
.roster { position: relative; display: block; width: 100%; height: 100%; background: var(--brand-black); text-decoration: none; overflow: hidden; }
.roster-art { position: absolute; left: 40px; right: 40px; top: 32px; bottom: 96px; }
.roster-art img { width: 100%; height: 100%; object-fit: contain; opacity: 0.5; transition: opacity 0.5s; }
.roster:hover .roster-art img { opacity: 1; }
.roster-meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.roster-name { font: 400 30px/1.2 var(--serif); color: var(--muted); transition: color 0.5s; }
.roster:hover .roster-name { color: #fff; }
.roster-cta { font: 11px var(--mono); color: #9ca3af; text-transform: uppercase; letter-spacing: 0.15em; opacity: 0; transform: translateY(4px); transition: all 0.3s; }
.roster:hover .roster-cta { opacity: 1; transform: none; color: #fff; }

/* Login page treatment of truck-mountains.jpg (app/login/page.tsx) */
.login-art { width: 100%; height: 100%; padding: 0 64px; background: var(--brand-black); display: grid; align-items: center; }
.login-art img { width: 100%; height: 100%; object-fit: cover; object-position: 75% 30%; border-radius: 8px; filter: grayscale(1); opacity: 0.8; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); transition: filter 0.5s, opacity 0.5s; }
.login-art:hover img { filter: none; opacity: 1; }

/* --- Copy sheet: RSA character rows --- */
.copy-sheet ul.chars { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.copy-sheet ul.chars li { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; line-height: 1.4; color: var(--ink); }
.copy-sheet ul.chars li i { font: 11px var(--mono); color: var(--soft); flex: none; }
.copy-sheet ul.chars li.over, .copy-sheet ul.chars li.over i { color: #ef4444; }

/* --- Spec sheet + logo assets --- */
.spec { padding: 48px 56px; height: 100%; background: var(--brand-black); display: grid; gap: 22px; align-content: start; }
.spec .eyebrow { font: 12px var(--mono); color: var(--soft); text-transform: uppercase; letter-spacing: 0.14em; }
.spec h3 { margin: 0 0 10px; font: 400 44px/1 var(--serif); }
.spec table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec th { text-align: left; font: 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .12em; padding: 10px 0 8px; border-bottom: 1px solid var(--line); }
.spec td { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.05); color: var(--muted); }
.spec td:first-child { font-family: var(--mono); color: var(--ink); width: 130px; }
.logo-asset { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; gap: 4%; background: var(--brand-black); }
.logo-asset.sq img { width: 46%; height: 46%; }
.logo-asset.wide img { width: 15%; height: 60%; }
.logo-asset.wide span { font: 500 150px/1 var(--serif); color: #fff; }
