/*
 * TEMPORARY stylesheet for the placeholder landing page.
 *
 * Self-contained on purpose: the real design system (base.css / components.css /
 * charts.css) is being built separately, and this file must not depend on it.
 * It is loaded LAST so it currently wins on every declaration.
 *
 * When the design system lands, drop '/css/placeholder.css' from the array in
 * app/views/layouts/layout.php and delete this file.
 */

:root {
  --bg:            #08090b;
  --bg-raised:     #0e1014;
  --bg-inset:      #121519;
  --border:        #23282f;
  --border-strong: #333a44;

  --text:          #e8eaed;
  --text-muted:    #8b939e;

  --red:           #e0273c;
  --red-bright:    #ff4256;
  --red-dim:       #7c1522;

  --ok:            #38d39f;
  --warn:          #e8b339;
  --bad:           #ff5c6c;
  --info:          #4ea8de;

  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Fira Code", Menlo, Consolas, "Courier New", monospace;

  --maxw: 62rem;
  --gap:  1.5rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--bg);
  /* Faint scanline texture — cheap, no image request. */
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.012) 0 1px,
    transparent 1px 3px
  );
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.65;
}

/* ---------------------------------------------------------------- layout */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.stack > * + * { margin-top: var(--gap); }

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-main { padding-block: 2.5rem 4rem; }

.site-header {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #0b0d10, #08090b);
  padding-block: 0.9rem;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(6px);
}

.site-brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
}
.site-brand-red { color: var(--red); }
.site-brand-sub {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-left: 0.5rem;
}
.site-brand:hover .site-brand-red { color: var(--red-bright); }

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.site-nav a::before { content: "["; color: var(--border-strong); }
.site-nav a::after  { content: "]"; color: var(--border-strong); }
.site-nav a:hover { color: var(--red-bright); }

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 1.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.site-footer p { margin: 0.35rem 0; }
.site-footer a { color: var(--red); }

/* ------------------------------------------------------------- terminal */

.ascii-banner {
  color: var(--red);
  font-family: var(--mono);
  font-size: clamp(0.28rem, 1.35vw, 0.72rem);
  line-height: 1.15;
  margin: 0 0 1.5rem;
  overflow-x: auto;
  white-space: pre;
  text-shadow: 0 0 18px rgba(224, 39, 60, 0.45);
}

.prompt { color: var(--text-muted); font-size: 0.9rem; }
.prompt a { color: var(--red); }

.cursor {
  color: var(--red);
  animation: blink 1.1s steps(1, end) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
}

.rule {
  border: 0;
  border-top: 1px solid var(--border);
  margin-block: 2rem;
}

/* ---------------------------------------------------------------- text */

h1, h2 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 0 0 0.75rem; }
h2 { font-size: 1.05rem; margin: 0; text-transform: uppercase; letter-spacing: 0.1em; }

.lede { font-size: 1.05rem; color: var(--text); margin: 0 0 1rem; max-width: 54rem; }
.lede em { color: var(--red-bright); font-style: normal; }

.muted { color: var(--text-muted); font-size: 0.9rem; }
.mono  { font-family: var(--mono); }

a { color: var(--red); }
a:hover { color: var(--red-bright); }

:focus-visible {
  outline: 2px solid var(--red-bright);
  outline-offset: 2px;
}

.code {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
  font-size: 0.9em;
  color: var(--ok);
}

.build-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 1.25rem;
}

/* --------------------------------------------------------------- cards */

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.card-head {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-inset);
}
.card-head h2 { color: var(--text-muted); }

.card-body { padding: 1.15rem; }
.card-body > * { margin-top: 0; }
.card-body.stack > * + * { margin-top: 1rem; }
.card-body p:last-child { margin-bottom: 0; }

.card-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

/* --------------------------------------------------------------- lists */

.check-list, .step-list, .status-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.check-list li, .status-list li { padding-left: 1.5rem; position: relative; margin-bottom: 0.5rem; }
.check-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--red);
}
.status-list li { padding-left: 0; }

.step-list { counter-reset: step; }
.step-list li {
  counter-increment: step;
  padding-left: 2.25rem;
  position: relative;
  margin-bottom: 0.75rem;
}
.step-list li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 700;
}

/* -------------------------------------------------------------- badges */

.badge {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.12rem 0.5rem;
  border-radius: 2px;
  border: 1px solid currentColor;
  margin-right: 0.5rem;
  white-space: nowrap;
}
.badge-ok      { color: var(--ok); }
.badge-warn    { color: var(--warn); }
.badge-bad     { color: var(--bad); }
.badge-info    { color: var(--info); }
.badge-neutral { color: var(--text-muted); }

/* -------------------------------------------------------------- alerts */

.alert {
  border: 1px solid var(--border-strong);
  border-left-width: 3px;
  border-radius: 4px;
  padding: 1.15rem;
  background: var(--bg-raised);
}
.alert h2 { margin-bottom: 0.6rem; }
.alert p { margin: 0.5rem 0 0; }
.alert p:first-of-type { margin-top: 0; }

.alert-error { border-left-color: var(--bad);  background: linear-gradient(90deg, rgba(255, 92, 108, 0.07), transparent 40%); }
.alert-error h2 { color: var(--bad); }
.alert-ok    { border-left-color: var(--ok); }
.alert-warn  { border-left-color: var(--warn); }
.alert-info  { border-left-color: var(--info); }

/* ------------------------------------------------------------ a11y/util */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sr-only:focus {
  position: static;
  width: auto; height: auto;
  margin: 0; padding: 0.5rem;
  clip: auto;
  background: var(--red);
  color: #fff;
}

.error-page { padding-block: 3rem; text-align: left; }
.error-page .ascii-banner { font-size: clamp(2rem, 12vw, 5rem); text-shadow: 0 0 26px rgba(224, 39, 60, 0.5); }
