/* Omarchy Side Panel landing page. Static, no build step. */

:root {
  --board: #221e1a;
  --panel: #1a1714;
  --board-text: #f4f1e8;
  --board-muted: #aaa79f;
  --board-line: rgba(244, 241, 232, 0.12);
  --board-line-soft: rgba(244, 241, 232, 0.07);
  --ink: rgba(0, 0, 0, 0.95);
  --ink-2: rgba(0, 0, 0, 0.6);
  --ink-3: rgba(0, 0, 0, 0.3);
  --amber: #f6a81b;
  --amber-hi: #ffc44a;
  --screen: #130d0a;
  --bezel: #292522;
  --bezel-line: #4b4540;
  --yellow: #f2dda0;
  --rose: #efc9c3;
  --mint: #cce3cf;
  --blue: #cbddee;
  --lilac: #d9d0eb;
  --sans: system-ui, "Noto Sans", "Liberation Sans", "DejaVu Sans", sans-serif;
  --mono: "JetBrainsMono Nerd Font", "JetBrains Mono", ui-monospace, "Liberation Mono", "DejaVu Sans Mono", monospace;
  --gutter: clamp(16px, 5vw, 72px);
  --panel-w: 352px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 320ms;
  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur: 0ms; }
  #demo .circle, #demo .act { transition: none; }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--board);
  color: var(--board-text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol, table, figure { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
code, kbd { font-family: var(--mono); font-size: 0.92em; }
kbd {
  padding: 0 0.35em;
  border: 1px solid var(--board-line);
  border-bottom-width: 2px;
  border-radius: 4px;
  white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--amber-hi); outline-offset: 2px; }
.paper :focus-visible, .paper:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -48px;
  padding: 8px 12px;
  background: var(--yellow);
  color: var(--ink);
  z-index: 20;
}
.skip:focus { top: 12px; }

/* The desktop: hero work area plus the panel at the right edge. */

.desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--panel-w);
  min-height: min(100vh, 760px);
  border-bottom: 1px solid var(--board-line-soft);
}

.work {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px var(--gutter) 48px;
  min-width: 0;
}

.top {
  display: flex;
  align-items: baseline;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: clamp(48px, 9vh, 112px);
}
.brand { font-weight: 650; letter-spacing: -0.01em; margin-right: auto; }
.top a { color: var(--board-muted); text-decoration: none; }
.top a:hover { color: var(--board-text); text-decoration: underline; }

h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.022em;
  font-weight: 650;
  max-width: 20ch;
  text-wrap: balance;
}

.lede {
  margin-top: 22px;
  max-width: 50ch;
  font-size: 21px;
  line-height: 1.4;
  color: var(--board-text);
}

.status {
  margin-top: 18px;
  max-width: 58ch;
  color: var(--board-muted);
}

.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 7px;
  border: 1px solid var(--board-line);
  background: transparent;
  color: var(--board-text);
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}
.btn:hover { border-color: rgba(244, 241, 232, 0.4); text-decoration: none; }
.btn-paper {
  background: var(--yellow);
  border-color: transparent;
  color: var(--ink);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.14);
}
.btn-paper:hover { background: #eed281; border-color: transparent; }
.btn:disabled { opacity: 0.45; cursor: default; }

.try {
  margin-top: 24px;
  max-width: 44ch;
  color: var(--board-muted);
}

/* The panel. */

.panel {
  background: var(--panel);
  border-left: 1px solid var(--board-line-soft);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--board-line-soft);
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 2;
}
.tool {
  width: 34px; height: 34px;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--board-muted);
  cursor: pointer;
}
.tool:hover { color: var(--board-text); }
.tool:disabled { opacity: 0.35; cursor: default; }
.tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.board {
  flex: 1;
  padding: 14px 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.panel-foot {
  padding: 10px 12px 14px;
  border-top: 1px solid var(--board-line-soft);
  font-size: 14px;
  line-height: 1.45;
  color: var(--board-muted);
}
.panel-foot p { margin: 0; }
.panel-foot .reset {
  margin-top: 8px;
  padding: 5px 10px;
  font-size: 14px;
}
.keys { margin-top: 8px; }
.keys summary { cursor: pointer; }
.keys ul { margin: 6px 0 0; padding-left: 18px; }

/* Paper notes: square sheets, text in the shell's monospace face. */

.paper {
  --paper: var(--yellow);
  --paper-under: #eed281;
  --link: #7a5b00;
  --link-hover: #574000;
  position: relative;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.5;
  outline-offset: 3px;
}
.paper[data-color="rose"]  { --paper: var(--rose);  --paper-under: #e7b0a7; --link: #7a1100; --link-hover: #570c00; }
.paper[data-color="mint"]  { --paper: var(--mint);  --paper-under: #b5d6b9; --link: #13671e; --link-hover: #084f11; }
.paper[data-color="blue"]  { --paper: var(--blue);  --paper-under: #b0cbe5; --link: #003f7a; --link-hover: #002d57; }
.paper[data-color="lilac"] { --paper: var(--lilac); --paper-under: #c5b7e0; --link: #2a0377; --link-hover: #1d0057; }

.note { isolation: isolate; transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.note.is-leaving { transform: translateY(56px) rotate(2.5deg); opacity: 0; }

.sheet {
  position: relative;
  z-index: 1;
  background: var(--paper);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.4);
  overflow: hidden;
}
.sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/paper-texture.png") repeat;
  background-size: 256px 256px;
  opacity: 0.14;
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* Expanded: a 20px darker-paper triangle at the top left is the fold control.
   No outline, no shadow. */
.fold {
  position: absolute;
  left: 0; top: 0;
  width: 20px; height: 20px;
  padding: 0;
  border: 0;
  cursor: pointer;
  --fold-color: var(--paper-under);
  --fold-color: color-mix(in srgb, var(--paper), #000 17%);
  background: linear-gradient(to bottom right, var(--fold-color) 50%, transparent 50%);
  z-index: 1;
}
.fold:hover, .fold:focus-visible {
  --fold-color: color-mix(in srgb, var(--paper), #000 24%);
}
.fold:focus-visible { outline-offset: 1px; }

.reveal {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows var(--dur) var(--ease);
}
.reveal > div { min-height: 0; overflow: hidden; }
.content { padding: 12px 32px 34px 16px; }
.content p { margin: 0; }
.content p + p, .content .task + p, .content p + .task { margin-top: 6px; }
.content strong { font-weight: 800; }
.content a { color: var(--link); text-decoration: underline; word-break: break-word; }
.content a:hover { color: var(--link-hover); }

.task { display: flex; align-items: flex-start; gap: 9px; }
.task + .task { margin-top: 4px; }
.circle {
  flex: none;
  width: 19px; height: 19px;
  margin-top: 3px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--ink-2);
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 140ms, border-color 140ms;
}
.circle svg { width: 11px; height: 11px; stroke: var(--paper); stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.circle[aria-checked="true"] { background: var(--ink); border-color: transparent; }
.circle[aria-checked="true"] svg { opacity: 1; }
.task.is-done .task-text { text-decoration: line-through; color: var(--ink-2); }

.editor {
  display: block;
  width: 100%;
  min-height: 96px;
  margin: 0;
  padding: 12px 32px 34px 16px;
  border: 0;
  resize: vertical;
  background: transparent;
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
  position: relative;
}
.editor:focus { outline: 0; }
.editor::placeholder { color: var(--ink-3); }

/* Note-local controls at the sheet corners. They appear on hover or focus,
   with no background highlight. */
.act {
  position: absolute;
  width: 28px; height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  transition: opacity 140ms, visibility 140ms;
}
.act svg { width: 19px; height: 19px; fill: currentColor; stroke: none; }
.act:hover, .act:focus-visible { color: var(--ink); }
.act-delete { right: 4px; top: 4px; }
.act-task { left: 4px; bottom: 0; }
.acts-end { position: absolute; right: 4px; bottom: 0; display: flex; }
.acts-end .act { position: static; }
.note:hover .act, .note:focus-within .act,
.clock:hover .act, .clock:focus-within .act { opacity: 1; visibility: visible; }
.note:hover .act, .note:focus-within .act { color: var(--ink-2); }
.note .act:hover, .note .act:focus-visible { color: var(--ink); }
.note.is-collapsed .act, .note.is-collapsed .acts-end { display: none; }
@media (hover: none) {
  .act { opacity: 1; visibility: visible; color: var(--ink-2); }
}

/* Collapsed: a compact sticky note with a darker under-sheet. */
.peek {
  display: none;
  padding: 10px 16px 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.04));
  cursor: pointer;
}
.under {
  position: absolute;
  left: 8px; right: 8px; bottom: -6px;
  height: 14px;
  background: var(--paper-under);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  z-index: 0;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.note.is-collapsed { margin-bottom: 6px; }
.note.is-collapsed .sheet { box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.4); }
.note.is-collapsed .fold { display: none; }
.note.is-collapsed .reveal { grid-template-rows: 0fr; }
.note.is-collapsed .peek { display: block; }
.note.is-collapsed .under { opacity: 1; }
.note.is-folding .peek { display: block; }

/* World clock card: the square dark hardware block, no paper. */

.clock {
  position: relative;
  background: var(--bezel);
  border: 1px solid var(--bezel-line);
  padding: 4px;
}
.clock .act { color: var(--amber); }
.clock .act:hover, .clock .act:focus-visible { color: var(--amber-hi); }
.clock:focus-visible { outline-color: var(--amber-hi); }
.screen {
  background: var(--screen);
  border: 1px solid #070504;
  padding: 10px 12px 9px;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.zone { flex: none; }
.led { display: block; }
.led rect { fill: rgba(255, 122, 13, 0.055); }
.led rect.on { fill: var(--amber); }

/* Supporting sections. */

main { padding: 0 var(--gutter); }
.sec {
  max-width: 980px;
  padding: clamp(56px, 8vw, 96px) 0 0;
}
.sec:last-child { padding-bottom: clamp(56px, 8vw, 96px); }
h2 {
  font-size: clamp(27px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 650;
  max-width: 24ch;
}
h3 { font-size: 17px; font-weight: 650; line-height: 1.35; }
.sec > p, .sec li { max-width: 62ch; }
.sec > p { margin-top: 16px; color: var(--board-text); }
.sec p.muted, .muted { color: var(--board-muted); }

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px 40px;
  margin-top: 28px;
}
.cols div p { margin-top: 6px; color: var(--board-muted); max-width: 42ch; }

.steps { margin: 24px 0 0; padding-left: 1.4em; }
.steps li { margin-top: 12px; }
.steps li::marker { color: var(--board-muted); }

.plain { margin: 20px 0 0; padding-left: 1.2em; }
.plain li + li { margin-top: 8px; }

/* The install command sits on a mint sheet. */
.cmd {
  --paper: var(--mint);
  --paper-under: #b5d6b9;
  margin-top: 24px;
  max-width: 640px;
}
.cmd .sheet { padding: 14px 16px 16px; }
.cmd pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--ink);
  position: relative;
  user-select: all;
}
.cmd-row { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; justify-content: space-between; position: relative; }
.cmd-row pre { flex: 1 1 280px; }
.copy {
  flex: none;
  padding: 7px 12px;
  border: 1.5px solid var(--ink-2);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.copy:hover { border-color: var(--ink); }
.cmd-status { margin-top: 10px; color: var(--ink-2); font-size: 15px; position: relative; }
.cmd-status:empty { display: none; }
.cmd-status.is-error { color: var(--ink); }

table {
  margin-top: 24px;
  border-collapse: collapse;
  width: 100%;
  max-width: 820px;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 10px 18px 10px 0;
  border-bottom: 1px solid var(--board-line-soft);
}
th { font-weight: 650; color: var(--board-text); }
td { color: var(--board-muted); }
td:first-child { color: var(--board-text); white-space: nowrap; }

footer {
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--board-line-soft);
  color: var(--board-muted);
  font-size: 15px;
  max-width: 980px;
}
footer p + p { margin-top: 8px; }

/* Responsive. */

@media (max-width: 1023px) {
  .desk { grid-template-columns: 1fr; min-height: 0; }
  .work { padding-bottom: 32px; }
  .top { margin-bottom: 40px; }
  .try { margin-top: 24px; padding-top: 0; }
  .panel { border-left: 0; border-top: 1px solid var(--board-line-soft); }
  .board { max-width: 560px; }
}

@media (max-width: 479px) {
  body { font-size: 16px; }
  .lede { font-size: 18px; }
  .content, .editor { padding: 22px 30px 34px 14px; }
  .peek { padding: 9px 14px 10px; }
  .screen { gap: 12px; padding: 9px 10px 8px; }
  th, td { padding-right: 12px; }
  td:first-child { white-space: normal; }
}
