/* Slow Drip Café — Gran Turismo 7 Café Living Gallery Aesthetic */
:root {
  --bg: #0f0d0c;
  --glass: rgba(16, 14, 13, 0.56);
  --glass-strong: rgba(16, 14, 13, 0.78);
  --border: rgba(244, 232, 218, 0.14);
  --border-warm: rgba(227, 164, 102, 0.28);
  --text: #f5efe6;
  --muted: rgba(245, 239, 230, 0.68);
  --subtle: rgba(245, 239, 230, 0.44);
  --amber: #e3a466;
  --amber-soft: rgba(227, 164, 102, 0.22);
  --amber-glow: rgba(227, 164, 102, 0.55);
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

body.idle { cursor: none; }

/* ---------- Full-bleed Stage ---------- */
.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #0d0b0a;
}

.scene-img {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 4s ease-in-out;
  will-change: opacity, transform;
  transform: scale(1.02) translate3d(0, 0, 0);
}

.scene-img.on { opacity: 1; }

body.pan .scene-img.on {
  animation: slowDrift 90s ease-in-out infinite alternate;
}

@keyframes slowDrift {
  0%   { transform: scale(1.02) translate3d(-1.2%, -0.8%, 0); }
  100% { transform: scale(1.07) translate3d(1.2%, 0.8%, 0); }
}

/* Corner-weighted scrims so the center of the photo stays luminous */
.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 48% at 92% 10%, rgba(12, 10, 9, 0.52) 0%, transparent 72%),
    radial-gradient(ellipse 62% 58% at 14% 88%, rgba(12, 10, 9, 0.62) 0%, transparent 74%),
    linear-gradient(180deg, rgba(10, 9, 8, 0.14) 0%, transparent 22%, transparent 76%, rgba(10, 9, 8, 0.36) 100%);
}

/* ---------- TOP-RIGHT: Unified Live Telemetry ---------- */
.telemetry {
  position: fixed;
  top: 28px;
  right: 32px;
  width: 348px;
  padding: 18px 20px 14px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  z-index: 20;
}

.tel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.tel-time-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}

.tel-time {
  font-size: 38px;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1;
}

.tel-ampm {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--amber);
}

.tel-date {
  margin-top: 5px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.tel-wx {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: right;
  padding-top: 2px;
}

.tel-wx-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.tel-wx-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.tel-temp {
  font-size: 24px;
  font-weight: 400;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.tel-cond {
  font-size: 11px;
  color: var(--muted);
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Slim Workday Countdown Bar */
.tel-work {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.tel-work-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11.5px;
  margin-bottom: 6px;
}

.tel-work-label {
  color: var(--muted);
  letter-spacing: 0.02em;
}

.tel-work-val {
  color: var(--text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.tel-bar-track {
  height: 4px;
  border-radius: 99px;
  background: rgba(245, 239, 230, 0.14);
  overflow: hidden;
}

.tel-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(227, 164, 102, 0.65), var(--amber));
  transition: width 1.2s ease;
}

/* 60-Second Rotating Drawer inside Top-Right */
.tel-drawer {
  position: relative;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  height: 112px;
  overflow: hidden;
}

.tel-slide {
  position: absolute;
  inset: 12px 0 0 0;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  pointer-events: none;
}

.tel-slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.slide-eyebrow {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.11em;
  color: var(--amber);
  margin-bottom: 8px;
}

/* Sun Arc */
.arc-wrap { width: 100%; height: 56px; }
.arc-svg { width: 100%; height: 100%; overflow: visible; }
.arc-horizon { stroke: rgba(245, 239, 230, 0.16); stroke-width: 1; stroke-dasharray: 2 4; }
.arc-track { fill: none; stroke: rgba(245, 239, 230, 0.16); stroke-width: 1.5; }
.arc-done { fill: none; stroke: var(--amber); stroke-width: 2; stroke-linecap: round; }
.sun-halo { fill: var(--amber-soft); animation: breathe 4s ease-in-out infinite; }
.sun-dot { fill: #fff3df; }

@keyframes breathe {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.95; transform: scale(1.18); }
}

.arc-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.arc-mid { color: var(--text); font-weight: 500; }

.daylight-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

.moon-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.moon-svg { width: 13px; height: 13px; }
.moon-bg { fill: rgba(245, 239, 230, 0.16); }
.moon-lit { fill: #f3dfb8; }

/* 8-Hour Forecast Strip */
.hours-strip {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  text-align: center;
}

.hr-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.hr-t { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hr-col .wi { width: 22px; height: 22px; }
.hr-v { font-size: 11.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.hr-p { font-size: 9.5px; color: #8dc4f0; min-height: 12px; }

/* 4,000 Weeks Compact Bar */
.weeks-bar-track {
  position: relative;
  height: 10px;
  border-radius: 99px;
  background: rgba(245, 239, 230, 0.14);
  margin: 12px 0 12px;
}

.weeks-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(227, 164, 102, 0.55), var(--amber));
  transition: width 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.weeks-bar-now {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff3df;
  box-shadow: 0 0 12px var(--amber-glow);
  transform: translate(-50%, -50%);
}

.weeks-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11.5px;
  color: var(--muted);
}

.weeks-meta strong {
  color: var(--text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Telemetry Slide Dots */
.tel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.tel-dots i {
  width: 14px;
  height: 2.5px;
  border-radius: 99px;
  background: rgba(245, 239, 230, 0.2);
  cursor: pointer;
  transition: background 0.4s ease, width 0.4s ease;
}

.tel-dots i.active {
  width: 24px;
  background: var(--amber);
}

/* ---------- LOWER-LEFT: Calm Gallery Card ---------- */
.gallery-card {
  position: fixed;
  left: 44px;
  bottom: 42px;
  width: min(620px, calc(100vw - 88px));
  padding: 28px 32px 24px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(125%);
  -webkit-backdrop-filter: blur(20px) saturate(125%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1.8s ease, transform 1.8s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 15;
}

.gallery-card.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.card-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.card-sep { opacity: 0.5; }

.card-title {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
}

.card-sub {
  margin-top: 8px;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--muted);
}

.card-divider {
  height: 1px;
  margin: 18px 0 16px;
  background: linear-gradient(90deg, var(--border-warm), transparent 85%);
}

.quote-block { margin: 0; }

.quote-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.1vw, 25px);
  line-height: 1.38;
  color: rgba(245, 239, 230, 0.94);
}

.quote-by {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--amber);
  letter-spacing: 0.03em;
}

.card-footer {
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.compass-row, .anchors-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compass-row span, .anchors-row span {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 99px;
  background: rgba(245, 239, 230, 0.07);
  border: 1px solid rgba(245, 239, 230, 0.12);
  color: var(--muted);
}

.legacy-line, .sync-line {
  font-size: 12px;
  color: var(--subtle);
  letter-spacing: 0.01em;
}

/* Focus Card specifics */
.focus-headline {
  font-size: clamp(24px, 2.5vw, 31px);
  margin-bottom: 14px;
}

.focus-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.focus-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 15px;
  line-height: 1.42;
}

.focus-tag {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  background: var(--amber-soft);
  padding: 2px 8px;
  border-radius: 6px;
}

.week-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.wday {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: center;
}

.wday-bar {
  height: 4px;
  border-radius: 99px;
  background: rgba(245, 239, 230, 0.14);
  overflow: hidden;
}

.wday-bar i {
  display: block;
  height: 100%;
  background: var(--amber);
  border-radius: 99px;
}

.wday span {
  font-size: 10.5px;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wday.today span { color: var(--amber); font-weight: 600; }

/* ---------- Optional 4,000 Weeks Modal ---------- */
.weeks-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(10, 9, 8, 0.84);
  backdrop-filter: blur(18px);
}

.weeks-modal[hidden] { display: none; }

.weeks-modal-inner {
  width: min(860px, 92vw);
  padding: 28px 32px;
  border-radius: var(--radius);
  background: rgba(20, 17, 15, 0.92);
  border: 1px solid var(--border-warm);
}

.weeks-modal-inner .card-eyebrow {
  justify-content: space-between;
}

.modal-title {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  margin-bottom: 6px;
}

.modal-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

.weeks-grid-wrap {
  position: relative;
  padding-bottom: 24px;
}

.weeks-now-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #fff3df;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: pulseRing 2.6s ease-out infinite;
}

@keyframes pulseRing {
  0%   { transform: translate(-50%, -50%) scale(0.7); opacity: 0.95; }
  100% { transform: translate(-50%, -50%) scale(2.3); opacity: 0; }
}

.weeks-ages {
  position: relative;
  height: 18px;
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--subtle);
}

.weeks-ages span {
  position: absolute;
  transform: translateX(-50%);
}

/* ---------- Bottom-Right Discreet Controls ---------- */
.controls {
  position: fixed;
  right: 32px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 30;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

body.awake .controls {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scene-caption {
  font-size: 12px;
  color: var(--muted);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.ctrl-group {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 99px;
  background: var(--glass-strong);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.ctrl-btn:hover { background: rgba(245, 239, 230, 0.12); color: var(--text); }
.ctrl-btn[aria-pressed="true"] { background: var(--amber-soft); color: var(--amber); }

/* ---------- Settings Drawer ---------- */
.settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 340px;
  max-width: 92vw;
  padding: 26px 24px;
  background: rgba(16, 14, 13, 0.94);
  border-left: 1px solid var(--border);
  backdrop-filter: blur(24px);
  z-index: 50;
  transform: translateX(104%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
}

.settings-panel.open { transform: translateX(0); }

.settings-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.settings-head h2 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
}

.icon-btn:hover { color: var(--text); border-color: var(--amber); }

.setting-group { margin-bottom: 20px; }
.setting-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.seg button {
  flex: 1 1 auto;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(245, 239, 230, 0.04);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  cursor: pointer;
}

.seg button[aria-pressed="true"] {
  background: var(--amber-soft);
  border-color: var(--amber);
  color: var(--text);
}

.setting-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}

.action-btn {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(245, 239, 230, 0.06);
  color: var(--text);
  font-family: var(--sans);
  font-size: 12.5px;
  cursor: pointer;
}

.action-btn:hover { border-color: var(--amber); }

.action-link {
  display: block;
  text-align: center;
  text-decoration: none;
  color: var(--amber);
}

.shortcuts {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 11.5px;
  color: var(--subtle);
}

.shortcuts b { color: var(--amber); font-weight: 600; margin-right: 4px; }

/* Toast */
.toast {
  position: fixed;
  bottom: 72px;
  right: 32px;
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--glass-strong);
  border: 1px solid var(--border-warm);
  font-size: 12.5px;
  color: var(--text);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  z-index: 60;
}

.toast.show { opacity: 1; transform: translateY(0); }

/* ---------- Animated Weather SVGs ---------- */
.wi { width: 100%; height: 100%; overflow: visible; }
.wi .glow { fill: rgba(227, 164, 102, 0.22); }
.wi .sun { fill: #f4c67a; }
.wi .ray { stroke: #f4c67a; stroke-width: 2.2; stroke-linecap: round; }
.wi .rays { transform-origin: 32px 32px; animation: spinSlow 28s linear infinite; }
.wi .moon { fill: #f3e4c6; }
.wi .star { fill: #fff6e6; animation: twinkle 3.2s ease-in-out infinite; }
.wi .cl path { fill: #e9e4dc; }
.wi .cl2 path { fill: rgba(233, 228, 220, 0.65); }
.wi .drift { animation: cloudDrift 7s ease-in-out infinite alternate; }
.wi .drift2 { animation: cloudDrift 9s ease-in-out infinite alternate-reverse; }
.wi .drop { stroke: #8ec7f2; stroke-width: 2.4; stroke-linecap: round; animation: rainFall 1.3s linear infinite; }
.wi .flake { fill: #eef6ff; animation: snowFall 2.6s ease-in-out infinite; }
.wi .fogl { stroke: rgba(233, 228, 220, 0.7); stroke-width: 2.4; stroke-linecap: round; animation: cloudDrift 5s ease-in-out infinite alternate; }
.wi .bolt { fill: #ffd875; animation: flash 3.5s ease-in-out infinite; }

@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes cloudDrift { from { transform: translateX(-2px); } to { transform: translateX(2.5px); } }
@keyframes rainFall { 0% { opacity: 0; transform: translateY(-4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(9px); } }
@keyframes snowFall { 0% { opacity: 0; transform: translate(0, -3px); } 50% { opacity: 1; } 100% { opacity: 0; transform: translate(-2px, 9px); } }
@keyframes flash { 0%, 88%, 100% { opacity: 0.2; } 92% { opacity: 1; } }

@media (max-width: 900px) {
  .telemetry { top: 16px; right: 16px; width: 310px; }
  .gallery-card { left: 16px; bottom: 64px; width: calc(100vw - 32px); padding: 20px; }
}
