/* Byterooms. One stylesheet for the landing page and the plain text pages. */
:root {
  --bg: #0e1419;
  --bg-deep: #080c10;
  --surface: #18212b;
  --surface-2: #223041;
  --line: #2c3947;
  --fg: #f1f5f9;
  --muted: #9aa8b8;
  --green: #4ade80;
  --green-ink: #06210f;
  --mint: #c9f5dc;
  --red: #ff5d5d;
  --amber: #ff9a1f;
  --blue: #4da3ff;
  --radius: 22px;
  --display: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--display); font-weight: 900; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { width: min(1120px, 100% - 40px); margin: 0 auto; }
.muted { color: var(--muted); }
.green { color: var(--green); }
.eyebrow { font: 800 12.5px/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--green); }

/* Buttons: chunky, with a ledge you press down. */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 900 17px/1 var(--display); text-decoration: none;
  padding: 16px 24px; border-radius: 16px; border: 0; cursor: pointer;
  background: var(--green); color: var(--green-ink);
  box-shadow: 0 5px 0 #1f8f4a; transform: translateY(0);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 0 #1f8f4a; }
.btn:active { transform: translateY(5px); box-shadow: 0 0 0 #1f8f4a; }
.btn.ghost { background: var(--surface); color: var(--fg); box-shadow: 0 5px 0 #0a0f14, inset 0 0 0 2px var(--line); }
.btn.ghost:active { box-shadow: 0 0 0 #0a0f14, inset 0 0 0 2px var(--line); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

/* Top bar */
.nav { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); background: rgba(14, 20, 25, 0.72); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.nav.stuck { border-color: var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font: 900 21px/1 var(--display); text-decoration: none; }
.brand .door { width: 30px; height: 30px; }
.nav nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav nav a { text-decoration: none; font-weight: 600; color: var(--muted); font-size: 15.5px; }
.nav nav a:hover { color: var(--fg); }
.nav .btn { padding: 11px 16px; font-size: 15px; box-shadow: 0 4px 0 #1f8f4a; color: var(--green-ink); }

/* Hero: the pager goes off */
.hero { position: relative; padding: 64px 0 0; }
.hero .wrap { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: center; }
.status {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px;
  font: 700 13.5px/1 var(--mono); background: var(--surface); border: 2px solid var(--line); color: var(--muted);
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.status i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
.alarm .status { background: rgba(255, 93, 93, 0.12); border-color: var(--red); color: #ffc9c9; }
.alarm .status i { background: var(--red); animation: ping 1.1s infinite; }
.fixed .status { background: rgba(74, 222, 128, 0.12); border-color: var(--green); color: var(--mint); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 93, 93, 0.7); } 100% { box-shadow: 0 0 0 12px rgba(255, 93, 93, 0); } }
.hero h1 { font-size: clamp(36px, 4.6vw, 58px); margin: 22px 0 18px; }
.hero h1 .green { display: inline-block; }
.hero .lede { font-size: 20px; color: var(--muted); max-width: 30em; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero .fine { margin-top: 16px; font-size: 14.5px; color: var(--muted); }

/* The phone that plays one incident decision */
.phone {
  position: relative; width: min(370px, 100%); margin: 0 auto; border-radius: 42px; padding: 12px;
  background: linear-gradient(160deg, #2a3644, #151c24); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px #364556;
}
.alarm .phone { animation: buzz 0.5s 2; }
@keyframes buzz { 0%, 100% { transform: translateX(0) rotate(0); } 20% { transform: translateX(-5px) rotate(-1deg); } 40% { transform: translateX(5px) rotate(1deg); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.screen { position: relative; border-radius: 32px; background: var(--bg-deep); overflow: hidden; min-height: 560px; padding: 20px 18px 18px; display: flex; flex-direction: column; }
.screen::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 60% at 50% 0%, rgba(74, 222, 128, 0.10), transparent 60%); pointer-events: none; transition: background 0.4s; }
.alarm .screen::before { background: radial-gradient(120% 60% at 50% 0%, rgba(255, 93, 93, 0.22), transparent 60%); }
.calm, .incident, .verdict { position: relative; }
.calm { margin: auto 0; text-align: center; }
.calm .clock { font: 900 64px/1 var(--display); }
.calm p { color: var(--muted); margin-top: 8px; }
.alarm .calm, .fixed .calm, .calm[hidden] { display: none; }
.incident { display: none; }
.alarm .incident, .fixed .incident { display: block; animation: rise 0.45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.sev { display: inline-block; font: 900 12px/1 var(--display); letter-spacing: 0.1em; padding: 6px 9px; border-radius: 8px; background: var(--red); color: #2a0606; }
.fixed .sev { background: var(--green); color: var(--green-ink); }
.incident h3 { font-size: 23px; margin: 12px 0 14px; }
.meter { display: flex; justify-content: space-between; font: 700 13px/1 var(--mono); color: var(--muted); margin-bottom: 7px; }
.bar { height: 12px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.bar b { display: block; height: 100%; width: 61%; border-radius: 8px; background: var(--red); transition: width 0.9s cubic-bezier(0.2, 0.9, 0.2, 1), background 0.5s; }
.log { margin: 14px 0; padding: 11px 12px; border-radius: 12px; background: #0b1117; border: 1px solid var(--line); font: 500 12.5px/1.5 var(--mono); color: #b8c6d6; }
.log em { color: var(--red); font-style: normal; }
.ask { font: 800 16px/1.3 var(--display); margin-bottom: 10px; }
.choice {
  display: flex; gap: 10px; width: 100%; text-align: left; align-items: center; margin-bottom: 8px; padding: 12px 13px;
  border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--fg); font: 600 15px/1.3 var(--body); cursor: pointer;
  transition: transform 0.08s, border-color 0.15s, background 0.15s;
}
.choice:hover:not(:disabled) { border-color: var(--green); transform: translateY(-1px); }
.choice .key { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); font: 800 13px/1 var(--display); }
.choice:disabled { cursor: default; opacity: 0.55; }
.choice.picked { opacity: 1; }
.choice.best { border-color: var(--green); background: rgba(74, 222, 128, 0.12); }
.choice.poor { border-color: var(--amber); background: rgba(255, 154, 31, 0.10); }
.choice.bad { border-color: var(--red); background: rgba(255, 93, 93, 0.10); }
.verdict { margin-top: 6px; padding: 12px 13px; border-radius: 14px; background: var(--surface); font-size: 14.5px; color: #d5deea; animation: rise 0.35s ease both; }
.verdict strong { font-family: var(--display); font-weight: 900; }
.verdict button { margin-top: 8px; background: none; border: 0; color: var(--green); font: 800 14px/1 var(--display); cursor: pointer; padding: 4px 0; }

/* Nully peeks over the bottom of the hero and talks */
.peek { position: relative; height: 150px; margin-top: 40px; overflow: hidden; }
.ledge { position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: var(--bg-deep); border-top: 2px solid var(--line); }
.peek .nully { position: absolute; bottom: 44px; left: max(20px, calc(50% - 520px)); width: 120px; transform: translateY(70px); transition: transform 0.6s cubic-bezier(0.2, 1.4, 0.4, 1); }
.alarm .peek .nully, .fixed .peek .nully { transform: translateY(0); }
.bubble {
  position: absolute; bottom: 74px; left: calc(max(20px, calc(50% - 520px)) + 136px); max-width: min(360px, calc(100% - 180px));
  padding: 12px 16px; border-radius: 18px 18px 18px 4px; background: var(--surface); border: 2px solid var(--line); font: 700 16px/1.35 var(--display);
  opacity: 0; transform: translateY(8px) scale(0.96); transform-origin: left bottom; transition: opacity 0.3s 0.35s, transform 0.3s 0.35s;
}
.alarm .bubble, .fixed .bubble { opacity: 1; transform: none; }

/* Sections */
section { padding: 96px 0; }
.head { max-width: 40em; margin-bottom: 44px; }
.head h2 { font-size: clamp(32px, 4.4vw, 52px); margin: 14px 0 14px; }
.head p { color: var(--muted); font-size: 19px; }

/* The corridor of rooms */
.corridor { background: var(--bg-deep); border-block: 1px solid var(--line); }
.rooms { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.room {
  position: relative; grid-column: span 2; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--line);
  overflow: hidden; min-height: 330px; display: flex; flex-direction: column;
  transition: opacity 0.6s, filter 0.6s, transform 0.6s, border-color 0.6s;
}
/* Rooms start dim only when the script that lights them is running. */
.js .room:not(.lit) { opacity: 0.5; filter: saturate(0.4); transform: translateY(18px); }
.room.wide { grid-column: span 3; }
.room.lit { border-color: #3a4a5c; }
.room .no { font: 700 12.5px/1 var(--mono); color: var(--muted); }
.room h3 { font-size: 25px; margin: 10px 0 8px; }
.room p { color: var(--muted); font-size: 16px; }
.room .demo { margin-top: auto; padding-top: 20px; }
.lamp { position: absolute; top: 20px; right: 20px; width: 12px; height: 12px; border-radius: 50%; background: var(--line); transition: background 0.4s 0.3s, box-shadow 0.4s 0.3s; }
.room.lit .lamp { background: var(--green); box-shadow: 0 0 18px 4px rgba(74, 222, 128, 0.55); }

/* Room demos */
.caption { font: 900 21px/1.3 var(--display); }
.caption span { color: #4b5a6b; transition: color 0.25s; }
.caption span.on { color: var(--fg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chips i { font: 700 13px/1 var(--mono); font-style: normal; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); color: #b8c6d6; }
.load { display: grid; gap: 10px; }
.load div { display: grid; grid-template-columns: 96px 1fr 62px; align-items: center; gap: 10px; font: 600 13px/1 var(--mono); color: var(--muted); }
.load u { height: 14px; border-radius: 7px; background: var(--surface-2); overflow: hidden; text-decoration: none; }
.load u b { display: block; height: 100%; width: 0; border-radius: 7px; background: var(--green); transition: width 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s; }
.load .hot b { background: var(--red); }
.room.lit .load .a b { width: 46%; }
.room.lit .load .b b { width: 100%; }
.room.lit .load .c b { width: 62%; }
.pager { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: #0b1117; border: 1px solid var(--line); }
.pager .bell { width: 44px; height: 44px; border-radius: 13px; background: rgba(255, 93, 93, 0.16); display: grid; place-items: center; font-size: 22px; }
.room.lit .pager .bell { animation: ring 1.2s 0.5s 3; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(-16deg); } 30% { transform: rotate(14deg); } 45% { transform: rotate(-10deg); } 60% { transform: rotate(8deg); } }
.pager b { display: block; font: 900 16px/1.2 var(--display); }
.pager small { color: var(--muted); font: 500 12.5px/1.4 var(--mono); }
.race { display: grid; gap: 12px; }
.race div { display: grid; grid-template-columns: 74px 1fr 34px; gap: 10px; align-items: center; font: 800 14px/1 var(--display); }
.race u { height: 16px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.race u b { display: block; height: 100%; width: 0; border-radius: 8px; transition: width 2.6s cubic-bezier(0.3, 0.7, 0.2, 1) 0.4s; }
.race .you b { background: var(--green); }
.race .them b { background: var(--blue); transition-duration: 3s; }
.room.lit .race .you b { width: 100%; }
.room.lit .race .them b { width: 78%; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.week i { aspect-ratio: 1; border-radius: 11px; background: var(--surface-2); display: grid; place-items: center; font: 800 12px/1 var(--display); font-style: normal; color: var(--muted); transition: background 0.3s, color 0.3s, transform 0.3s; }
.room.lit .week i.done { background: var(--green); color: var(--green-ink); transform: scale(1.04); }
.room.lit .week i:nth-child(1) { transition-delay: 0.3s; } .room.lit .week i:nth-child(2) { transition-delay: 0.5s; }
.room.lit .week i:nth-child(3) { transition-delay: 0.7s; } .room.lit .week i:nth-child(4) { transition-delay: 0.9s; }
.room.lit .week i:nth-child(5) { transition-delay: 1.1s; }

/* Tracks */
.tracks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.track { padding: 22px; border-radius: var(--radius); border: 2px solid var(--line); background: linear-gradient(180deg, var(--surface), var(--bg)); }
.track .n { font: 900 54px/1 var(--display); color: var(--green); }
.track h3 { font-size: 20px; margin: 8px 0 6px; }
.track p { color: var(--muted); font-size: 15px; }

/* Meet Nully */
.meet .wrap { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: center; }
.meet .nully { width: 100%; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.5)); animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-12px); } }
.meet h2 { font-size: clamp(30px, 4vw, 46px); margin: 14px 0; }
.meet p { color: var(--muted); font-size: 19px; max-width: 32em; }
.meet p + p { margin-top: 14px; }

/* The company */
.company { background: var(--bg-deep); border-block: 1px solid var(--line); }
.doors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.door-card { padding: 26px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--surface); display: flex; gap: 20px; align-items: flex-start; }
.door-card img, .door-card .blank { flex: none; width: 76px; height: 76px; border-radius: 18px; }
.door-card .blank { border: 2px dashed var(--line); display: grid; place-items: center; font: 900 30px/1 var(--display); color: var(--line); }
.door-card h3 { font-size: 23px; }
.door-card p { color: var(--muted); margin-top: 6px; font-size: 16px; }
.tag { display: inline-block; margin-top: 12px; font: 800 12px/1 var(--display); letter-spacing: 0.06em; padding: 7px 10px; border-radius: 9px; background: rgba(74, 222, 128, 0.14); color: var(--green); }
.tag.soon { background: var(--surface-2); color: var(--muted); }

/* Final call */
.join { text-align: center; }
.join h2 { font-size: clamp(34px, 5vw, 60px); max-width: 16em; margin: 0 auto 16px; }
.join p { color: var(--muted); font-size: 19px; max-width: 32em; margin: 0 auto 30px; }

footer { border-top: 1px solid var(--line); padding: 34px 0 44px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; }
footer a { text-decoration: none; }
footer a:hover { color: var(--fg); }
footer .brand { font-size: 18px; color: var(--fg); margin-right: auto; }

/* Plain text pages (privacy, delete account) */
.doc { width: min(720px, 100% - 40px); margin: 0 auto; padding: 48px 0 80px; }
.doc h1 { font-size: 38px; margin-bottom: 18px; }
.doc h2 { font-size: 24px; margin: 40px 0 10px; }
.doc h3 { font-size: 19px; margin: 26px 0 8px; }
.doc p, .doc li { color: #d5deea; }
.doc p { margin: 10px 0; }
.doc a { color: var(--green); }
/* Buttons inside a document keep their own text colour, not the link colour. */
.doc a.btn { color: var(--green-ink); }
.doc a.btn.ghost { color: var(--fg); }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 12px 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.doc .scroll { overflow-x: auto; }
.doc ol li, .doc ul li { margin: 6px 0; }

@media (max-width: 900px) {
  .hero .wrap, .meet .wrap { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  .meet .nully { width: 190px; margin: 0 auto; }
  .rooms { grid-template-columns: 1fr; }
  .room, .room.wide { grid-column: auto; min-height: 0; }
  .tracks { grid-template-columns: repeat(2, 1fr); }
  .doors { grid-template-columns: 1fr; }
  .nav nav a:not(.btn) { display: none; }
  section { padding: 68px 0; }
  .bubble { font-size: 14.5px; }
}
@media (max-width: 480px) {
  .door-card { flex-direction: column; }
  .peek .nully { width: 92px; }
  .bubble { left: 124px; max-width: calc(100% - 140px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .room:not(.lit) { opacity: 1; filter: none; transform: none; }
}

/* The app's name, above the headline, so nobody wonders whose page this is */
.applock { display: flex; align-items: center; gap: 14px; }
.applock img { border-radius: 13px; box-shadow: 0 0 0 1px var(--line); }
.applock strong { display: block; font: 900 26px/1.1 var(--display); }
.applock span { color: var(--muted); font-size: 15px; }
.gloss { margin-top: 12px; font-size: 15.5px; color: var(--muted); padding-left: 12px; border-left: 3px solid var(--line); max-width: 34em; }
.try { text-align: center; font: 800 15px/1 var(--display); color: var(--green); margin-bottom: 14px; }
.fixed .peek .nully, .alarm .peek .nully { transform: translateY(0); }

/* Real screens from the app */
.shots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 44px; }
.shots figure { margin: 0; border-radius: 26px; overflow: hidden; border: 2px solid var(--line); background: var(--bg); }
.shots img { width: 100%; height: auto; }
.shots-note { margin-top: 14px; color: var(--muted); font-size: 14.5px; text-align: center; }
.join-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 20px; }
.join .fine { font-size: 15px; margin: 0 auto; }
footer .made { color: var(--fg); }
@media (max-width: 900px) {
  .shots { grid-template-columns: repeat(5, 62%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .shots figure { scroll-snap-align: center; }
}
