/* =========================================================
   O-Buddy download site — design tokens & layout
   Palette pulled from the brief's exact gradient colours,
   extended with an ink/paper pair for text and surfaces.
   Signature element: "signage tiles" — square digit tiles
   modelled on the SOET room-code diagram (Building/Floor/Room)
   — reused as step markers and as the room-code decoder.
========================================================= */

:root {
  --color-1: rgb(33 116 146);
  --color-2: rgb(126 189 75);
  --color-3: rgb(91 161 101);
  --color-4: rgb(110 174 87);
  --color-5: rgb(48 127 134);

  --brand-purple: #4a1e96;

  --ink: #0e2430;
  --ink-soft: #48626b;
  --paper: #FEFBEE;
  --card: #ffffff;
  --line: rgba(14, 36, 48, 0.12);

  --display: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --body: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 12px 30px -14px rgba(14, 36, 48, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
}

#root { min-height: 100vh; }

img { max-width: 100%; display: block; }

button { font-family: inherit; }

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Top bar ---------- */
.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(254, 251, 238, 0.9);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar__inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  cursor: pointer;
  color: var(--brand-purple);
}
.brand--small { font-size: 0.95rem; opacity: 1; }
.brand__mark {
  color: var(--brand-purple);
  letter-spacing: 0.04em;
}
.linkbtn {
  background: none;
  border: none;
  color: var(--color-1);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 6px 0;
}
.linkbtn:hover { text-decoration: underline; }

/* ---------- Progress rail ---------- */
.rail-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 20px 0;
  width: 100%;
}
.rail {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.rail__stop {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.rail__label {
  font-size: 0.82rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.rail__stop--active .rail__label { color: var(--ink); font-weight: 700; }
.rail__connector {
  height: 2px;
  width: 28px;
  background: var(--line);
  flex-shrink: 0;
}

/* Signage tile — signature element */
.tile {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  flex-shrink: 0;
}
.tile--active { background: var(--color-1); border-color: var(--color-1); color: #fff; }
.tile--done { background: var(--color-3); border-color: var(--color-3); color: #fff; }
.tile--muted { color: var(--ink-soft); }
.tile--b1 { background: #eef2f4; border-color: var(--color-1); color: var(--color-1); }
.tile--b2 { background: #eef6ea; border-color: var(--color-2); color: #4c7a2a; }
.tile--b3 { background: #eaf4ee; border-color: var(--color-5); color: var(--color-5); }

/* ---------- Cover (start) page ---------- */
.cover {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 20px 80px;
  background: var(--paper);
}
.cover__content {
  max-width: 620px;
  text-align: center;
}
.cover__brand {
  font-family: var(--display);
  font-weight: 800;
  color: var(--brand-purple);
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  letter-spacing: 0.02em;
  margin: 0 0 18px;
}
.cover__title {
  font-family: var(--display);
  font-weight: 800;
  color: var(--ink);
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  line-height: 1.35;
  margin: 0 0 22px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.cover__sub {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 auto 36px;
  max-width: 520px;
}
.cover__start {
  font-size: 1.05rem;
  padding: 14px 34px;
}

/* ---------- Generic page ---------- */
.page {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  width: 100%;
  flex: 1;
}
.page--center { text-align: left; }
.page__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}
.page__head h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  margin: 0 0 2px;
}
.muted { color: var(--ink-soft); margin: 0; }
.muted.small { font-size: 0.85rem; }
.mono { font-family: var(--mono); }

/* ---------- Wizard ---------- */
.wizard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.wizard__progress {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.wizard__bar {
  height: 6px;
  border-radius: 4px;
  background: var(--line);
  margin-top: 8px;
  overflow: hidden;
}
.wizard__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-1), var(--color-3));
  transition: width 0.25s ease;
}
.wizard__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  margin: 14px 0 16px;
}
.wizard__images {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}
.wizard__img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  max-height: 480px;
  width: auto;
}
.wizard__caption {
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 0 20px;
}
.wizard__nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  background: var(--color-1);
  color: #fff;
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn--disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* ---------- Panels ---------- */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.panel__title { font-family: var(--display); font-weight: 800; margin: 0 0 14px; font-size: 1.1rem; }
.panel__subtitle { font-family: var(--display); font-weight: 800; margin: 22px 0 10px; font-size: 1rem; }
.panel__img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin: 10px 0 4px;
}

.code-demo { text-align: center; margin-bottom: 20px; }
.code-demo__tiles { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; }
.code-demo__tiles .tile { width: 42px; height: 42px; font-size: 1.2rem; }
.code-demo__keys {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot--b1 { background: var(--color-1); }
.dot--b2 { background: var(--color-2); }
.dot--b3 { background: var(--color-5); }

.legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.legend-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
}
.legend-chip__swatch {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 2px solid;
  flex-shrink: 0;
}

/* ---------- Decoder ---------- */
.decoder { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.decoder__input {
  font-family: var(--mono);
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--line);
  width: 140px;
}
.decoder__input:focus { outline: none; border-color: var(--color-1); }
.decoder__result {
  font-size: 0.95rem;
  background: var(--paper);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
}

/* ---------- Floor locator ---------- */
.floor-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.floor-tab {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--ink-soft);
}
.floor-tab--active { background: var(--color-1); color: #fff; border-color: var(--color-1); }

.directory { display: flex; flex-direction: column; gap: 2px; }
.directory__row {
  display: flex;
  justify-content: space-between;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.directory__row:last-child { border-bottom: none; }

.block-legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.block-legend {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.block-legend__head { font-weight: 800; font-size: 0.85rem; color: var(--color-1); margin-bottom: 4px; }
.block-legend__body { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.5; }

/* ---------- Notices ---------- */
.notice {
  background: #fff4e5;
  border: 1px solid #f0cf9a;
  color: #7a5310;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.notice .linkbtn { color: #7a5310; text-decoration: underline; }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-soft);
  padding: 24px 20px 32px;
}

.cover-logos{display:flex;justify-content:center;margin-bottom:12px}
.adamas-logo{width:170px;height:auto}
.title-row{display:flex;align-items:center;justify-content:center;gap:12px}
.obuddy-logo{width:54px;height:54px}
