/* Kataru Corp gateway: sign-in, demo selection, admin.
   Built from the logo: heavy black grotesque on white paper, with printer's
   crop marks and the three process inks (cyan, magenta, yellow) used one per demo. */

:root {
  --paper: #ffffff;
  --ink: #000000;
  --ink-2: #3d3d3d;
  --ink-3: #6e6e6e;
  --rule: #dcdcdc;
  --wash: #f4f4f2;
  --cyan: #00a3e0;
  --magenta: #d6006f;
  --yellow: #ffcd00;
  --danger: #b3261e;
  --ok: #1d7a3e;
  --focus: #00a3e0;
  --display: "Archivo Black", "Arial Black", Impact, sans-serif;
  --text: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons and fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: 0 1.25rem;
  font: 600 1rem/1 var(--text);
  color: var(--paper); background: var(--ink);
  border: 2px solid var(--ink); border-radius: 0;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn[disabled] { opacity: .5; cursor: progress; }
.btn--ghost { color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--wash); border-color: var(--ink); }
.btn--small { min-height: 36px; padding: 0 .75rem; font-size: .875rem; }
.btn--danger { background: var(--danger); border-color: var(--danger); }
.btn--block { width: 100%; }

.field { display: grid; gap: .375rem; margin: 0 0 1rem; }
.field label { font-weight: 600; font-size: .9375rem; }
.field .hint { color: var(--ink-3); font-size: .8125rem; }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: .625rem .875rem;
  font: 1rem var(--text); color: var(--ink);
  background: var(--paper); border: 1.5px solid #9a9a9a; border-radius: 0;
}
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0, 163, 224, .35); }
.check { display: flex; align-items: center; gap: .625rem; margin: .5rem 0; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); }

.notice { padding: .75rem 1rem; margin: 0 0 1rem; border-left: 4px solid var(--ink); background: var(--wash); font-size: .9375rem; }
.notice--error { border-color: var(--danger); background: #fbeceb; color: #5e1410; }
.notice--ok { border-color: var(--ok); background: #e9f5ee; color: #0f3d20; }
.notice:empty { display: none; }

/* ---------- crop marks ---------- */
.cropped { position: relative; }
.cropped::before, .cropped::after,
.cropped > .crop-b::before, .cropped > .crop-b::after {
  content: ""; position: absolute; width: 18px; height: 18px; pointer-events: none;
  border-color: var(--ink);
}
.cropped::before { top: -10px; left: -10px; border-top: 1px solid; border-left: 1px solid; }
.cropped::after { top: -10px; right: -10px; border-top: 1px solid; border-right: 1px solid; }
.cropped > .crop-b::before { bottom: -10px; left: -10px; border-bottom: 1px solid; border-left: 1px solid; }
.cropped > .crop-b::after { bottom: -10px; right: -10px; border-bottom: 1px solid; border-right: 1px solid; }

/* registration mark used beside the logo */
.reg { width: 22px; height: 22px; flex: none; }

/* ---------- sign-in ---------- */
.signin {
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
}
.signin__aside {
  position: relative; overflow: hidden;
  background: var(--ink); color: var(--paper);
  padding: clamp(2rem, 5vw, 4rem);
  display: flex; flex-direction: column; justify-content: space-between;
}
.signin__aside h1 {
  font: 400 clamp(2.5rem, 6vw, 5.25rem)/0.95 var(--display);
  letter-spacing: -.01em; margin: 0; max-width: 11ch;
}
.signin__aside p { color: #c9c9c9; max-width: 44ch; margin: 1.25rem 0 0; font-size: 1.0625rem; }
.inks { display: flex; gap: 0; margin-top: 2.5rem; }
.inks span { width: 56px; height: 56px; border-radius: 50%; mix-blend-mode: screen; margin-right: -14px; }
.inks span:nth-child(1) { background: var(--cyan); }
.inks span:nth-child(2) { background: var(--magenta); }
.inks span:nth-child(3) { background: var(--yellow); }
.signin__foot { font-size: .8125rem; color: #9b9b9b; }

.signin__main { display: grid; place-items: center; padding: 2.5rem 1.5rem; }
.card { width: 100%; max-width: 420px; padding: 2rem 2rem 1.5rem; border: 1px solid var(--ink); background: var(--paper); }
.card__logo { display: flex; align-items: center; gap: .75rem; padding-bottom: 1.25rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--rule); }
.card__logo img { width: 200px; height: auto; }
.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.card__head h2 { font: 400 1.75rem/1.1 var(--display); margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: .9375rem; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkbtn:hover { color: var(--magenta); }
.card__divider { display: flex; align-items: center; gap: .75rem; margin: 1.5rem 0 .75rem; color: var(--ink-3); font-size: .875rem; }
.card__divider::before, .card__divider::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.card__access { font-size: .9375rem; color: var(--ink-2); margin: 0; }
.pw-rules { margin: -.25rem 0 1rem; padding-left: 1.1rem; color: var(--ink-3); font-size: .8125rem; }

@media (max-width: 860px) {
  .signin { grid-template-columns: 1fr; }
  .signin__aside { min-height: auto; padding: 1.75rem 1.5rem; }
  .signin__aside h1 { font-size: 2.25rem; }
  .signin__aside p, .inks, .signin__foot { display: none; }
}

/* ---------- top bar (landing, admin) ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--ink);
}
.topbar__brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.topbar__brand img { width: 168px; height: auto; }
.topbar__nav { display: flex; align-items: center; gap: 1.25rem; font-size: .9375rem; }
.topbar__nav a { text-decoration: none; }
.topbar__nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.topbar__user { color: var(--ink-3); }
@media (max-width: 640px) { .topbar__user { display: none; } .topbar__brand img { width: 130px; } }

.wrap { width: min(1240px, 100% - 2rem); margin-inline: auto; }

/* ---------- landing ---------- */
.landing__intro { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem); display: grid; grid-template-columns: 1.15fr 1fr; gap: 2rem; align-items: end; }
.landing__intro h1 { font: 400 clamp(2.5rem, 6.5vw, 5.5rem)/.92 var(--display); margin: 0; letter-spacing: -.015em; }
.landing__intro p { margin: 0; color: var(--ink-2); font-size: 1.125rem; max-width: 46ch; }
@media (max-width: 800px) { .landing__intro { grid-template-columns: 1fr; } }

.demos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem 2.5rem; padding: 1rem 0 5rem; }
@media (max-width: 960px) { .demos { grid-template-columns: 1fr; max-width: 560px; } }
.demo { text-decoration: none; display: grid; gap: 1.5rem; align-content: start; }
.demo__plate { aspect-ratio: 4 / 3; position: relative; background: var(--wash); }
.demo__plate img, .demo__plate svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.demo__ink { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; transition: height .25s ease; }
.demo:hover .demo__ink, .demo:focus-visible .demo__ink { height: 22px; }
.demo--cafe .demo__ink { background: var(--yellow); }
.demo--bank .demo__ink { background: var(--cyan); }
.demo--retail .demo__ink { background: var(--magenta); }
.demo__kind { font: 600 .9375rem/1.2 var(--text); color: var(--ink-3); margin: 0; }
.demo h2 { font: 400 1.875rem/1.05 var(--display); margin: .25rem 0 .5rem; }
.demo p { margin: 0; color: var(--ink-2); max-width: 44ch; }
.demo__go { margin-top: 1rem; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.demo:hover .demo__go { color: var(--magenta); }

.landing__foot { border-top: 1px solid var(--ink); padding: 1.5rem 0 2.5rem; color: var(--ink-3); font-size: .875rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- admin ---------- */
.admin { padding: 2.5rem 0 5rem; }
.admin h1 { font: 400 clamp(2rem, 4vw, 3rem)/1 var(--display); margin: 0 0 .5rem; }
.admin__lead { color: var(--ink-2); margin: 0 0 2rem; max-width: 60ch; }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--ink); margin-bottom: 2rem; }
.tabs button { font: 600 1rem var(--text); background: none; border: 0; padding: .875rem 1.25rem; cursor: pointer; border-bottom: 4px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { border-color: var(--ink); }
.panel[hidden] { display: none; }

.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 2.5rem; align-items: start; }
@media (max-width: 1000px) { .admin-grid { grid-template-columns: 1fr; } }
.box { border: 1px solid var(--ink); padding: 1.5rem; }
.box h2 { font: 400 1.375rem/1.1 var(--display); margin: 0 0 1rem; }
.box h3 { font-size: 1.0625rem; margin: 1.5rem 0 .75rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--ink); }
table.users { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.users th, .users td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.users th { font-size: .8125rem; color: var(--ink-3); font-weight: 600; background: var(--wash); }
.users tr:last-child td { border-bottom: 0; }
.users .who strong { display: block; }
.users .who span { color: var(--ink-3); font-size: .875rem; }
.pill { display: inline-block; padding: .125rem .5rem; font-size: .8125rem; font-weight: 600; border: 1px solid currentColor; white-space: nowrap; }
.pill--ok { color: var(--ok); }
.pill--off { color: var(--danger); }
.pill--wait { color: #8a5a00; }
.pill--admin { color: var(--ink); background: var(--yellow); border-color: var(--yellow); }
.row-actions { display: flex; flex-wrap: wrap; gap: .375rem; }
.toolbar { display: flex; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; flex-wrap: wrap; }
.toolbar .input { max-width: 320px; min-height: 40px; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 600px) { .cols-2 { grid-template-columns: 1fr; } }
.settings { display: grid; gap: 2rem; max-width: 900px; }
.settings .actions { display: flex; gap: 1rem; align-items: center; }

dialog { border: 1px solid var(--ink); padding: 1.5rem; max-width: 440px; width: calc(100% - 2rem); }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
dialog h2 { font: 400 1.375rem/1.1 var(--display); margin: 0 0 1rem; }
dialog .actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1.25rem; }

/* ---------- 404 ---------- */
.lost { min-height: 100vh; display: grid; place-content: center; text-align: left; padding: 2rem; gap: 1rem; }
.lost h1 { font: 400 clamp(3rem, 10vw, 7rem)/.9 var(--display); margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
