/* DIDU coming soon — world-class terminal gate */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #0b0f0c;
  --ink: #f4efe4;
  --muted: #8b958e;
  --accent: #c8ff00;
  --accent-dim: rgba(200, 255, 0, 0.12);
  --accent-line: rgba(200, 255, 0, 0.32);
  --panel: #0f1412;
  --panel-highlight: #141a17;
  --line: #1c2420;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

html {
  height: 100%;
}

html,
body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  overflow: hidden;
  background:
    radial-gradient(ellipse 100% 70% at 0% 0%, rgba(200, 255, 0, 0.09), transparent 50%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(200, 255, 0, 0.05), transparent 45%),
    var(--bg);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

/* terminal frame with corner brackets */
.cs-frame {
  position: fixed;
  inset: clamp(12px, 2.5vmin, 24px);
  border: 1px solid var(--accent-line);
  border-radius: 3px;
  pointer-events: none;
  z-index: 0;
}

.cs-frame::before,
.cs-frame::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--accent);
  border-style: solid;
}

.cs-frame::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.cs-frame::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

/* page container */
.cs-page {
  position: relative;
  z-index: 1;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(1.25rem, 3vh, 2.25rem) clamp(1.5rem, 5vw, 4rem);
  gap: 0;
  overflow: hidden;
}

/* header */
.cs-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-bottom: clamp(0.75rem, 2vh, 1.25rem);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(0.75rem, 2vh, 1.5rem);
}

.cs-header-left {
  justify-self: start;
}

.cs-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: clamp(0.68rem, 1vmin, 0.82rem);
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 20, 18, 0.9);
}

.cs-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(200, 255, 0, 0.7);
  animation: cs-pulse 2.4s ease-in-out infinite;
}

@keyframes cs-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.cs-tagline {
  margin: 0;
  text-align: center;
  font-size: clamp(0.75rem, 1.2vmin, 0.95rem);
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--ink);
  opacity: 0.9;
}

.cs-books {
  justify-self: end;
  display: flex;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cs-books li {
  font-size: clamp(0.72rem, 1vmin, 0.85rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}

/* main two-column layout */
.cs-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  min-height: 0;
  align-items: center;
}

/* left: manifesto */
.cs-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.cs-kicker {
  margin: 0 0 clamp(0.5rem, 1vh, 0.75rem);
  width: fit-content;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  background: var(--accent);
  color: #0b0f0c;
  font-size: clamp(0.65rem, 1vmin, 0.78rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  box-shadow: 0 0 24px rgba(200, 255, 0, 0.2);
}

.cs-logo {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(5rem, 14vmin, 10rem);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.04em;
}

.cs-logo-dot {
  color: var(--accent);
}

.cs-ask {
  margin: clamp(0.35rem, 1vh, 0.65rem) 0 clamp(0.85rem, 2vh, 1.25rem);
  font-family: var(--serif);
  font-size: clamp(2rem, 5.5vmin, 4rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.cs-hook {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.5vmin, 1.85rem);
  line-height: 1.2;
  max-width: 24ch;
  color: var(--ink);
}

.cs-hook strong {
  color: var(--accent);
  font-weight: 600;
}

.cs-body {
  margin: clamp(0.85rem, 2vh, 1.25rem) 0 0;
  font-size: clamp(0.92rem, 1.6vmin, 1.12rem);
  line-height: 1.5;
  color: var(--muted);
  max-width: 42ch;
}

.cs-trust {
  margin: clamp(0.65rem, 1.5vh, 0.9rem) 0 0;
  font-size: clamp(0.82rem, 1.35vmin, 0.98rem);
  line-height: 1.45;
  color: var(--muted);
  max-width: 44ch;
}

.cs-trust code {
  color: var(--accent);
  font-size: 0.95em;
}

.cs-trust strong {
  color: var(--ink);
}

/* platform story pillars */
.cs-pillars {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: clamp(1rem, 2.5vh, 1.5rem);
}

.cs-pillar {
  padding: 0.75rem 0.9rem;
  border-left: 2px solid var(--accent);
  background: rgba(200, 255, 0, 0.03);
  border-radius: 0 8px 8px 0;
}

.cs-pillar-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: clamp(0.62rem, 0.95vmin, 0.72rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--accent);
}

.cs-pillar p {
  margin: 0;
  font-size: clamp(0.78rem, 1.2vmin, 0.88rem);
  line-height: 1.45;
  color: var(--muted);
}

.cs-pillar code {
  color: var(--accent);
  font-size: 0.92em;
}

.cs-pillar strong {
  color: var(--ink);
  font-weight: 700;
}

.cs-spine {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.45rem;
  margin-top: clamp(1rem, 2.5vh, 1.5rem);
  padding-top: clamp(0.85rem, 2vh, 1.15rem);
  border-top: 1px solid var(--line);
}

.cs-spine span:not(.cs-spine-arrow) {
  font-size: clamp(0.72rem, 1.15vmin, 0.88rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.cs-spine-arrow {
  color: var(--accent);
  font-size: 0.82rem;
  opacity: 0.85;
}

/* right: panel with grid */
.cs-right {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.cs-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(1rem, 2.2vh, 1.5rem) clamp(1.15rem, 2vw, 1.5rem);
  border-radius: clamp(14px, 2vmin, 20px);
  border: 1px solid var(--accent-line);
  background:
    linear-gradient(160deg, var(--panel-highlight) 0%, var(--panel) 40%, rgba(11, 15, 12, 0.95) 100%);
  box-shadow:
    0 1px 0 rgba(200, 255, 0, 0.08) inset,
    0 32px 80px rgba(0, 0, 0, 0.45);
}

.cs-panel-header {
  margin-bottom: clamp(0.65rem, 1.5vh, 0.9rem);
}

.cs-panel-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.4vmin, 1.75rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.cs-panel-header h2 em {
  font-style: normal;
  color: var(--accent);
}

.cs-panel-header p {
  margin: 0.3rem 0 0;
  font-size: clamp(0.72rem, 1.1vmin, 0.85rem);
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* 2×3 grid of surfaces */
.cs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: clamp(0.45rem, 1vh, 0.7rem);
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cs-cell {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(0.6rem, 1.3vh, 0.9rem) clamp(0.65rem, 1.2vw, 0.9rem);
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(11, 15, 12, 0.6);
  transition: border-color 0.12s ease, background 0.12s ease;
}

.cs-cell:hover {
  border-color: var(--accent-line);
  background: rgba(200, 255, 0, 0.03);
}

.cs-cell-num {
  display: block;
  font-size: clamp(0.55rem, 0.9vmin, 0.68rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--accent);
  opacity: 0.7;
  margin-bottom: 0.2rem;
}

.cs-cell h3 {
  margin: 0 0 0.25rem;
  font-size: clamp(0.92rem, 1.5vmin, 1.1rem);
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.cs-cell p {
  margin: 0;
  font-size: clamp(0.72rem, 1.15vmin, 0.88rem);
  line-height: 1.38;
  color: var(--muted);
}

/* shield strip */
.cs-shield {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 1rem;
  margin: clamp(0.65rem, 1.5vh, 0.9rem) 0 0;
  padding: clamp(0.55rem, 1.3vh, 0.75rem) 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.cs-shield li {
  position: relative;
  padding-left: 0.8rem;
  font-size: clamp(0.65rem, 1vmin, 0.78rem);
  line-height: 1.35;
  color: var(--muted);
}

.cs-shield li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: var(--accent);
  transform: rotate(45deg);
}

/* footer */
.cs-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: clamp(0.65rem, 1.5vh, 1rem);
  border-top: 1px solid var(--line);
  margin-top: clamp(0.75rem, 2vh, 1.25rem);
}

.cs-footer-copy {
  margin: 0;
  font-size: clamp(0.72rem, 1vmin, 0.85rem);
  color: var(--muted);
}

.cs-footer-brand {
  color: var(--ink);
  font-weight: 700;
  margin-right: 0.3rem;
}

.cs-footer a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.cs-footer a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.cs-key-btn {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.38rem 0.75rem;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: clamp(0.68rem, 1vmin, 0.8rem);
  letter-spacing: 0.1em;
  text-transform: lowercase;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.cs-key-btn:hover {
  opacity: 1;
  border-color: var(--accent-line);
  color: var(--accent);
}

/* drawer */
.cs-drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: end center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cs-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cs-drawer-card {
  width: min(100%, 22rem);
  padding: 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--accent-line);
  background: var(--panel);
  transform: translateY(10px);
  transition: transform 0.2s ease;
}

.cs-drawer.is-open .cs-drawer-card {
  transform: translateY(0);
}

.cs-drawer h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
}

.cs-drawer p {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.cs-drawer input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  margin-bottom: 0.75rem;
}

.cs-drawer input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.cs-drawer-actions {
  display: flex;
  gap: 0.5rem;
}

.cs-drawer-actions button {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.cs-drawer-actions .cs-primary {
  background: var(--accent);
  color: #0b0f0c;
  border-color: var(--accent);
  font-weight: 700;
}

.cs-err {
  min-height: 1.25rem;
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: #ff7b72;
}

/* responsive: mobile stacks */
@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .cs-page {
    height: auto;
    max-height: none;
    min-height: 100dvh;
    overflow: visible;
    padding-bottom: 2rem;
  }

  .cs-main {
    grid-template-columns: 1fr;
    gap: clamp(2rem, 5vh, 3rem);
    align-items: start;
  }

  .cs-header {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 0.65rem;
  }

  .cs-header-left {
    justify-self: center;
  }

  .cs-books {
    justify-self: center;
  }

  .cs-left {
    text-align: center;
    align-items: center;
  }

  .cs-hook,
  .cs-body,
  .cs-trust {
    max-width: none;
    text-align: center;
  }

  .cs-pillars {
    text-align: left;
    width: 100%;
    max-width: 28rem;
  }

  .cs-spine {
    justify-content: center;
  }

  .cs-grid {
    grid-template-rows: auto;
  }

  .cs-panel {
    height: auto;
  }
}

/* short viewports */
@media (max-height: 720px) and (min-width: 901px) {
  .cs-logo {
    font-size: clamp(4rem, 11vmin, 6rem);
  }

  .cs-ask {
    font-size: clamp(1.5rem, 4vmin, 2.5rem);
  }

  .cs-cell {
    padding: 0.5rem 0.55rem;
  }

  .cs-cell h3 {
    font-size: clamp(0.85rem, 1.3vmin, 0.98rem);
  }

  .cs-cell p {
    font-size: clamp(0.68rem, 1vmin, 0.78rem);
    line-height: 1.32;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-status-dot {
    animation: none;
  }

  .cs-drawer,
  .cs-drawer-card,
  .cs-cell {
    transition: none;
  }
}
