/* styles/site.css — quiet protocol console, one viewport */

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --line: #e7e5e4;
  --text: #1c1917;
  --muted: #78716c;
  --orange: #ff6b35;
  --blue: #3b82f6;
  --green: #10b981;
  --code-bg: #16161d;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header — centered wordmark */
header {
  padding: 22px 0 8px;
  text-align: center;
}
.wordmark {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* Main stage — centered, fits in viewport */
.stage-wrap {
  flex: 1;
  width: min(560px, 92vw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}

.intro { text-align: center; }
.intro h1 {
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.intro p { color: var(--muted); margin: 0; }

/* Demo card */
.demo {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(28,25,23,.06);
  padding: 16px;
}

/* View toggle — centered segmented control */
.view-toggle {
  display: flex;
  justify-content: center;
  background: #f4f4f5;
  border-radius: 999px;
  padding: 3px;
  margin-bottom: 14px;
}
.view-toggle button {
  flex: 1;
  max-width: 180px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: .85rem;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s ease;
}
.view-toggle button.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(28,25,23,.14);
}

/* Views */
.view { display: none; }
.view.active { display: block; }

/* User view — weather card */
.weather-card {
  border-radius: 12px;
  padding: 22px 24px;
  transition: background .3s ease;
}
.weather-card.locked { background: #faf5f0; }
.weather-card.unlocked { background: #ecfdf5; }

.lock-label {
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.weather-card.unlocked .lock-label { color: #047857; }
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
.weather-card.locked .dot { animation: pulse 1.6s ease infinite; }
@keyframes pulse { 0%,100%{opacity:.4} 55%{opacity:1} }

.city {
  font-size: .85rem;
  color: var(--muted);
  margin: 10px 0 2px;
}
.temp .big {
  display: block;
  font-size: clamp(3.4rem, 14vw, 5rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #a8a29e;
}
.temp .big.revealed { color: var(--text); }
.forecast {
  list-style: none;
  margin: 14px 0 4px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  font-size: .85rem;
}
.weather-card.locked .forecast { filter: blur(5px); opacity: .45; }
.weather-card.unlocked .forecast { transition: all .4s ease; }

/* Developer view — log */
.log-panel {
  background: var(--code-bg);
  border-radius: 10px;
  min-height: 208px;
}
#httpLog {
  margin: 0;
  padding: 14px 16px;
  font-family: "SFMono-Regular", ui-monospace, Menlo, Monaco, Consolas, monospace;
  font-size: .78rem;
  line-height: 1.6;
  color: #d4d4dc;
  white-space: pre-wrap;
}
#httpLog b { color: var(--orange); }
#httpLog .ok { color: var(--green); }

/* Status bar */
.statusbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.state-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #d6d3d1;
  flex-shrink: 0;
}
#statusText { font-size: .85rem; color: var(--muted); }

.primary {
  margin-left: auto;
  border: none;
  background: var(--orange);
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.primary:hover { background: #e85a20; }
.primary:active { transform: translateY(1px); }
.primary:disabled { opacity: .6; cursor: default; }

/* Footer */
footer {
  text-align: center;
  padding: 14px;
  color: var(--muted);
  font-size: .78rem;
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0s !important; animation-duration: 0s !important; }
}
