@font-face { font-family: 'Share Tech Mono'; src: url(fonts/sharetechmono.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'VT323'; src: url(fonts/vt323.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Rubik Mono One'; src: url(fonts/rubikmonoone.woff2) format('woff2'); font-display: swap; }

:root {
  --ph: 255 136 46;
  --hi: 255 214 170;
  --dim: 168 72 20;
  --deep: 62 22 6;
  --ink: #0b0400;
  --cream: #f8f0e6;
  --soft: #c9b6a3;

  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'Share Tech Mono', ui-monospace, Menlo, monospace;
  --term: 'VT323', ui-monospace, Menlo, monospace;
  --logo: 'Rubik Mono One', 'Arial Black', sans-serif;

  --glow: 0 0 1px rgb(var(--hi) / .7), 0 0 8px rgb(var(--ph) / .45);
  --inset: clamp(8px, 1.6vmin, 22px);
  --rad: clamp(16px, 3vmin, 34px);
}

:root[data-phosphor='green'] { --ph: 70 255 120; --hi: 205 255 214; --dim: 30 130 60; --deep: 8 42 18; --ink: #010a03; --cream: #e8ffed; --soft: #96cca4; }
:root[data-phosphor='ice']   { --ph: 80 186 255; --hi: 210 236 255; --dim: 30 90 150; --deep: 6 26 46; --ink: #01060c; --cream: #eaf5ff; --soft: #9bc0dc; }
:root[data-phosphor='white'] { --ph: 228 224 212; --hi: 255 255 250; --dim: 120 118 110; --deep: 34 33 30; --ink: #050505; --cream: #f7f5f0; --soft: #bab6ad; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: #000; }
body {
  color: rgb(var(--hi));
  font: 13px/1.4 var(--mono);
  letter-spacing: .05em;
  -webkit-font-smoothing: antialiased;
  background: radial-gradient(120% 90% at 50% 40%, #0d0502 0%, #000 72%);
  -webkit-tap-highlight-color: transparent;
}
::selection { background: rgb(var(--ph)); color: var(--ink); text-shadow: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; letter-spacing: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 1px dashed rgb(var(--hi)); outline-offset: 2px; }
b { font-weight: inherit; color: rgb(var(--hi)); }

/* ───────────────────────── CRT SHELL (signature KoTRT hardware) ───────────────────────── */
.crt {
  position: fixed;
  inset: var(--inset);
  border-radius: var(--rad);
  border: 2px solid rgb(var(--ph) / .9);
  box-shadow:
    0 0 2px rgb(var(--hi) / .8),
    0 0 16px rgb(var(--ph) / .5),
    0 0 76px rgb(var(--ph) / .18),
    inset 0 0 2px rgb(var(--hi) / .55),
    inset 0 0 28px rgb(var(--ph) / .3),
    inset 0 0 130px rgb(0 0 0 / .88);
  background:
    linear-gradient(to bottom, rgb(var(--deep) / .52), rgb(var(--deep) / .12) 32%, transparent 58%),
    radial-gradient(120% 100% at 50% 50%, rgb(var(--deep) / .32) 0%, #030100 72%);
  overflow: hidden;
  isolation: isolate;
}
.crt::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: calc(var(--rad) - 5px);
  border: 1px solid rgb(var(--ph) / .22);
  pointer-events: none;
  z-index: 9;
}

.screen {
  position: absolute;
  inset: clamp(12px, 1.7vw, 22px) clamp(14px, 2.2vw, 32px);
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  z-index: 1;
}

/* ───────────────────────── HEADER ───────────────────────── */
.hdr {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2vw;
  padding: 0 2px;
  text-transform: uppercase;
  text-shadow: var(--glow);
}
.hdr-l { min-width: 0; }
.feed {
  font-size: 11px;
  letter-spacing: .08em;
  opacity: .7;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.subline {
  font-size: clamp(13px, 1.3vw, 18px);
  letter-spacing: .09em;
  color: rgb(var(--hi));
  white-space: nowrap;
}

.logo { display: flex; flex-direction: column; align-items: center; padding: 0 4px; }
.logo-mark {
  font-family: var(--logo);
  font-size: clamp(28px, 4.1vw, 62px);
  line-height: .9;
  letter-spacing: -.07em;
  padding-right: .07em;
  white-space: nowrap;
  text-transform: none;
  color: rgb(var(--hi));
  text-shadow: 0 0 2px rgb(var(--hi)), 0 0 16px rgb(var(--ph) / .75), 0 0 44px rgb(var(--ph) / .35);
}
.logo-mark .lc { font-size: .56em; letter-spacing: -.04em; margin: 0 .04em 0 .02em; }
.logo-base {
  display: block;
  width: 108%;
  height: clamp(6px, .85vw, 11px);
  margin-top: 4px;
  fill: rgb(var(--ph));
  filter: drop-shadow(0 0 6px rgb(var(--ph) / .7));
}
.logo:hover .logo-mark { animation: jit .22s steps(2) 2; }

.hdr-r {
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  font-size: clamp(11px, 1vw, 14px);
  letter-spacing: .08em;
  white-space: nowrap;
}
.hdr-contact {
  border-bottom: 1px solid transparent;
  transition: border-color .15s, color .15s;
}
.hdr-contact:hover { border-color: rgb(var(--hi)); color: var(--cream); }
.hdr-contact.dim { opacity: .78; }

.rules { display: grid; gap: 4px; margin: 10px -6px 10px; }
.rules i { display: block; height: 2px; background: rgb(var(--ph) / .9); box-shadow: 0 0 8px rgb(var(--ph) / .65); }
.rules i + i { height: 1px; opacity: .52; }

/* ───────────────────────── SUB-BAR / MODE SWITCHES ───────────────────────── */
.sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 0 2px 12px;
  text-transform: uppercase;
  text-shadow: var(--glow);
}
.tag {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 3px 9px;
  font-size: 13px;
  border: 1.5px solid rgb(var(--ph));
  box-shadow: 0 0 8px rgb(var(--ph) / .4), inset 0 0 10px rgb(var(--ph) / .16);
}
.tag span { opacity: .82; }
.tag-ico { width: 30px; height: 14px; fill: rgb(var(--hi)); stroke: rgb(var(--hi)); filter: drop-shadow(0 0 3px rgb(var(--ph))); }
.status-txt {
  font-size: 12px;
  letter-spacing: .1em;
  color: rgb(var(--ph));
  opacity: .92;
}
.modes { margin-left: auto; display: flex; gap: 6px; }
.modes button {
  padding: 4px 11px 4px 5px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1px solid rgb(var(--ph) / .4);
  opacity: .78;
  transition: opacity .15s, border-color .15s;
}
.modes button span { display: inline-block; padding: 0 5px; margin-right: 7px; background: rgb(var(--ph) / .22); }
.modes button:hover { opacity: 1; border-color: rgb(var(--ph)); }
.modes button.on {
  opacity: 1;
  color: var(--ink);
  text-shadow: none;
  background: rgb(var(--hi));
  border-color: rgb(var(--hi));
  box-shadow: 0 0 14px rgb(var(--ph) / .7);
}
.modes button.on span { background: rgb(var(--ph) / .5); }

/* ───────────────────────── MAIN STAGE ───────────────────────── */
.stage {
  min-height: 0;
  position: relative;
  display: flex;
}
.view {
  width: 100%;
  height: 100%;
  min-height: 0;
}
.view[hidden] { display: none; }

/* VIEW 1: OVERVIEW */
.view-overview {
  display: grid;
  grid-template-columns: minmax(340px, 1.04fr) minmax(0, 1.12fr);
  gap: clamp(16px, 2.4vw, 34px);
  align-items: stretch;
}

.brief {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(14px, 2vh, 24px);
  padding: 6px 4px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}
.brief::-webkit-scrollbar { display: none; }

.headline {
  font-family: var(--sans);
  font-size: clamp(28px, 3.2vw, 46px);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -.028em;
  color: var(--cream);
  text-shadow: 0 0 24px rgb(var(--ph) / .24);
  max-width: 15ch;
}
.headline.sm {
  font-size: clamp(24px, 2.6vw, 38px);
}

.pitch {
  font-family: var(--sans);
  font-size: clamp(15px, 1.2vw, 17.5px);
  line-height: 1.56;
  letter-spacing: 0;
  color: var(--soft);
  max-width: 48ch;
}

.facts {
  display: grid;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid rgb(var(--ph) / .3);
  border-bottom: 1px solid rgb(var(--ph) / .3);
}
.facts > div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}
.facts dt {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: rgb(var(--ph));
  text-shadow: var(--glow);
}
.facts dd {
  font-family: var(--sans);
  font-size: clamp(13.5px, 1.05vw, 15px);
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--cream);
}

/* Direct Email / Phone CRT Keys */
.direct-bar {
  display: grid;
  gap: 10px;
  max-width: 470px;
}
.direct-row {
  display: flex;
  align-items: stretch;
}
.key-cta {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border: 1.5px solid rgb(var(--ph) / .65);
  background: rgb(var(--deep) / .35);
  color: var(--cream);
  transition: background .15s, border-color .15s, box-shadow .15s, color .15s;
}
.key-cta:hover {
  border-color: rgb(var(--hi));
  background: rgb(var(--ph) / .18);
  box-shadow: 0 0 18px rgb(var(--ph) / .35);
}
.key-cta.primary {
  background: rgb(var(--hi));
  border-color: rgb(var(--hi));
  color: var(--ink);
  box-shadow: 0 0 22px rgb(var(--ph) / .55);
}
.key-cta.primary:hover {
  background: #fff4e6;
  box-shadow: 0 0 28px rgb(var(--ph) / .75);
}
.k-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  padding: 2px 6px;
  background: rgb(var(--ph) / .22);
  color: rgb(var(--hi));
  flex-shrink: 0;
}
.key-cta.primary .k-tag {
  background: rgb(0 0 0 / .16);
  color: var(--ink);
}
.k-val {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.k-arr {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 15px;
}
.key-copy {
  padding: 0 13px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: rgb(var(--hi));
  border: 1.5px solid rgb(var(--ph) / .45);
  border-left: 0;
  background: rgb(0 0 0 / .45);
  transition: background .15s, color .15s, border-color .15s;
}
.key-copy:hover {
  background: rgb(var(--ph) / .2);
  border-color: rgb(var(--hi));
}
.key-copy.copied {
  background: rgb(var(--hi));
  color: var(--ink);
  border-color: rgb(var(--hi));
}

/* ───────────────────────── CRT VIEWPORT BOX ───────────────────────── */
.vp {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgb(var(--ph) / .26);
  background:
    linear-gradient(rgb(var(--hi)), rgb(var(--hi))) top left / 16px 2px no-repeat,
    linear-gradient(rgb(var(--hi)), rgb(var(--hi))) top left / 2px 16px no-repeat,
    linear-gradient(rgb(var(--hi)), rgb(var(--hi))) top right / 16px 2px no-repeat,
    linear-gradient(rgb(var(--hi)), rgb(var(--hi))) top right / 2px 16px no-repeat,
    linear-gradient(rgb(var(--hi)), rgb(var(--hi))) bottom left / 16px 2px no-repeat,
    linear-gradient(rgb(var(--hi)), rgb(var(--hi))) bottom left / 2px 16px no-repeat,
    linear-gradient(rgb(var(--hi)), rgb(var(--hi))) bottom right / 16px 2px no-repeat,
    linear-gradient(rgb(var(--hi)), rgb(var(--hi))) bottom right / 2px 16px no-repeat,
    radial-gradient(90% 80% at 50% 50%, rgb(var(--deep) / .3), transparent 76%);
}
.vp > canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: ew-resize;
  touch-action: none;
}
.vp-c {
  position: absolute;
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .09em;
  text-transform: uppercase;
  pointer-events: none;
  text-shadow: var(--glow);
  z-index: 2;
}
.vp-c.tl { top: 0; left: 0; color: rgb(var(--ph)); }
.vp-c.tr { top: 0; right: 0; color: rgb(var(--hi)); }
.vp-c.bl { bottom: 0; left: 0; opacity: .68; }
.vp-c.br { bottom: 0; right: 0; opacity: .78; }

/* ───────────────────────── VIEW 2: DOSSIER (WHAT WE BUILD) ───────────────────────── */
.vp-files { height: 100%; }
.files-inner {
  position: absolute;
  inset: 38px 18px 18px;
  display: grid;
  grid-template-columns: minmax(220px, 34%) minmax(0, 1fr);
  gap: 24px;
  min-height: 0;
}
.files-list {
  list-style: none;
  overflow-y: auto;
  padding-right: 16px;
  border-right: 1px dashed rgb(var(--ph) / .34);
  scrollbar-width: none;
  display: grid;
  align-content: start;
  gap: 6px;
}
.files-list::-webkit-scrollbar, .files-read::-webkit-scrollbar { display: none; }
.files-list button {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  padding: 10px 12px;
  text-align: left;
  border: 1px solid rgb(var(--ph) / .18);
  transition: border-color .15s, background .15s;
}
.files-list button:hover {
  border-color: rgb(var(--ph) / .6);
  background: rgb(var(--ph) / .06);
}
.files-list button.on {
  border-color: rgb(var(--hi));
  background: rgb(var(--ph) / .14);
  box-shadow: inset 3px 0 0 rgb(var(--hi)), 0 0 14px rgb(var(--ph) / .2);
}
.files-list .fid {
  font-family: var(--mono);
  font-size: 12px;
  color: rgb(var(--ph));
}
.files-list .ftt {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--cream);
}
.files-list .fst {
  grid-column: 2;
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0;
  color: var(--soft);
}

.files-read {
  overflow-y: auto;
  scrollbar-width: none;
  padding: 4px 12px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.doc-kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: rgb(var(--ph));
  text-shadow: var(--glow);
}
.doc-title {
  font-family: var(--sans);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--cream);
  line-height: 1.15;
}
.doc-grid {
  display: grid;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid rgb(var(--ph) / .3);
  border-bottom: 1px solid rgb(var(--ph) / .3);
}
.doc-block h3 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: rgb(var(--ph));
  margin-bottom: 4px;
  font-weight: 400;
}
.doc-block p {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0;
  color: var(--cream);
  max-width: 60ch;
}
.doc-cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .09em;
  color: var(--ink);
  background: rgb(var(--hi));
  border: 1px solid rgb(var(--hi));
  box-shadow: 0 0 16px rgb(var(--ph) / .45);
  transition: background .15s;
}
.doc-cta:hover { background: #fff4e6; }

/* ───────────────────────── VIEW 3: CONTACT + CALLING CARD ───────────────────────── */
.view-contact {
  display: grid;
  grid-template-columns: minmax(320px, .95fr) minmax(0, 1.15fr);
  gap: clamp(16px, 2.4vw, 34px);
  align-items: stretch;
}
.contact-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding: 6px 4px;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.mini-btn {
  padding: 9px 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: rgb(var(--hi));
  border: 1px solid rgb(var(--ph) / .55);
  background: rgb(var(--deep) / .35);
  transition: background .15s, border-color .15s, color .15s;
}
.mini-btn:hover {
  background: rgb(var(--ph));
  color: var(--ink);
  border-color: rgb(var(--hi));
}

.vp-card {
  display: grid;
  place-items: center;
  padding: 40px 22px 22px;
}
.card-preview-wrap {
  width: 100%;
  max-width: 620px;
  display: grid;
  place-items: center;
}
#cardCanvas {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid rgb(var(--ph) / .55);
  box-shadow: 0 0 32px rgb(var(--ph) / .28);
}

/* ───────────────────────── FOOTER / COMMAND PROMPT ───────────────────────── */
.ftr {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgb(var(--ph) / .4);
  text-shadow: var(--glow);
}
.cmd {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-family: var(--term);
  font-size: 22px;
  letter-spacing: .06em;
}
.cmd label { color: rgb(var(--ph)); flex-shrink: 0; }
.cmd input {
  flex: 1;
  min-width: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
  color: rgb(var(--hi));
  text-shadow: inherit;
  background: transparent;
  border: 0;
  outline: 0;
  caret-color: rgb(var(--hi));
}
.cmd input::placeholder { color: rgb(var(--ph) / .42); text-shadow: none; }
.cmd-reply {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: rgb(var(--hi));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 38%;
}
.ftr-r {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  white-space: nowrap;
  text-transform: uppercase;
}
.ftr-r button, .ftr-link {
  padding: 2px 7px;
  border: 1px solid rgb(var(--ph) / .35);
  transition: border-color .15s, background .15s;
}
.ftr-r button:hover, .ftr-link:hover {
  border-color: rgb(var(--hi));
  background: rgb(var(--ph) / .12);
}
.ftr-r button b { color: rgb(var(--ph)); }
.ftr-r button[aria-pressed='true'] b { color: rgb(var(--hi)); }
.ftr-link { opacity: .68; }
.ftr-link:hover { opacity: 1; }
.clock { min-width: 8ch; text-align: right; font-variant-numeric: tabular-nums; opacity: .82; }

/* ───────────────────────── CRT GLASS FX ───────────────────────── */
.fx { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; }
.fx-scan {
  z-index: 5;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgb(0 0 0 / .2) 2px 3px);
}
.fx-roll {
  z-index: 6;
  top: -24%;
  bottom: auto;
  height: 24%;
  border-radius: 0;
  background: linear-gradient(to bottom, transparent, rgb(var(--ph) / .038) 55%, rgb(var(--hi) / .018) 70%, transparent);
  animation: roll 10s linear infinite;
}
.fx-grain { z-index: 7; width: 100%; height: 100%; opacity: .05; mix-blend-mode: screen; }
.fx-vig {
  z-index: 8;
  background: radial-gradient(ellipse 84% 78% at 50% 48%, transparent 60%, rgb(0 0 0 / .48) 100%);
  box-shadow: inset 0 0 85px rgb(0 0 0 / .72);
}

@keyframes roll { to { transform: translateY(520%); } }
@keyframes jit { 0% { transform: translate(-2px, 1px) skewX(-5deg); } 100% { transform: translate(2px, -1px) skewX(4deg); } }

/* ───────────────────────── RESPONSIVE (TABLET & MOBILE) ───────────────────────── */
@media (max-width: 920px) {
  html, body { height: auto; overflow-y: auto; }
  .crt {
    position: relative;
    inset: auto;
    margin: 10px;
    min-height: calc(100svh - 20px);
    overflow: visible;
  }
  .screen {
    position: relative;
    inset: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .hdr {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 8px;
  }
  .hdr-l, .hdr-r { align-items: center; justify-self: center; }
  .status-txt { display: none; }
  .modes { margin-left: 0; width: 100%; }
  .modes button { flex: 1; text-align: center; }
  .view-overview, .view-contact {
    grid-template-columns: 1fr;
  }
  .vp { min-height: 280px; }
  .vp-files { min-height: 520px; }
  .files-inner {
    position: relative;
    inset: auto;
    padding: 36px 14px 16px;
    grid-template-columns: 1fr;
  }
  .files-list {
    border-right: 0;
    border-bottom: 1px dashed rgb(var(--ph) / .34);
    padding-right: 0;
    padding-bottom: 12px;
  }
  .ftr { flex-wrap: wrap; gap: 10px; }
  .cmd { width: 100%; }
  .cmd-reply { display: none; }
  .ftr-r { width: 100%; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  .fx-roll { display: none; }
}
