/* PalmVellum landing — Y2K + programming aesthetic.
 * Palette: grey scale + a single accent yellow.
 * Fonts: IBM Plex Mono (body), Press Start 2P (chunky headers),
 *        VT323 (terminal flavor).
 */

:root {
  /* Dark-grey palette — distinctly grey, not black. */
  --bg:          #2d2d2d;
  --bg-elev:    #353535;
  --bg-deep:    #232323;

  --surface:    #3a3a3a;
  --surface-lo: #303030;

  --line:       #4a4a4a;
  --line-soft:  #3a3a3a;

  --ink:        #f4f4f4;
  --ink-dim:    #c4c4c4;
  --ink-mute:   #8e8e8e;

  --accent:     #ffd600;
  --accent-dim: #c9a700;

  --green:      #69b945;        /* status LED */

  /* Hard-shadow uses a darker grey than the bg, not pure black,
     to stay coherent with the new palette. */
  --shadow-hard: 4px 4px 0 0 #1a1a1a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Monaco, monospace;
  font-size: 16px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--ink);

  /* subtle CRT scanlines */
  background-image:
    linear-gradient(
      to bottom,
      rgba(255,255,255,0.012) 0px,
      rgba(255,255,255,0.012) 1px,
      transparent 1px,
      transparent 3px
    );
  background-attachment: fixed;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent-dim);
}
a:hover {
  background: var(--accent);
  color: var(--bg);
  border-bottom-color: var(--bg);
}

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

/* ─────────── Window chrome ─────────── */
.window-chrome {
  background: var(--surface);
  border-bottom: 2px solid var(--line);
  padding: 6px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  letter-spacing: 0.04em;
  user-select: none;
}
.chrome-name { color: var(--ink-dim); }
.chrome-icon { color: var(--accent); margin-right: 8px; }
.chrome-controls {
  display: flex;
  gap: 4px;
  font-family: 'VT323', monospace;
  font-size: 18px;
  color: var(--ink-mute);
}
.chrome-controls span {
  display: inline-block;
  width: 22px;
  text-align: center;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}

/* ─────────── Status bar ─────────── */
.status-bar {
  background: var(--surface-lo);
  border-bottom: 1px solid var(--line);
  padding: 6px 16px;
  display: flex;
  gap: 28px;
  font-family: 'VT323', monospace;
  font-size: 15px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  flex-wrap: wrap;
}
.status-bar em {
  font-style: normal;
  color: var(--accent);
  margin-left: 4px;
}
.status-right { margin-left: auto; }
.status-led {
  width: 10px; height: 10px;
  background: var(--green);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px var(--green);
  align-self: center;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  50% { opacity: 0.4; }
}

/* ─────────── Hero ─────────── */
.hero {
  padding: 56px 0 36px;
  border-bottom: 1px solid var(--line-soft);
}
.ascii-logo {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  line-height: 1.1;
  color: var(--accent);
  margin-bottom: 32px;
  white-space: pre;
  overflow-x: auto;
}
.hero-title {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}
.hero-title .accent { color: var(--accent); }
.hero-sub {
  font-family: 'VT323', monospace;
  font-size: 22px;
  color: var(--ink-dim);
  margin-bottom: 36px;
}
.cursor {
  display: inline-block;
  color: var(--accent);
  animation: blink 1s steps(2) infinite;
  margin-left: 6px;
}
@keyframes blink {
  to { opacity: 0; }
}

/* ─────────── Buttons ─────────── */
.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom: none;       /* we draw it via shadow for Y2K depth */
  box-shadow: var(--shadow-hard);
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  text-decoration: none;
  transition: transform 60ms ease-out;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 0 #1a1a1a;
  background: var(--surface);     /* keep grey on hover */
  color: var(--accent);
  border-color: var(--accent);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 0 #1a1a1a;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: #1a1a1a;
}
.btn-primary:hover {
  background: var(--accent);
  color: var(--bg);
}
.btn-prefix {
  color: var(--accent-dim);
  font-weight: 700;
}
.btn-primary .btn-prefix { color: var(--bg); }

/* ─────────── Counter strip ─────────── */
.counter-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  margin: 28px 0;
}
.counter {
  background: var(--bg);
  padding: 18px 14px;
  text-align: center;
}
.counter-num {
  font-family: 'Press Start 2P', monospace;
  font-size: 18px;
  color: var(--accent);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.counter-label {
  font-family: 'VT323', monospace;
  font-size: 17px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

/* ─────────── Sections ─────────── */
.section {
  padding: 48px 0;
  border-bottom: 1px solid var(--line-soft);
}
.section-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 26px;
  letter-spacing: 0.02em;
}
.section-title .prompt {
  color: var(--accent);
  margin-right: 12px;
}
.prose {
  font-size: 15px;
  color: var(--ink-dim);
  max-width: 720px;
  margin-bottom: 24px;
}
.prose p + p { margin-top: 14px; }
.prose strong { color: var(--ink); }

/* ─────────── Comparison table ─────────── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 14px;
  border: 1px solid var(--line);
}
.compare-table th,
.compare-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
}
.compare-table thead th {
  background: var(--surface-lo);
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
}
.compare-table .us {
  background: rgba(255, 214, 0, 0.06);
  border-left: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}
.compare-table tbody tr:hover {
  background: var(--surface-lo);
}

/* ─────────── Manifesto ─────────── */
.manifesto-list {
  list-style: none;
  display: grid;
  gap: 14px;
}
.manifesto-list li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  padding: 16px 18px;
  background: var(--surface-lo);
  border-left: 3px solid var(--accent);
}
.m-num {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: var(--accent);
}
.m-text {
  color: var(--ink-dim);
  font-size: 15px;
}

/* ─────────── Apps grid ─────────── */
.app-group-title {
  font-family: 'VT323', monospace;
  color: var(--ink-mute);
  font-size: 21px;
  letter-spacing: 0.06em;
  margin: 28px 0 12px;
  text-transform: lowercase;
}
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.app-card {
  position: relative;
  background: var(--surface-lo);
  border: 1px solid var(--line);
  padding: 18px 18px 50px;
}
.app-tag {
  display: inline-block;
  font-family: 'VT323', monospace;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--bg);
  background: var(--accent);
  padding: 0 8px;
  margin-bottom: 10px;
}
.tag-commercial {
  background: var(--ink-dim);
  color: var(--bg);
}
.app-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.app-desc {
  font-size: 14px;
  color: var(--ink-dim);
  margin-bottom: 6px;
}
.app-status {
  position: absolute;
  bottom: 14px;
  left: 18px;
  font-family: 'VT323', monospace;
  font-size: 15px;
  color: var(--ink-mute);
}
.status-active { color: var(--green); }
.status-soon  { color: var(--accent); }

.app-card-commercial {
  border-color: var(--line);
  border-style: dashed;
}

/* ─────────── Devices grid ─────────── */
.devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.device-col {
  background: var(--surface-lo);
  padding: 18px;
  border-top: 2px solid var(--accent);
}
.device-mfg {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}
.device-col ul {
  list-style: none;
  font-size: 14px;
}
.device-col li {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px dashed var(--line-soft);
  color: var(--ink-dim);
}
.device-col li.device-ref {
  color: var(--accent);
  font-weight: 700;
}
.device-year {
  color: var(--ink-mute);
  font-family: 'VT323', monospace;
  font-size: 15px;
}
.device-note {
  margin-top: 12px;
  font-family: 'VT323', monospace;
  font-size: 15px;
  color: var(--ink-mute);
}

/* ─────────── Footer ─────────── */
.site-footer {
  margin-top: 36px;
  padding: 36px 0 24px;
  border-top: 2px solid var(--line);
  font-size: 13px;
  color: var(--ink-mute);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 28px;
  margin-bottom: 26px;
}
.footer-grid strong {
  color: var(--accent);
  display: block;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.footer-grid ul { list-style: none; }
.footer-grid li { padding: 3px 0; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px dashed var(--line);
  padding-top: 16px;
}
.muted { color: var(--ink-mute); font-family: 'VT323', monospace; font-size: 15px; }

/* ─────────── Support / donate ─────────── */
.support-note {
  display: inline-flex;
  align-items: center;
  font-family: 'VT323', monospace;
  font-size: 17px;
  color: var(--ink-mute);
  padding: 0 12px;
  letter-spacing: 0.03em;
}
.support-note em {
  font-style: normal;
  color: var(--accent);
  margin: 0 4px;
}

/* ─────────── Responsive niceties ─────────── */
@media (max-width: 640px) {
  .ascii-logo { font-size: 8px; }
  .status-bar { gap: 14px; font-size: 13px; }
  .status-right { margin-left: 0; }
  .hero { padding: 36px 0 24px; }
  .manifesto-list li { grid-template-columns: 48px 1fr; gap: 12px; }
  .device-col { padding: 14px; }
}

.lang-picker:hover, .lang-picker:focus {
  color: #ffd600;
  border-color: rgba(255, 214, 0, 0.4);
  outline: none;
}
.lang-picker option {
  background: #2d2d2d;
  color: #fff;
}


/* Override .chrome-controls span (22px chrome button) styling for the
   picker — its inner spans (globe / label / caret) must not be boxed
   into individual chrome buttons, or the 'Language' text gets clipped. */
.chrome-controls .lang-picker-wrap,
.chrome-controls .lang-picker-wrap span {
  width: auto;
  background: transparent;
  border: 0;
  text-align: left;
}
/* ─── Language picker (prominent, in window chrome) ────── */
.lang-picker-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  margin-right: 8px;
  padding: 0 10px 0 8px;
  background: rgba(255, 214, 0, 0.08);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.lang-picker-wrap:hover {
  background: var(--accent);
  color: var(--bg);
}
.lang-globe {
  font-size: 14px;
  line-height: 1;
}
.lang-label {
  text-transform: uppercase;
  font-weight: 500;
}
.lang-caret {
  font-size: 10px;
  line-height: 1;
  opacity: 0.85;
}
/* Native <select> sits on top, invisible, so the styled wrapper
   shows through but the OS native menu still opens on click. */
.lang-picker {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: transparent;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}
.lang-picker option {
  background: #2d2d2d;
  color: #fff;
  font-family: 'IBM Plex Mono', sans-serif;
}
/* Mobile: shrink slightly so the chrome row still fits */
@media (max-width: 480px) {
  .lang-picker-wrap {
    font-size: 11px;
    padding: 0 6px;
    height: 20px;
  }
  .lang-globe { font-size: 12px; }
  .lang-label { display: none; }  /* keep just globe + caret */
}

/* prose-sub used in the new What section */
.prose-sub {
  font-family: inherit;
  color: #ffd600;
  font-size: 1rem;
  margin: 1.3rem 0 0.5rem;
  text-transform: lowercase;
  letter-spacing: 0.03em;
}
