/* =========================================================
   Interstatus Lab: cyberpunk laboratory, FF7R-style HUD
   Dark only. Cut corners (always outlined), thin lines,
   slanted buttons, glow on hover.
   ========================================================= */

/* ---------- Fonts (self-hosted, no outside requests) ---------- */
@font-face { font-family: "Rajdhani"; font-weight: 600; font-display: swap; src: url("/assets/fonts/rajdhani-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Rajdhani"; font-weight: 700; font-display: swap; src: url("/assets/fonts/rajdhani-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

/* ---------- Colors and type (change the look here) ---------- */
:root {
  --void: #070a10;        /* page background */
  --panel: #0c1320;       /* panel bottom */
  --panel-hi: #122036;    /* panel top */
  --line: #203453;        /* thin lines */
  --line-hot: #2e4d75;    /* brighter lines */
  --ink: #e8eef8;         /* main text */
  --dim: #8d9bb6;         /* soft text */
  --green: #5cff9d;       /* main accent (Bio Green) */
  --violet: #a98bff;      /* second accent */
  --teal: #48e0d2;        /* HUD tint */

  --f-display: "Rajdhani", "Segoe UI", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --cut: 18px;            /* size of the cut corners */
  color-scheme: dark;
}

/* ---------- Basics ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font: 400 16px/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
/* lab grid + soft glow behind everything */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 80% 0%, #5cff9d14, transparent 70%),
    radial-gradient(ellipse 60% 50% at 0% 40%, #a98bff12, transparent 70%),
    linear-gradient(var(--void), var(--void));
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(#20345333 1px, transparent 1px),
    linear-gradient(90deg, #20345333 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(#000, transparent 85%);
}
img { max-width: 100%; display: block; }
a { color: var(--green); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: .01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.wrap {
  max-width: 1080px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--green); color: var(--void); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

/* small all-caps label */
.tag {
  font: 500 12px/1 var(--f-mono);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--teal);
}
.lede { color: var(--dim); font-size: 18px; max-width: 58ch; }
.small { color: var(--dim); font-size: 14px; }

/* ---------- Frame: a panel with cut corners that keep their outline ---------- */
.frame {
  --edge: var(--line-hot);
  position: relative;
  border: 1px solid var(--edge);
  background:
    /* the two diagonal lines in the cut corners */
    linear-gradient(to bottom left, transparent 50%, var(--edge) 50%, var(--edge) calc(50% + 1.2px), transparent calc(50% + 1.2px)) top right / var(--cut) var(--cut) no-repeat border-box,
    linear-gradient(to top right, transparent 50%, var(--edge) 50%, var(--edge) calc(50% + 1.2px), transparent calc(50% + 1.2px)) bottom left / var(--cut) var(--cut) no-repeat border-box,
    linear-gradient(160deg, #13223acc, #0b1220e6);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  backdrop-filter: blur(8px);
  padding: 22px 24px;
}

/* ---------- Buttons: slanted, glowing ---------- */
.btn {
  --slant: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 15px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  color: var(--void); background: var(--green);
  border: 0; padding: 14px 32px;
  clip-path: polygon(var(--slant) 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%);
  transition: filter .15s, transform .1s, box-shadow .15s;
}
.btn:hover { filter: brightness(1.12) drop-shadow(0 0 10px #5cff9d99); }
.btn:active { transform: scale(.97); }
/* outline button keeps its open corners (on purpose) */
.btn-ghost { background: transparent; color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.btn-ghost:hover { background: #5cff9d14; }
.btn-small { padding: 10px 22px; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* status pill */
.pill {
  font: 500 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--green); border: 1px solid currentColor; border-radius: 5px; padding: 6px 10px;
  background: #5cff9d10;
}
.pill-violet { color: var(--violet); background: #a98bff12; }

/* ATB-style gauge bar */
.gauge {
  display: block; height: 6px; transform: skewX(-24deg);
  background: #ffffff0d; border: 1px solid var(--line-hot); overflow: hidden;
}
.gauge > span {
  display: block; height: 100%; width: var(--fill, 50%);
  background: linear-gradient(90deg, var(--teal), var(--green));
  box-shadow: 0 0 12px var(--green);
}

.fill-64 { --fill: 64%; } .fill-70 { --fill: 70%; } .fill-100 { --fill: 100%; }

/* readout list (label · value rows) */
.readout { margin: 0; display: flex; flex-direction: column; }
.readout > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.readout > div:last-child { border-bottom: 0; }
.readout dt { font: 500 12px/1.6 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.readout dd { margin: 0; text-align: right; font-weight: 500; }
.readout .num { font-family: var(--f-display); font-size: 20px; line-height: 1.1; color: var(--green); }
.readout .ok { color: var(--green); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: #070a10cc; backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar-inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px max(20px, env(safe-area-inset-right, 0px)) 12px max(20px, env(safe-area-inset-left, 0px)); }
.brand-logo { height: 32px; width: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-name { font: 700 22px/1 var(--f-display); letter-spacing: .04em; }
.brand-lab { font: 500 11px/1 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--void); background: var(--green); padding: 5px 9px 5px 11px; clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.nav { display: flex; gap: 4px; }
.nav a {
  font: 600 15px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase;
  color: var(--dim); text-decoration: none; padding: 10px 14px;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--ink); background: linear-gradient(90deg, #5cff9d22, #5cff9d08); }

/* ---------- Hero ---------- */
.hero { padding-block: 72px 56px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 20px; }
.hero h1 { font-size: clamp(44px, 7vw, 76px); }
.hero-shots { position: relative; height: 440px; }
.hero-shots .frame { position: absolute; padding: 8px; width: 62%; }
.hero-shots img { width: 100%; height: auto; }
.shot-a { left: 0; top: 0; --edge: #a98bff99; }
.shot-b { right: 0; bottom: 0; width: 52% !important; --edge: #5cff9d99; box-shadow: 0 20px 50px #000a; }

/* "Now Labbing" recording dot */
.tag-live { display: inline-flex; align-items: center; gap: 10px; }
.rec { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: blink 1.6s steps(2, start) infinite; }
@keyframes blink { to { opacity: .2; } }

/* training-mode input display */
.inputs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.key {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  font: 600 16px/1 var(--f-body); color: var(--ink);
  border: 1px solid var(--line-hot); border-radius: 6px; background: #ffffff08;
}
.key-p { color: var(--void); background: var(--violet); border-color: var(--violet); font-family: var(--f-display); font-weight: 700; box-shadow: 0 0 12px #a98bff66; }
.inputs-label { margin-left: 8px; font: 500 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }

/* ---------- Sections ---------- */
.section { padding-block: 64px; }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.section h2 { font-size: clamp(34px, 5vw, 48px); display: flex; align-items: center; gap: 18px; }
.section-head h2::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-hot), transparent); }

/* ---------- App cards ---------- */
.app-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.app-card {
  --cut: 26px;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 12px; padding: 26px 28px;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
/* light sweep on hover */
.app-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, #5cff9d1f 50%, transparent 65%);
  transform: translateX(-120%);
}
.app-card:hover, .app-card:focus-visible { --edge: var(--green); transform: translateY(-4px); box-shadow: inset 0 0 40px #5cff9d1a; }
.app-card:hover::after, .app-card:focus-visible::after { transform: translateX(120%); transition: transform .7s ease; }
.app-card:focus-visible { outline: none; }
.app-top { display: flex; justify-content: space-between; align-items: flex-start; }
/* looks like a phone home-screen icon */
.app-icon { width: 44px; height: 44px; object-fit: cover; border-radius: 22.5%; box-shadow: 0 0 0 1px #ffffff1a, 0 4px 12px #0008; }
.app-type { font: 500 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); margin-top: 6px; }
.app-name { font: 700 34px/1 var(--f-display); }
.app-line { color: var(--dim); }
.app-card .gauge { margin-top: 6px; }
.app-more { font: 700 13px/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--green); }
.app-more::after { content: " ›"; }

/* ---------- Popup ---------- */
.modal {
  border: 0; padding: 16px; background: transparent; color: var(--ink);
  width: min(720px, 100%); max-width: 100%; max-height: 100%;
}
.modal::backdrop { background: #03050bcc; backdrop-filter: blur(6px); }
.modal[open] { animation: pop .22s ease-out; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.modal-frame {
  --cut: 30px; --edge: var(--green);
  display: flex; flex-direction: column; gap: 16px; padding: 30px 32px;
  background:
    linear-gradient(to bottom left, transparent 50%, var(--edge) 50%, var(--edge) calc(50% + 1.2px), transparent calc(50% + 1.2px)) top right / var(--cut) var(--cut) no-repeat border-box,
    linear-gradient(to top right, transparent 50%, var(--edge) 50%, var(--edge) calc(50% + 1.2px), transparent calc(50% + 1.2px)) bottom left / var(--cut) var(--cut) no-repeat border-box,
    linear-gradient(160deg, #142640, #0a111d);
}
.modal-title { font-size: 44px; }
.modal-text { color: var(--dim); font-size: 17px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font: 500 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); border: 1px solid var(--line-hot); border-radius: 5px; padding: 6px 10px; }
.shots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.shots img { width: 100%; height: 300px; object-fit: contain; object-position: center top; background: #070b14; border: 1px solid var(--line); padding: 6px; }

/* ---------- About ---------- */
.about-grid { display: block; }
.about-copy { display: flex; flex-direction: column; gap: 18px; font-size: 18px; max-width: 60ch; }
.about-copy h2 { margin-bottom: 4px; }

/* ---------- Press kit ---------- */
.press-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.press-grid .frame { display: flex; flex-direction: column; gap: 10px; }
.press-dl { gap: 16px !important; align-items: flex-start; }
.press-dl p:not(.tag) { color: var(--dim); }

/* ---------- Contact ---------- */
.contact { display: flex; flex-direction: column; gap: 20px; max-width: 720px; }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.email { font: 700 clamp(24px, 4vw, 32px)/1 var(--f-display); letter-spacing: .02em; user-select: all; overflow-wrap: anywhere; }
.links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.link-pill {
  display: inline-block; font: 500 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; border: 1px solid var(--line-hot); border-radius: 5px; padding: 9px 14px;
  transition: border-color .15s, color .15s, box-shadow .15s;
}
.link-pill::after { content: " ↗"; color: var(--dim); }
.link-pill:hover { border-color: var(--green); color: var(--green); box-shadow: 0 0 14px #5cff9d33; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 24px calc(24px + env(safe-area-inset-bottom, 0px)); color: var(--dim); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer-links { display: flex; gap: 18px; }
.footer a { color: var(--dim); }
.footer a:hover { color: var(--green); }

/* ---------- Phones ---------- */
@media (max-width: 820px) {
  .hero { padding-block: 44px 32px; }
  .hero-grid, .about-grid, .press-grid { grid-template-columns: 1fr; gap: 28px; }
  .section { padding-block: 44px; }
  .app-grid { grid-template-columns: 1fr; }
  .hero-shots { height: 380px; max-width: 420px; }
}
@media (max-width: 600px) {
  .nav { display: none; }
  .modal { padding: 8px; }
  .modal-frame { padding: 24px 20px; }
  .modal-title { font-size: 36px; }
  .shots img { height: 200px; padding: 4px; }
}

/* ---------- Less motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
