/* breakaway.neocities.org — Southern Sietch
   pixel-cute engineering aesthetic */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&family=Nunito:wght@400;600;700&display=swap');

:root {
  --ice-deep: #0c1a2e;
  --ice-mid: #16324f;
  --ice-panel: #1a3a5c;
  --ice-light: #c8e7ff;
  --ice-pale: #e8f6ff;
  --aurora: #7cffc4;
  --aurora-dim: #3a9e78;
  --brass: #d4a84b;
  --brass-dim: #8a6b2a;
  --coral: #ff8a9a;
  --snow: #f4fbff;
  --ink: #0a1420;
  --muted: #8eb0cc;
  --pixel-border: 4px;
  --radius: 0;
  --font-pixel: 'Press Start 2P', monospace;
  --font-display: 'VT323', monospace;
  --font-body: 'Nunito', system-ui, sans-serif;
  --max: 920px;
  --nav-h: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ice-pale);
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, #1e4a6e 0%, transparent 55%),
    radial-gradient(ellipse 80% 40% at 80% 100%, #0d2f28 0%, transparent 50%),
    var(--ice-deep);
  background-attachment: fixed;
}

/* subtle pixel snow grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image:
    linear-gradient(var(--ice-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--ice-light) 1px, transparent 1px);
  background-size: 16px 16px;
  z-index: 0;
}

a { color: var(--aurora); text-decoration: none; }
a:hover { color: var(--snow); text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; height: auto; image-rendering: pixelated; }

/* —— layout —— */
.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1rem 4rem;
}

/* —— pixel box —— */
.pixel-box {
  background: var(--ice-panel);
  border: var(--pixel-border) solid var(--ice-light);
  box-shadow:
    4px 4px 0 var(--ink),
    inset 0 0 0 2px var(--ice-mid);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.25rem;
}

.pixel-box.accent {
  border-color: var(--aurora);
  box-shadow:
    4px 4px 0 var(--aurora-dim),
    inset 0 0 0 2px var(--ice-mid);
}

.pixel-box.brass {
  border-color: var(--brass);
  box-shadow:
    4px 4px 0 var(--brass-dim),
    inset 0 0 0 2px var(--ice-mid);
}

.pixel-box.coral {
  border-color: var(--coral);
}

/* —— nav —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 26, 46, 0.94);
  border-bottom: 4px solid var(--ice-light);
  backdrop-filter: blur(6px);
}

.site-header .inner {
  max-width: calc(var(--max) + 80px);
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.brand {
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  line-height: 1.5;
  color: var(--snow);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.brand:hover { color: var(--aurora); text-decoration: none; }

.brand-mark {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.15rem;
  margin-left: auto;
}

.nav a {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--ice-light);
  padding: 0.2rem 0.55rem;
  border: 2px solid transparent;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--aurora);
  border-color: var(--snow);
  text-decoration: none;
}

/* —— type —— */
h1, h2, h3, h4 {
  font-family: var(--font-pixel);
  line-height: 1.55;
  font-weight: 400;
  color: var(--snow);
}

h1 {
  font-size: clamp(0.85rem, 2.5vw, 1.05rem);
  margin: 0 0 1rem;
  color: var(--aurora);
}

h2 {
  font-size: clamp(0.7rem, 2vw, 0.82rem);
  margin: 1.75rem 0 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 3px dashed var(--ice-mid);
  color: var(--brass);
}

h3 {
  font-size: 0.65rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--ice-light);
}

h4 {
  font-size: 0.58rem;
  margin: 1rem 0 0.4rem;
  color: var(--muted);
}

p { margin: 0 0 0.9rem; }

.lead {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.35;
  color: var(--snow);
  margin-bottom: 1rem;
}

.haunt {
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1.3;
  color: var(--aurora);
  border-left: 6px solid var(--aurora);
  padding: 0.35rem 0 0.35rem 1rem;
  margin: 0 0 1.25rem;
}

.muted { color: var(--muted); }
.small { font-size: 0.92rem; }
.mono { font-family: var(--font-display); font-size: 1.2rem; }

.status-tag {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  padding: 0.35rem 0.5rem;
  margin: 0 0.25rem 0.35rem 0;
  border: 2px solid;
  vertical-align: middle;
}

.status-tag.eng { color: var(--aurora); border-color: var(--aurora); }
.status-tag.myth { color: var(--brass); border-color: var(--brass); }
.status-tag.doc { color: var(--ice-light); border-color: var(--ice-light); }
.status-tag.todo { color: var(--coral); border-color: var(--coral); }

/* —— hero —— */
.hero {
  text-align: center;
  padding: 1.5rem 1rem 0.5rem;
}

.hero-art {
  width: 160px;
  height: 160px;
  margin: 0 auto 1rem;
  image-rendering: pixelated;
}

.subtitle {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--muted);
  margin-top: -0.5rem;
}

/* —— widgets —— */
.widget-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.25rem 0;
}

@media (min-width: 640px) {
  .widget-grid { grid-template-columns: 1fr 1fr; }
  .widget-grid .span-2 { grid-column: 1 / -1; }
}

.widget-title {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--brass);
  margin: 0 0 0.75rem;
  letter-spacing: 0.04em;
}

.phase-display {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--snow);
  line-height: 1.1;
}

.phase-display .emoji {
  font-size: 1.6rem;
  margin-right: 0.35rem;
}

.bar-track {
  height: 16px;
  background: var(--ice-deep);
  border: 3px solid var(--ice-light);
  margin: 0.65rem 0 0.35rem;
  image-rendering: pixelated;
}

.bar-fill {
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    var(--aurora) 0 8px,
    var(--aurora-dim) 8px 10px
  );
  transition: width 0.6s ease;
  min-width: 0;
}

.bar-fill.night {
  background: repeating-linear-gradient(
    90deg,
    #6b7cff 0 8px,
    #3a4588 8px 10px
  );
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--muted);
}

/* —— cards / lists —— */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 560px) {
  .card-grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .card-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
}

.card {
  background: var(--ice-mid);
  border: 3px solid var(--ice-light);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 1rem;
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 0.1s, box-shadow 0.1s;
}

a.card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--aurora-dim);
  text-decoration: none;
  color: inherit;
  border-color: var(--aurora);
}

.card h3 {
  margin-top: 0;
  color: var(--aurora);
}

.card p:last-child { margin-bottom: 0; }

ul.pixel-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

ul.pixel-list li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.4rem;
  border-bottom: 1px dashed var(--ice-mid);
}

ul.pixel-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--aurora);
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.3;
}

/* —— timeline —— */
.timeline {
  border-left: 4px solid var(--aurora);
  margin: 1rem 0 2rem 0.5rem;
  padding-left: 1.25rem;
}

.tl-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.tl-item::before {
  content: '';
  position: absolute;
  left: -1.55rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  background: var(--brass);
  border: 3px solid var(--snow);
  box-shadow: 2px 2px 0 var(--ink);
}

.tl-item.future::before { background: var(--aurora); }

.tl-when {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--brass);
  margin-bottom: 0.35rem;
}

.tl-item.future .tl-when { color: var(--aurora); }

/* —— map —— */
.map-canvas-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.map-legend span::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 0.35rem;
  vertical-align: middle;
  border: 2px solid var(--snow);
}

.leg-real::before { background: var(--ice-light); }
.leg-plan::before { background: var(--aurora); }
.leg-myth::before { background: var(--brass); }
.leg-corridor::before { background: var(--coral); }

/* —— suit evolution —— */
.suit-track {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
  margin: 1rem 0;
}

.suit-stage {
  flex: 1 1 140px;
  background: var(--ice-deep);
  border: 3px solid var(--ice-light);
  padding: 0.75rem;
  text-align: center;
}

.suit-stage .icon { font-size: 2rem; line-height: 1; margin-bottom: 0.35rem; }
.suit-stage .name {
  font-family: var(--font-pixel);
  font-size: 0.42rem;
  color: var(--aurora);
  margin-bottom: 0.35rem;
}
.suit-stage p {
  font-size: 0.85rem;
  margin: 0;
  color: var(--muted);
}

.suit-arrow {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--brass);
  padding: 0 0.15rem;
}

/* —— posters —— */
.poster-wall {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 560px) {
  .poster-wall { grid-template-columns: 1fr 1fr; }
}

.poster {
  aspect-ratio: 3/4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1.25rem;
  border: 6px solid var(--snow);
  box-shadow: 6px 6px 0 var(--ink);
  background: linear-gradient(160deg, var(--ice-mid), var(--ice-deep));
  position: relative;
  overflow: hidden;
}

.poster::after {
  content: 'SIETCH · BREAKAWAY';
  position: absolute;
  bottom: 0.5rem;
  font-family: var(--font-pixel);
  font-size: 0.38rem;
  color: var(--muted);
  opacity: 0.7;
}

.poster h3 {
  font-size: 0.7rem;
  color: var(--aurora);
  margin: 0.5rem 0;
}

.poster .tagline {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--snow);
  line-height: 1.2;
}

.poster.alt {
  background: linear-gradient(160deg, #2a1a0e, #1a3a28);
  border-color: var(--brass);
}

.poster.alt h3 { color: var(--brass); }

.poster.warm {
  background: linear-gradient(160deg, #1a2840, #0e3a35);
  border-color: var(--coral);
}

/* —— agora / guestbook —— */
.msg-form label {
  display: block;
  font-family: var(--font-pixel);
  font-size: 0.48rem;
  color: var(--brass);
  margin: 0.75rem 0 0.35rem;
}

.msg-form input,
.msg-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.55rem 0.65rem;
  background: var(--ice-deep);
  color: var(--snow);
  border: 3px solid var(--ice-light);
  outline: none;
}

.msg-form input:focus,
.msg-form textarea:focus {
  border-color: var(--aurora);
}

.msg-form textarea { min-height: 100px; resize: vertical; }

.btn {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  padding: 0.7rem 1rem;
  margin-top: 0.85rem;
  margin-right: 0.5rem;
  cursor: pointer;
  border: 3px solid var(--snow);
  background: var(--aurora);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.btn.ghost {
  background: transparent;
  color: var(--ice-light);
  border-color: var(--ice-light);
}

.btn.danger {
  background: var(--coral);
  color: var(--ink);
}

.messages { margin-top: 1.5rem; }

.message {
  background: var(--ice-mid);
  border: 3px solid var(--ice-light);
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  position: relative;
}

.message .meta {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.message .nick {
  color: var(--aurora);
  font-weight: 700;
}

.message .body {
  white-space: pre-wrap;
  word-break: break-word;
}

.message .del {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  padding: 0.35rem 0.45rem;
  background: transparent;
  border: 2px solid var(--coral);
  color: var(--coral);
  cursor: pointer;
  display: none;
}

body.admin-mode .message .del { display: block; }

.admin-bar {
  display: none;
  margin-bottom: 1rem;
  padding: 0.75rem;
  border: 3px dashed var(--coral);
  font-family: var(--font-display);
  font-size: 1.15rem;
}

body.admin-mode .admin-bar { display: block; }

/* —— footer —— */
.site-footer {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1rem 2.5rem;
  border-top: 3px dashed var(--ice-mid);
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--muted);
  text-align: center;
}

.site-footer a { color: var(--brass); }

/* —— premises —— */
.premise {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 1rem;
  align-items: start;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px dashed var(--ice-mid);
}

.premise-num {
  font-family: var(--font-pixel);
  font-size: 1rem;
  color: var(--aurora);
  line-height: 1;
  padding-top: 0.15rem;
}

/* —— callout —— */
.callout {
  background: var(--ice-deep);
  border-left: 6px solid var(--brass);
  padding: 0.85rem 1rem;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.callout strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--brass);
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 400;
}

/* —— table —— */
.simple-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1rem 0;
}

.simple-table th,
.simple-table td {
  border: 2px solid var(--ice-mid);
  padding: 0.5rem 0.65rem;
  text-align: left;
}

.simple-table th {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--brass);
  background: var(--ice-deep);
}

.simple-table td:first-child { color: var(--aurora); }

/* —— todo checks —— */
.todo-list label {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--ice-mid);
  cursor: pointer;
}

.todo-list input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  accent-color: var(--aurora);
  flex-shrink: 0;
}

/* —— exhibit —— */
.exhibit-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

/* —— stamp —— */
.stamp {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.42rem;
  color: var(--coral);
  border: 3px solid var(--coral);
  padding: 0.4rem 0.55rem;
  transform: rotate(-6deg);
  opacity: 0.9;
  margin: 0.5rem 0;
}

/* —— responsive nav squeeze —— */
@media (max-width: 520px) {
  .nav a { font-size: 1.05rem; padding: 0.15rem 0.4rem; }
  .brand { font-size: 0.52rem; }
}

/* —— map atlas —— */
.map-stage {
  background: var(--ice-deep);
  border: 4px solid var(--ice-light);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 0.5rem;
  margin: 1rem 0;
  overflow-x: auto;
}
.map-stage.parchment {
  background: #2a2418;
  border-color: var(--brass);
  box-shadow: 4px 4px 0 var(--brass-dim);
}
.map-stage svg {
  display: block;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  height: auto;
}
.map-stage svg text {
  font-family: 'VT323', monospace;
  user-select: none;
}
.map-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0 1rem;
}
.map-controls button,
.map-controls a.btn-level {
  font-family: var(--font-pixel);
  font-size: 0.42rem;
  padding: 0.55rem 0.7rem;
  border: 3px solid var(--ice-light);
  background: var(--ice-mid);
  color: var(--ice-pale);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--ink);
}
.map-controls button:hover,
.map-controls a.btn-level:hover {
  border-color: var(--aurora);
  color: var(--aurora);
  text-decoration: none;
}
.map-controls button.active,
.map-controls a.btn-level.active {
  background: var(--aurora);
  color: var(--ink);
  border-color: var(--snow);
}
.map-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}
@media (min-width: 640px) {
  .map-meta { grid-template-columns: 1fr 1fr; }
}
.hotspot-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.hotspot-list li {
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--ice-mid);
  font-size: 0.95rem;
}
.hotspot-list li strong {
  color: var(--aurora);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
}
.layer-panel { display: none; }
.layer-panel.active { display: block; }
.depth-rail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--muted);
}
.depth-rail .sep { color: var(--brass); }
