/* The project website (index.html): Craft Conductor's Industrial Silver / Obsidian / Magma look
   (the same colours as the app's craft-conductor-theme.css), night by default, day on request. */
:root, :root[data-theme="night"] {
  color-scheme: dark;
  --bg: #0A0A0A; --panel: #121212; --panel-2: #191919; --border: #2C2C2C; --border-strong: #3A3A3A;
  --text: #E2E8F0; --muted: #94A3B8; --bright: #F8FAFC;
  --accent: #FF3E00; --accent-text: #FF5A24; --on-accent: #070707; --ok: #22C55E;
  --shadow: rgba(0, 0, 0, .5); --grid: rgba(255, 255, 255, .016); --highlight: rgba(255, 255, 255, .055);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nav: 248px;
}
:root[data-theme="day"] {
  color-scheme: light;
  --bg: #F4F4F4; --panel: #FFFFFF; --panel-2: #FAFAFA; --border: #C9C9C9; --border-strong: #121212;
  --text: #1A1A1A; --muted: #4B5563; --bright: #121212;
  --accent: #D63300; --accent-text: #A62700; --on-accent: #FFFFFF; --ok: #166534;
  --shadow: rgba(18, 24, 32, .14); --grid: rgba(18, 24, 32, .03); --highlight: rgba(255, 255, 255, .95);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 32px 32px; }
body.demo-open { overflow: hidden; }
a { color: var(--accent-text); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
button, input, select { font: inherit; }
button { cursor: pointer; }
code { font: .9em var(--mono); background: var(--panel-2); border: 1px solid var(--border); padding: 0 .3em; overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 60; background: var(--panel); color: var(--bright); padding: 10px 14px; border: 1px solid var(--accent); }
.skip:focus { left: 12px; }
.muted { color: var(--muted); }
h1, h2, h3 { color: var(--bright); margin: 0; }

/* ------------------------------------------------------------ navigation (left, like the app) */
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: var(--nav); background: var(--panel); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 22px 14px; overflow-y: auto; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 26px; color: var(--bright); text-decoration: none;
  font: 800 13px/1.15 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.sidebar nav { display: grid; gap: 2px; }
.nav-link { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-left: 3px solid transparent; color: var(--muted);
  text-decoration: none; font: 600 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.nav-icon { width: 20px; text-align: center; font-size: 16px; font-family: var(--sans); }
.nav-link:hover, .nav-link.active { background: var(--panel-2); border-left-color: var(--accent); color: var(--bright); }
.nav-bottom { margin-top: auto; padding: 18px 8px 4px; display: grid; gap: 14px; }
.nav-version { margin: 0; color: var(--muted); font: 11px var(--mono); letter-spacing: .04em; }
.theme-control { display: flex; align-items: center; gap: 8px; font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.theme-switch { position: relative; width: 44px; height: 24px; padding: 0; border: 1px solid var(--border-strong); background: var(--panel-2); }
.theme-switch .thumb { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: var(--accent); transition: transform .18s ease; }
.theme-switch[aria-checked="true"] .thumb { transform: translateX(20px); }
.menu-toggle, .site-scrim { display: none; }

/* ------------------------------------------------------------ the page */
#website { margin-left: var(--nav); }
.section { max-width: 1240px; margin: 0 auto; padding: 88px clamp(22px, 5vw, 80px); }
.eyebrow { margin: 0 0 14px; color: var(--accent-text); font: 800 12px var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--accent); vertical-align: 1px; }
h1 { font-size: clamp(36px, 4.6vw, 64px); line-height: 1.06; letter-spacing: -.035em; margin-bottom: 22px; }
h1 em { font-style: normal; color: var(--accent); }
h2 { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.1; letter-spacing: -.03em; margin-bottom: 18px; }
h3 { font-size: 19px; line-height: 1.3; margin-bottom: 8px; }
.lede { font-size: 19px; color: var(--muted); max-width: 640px; margin: 0; }
.section-copy { font-size: 18px; color: var(--muted); max-width: 760px; margin: 0 0 34px; }
.fineprint { color: var(--muted); font-size: 14px; margin: 22px 0 0; }
.button { display: inline-flex; gap: 14px; align-items: center; min-height: 50px; padding: 14px 20px; border: 1px solid var(--border-strong);
  text-decoration: none; font: 700 13px var(--mono); letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 2px 4px -2px var(--shadow), inset 0 1px 0 var(--highlight); transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button.primary:hover { background: var(--panel); color: var(--accent); }
.button.secondary { background: var(--panel); color: var(--bright); }
.button.secondary:hover { border-color: var(--accent); }

.hero { display: grid; gap: clamp(32px, 4vw, 52px); padding-top: clamp(56px, 7vw, 96px); }
.hero-text { max-width: 980px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 30px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.hero-facts li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.hero-shot { position: relative; display: block; width: 100%; max-width: 1180px; padding: 0; border: 1px solid var(--border-strong); background: var(--panel);
  box-shadow: 0 24px 70px var(--shadow); transition: transform .2s ease, border-color .2s ease; }
.hero-shot img { display: block; width: 100%; }
.hero-shot:hover { border-color: var(--accent); transform: translateY(-2px); }
.shot-badge { position: absolute; left: 12px; bottom: 12px; background: var(--accent); color: var(--on-accent); padding: 5px 10px; font: 700 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature { background: var(--panel); border: 1px solid var(--border); padding: 0 0 22px; box-shadow: inset 0 1px 0 var(--highlight); }
.feature img { display: block; width: 100%; aspect-ratio: 1440 / 900; object-fit: cover; object-position: top left; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.feature h3, .feature p { padding: 0 20px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
.feature img.feature-phone { object-fit: contain; object-position: center; background: var(--panel-2); padding: 12px 0; }

.demo-section { max-width: none; background: var(--panel); border-block: 1px solid var(--border);
  padding-inline: max(clamp(22px, 5vw, 80px), calc((100% - 1240px) / 2 + clamp(22px, 5vw, 80px))); }
.demo-choices-inline { display: grid; grid-template-columns: 1fr 1fr minmax(240px, .8fr); gap: 16px; }
.choice-card { display: flex; flex-direction: column; gap: 12px; text-align: left; min-height: 220px; padding: 24px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border-strong); box-shadow: inset 0 1px 0 var(--highlight); transition: border-color .15s ease, transform .15s ease; }
.choice-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.choice-icon { font-size: 28px; color: var(--accent); line-height: 1; }
.choice-card b { font-size: 20px; color: var(--bright); }
.choice-card small { color: var(--muted); font-size: 15px; }
.choice-card strong { margin-top: auto; color: var(--accent-text); font: 700 13px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.phone-card { display: grid; gap: 12px; align-content: start; padding: 20px; border: 1px dashed var(--border-strong); background: var(--bg); }
.phone-card p { margin: 0; color: var(--muted); font-size: 14px; }
.phone-card b { color: var(--bright); }
.qr-button { justify-self: start; padding: 8px; background: #fff; border: 1px solid var(--border-strong); line-height: 0; }
.qr-button:hover { outline: 2px solid var(--accent); }
.qr-button img { width: 140px; height: 140px; }

.download-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.download-option { display: grid; gap: 4px; padding: 22px; background: var(--panel); border: 1px solid var(--border-strong); color: var(--text); text-decoration: none;
  box-shadow: inset 0 1px 0 var(--highlight); }
.download-option:hover { border-color: var(--accent); color: var(--text); }
.download-option b { color: var(--bright); font-size: 19px; }
.download-option small { color: var(--muted); }
.download-option code { margin-top: 10px; font-size: 12px; justify-self: start; }
.notice-line { margin: 22px 0 0; padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--panel); }

.step-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.step-row li { border-top: 2px solid var(--border-strong); padding-top: 18px; }
.step-row b { display: block; margin-bottom: 14px; color: var(--accent-text); font: 800 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.step-row p { color: var(--muted); font-size: 15px; margin: 0; }

.link-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.link-card { display: grid; gap: 6px; padding: 20px; background: var(--panel); border: 1px solid var(--border); text-decoration: none; color: var(--text); }
.link-card:hover { border-color: var(--accent); color: var(--text); }
.link-card b { color: var(--bright); }
.link-card span { color: var(--muted); font-size: 15px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 32px; }
.facts p { color: var(--muted); font-size: 15px; margin: 0; }
.site-footer { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; padding: 28px clamp(22px, 5vw, 80px); border-top: 1px solid var(--border);
  color: var(--muted); font-size: 14px; }
.footer-brand { font: 800 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--bright); }

/* ------------------------------------------------------------ the demo over the website */
.demo-overlay { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: flex-end; }
.demo-overlay[hidden], .demo-intro[hidden], .demo-stage[hidden], .phone-side[hidden] { display: none !important; }
.demo-shade { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fade .25s ease-out; }
.leave-demo { position: relative; z-index: 2; align-self: stretch; width: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 16px 0; border: 0; background: var(--accent); color: var(--on-accent); font: 800 12px var(--mono); letter-spacing: .16em; text-transform: uppercase; animation: slide .3s ease-out; }
.leave-demo span:last-child { writing-mode: vertical-rl; transform: rotate(180deg); }
.leave-demo:hover { filter: brightness(1.1); }
.leave-demo:focus-visible { outline-offset: -5px; outline-color: var(--on-accent); }
.demo-drawer { position: relative; z-index: 2; width: min(1400px, calc(100vw - 48px)); height: 100%; display: flex; flex-direction: column; overflow: auto;
  background: var(--bg); box-shadow: -24px 0 80px var(--shadow); animation: slide .3s ease-out; }
.demo-intro { max-width: 900px; margin: auto; padding: clamp(28px, 6vw, 80px) 24px; }
.demo-intro > p { color: var(--muted); }
.demo-intro h2:focus { outline: none; }
.demo-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.demo-notice { margin-top: 22px; color: var(--muted); font-size: 14px; }
.link-button { border: 0; background: none; padding: 0; color: var(--accent-text); text-decoration: underline; }
.demo-stage { display: flex; flex-direction: column; min-height: 100%; }
.demo-toolbar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 8px 14px; background: var(--panel); border-bottom: 1px solid var(--border); }
.demo-label { font: 700 12px var(--mono); letter-spacing: .06em; color: var(--bright); }
.demo-tag { background: var(--accent); color: var(--on-accent); padding: 2px 7px; text-transform: uppercase; letter-spacing: .12em; font-size: 10px; }
.demo-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.demo-tools button, .demo-check { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border-strong); font: 600 12px var(--mono); }
.demo-tools button:hover, .demo-check:hover { border-color: var(--accent); }
.demo-tools button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-text); }
.demo-workspace { flex: 1; min-height: 0; display: flex; gap: 24px; align-items: stretch; justify-content: center; }
.frame-holder { flex: 1; min-width: 0; display: flex; }
.frame-holder iframe { flex: 1; width: 100%; min-height: calc(100vh - 92px); border: 0; background: var(--bg); }
.demo-workspace.phone { padding: 18px; background: var(--panel-2); align-items: center; }
.demo-workspace.phone .frame-holder { flex: 0 0 auto; width: 400px; max-width: 100%; height: min(820px, calc(100vh - 130px)); border: 10px solid #1b1b1b; outline: 1px solid var(--border-strong); box-shadow: 0 20px 60px var(--shadow); }
.demo-workspace.phone .frame-holder iframe { min-height: 0; }
.phone-side { align-self: center; width: 230px; display: grid; gap: 12px; color: var(--muted); font-size: 14px; }
.phone-side img { background: #fff; padding: 8px; width: 150px; height: 150px; }
.phone-side b { color: var(--bright); }
.demo-status { margin: 0; padding: 6px 14px; min-height: 30px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); background: var(--panel); }
@keyframes slide { from { transform: translateX(80px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------------------------------------ smaller screens */
@media (max-width: 1100px) {
  .feature-grid, .link-grid, .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .download-grid, .step-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-choices-inline { grid-template-columns: 1fr 1fr; }
  .phone-card { grid-column: 1 / -1; grid-template-columns: auto 1fr; align-items: center; }
}
@media (max-width: 820px) {
  :root { --nav: 0px; }
  .menu-toggle { display: inline-flex; gap: 8px; align-items: center; position: fixed; z-index: 30; top: 10px; left: 10px; min-height: 42px; padding: 8px 12px;
    background: var(--panel); color: var(--bright); border: 1px solid var(--border-strong); font: 700 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
  .sidebar { width: min(290px, 86vw); transform: translateX(-100%); transition: transform .2s ease; z-index: 40; padding-top: 64px; }
  .sidebar.open { transform: none; box-shadow: 0 0 60px var(--shadow); }
  .site-scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .55); }
  .site-scrim[hidden] { display: none; }
  #website { margin-left: 0; }
  .section { padding: 64px 18px; }
  .hero { padding-top: 76px; }
  .lede, .section-copy { font-size: 17px; }
  .demo-drawer { width: calc(100vw - 40px); }
  .leave-demo { width: 40px; font-size: 11px; }
  .demo-workspace.phone { padding: 10px; }
  .phone-side { display: none !important; }
}
@media (max-width: 600px) {
  .feature-grid, .link-grid, .facts, .download-grid, .step-row, .demo-choices-inline, .demo-choices { grid-template-columns: 1fr; }
  .phone-card { grid-template-columns: 1fr; }
  .choice-card { min-height: 0; }
  .hero-actions .button { width: 100%; justify-content: space-between; }
  .demo-toolbar { padding: 6px 8px; }
  .demo-tools button, .demo-check { font-size: 11px; padding: 5px 8px; }
  .demo-workspace.phone .frame-holder { border-width: 0; outline: 0; width: 100%; height: calc(100vh - 150px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
