/* ============================================================
   Sadeep OS — chrome: boot, osbar, palette, panels, terminal
   ============================================================ */

/* ---- BOOT INTRO ------------------------------------------- */
#boot {
  position: fixed; inset: 0; z-index: 10000;
  background: #0a0807; display: grid; place-items: center;
  transition: opacity 0.6s ease, visibility 0.6s;
}
#boot.done { opacity: 0; visibility: hidden; }
.boot-inner { width: min(86%, 460px); font-family: var(--font-mono); }
.boot-logo { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: 0.12em; color: var(--ink); margin-bottom: 26px; display: flex; align-items: center; gap: 12px; }
.boot-mark { color: var(--c-coral); animation: spin 4s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot-log { font-size: 12.5px; line-height: 1.9; color: var(--ink-soft); min-height: 150px; margin-bottom: 18px; }
.boot-log .ok { color: var(--c-cyan); }
.boot-log .dim { color: var(--ink-mute); }
.boot-bar { height: 4px; border-radius: 100px; background: rgba(255,255,255,0.08); overflow: hidden; }
.boot-bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--c-coral), var(--c-amber)); border-radius: 100px; box-shadow: 0 0 14px var(--c-coral); }
.boot-pct { font-size: 11px; color: var(--ink-mute); margin-top: 10px; letter-spacing: 0.08em; }

/* ---- OS TOP BAR ------------------------------------------- */
.osbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 52px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(14px, 3vw, 26px);
  background: rgba(13, 11, 9, 0.66); backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid rgba(255,240,230,0.08);
  transition: background 0.6s, border-color 0.6s, color 0.6s;
  font-family: var(--font-mono);
}
.osbar.light { background: rgba(248, 243, 236, 0.72); border-bottom-color: rgba(40,28,20,0.1); color: #241a13; }
.osbar-left, .osbar-right { display: flex; align-items: center; gap: 16px; }
.traffic { display: flex; gap: 7px; }
.traffic i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.traffic i:nth-child(1) { background: #e0685f; } .traffic i:nth-child(2) { background: #e7b15e; } .traffic i:nth-child(3) { background: #7bd88f; }
.os-brand { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -0.01em; color: inherit; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.os-mark { color: var(--c-coral); }
.os-dim { opacity: 0.45; }
.osbar-center { position: absolute; left: 50%; transform: translateX(-50%); }
.crumb { font-size: 12px; color: var(--ink-mute); letter-spacing: 0.04em; }
.osbar.light .crumb { color: #8c7d6f; }
.crumb b { color: var(--c-coral); font-weight: 600; }
.os-stat { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-soft); }
.osbar.light .os-stat { color: #5c4f44; }
.os-dot { width: 7px; height: 7px; border-radius: 50%; background: #7bd88f; box-shadow: 0 0 8px #7bd88f; animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: 0.4; } }
.kbtn {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft);
  background: rgba(255,255,255,0.05); border: 1px solid var(--line-2);
  padding: 8px 13px; border-radius: 9px; display: flex; align-items: center; gap: 8px;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.osbar.light .kbtn { background: rgba(40,28,20,0.05); color: #5c4f44; }
.kbtn:hover { border-color: var(--c-coral); color: var(--ink); }
.osbar.light .kbtn:hover { color: #241a13; }
.ksearch { font-weight: 700; padding: 1px 6px; border-radius: 5px; background: rgba(224,135,99,0.2); color: var(--c-coral); }
@media (max-width: 1024px) { .osbar-center { display: none; } }
@media (max-width: 760px) { .os-hide-sm { display: none; } }

/* ---- COMMAND PALETTE · macOS window ----------------------- */
.palette {
  position: fixed; inset: 0; z-index: 9000; display: grid; place-items: start center;
  padding-top: 13vh; background: rgba(8,6,5,0.5); backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  opacity: 0; visibility: hidden; transition: opacity 0.22s, visibility 0.22s;
}
.palette.open { opacity: 1; visibility: visible; }

/* the window itself — vibrancy, hairline top highlight, layered macOS shadow */
.palette-box {
  width: min(92%, 600px);
  background: linear-gradient(rgba(40,33,28,0.86), rgba(24,19,16,0.9));
  background-color: rgba(26,21,17,0.78);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 0.5px solid rgba(255,255,255,0.14);
  border-radius: 12px; overflow: hidden;
  box-shadow:
    0 0 0 0.5px rgba(0,0,0,0.5),
    0 30px 90px -20px rgba(0,0,0,0.7),
    0 8px 28px -12px rgba(0,0,0,0.6);
  transform: translateY(-8px) scale(0.96); transform-origin: top center;
  transition: transform 0.32s var(--ease);
}
.palette.open .palette-box { transform: none; }

/* macOS title bar with functional traffic lights */
.palette-titlebar {
  position: relative; display: flex; align-items: center;
  height: 38px; padding: 0 14px;
  border-bottom: 0.5px solid rgba(255,255,255,0.08);
  background: linear-gradient(rgba(255,255,255,0.04), rgba(255,255,255,0));
  user-select: none; cursor: default;
}
.pt-traffic { display: flex; gap: 8px; }
.tl {
  width: 12px; height: 12px; border-radius: 50%; display: block;
  border: 0.5px solid rgba(0,0,0,0.25); position: relative;
  transition: filter 0.15s;
}
.tl-close { background: #ff5f57; cursor: pointer; }
.tl-min   { background: #febc2e; }
.tl-zoom  { background: #28c840; }
/* glyphs reveal on hover of the traffic cluster, like real macOS */
.tl::after {
  content: ''; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 9px; font-weight: 700; line-height: 1; color: rgba(0,0,0,0.55);
  opacity: 0; transition: opacity 0.12s;
}
.pt-traffic:hover .tl-close::after { content: '\00d7'; opacity: 1; }
.pt-traffic:hover .tl-min::after   { content: '\2212'; opacity: 1; }
.pt-traffic:hover .tl-zoom::after  { content: ''; opacity: 0; }
.tl-close:active { filter: brightness(0.85); }
.pt-title {
  position: absolute; left: 0; right: 0; text-align: center; pointer-events: none;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  color: var(--ink-soft); letter-spacing: 0.01em;
}

.palette-input { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 0.5px solid rgba(255,255,255,0.07); }
.pi-prompt { color: var(--ink-mute); font-size: 19px; line-height: 1; }
#palette-q { flex: 1; background: none; border: none; outline: none; color: var(--ink); font-family: var(--font-body); font-size: 16px; }
#palette-q::placeholder { color: var(--ink-mute); }
.pi-esc { font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute); border: 0.5px solid var(--line-2); padding: 3px 8px; border-radius: 6px; }

/* macOS-style overlay scrolling — thin, rounded, contained momentum */
.palette-list {
  max-height: 340px; overflow-y: auto; padding: 8px;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}
.palette-list::-webkit-scrollbar { width: 9px; }
.palette-list::-webkit-scrollbar-track { background: transparent; }
.palette-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.16); border-radius: 8px;
  border: 2px solid transparent; background-clip: content-box;
}
.palette-list:hover::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.28); background-clip: content-box; }
.palette-list::-webkit-scrollbar-thumb:active { background: rgba(255,255,255,0.4); background-clip: content-box; }

.p-item { display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 8px; cursor: pointer; transition: background 0.12s; }
.p-item.active, .p-item:hover { background: var(--c-coral); }
.p-item.active .p-name, .p-item:hover .p-name { color: #fff; }
.p-item.active .p-desc, .p-item:hover .p-desc,
.p-item.active .p-key,  .p-item:hover .p-key { color: rgba(255,255,255,0.8); }
.p-item.active .p-ico,  .p-item:hover .p-ico { background: rgba(255,255,255,0.22); color: #fff; }
.p-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 13px; background: rgba(255,255,255,0.06); color: var(--c-coral); flex-shrink: 0; transition: background 0.12s, color 0.12s; }
.p-item .p-name { font-size: 14.5px; color: var(--ink); font-weight: 600; }
.p-item .p-desc { font-size: 12px; color: var(--ink-mute); font-family: var(--font-mono); }
.p-item .p-key { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute); }
.palette-foot { display: flex; gap: 18px; padding: 11px 18px; border-top: 0.5px solid rgba(255,255,255,0.07); font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute); }

/* ---- PANEL / WINDOW CHROME -------------------------------- */
.panel { position: relative; padding-block: clamp(60px, 9vh, 110px); scroll-margin-top: 60px; }
.panel-bar {
  position: sticky; top: 52px; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  width: min(92%, var(--maxw)); margin: 0 auto 36px;
  padding: 10px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line);
  backdrop-filter: blur(14px); font-family: var(--font-mono);
}
.pb-dots { display: flex; gap: 6px; }
.pb-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.pb-dots i:first-child { background: #e0685f; } .pb-dots i:nth-child(2) { background: #e7b15e; } .pb-dots i:nth-child(3) { background: #7bd88f; }
.pb-title { font-size: 12.5px; color: var(--ink-soft); letter-spacing: 0.02em; }
.pb-meta { margin-left: auto; font-size: 11px; color: var(--ink-mute); border: 1px solid var(--line); padding: 3px 10px; border-radius: 100px; }
.panel-pad { position: relative; z-index: 5; }

/* ---- HERO / AI CHAT --------------------------------------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: 90px; }
.hero-inner { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
.chat { max-width: 640px; }
.chat-row { display: flex; gap: 16px; align-items: flex-start; }
.chat-av { width: 56px; height: 56px; border-radius: 16px; overflow: hidden; flex-shrink: 0; border: 1px solid var(--line-2); box-shadow: var(--glow-coral); }
.chat-av img { width: 130%; height: 130%; object-fit: cover; object-position: 50% 14%; margin: -8% 0 0 -15%; }
.chat-bubbles { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.bubble {
  background: rgba(27,22,18,0.7); border: 1px solid var(--line); border-radius: 4px 18px 18px 18px;
  padding: 18px 22px; backdrop-filter: blur(12px);
  font-size: clamp(20px, 3vw, 30px); font-family: var(--font-display); font-weight: 500; line-height: 1.2; letter-spacing: -0.02em;
  color: var(--ink); min-height: 1.2em; text-wrap: pretty;
}
.bubble .grad { background: linear-gradient(110deg, var(--c-coral), var(--c-amber) 55%, var(--c-violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bubble-2 { font-family: var(--font-body); font-weight: 400; font-size: clamp(15px, 2vw, 18px); color: var(--ink-soft); }
.bubble.typing::after { content: "▍"; color: var(--c-coral); animation: blink 1s step-end infinite; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.prompt-chip {
  font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft);
  background: rgba(224,135,99,0.08); border: 1px solid rgba(224,135,99,0.3);
  padding: 10px 16px; border-radius: 100px; transition: transform 0.3s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
}
.prompt-chip:hover { background: rgba(224,135,99,0.2); color: var(--ink); border-color: var(--c-coral); }
.prompt-chip::before { content: "→ "; color: var(--c-coral); }
.chat-user { display: flex; justify-content: flex-end; animation: fadeUp 0.4s var(--ease) both; }
.user-bubble { background: linear-gradient(120deg, var(--c-coral), var(--c-coral-d)); color: #fff7f2; border-radius: 18px 4px 18px 18px; padding: 12px 18px; font-size: 14.5px; font-weight: 600; max-width: 80%; }
.assistant-reply { animation: fadeUp 0.4s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* hero id card */
.hero-side { position: relative; }
.hero-id { padding: 32px 28px; }
.hid-top { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; margin-bottom: 24px; }
/* circle = bottom 140px; orb is taller so the head can poke out the top.
   the disc (::before) draws the ring + backdrop; the mask clips the photo to
   the circle below center while leaving the top open for the head. */
/* circle = bottom 140px; orb is taller so the head can poke out the top.
   the disc (::before) draws the ring + backdrop; the mask clips everything to
   the circle below center while leaving the top open for the head. the glow is
   a drop-shadow applied after the mask, so it traces the new silhouette. */
.hid-orb { --orb: 140px; --pop: 28px; position: relative; width: var(--orb); height: calc(var(--orb) + var(--pop)); flex-shrink: 0;
  display: flex; align-items: flex-end; justify-content: center; overflow: visible;
  filter: drop-shadow(0 6px 18px rgba(255,122,89,.45));
  -webkit-mask:
    radial-gradient(circle calc(var(--orb) / 2) at 50% calc(100% - var(--orb) / 2), #000 99%, transparent 100%) 0 0 / 100% 100% no-repeat,
    linear-gradient(#000, #000) 0 0 / 100% calc(100% - var(--orb) / 2) no-repeat;
  mask:
    radial-gradient(circle calc(var(--orb) / 2) at 50% calc(100% - var(--orb) / 2), #000 99%, transparent 100%) 0 0 / 100% 100% no-repeat,
    linear-gradient(#000, #000) 0 0 / 100% calc(100% - var(--orb) / 2) no-repeat; }
.hid-orb::before { content: ""; box-sizing: border-box; position: absolute; left: 0; bottom: 0; width: var(--orb); height: var(--orb); border-radius: 50%;
  border: 2.5px solid var(--c-coral);
  background: radial-gradient(circle at 50% 32%, rgba(255,122,89,.22), rgba(20,20,28,.18) 70%); }
.hid-orb img { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); width: 165px; height: auto; object-fit: contain;
  transition: opacity .45s var(--ease), transform .45s var(--ease); will-change: opacity, transform; }
/* real photo sits on top, hidden until hover, then crossfades in */
.hid-orb .orb-real { opacity: 0; }
.hid-orb:hover .orb-avatar { opacity: 0; transform: translateX(-50%) scale(1.04); }
.hid-orb:hover .orb-real { opacity: 1; transform: translateX(-50%) scale(1.04); }
.hid-name { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.hid-role { font-family: var(--font-mono); font-size: 13px; color: var(--c-coral); margin-top: 4px; }
.hid-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hid-grid .k { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); }
.hid-grid .v { display: block; font-family: var(--font-display); font-size: 15px; margin-top: 3px; }
.hid-open { color: #7bd88f !important; }
.hid-actions { display: flex; gap: 10px; margin-top: 22px; }
.hid-actions .btn { flex: 1; justify-content: center; font-size: 13px; padding: 13px 12px; }

.scroll-cue { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-mute); }
.scroll-cue i { width: 1px; height: 30px; background: linear-gradient(var(--c-coral), transparent); animation: cueDrop 1.8s ease-in-out infinite; }
@keyframes cueDrop { 0%,100%{opacity:0.3;transform:scaleY(0.6)} 50%{opacity:1;transform:scaleY(1)} }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-side { order: -1; }
}

/* ---- TERMINAL --------------------------------------------- */
.term {
  max-width: 760px; margin: 0 auto; padding: 22px 24px; font-family: var(--font-mono);
  background: rgba(8,6,5,0.92) !important; min-height: 360px; display: flex; flex-direction: column;
}
.term-body { font-size: 13.5px; line-height: 1.75; color: var(--ink-soft); flex: 1; }
.term-body .ln { white-space: pre-wrap; word-break: break-word; }
.term-body .u { color: var(--c-coral); }
.term-body .ok { color: var(--c-cyan); }
.term-body .hl { color: var(--c-amber); }
.term-body .vi { color: var(--c-violet); }
.term-body .dim { color: var(--ink-mute); }
.term-body a { color: var(--c-cyan); text-decoration: underline; text-underline-offset: 2px; }
.term-input-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.term-prompt { color: var(--c-coral); font-size: 13.5px; white-space: nowrap; }
.tp-arrow { color: var(--c-cyan); }
#term-input { flex: 1; background: none; border: none; outline: none; color: var(--ink); font-family: var(--font-mono); font-size: 13.5px; caret-color: var(--c-coral); }
.term-hints { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 760px; margin: 16px auto 0; }
.term-hint { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-mute); border: 1px solid var(--line); padding: 6px 12px; border-radius: 100px; cursor: pointer; transition: color 0.2s, border-color 0.2s; }
.term-hint:hover { color: var(--c-coral); border-color: var(--c-coral); }

/* ---- WIPE TRANSITION -------------------------------------- */
#wipe { position: fixed; inset: 0; z-index: 8000; pointer-events: none; opacity: 0; background: radial-gradient(circle at center, transparent 0%, rgba(224,135,99,0.05) 100%); }
