/* Home extras: first-run welcome, command menu, shortcuts sheet. Daybreak Glass, light and dark. */

/* ---------- First-run welcome ---------- */
.hw { position: relative; z-index: 1; width: calc(100% - 32px); max-width: 860px; margin: 4px auto 22px; padding: 16px 16px 18px; border-radius: 26px;
  background: var(--glass-solid); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow); }
.hw[hidden] { display: none; }
.hw-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 0 10px 8px; }
.hw-top h2 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink-muted); }
.hw-x { border-radius: 999px; width: 34px; height: 34px; }
.hw-x:hover { background: var(--hover); color: var(--ink); }
.hw-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; counter-reset: none; }
.hw-step { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); min-width: 0; }
.hw-ic { position: relative; flex-shrink: 0; width: 40px; height: 40px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: #FFFFFF;
  background: linear-gradient(135deg, var(--cta-a), var(--cta-b)); box-shadow: 0 8px 18px -10px rgba(232, 101, 43, .8); }
.hw-n { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 999px; background: var(--card); color: var(--ink); border: 1px solid var(--line);
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.hw-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hw-t b { font-size: 14.5px; font-weight: 600; }
.hw-t span { font-size: 13px; color: var(--ink-muted); line-height: 1.45; }
@media (max-width: 760px) {
  .hw { padding: 12px 12px 14px; border-radius: 24px; margin-bottom: 18px; }
  .hw-top { padding-bottom: 6px; }
  .hw-steps { grid-template-columns: 1fr; gap: 6px; }
  .hw-step { padding: 9px 10px; align-items: center; gap: 10px; border-radius: 16px; }
  .hw-ic { width: 34px; height: 34px; }
  .hw-ic svg { width: 17px; height: 17px; }
  .hw-t b { font-size: 14px; }
  .hw-t span { font-size: 12.5px; line-height: 1.4; }
}

/* ---------- Empty state ---------- */
.home .empty.home-empty:not([hidden]) { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--ink-muted); }
.home-empty .btn { border-radius: 999px; }

/* ---------- Search button in the top bar ---------- */
.cmdk-btn { border-radius: 999px; flex-shrink: 0; }
.cmdk-btn:hover { background: var(--hover); color: var(--ink); }
.cmdk-btn[hidden] { display: none; }

/* ---------- Command menu ---------- */
html.cmdk-lock, html.cmdk-lock body { overflow: hidden; }
.cmdk-back { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-start; justify-content: center;
  padding: max(12vh, 24px) 16px 16px; background: rgba(18, 20, 28, .38); }
/* No backdrop blur here: blurring the whole page made Ctrl+K open slowly. */
html[data-mode="dark"] .cmdk-back { background: rgba(4, 6, 12, .55); }
.cmdk-back[hidden] { display: none; }
.cmdk { width: 100%; max-width: 620px; max-height: min(560px, calc(100dvh - max(12vh, 24px) - 16px)); display: flex; flex-direction: column; overflow: hidden;
  border-radius: 26px; background: var(--card); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow), var(--shadow-window); }
.cmdk-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.cmdk-ic { color: var(--ink-faint); display: inline-flex; }
.cmdk-input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 17px; outline: none; }
.cmdk-input::placeholder { color: var(--ink-faint); }
.cmdk-esc { flex-shrink: 0; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--chip-bg); color: var(--ink-muted); font: inherit; font-size: 12px; cursor: pointer; }
.cmdk-esc:hover { color: var(--ink); }
.cmdk-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 8px 8px; }
.cmdk-group + .cmdk-group { margin-top: 4px; }
.cmdk-gh { position: sticky; top: -6px; z-index: 1; padding: 10px 12px 6px; font-size: 12px; font-weight: 600; color: var(--ink-faint); background: var(--card); }
.cmdk-item { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 12px; border-radius: 999px; cursor: pointer; color: var(--ink); user-select: none; }
.cmdk-item.on { background: var(--hover); box-shadow: inset 0 0 0 1px var(--line); }
.cmdk-oi { flex-shrink: 0; width: 30px; height: 30px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-muted); background: var(--chip-bg); }
.cmdk-oi.proj { background: var(--tint); color: #121316; font-size: 13px; font-weight: 700; border-radius: 9px; }
.cmdk-item.on .cmdk-oi:not(.proj) { color: var(--ink); }
.cmdk-ot { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cmdk-ol { font-size: 14.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-os { font-size: 12px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-ret, .cmdk-hint { flex-shrink: 0; font-size: 12px; color: var(--ink-faint); }
.cmdk-ret { opacity: 0; }
.cmdk-item.on .cmdk-ret { opacity: 1; }
.cmdk kbd, .keys-sheet kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 8px;
  border: 1px solid var(--line); border-bottom-width: 2px; background: var(--card); color: var(--ink-muted); font: 500 12px/1 inherit; font-family: inherit; }
.cmdk-none { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 34px 16px; text-align: center; color: var(--ink-muted); font-size: 14px; }
.cmdk-none b { color: var(--ink); font-weight: 600; }
.cmdk-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-faint); }
.cmdk-foot span { display: inline-flex; align-items: center; gap: 4px; }
.cmdk-foot kbd { min-width: 20px; height: 20px; padding: 0 5px; font-size: 11px; }
@media (max-width: 640px) {
  .cmdk-back { padding-top: max(10px, env(safe-area-inset-top, 0px)); }
  .cmdk { border-radius: 22px; max-height: calc(100dvh - 20px); }
  .cmdk-foot { display: none; }
  .cmdk-input { font-size: 16px; }
}
@media (prefers-reduced-motion: no-preference) {
  .cmdk-back:not([hidden]) { animation: cv-fade .16s ease both; }
  .cmdk-back:not([hidden]) .cmdk { animation: cmdk-in .24s cubic-bezier(.2, .8, .2, 1) both; }
  .cmdk-item { transition: background-color .12s ease; }
}
@keyframes cmdk-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Keyboard shortcuts sheet ---------- */
.keys-back { z-index: 70; background: rgba(18, 20, 28, .28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.keys-sheet { max-width: 440px; border-radius: 24px; padding: 18px 18px 10px; }
.keys-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.keys-top h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.keys-x { border-radius: 999px; }
.keys-x:hover { background: var(--hover); color: var(--ink); }
.keys-list { margin: 0; }
.keys-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.keys-row:first-child { border-top: 0; }
.keys-row dt { font-size: 14px; color: var(--ink); min-width: 0; }
.keys-row dd { margin: 0; display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.keys-plus { font-size: 12px; color: var(--ink-faint); }

/* Narrow phones: make room in the top bar for the search button. */
@media (max-width: 420px) {
  .app.in-pages .navlinks a { padding: 0 8px; }
  .app.in-pages .cmdk-btn { width: 32px; }
}

/* ---------- "How Corvela works" (option 3, chosen 30 Oct) ---------- */
/* Demo: steps + a small moving picture of Corvela building a site */
.hw-v-demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 18px; align-items: center; padding: 18px 18px 18px 22px; }
.hw-v-demo .hw-x { position: absolute; top: 10px; right: 10px; }
.hw-demo-txt h2 { margin: 0 0 12px; font-size: 19px; font-weight: 700; letter-spacing: -.015em; color: var(--ink); }
.hw-v-demo .hw-steps { grid-template-columns: 1fr; gap: 4px; }
.hw-v-demo .hw-step { background: none; border: 0; padding: 6px 0; align-items: center; }
.hw-v-demo .hw-ic { width: 34px; height: 34px; }
.hw-v-demo .hw-ic svg { width: 17px; height: 17px; }
.hw-art { position: relative; margin-top: 18px; }
.hw-win { border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(20, 16, 10, .12); }
.hw-win-bar { display: flex; gap: 5px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.hw-win-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.hw-win-body { display: grid; grid-template-columns: 38% 1fr; height: 150px; }
.hw-chat { display: flex; flex-direction: column; gap: 7px; padding: 10px 8px; border-right: 1px solid var(--line); }
.hw-bub { display: block; border-radius: 9px; }
.hw-bub.you { align-self: flex-end; width: 78%; height: 22px; background: linear-gradient(135deg, var(--cta-a), var(--cta-b)); opacity: .85; }
.hw-bub.ai { width: 90%; padding: 7px; display: flex; flex-direction: column; gap: 5px; background: var(--hover); }
.hw-bub.ai i { display: block; height: 5px; border-radius: 3px; background: var(--line); }
.hw-bub.ai i + i { width: 60%; }
.hw-site { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.hw-site > span { display: block; border-radius: 6px; }
.hw-s-nav { height: 8px; width: 100%; background: var(--hover); }
.hw-s-hero { display: flex !important; flex-direction: column; gap: 5px; padding: 12px 10px; background: linear-gradient(135deg, color-mix(in srgb, var(--cta-b) 22%, var(--card)), color-mix(in srgb, var(--cta-a) 18%, var(--card))); }
.hw-s-hero i { display: block; height: 7px; width: 70%; border-radius: 3px; background: color-mix(in srgb, var(--ink) 55%, transparent); }
.hw-s-hero i + i { width: 45%; height: 5px; background: color-mix(in srgb, var(--ink) 25%, transparent); }
.hw-s-hero b { display: block; width: 34px; height: 10px; margin-top: 3px; border-radius: 99px; background: var(--ink); }
.hw-s-row { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hw-s-row i { display: block; height: 30px; border-radius: 6px; background: var(--hover); }
.hw-live { position: absolute; right: -6px; bottom: -10px; padding: 5px 10px 5px 22px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--cta-a), var(--cta-b)); box-shadow: 0 8px 18px color-mix(in srgb, var(--cta-a) 40%, transparent); }
.hw-live::before { content: ""; position: absolute; left: 10px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .hw-v-demo .hw-bub.you { animation: hw-in 6s ease infinite; }
  .hw-v-demo .hw-bub.ai { animation: hw-in 6s ease infinite .6s; }
  .hw-v-demo .hw-s-hero { animation: hw-build 6s ease infinite 1.1s; }
  .hw-v-demo .hw-s-row i { animation: hw-build 6s ease infinite 1.6s; }
  .hw-v-demo .hw-s-row i:nth-child(2) { animation-delay: 1.8s; }
  .hw-v-demo .hw-s-row i:nth-child(3) { animation-delay: 2s; }
  .hw-v-demo .hw-live { animation: hw-pop 6s ease infinite 2.6s; }
}
@keyframes hw-in { 0%, 4% { opacity: 0; transform: translateY(6px); } 10%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes hw-build { 0%, 4% { opacity: 0; transform: scale(.94); } 12%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes hw-pop { 0%, 5% { opacity: 0; transform: scale(.6); } 11% { opacity: 1; transform: scale(1.08); } 15%, 86% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; } }
@media (max-width: 720px) {
  .hw-v-demo { grid-template-columns: 1fr; padding: 14px 14px 18px; }
  .hw-art { margin: 0 8px; }
  .hw-demo-txt h2 { font-size: 17px; padding-right: 36px; }
}
