/* ============================================================
   Omarchy — unofficial tribute / design demo
   Palette: warm concrete + aubergine ink + electric SUPER indigo + brass
   Type: Instrument Serif (display) · Inter (body) · IBM Plex Mono (utility) · Space Grotesk (wordmark)
   Faces served by the pinned fonts-maierzone library (self-hosted, OFL).
   ============================================================ */

:root {
  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --font-grotesk: 'Space Grotesk', var(--font-body);

  --paper:     #e7e3da;
  --paper-2:   #efece4;
  --ink:       #211b28;
  --ink-2:     #4c4455;
  --ink-3:     #635a6c;
  --line:      #cabfb0;
  --super:     #4636e8;
  --super-ink: #3a2ec2;
  --brass:     #a17c39;
  --brass-ink: #7c5c20;
  --stage-bg:  #141019;

  --measure: 66ch;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --rule: 1px solid var(--line);
}

:root[data-theme='dark'] {
  --paper:     #17131d;
  --paper-2:   #1e1926;
  --ink:       #ece7f1;
  --ink-2:     #b7aec2;
  --ink-3:     #8b8397;
  --line:      #322b3b;
  --super:     #9b8dff;
  --super-ink: #b3a7ff;
  --brass:     #c99a52;
  --brass-ink: #d8ab68;
  --stage-bg:  #0d0b11;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper:     #17131d;
    --paper-2:   #1e1926;
    --ink:       #ece7f1;
    --ink-2:     #b7aec2;
    --ink-3:     #8b8397;
    --line:      #322b3b;
    --super:     #9b8dff;
    --super-ink: #b3a7ff;
    --brass:     #c99a52;
    --brass-ink: #d8ab68;
    --stage-bg:  #0d0b11;
  }
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.04rem, 0.5vw + 0.94rem, 1.18rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--super-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
img { max-width: 100%; }
::selection { background: var(--super); color: #fff; }

:focus-visible {
  outline: 2px solid var(--super);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: fixed; left: 0.75rem; top: 0.75rem;
  transform: translateY(-160%);
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; font-family: var(--font-mono); font-size: 0.8rem;
  z-index: 100; transition: transform 0.2s;
}
.skip:focus { transform: none; color: var(--paper); }

.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;
}

/* ---------- type helpers ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.eyebrow--super { color: var(--super-ink); }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.005em;
  font-size: clamp(3rem, 8vw, 6rem);
}
.display .hl { color: var(--super-ink); font-style: italic; }

.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
}

.lead {
  font-size: clamp(1.18rem, 0.9vw + 1rem, 1.42rem);
  line-height: 1.5;
  color: var(--ink-2);
  font-weight: 400;
}

.prose p { max-width: var(--measure); }
.prose p + p { margin-top: 1.1em; }
.prose em { font-style: italic; }
.prose code, .arrives code, .stage__intro code {
  font-family: var(--font-mono);
  font-size: 0.84em;
  background: color-mix(in srgb, currentColor 12%, transparent);
  padding: 0.08em 0.36em;
  border-radius: 4px;
}

/* ---------- scaffold ---------- */
.wrap {
  max-width: 76rem;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.act {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  border-top: var(--rule);
}
.act__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.9rem;
  flex-wrap: wrap;
}
.act__num {
  font-family: var(--font-grotesk);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--brass-ink);
  border: 1px solid var(--brass);
  border-radius: 999px;
  padding: 0.2rem 0.8rem;
  flex: none;
  white-space: nowrap;
}
.act__title { color: var(--ink-3); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem var(--gutter);
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: var(--rule);
}
.wordmark {
  font-family: var(--font-grotesk);
  font-weight: 700;
  letter-spacing: 0.3em;
  font-size: 0.84rem;
  color: var(--ink);
  text-decoration: none;
}
.wordmark:hover { color: var(--super-ink); }
.topbar__nav { display: flex; align-items: center; gap: 1.4rem; }
.topbar__nav a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  text-decoration: none;
}
.topbar__nav a:hover { color: var(--super-ink); }

.toggle {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  width: 2rem; height: 2rem;
  border-radius: 999px;
  display: grid; place-items: center;
  cursor: pointer;
  line-height: 1;
  transition: border-color 0.2s, color 0.2s;
}
.toggle:hover { color: var(--ink); border-color: var(--ink-3); }

@media (max-width: 34rem) {
  .topbar__nav a { display: none; }
}

/* ---------- hero ---------- */
.hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 7vw, 5rem); }
.hero__eyebrow { margin-bottom: 1.5rem; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
}
.hero__lead { margin-top: 1.7rem; max-width: 34ch; }
.hero__cmd { margin-top: 2.2rem; }

@media (max-width: 60rem) {
  .hero__grid { grid-template-columns: 1fr; align-items: start; }
}

/* ---------- THE MENU (signature) ---------- */
.menu {
  border: 1px solid var(--ink-3);
  background: var(--paper-2);
  padding: 1.5rem 1.9rem 1.7rem 1.6rem;
}
.menu__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  margin-bottom: 0.3rem;
  border-bottom: 1px solid var(--line);
}
.menu__head b {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  font-weight: 600;
}
.menu__head span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-3);
}
.menu__row {
  display: flex;
  align-items: baseline;
  padding: 0.44rem 0;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 55ms);
}
.menu.in .menu__row { opacity: 1; transform: none; }
.menu__label { color: var(--ink-2); flex: none; }
.menu__dots {
  flex: 1 1 auto;
  align-self: center;
  border-bottom: 1.5px dotted color-mix(in srgb, var(--ink-3) 45%, transparent);
  margin: 0 0.6em;
  transform: translateY(-0.16em);
}
.menu__value { color: var(--ink); flex: none; }
.menu__stamp {
  flex: none;
  margin-left: 0.7em;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass-ink);
  border: 1.5px solid var(--brass);
  border-radius: 3px;
  padding: 0.12em 0.4em;
  transform: rotate(-4deg);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
  transition-delay: calc(var(--i, 0) * 55ms + 130ms);
}
.menu:not(.in) .menu__stamp { transform: rotate(16deg) scale(0.55); opacity: 0; }
.menu__note {
  margin-top: 1.1rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--ink-3);
  max-width: 48ch;
}

@media (prefers-reduced-motion: reduce) {
  .menu__row, .menu__stamp { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- command line ---------- */
.cmd {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--ink-3);
  background: #211b28;
  max-width: 42rem;
  overflow: hidden;
}
:root[data-theme='dark'] .cmd { background: #100c15; }
.cmd__text {
  font-family: var(--font-mono);
  font-size: clamp(0.74rem, 1.6vw, 0.9rem);
  color: #efece4;
  padding: 0.85rem 1rem;
  white-space: nowrap;
  overflow-x: auto;
  flex: 1 1 auto;
}
.cmd__text::before { content: '$ '; color: #c99a52; }
.cmd__copy {
  appearance: none;
  border: 0;
  border-left: 1px solid rgba(239, 236, 228, 0.2);
  background: transparent;
  color: #efece4;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 1.1rem;
  cursor: pointer;
  flex: none;
  transition: background 0.2s, color 0.2s;
}
.cmd__copy:hover { background: rgba(239, 236, 228, 0.12); }
.cmd__copy[data-done='1'] { color: #8ee6b0; }

/* ---------- "what arrives" list ---------- */
.arrives { max-width: var(--measure); }
.arrives li {
  position: relative;
  padding: 0.9rem 0 0.9rem 1.6em;
  border-top: 1px solid var(--line);
  font-size: 1.04rem;
  line-height: 1.45;
}
.arrives li::before {
  content: '\2014';
  position: absolute; left: 0; top: 0.9rem;
  color: var(--brass-ink);
}
.arrives li:last-child { border-bottom: 1px solid var(--line); }

/* ---------- STAGE — full-bleed act III ---------- */
.stage {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: var(--stage-bg);
  color: #cfc9d8;
  padding-block: clamp(4rem, 10vw, 8rem);
}
.stage .wrap { max-width: 72rem; }
.stage__head { margin-bottom: 2.4rem; }
.stage__num {
  font-family: var(--font-grotesk);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: #d8ab68;
  border: 1px solid rgba(216, 171, 104, 0.5);
  border-radius: 999px;
  padding: 0.2rem 0.8rem;
}
.stage__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1.05;
  color: #f2eef7;
  margin-top: 1rem;
}
.stage__intro {
  margin-top: 1rem;
  max-width: 54ch;
  color: #a49dae;
  font-size: 1.04rem;
}
.stage__intro em { font-style: italic; color: #cfc9d8; }

/* ---------- the device ---------- */
.sim {
  --s-bg: #1a1b26;
  --s-panel: #24283b;
  --s-fg: #c0caf5;
  --s-dim: #565f89;
  --s-accent: #7aa2f7;
  --s-accent2: #bb9af7;
  --s-border: #2f334d;

  margin-top: 2.2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  background: var(--s-bg);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
  transition: background 0.35s ease;
}
.sim[data-theme='catppuccin'] {
  --s-bg: #1e1e2e; --s-panel: #313244; --s-fg: #cdd6f4; --s-dim: #6c7086;
  --s-accent: #89b4fa; --s-accent2: #f5c2e7; --s-border: #45475a;
}
.sim[data-theme='gruvbox'] {
  --s-bg: #282828; --s-panel: #3c3836; --s-fg: #ebdbb2; --s-dim: #928374;
  --s-accent: #83a598; --s-accent2: #fabd2f; --s-border: #504945;
}
.sim[data-theme='nord'] {
  --s-bg: #2e3440; --s-panel: #3b4252; --s-fg: #d8dee9; --s-dim: #7b88a1;
  --s-accent: #88c0d0; --s-accent2: #a3be8c; --s-border: #434c5e;
}
.sim[data-theme='rose-pine'] {
  --s-bg: #191724; --s-panel: #1f1d2e; --s-fg: #e0def4; --s-dim: #6e6a86;
  --s-accent: #9ccfd8; --s-accent2: #ebbcba; --s-border: #26233a;
}

.sim__bar {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 0.85rem;
  background: var(--s-panel);
  border-bottom: 1px solid var(--s-border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--s-dim);
  transition: background 0.35s ease, color 0.35s ease;
}
.sim__ws { display: flex; gap: 0.3rem; }
.sim__ws b {
  display: grid; place-items: center;
  min-width: 1.4rem; height: 1.4rem;
  border-radius: 5px;
  font-weight: 500;
  color: var(--s-dim);
  background: transparent;
  transition: color 0.2s ease, background 0.2s ease;
}
.sim__ws b[data-active='1'] { color: var(--s-bg); background: var(--s-accent); }
.sim__ws b[data-filled='1']:not([data-active='1']) { color: var(--s-fg); background: var(--s-border); }
.sim__title { color: var(--s-fg); flex: 1 1 auto; }
.sim__stat { display: flex; gap: 0.85rem; }

.sim__desk {
  position: relative;
  height: 266px;
  padding: 10px;
  display: flex;
  gap: 10px;
}
.win {
  background: var(--s-bg);
  border: 1px solid var(--s-border);
  border-radius: 7px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: flex-basis 0.3s ease, opacity 0.3s ease, border-color 0.2s ease;
}
.win[data-focus='1'] { border-color: var(--s-accent); box-shadow: 0 0 0 1px var(--s-accent) inset; }
.win__tt {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.03em;
  color: var(--s-dim);
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--s-border);
  display: flex; gap: 0.4rem; align-items: center;
}
.win__tt b { color: var(--s-fg); font-weight: 500; }
.win__body {
  flex: 1 1 auto;
  padding: 0.7rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.65;
  color: var(--s-fg);
  overflow: hidden;
  white-space: pre;
}
.win__body .c-dim { color: var(--s-dim); }
.win__body .c-acc { color: var(--s-accent); }
.win__body .c-acc2 { color: var(--s-accent2); }
.win__page {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  background: var(--s-panel);
}
.win__page span {
  font-family: var(--font-display);
  font-size: 2.3rem;
  color: var(--s-fg);
}
.sim__col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.sim__desk[data-count='0']::after {
  content: 'workspace ' attr(data-ws) ' — empty. press SUPER + Return.';
  margin: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--s-dim);
}

@media (prefers-reduced-motion: reduce) {
  .win, .sim, .sim__bar, .sim__ws b { transition: none !important; }
}

.sim__controls {
  display: grid;
  gap: 1.4rem;
  margin-top: 1.6rem;
}
.ctl__label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8a8397;
  margin-bottom: 0.7rem;
}
.themes, .keys { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.swatch {
  appearance: none;
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: #cfc9d8;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.swatch i {
  width: 0.7rem; height: 0.7rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.swatch[aria-checked='1'] { border-color: #d8ab68; background: rgba(216, 171, 104, 0.12); color: #f2eef7; }
.swatch:hover { border-color: rgba(255, 255, 255, 0.35); }

.key {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: #e6e2ee;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.08s;
}
.key:hover { border-color: var(--super); background: rgba(70, 54, 232, 0.16); }
.key:active { transform: translateY(1px); }
.key b { color: #b3a7ff; font-weight: 500; }

.sim__caption {
  margin-top: 1.4rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: #a49dae;
  min-height: 1.5em;
}
.sim__caption b { color: #e6e2ee; font-style: normal; font-family: var(--font-mono); font-size: 0.92rem; }

@media (max-width: 44rem) {
  .sim__desk { flex-direction: column; height: auto; min-height: 340px; }
  .sim__col { flex-direction: column; }
  .win { min-height: 92px; }
}

/* ---------- outro ---------- */
.outro { padding-block: clamp(4rem, 9vw, 7rem) clamp(3.5rem, 7vw, 5.5rem); border-top: var(--rule); }
.outro__cmd { margin: 2rem 0 2.5rem; }
.outro__links {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.outro__fine {
  margin-top: 1.6rem;
  color: var(--ink-3);
  font-size: 0.98rem;
  max-width: 54ch;
}
.outro__foot {
  margin-top: 2.5rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-3);
}
.outro__foot a { color: var(--ink-3); }
.outro__foot a:hover { color: var(--super-ink); }
