@font-face {
  font-family: 'Special Elite';
  src: url('/assets/fonts/special-elite-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/jetbrains-mono-400.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --beige-lo: #565f46;
  --beige-mid: #a3a189;
  --beige-hi: #b9b79c;
  --room: #0e0d0a;
  --ink: #14130f;
  --paper: #e8e2ca;
  --amber: #c98a3d;
  --maxh: clamp(64px, 15vw, 176px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--room);
  cursor: default;
}

body {
  position: relative;
  font-family: 'JetBrains Mono', monospace;
}

.blinds {
  position: fixed;
  inset: 0;
  background-image: url('/assets/blinds-tile.png');
  background-repeat: repeat-y;
  background-size: 100% 78px;
  background-position: center top;
  filter: saturate(0.92) contrast(1.02);
}

.blinds::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 0%, transparent 45%, rgba(0,0,0,0.28) 100%);
  pointer-events: none;
}

.peek-wrap {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(80vw, 840px);
  height: 0;
  max-height: var(--maxh);
  overflow: hidden;
  transform: translate(calc(-50% + var(--shiftx, 0px)), -50%);
  pointer-events: none;
}

.peek-wrap img {
  position: absolute;
  left: 50%;
  top: 50%;
  height: var(--maxh);
  width: auto;
  max-width: none;
  transform: translate(-50%, -50%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
}

.tag {
  position: fixed;
  top: clamp(16px, 3vw, 28px);
  left: clamp(16px, 3vw, 28px);
  margin: 0;
  pointer-events: none;
}

.tag p {
  margin: 0;
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: clamp(12px, 1.6vw, 15px);
  letter-spacing: 0.03em;
  color: var(--paper);
  text-shadow: 0 1px 2px rgba(0,0,0,0.6), 0 0 14px rgba(0,0,0,0.4);
  opacity: 0.82;
}

.sill {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  background: var(--ink);
  border-top: 1px solid rgba(201, 138, 61, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(10px, 2.4vw, 22px);
  gap: 12px;
  z-index: 10;
}

.sill-left {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.6vw, 16px);
  min-width: 0;
}

.sill-ticker {
  color: var(--amber);
  font-size: 12px;
  letter-spacing: 0.05em;
  flex: none;
}

.sill-ca {
  appearance: none;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 2px;
  color: var(--paper);
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(10px, 2.4vw, 13px);
  padding: 5px 9px;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 46vw;
}

.sill-ca:hover { border-color: rgba(255,255,255,0.3); }

.sill-copied {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--amber);
  color: var(--ink);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.sill-ca.copied .sill-copied {
  opacity: 1;
  transform: translateY(0);
}

.sill-right {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 18px);
  flex: none;
}

.sill-right a {
  color: var(--beige-hi);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.sill-right a:hover {
  color: var(--paper);
  border-color: var(--amber);
}

.sill-clock {
  color: rgba(232, 226, 202, 0.4);
  font-size: 11px;
  display: none;
}

@media (min-width: 640px) {
  .sill-clock { display: inline; }
}

@media (max-width: 560px) {
  .sill {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    height: 66px;
    padding: 7px clamp(10px, 3vw, 16px);
    gap: 5px;
  }
  .sill-left { justify-content: space-between; }
  .sill-ca {
    max-width: none;
    flex: 1;
    font-size: 10.5px;
    padding: 4px 7px;
  }
  .sill-right { justify-content: flex-end; }
  .sill-clock { display: none !important; }
  .tag p { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .peek-wrap { height: var(--maxh) !important; }
}
