/* ═══════════════════════════════════════════════════════════════
   SonicSpace — dashboard.css
   Landing page, results layout, hero, info sections
   ═══════════════════════════════════════════════════════════════ */

/* ─── LANDING PAGE LAYOUT ────────────────────────────────────── */
.page-landing {
  background: var(--bg-base);
}

/* ─── HERO ───────────────────────────────────────────────────── */
.landing-main {
  padding-top: var(--header-height);
}

.hero-section {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: flex-start;
  overflow: hidden;
}

.hero-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.35;
}

/* Subtle grid overlay */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--sp-20) var(--sp-6) var(--sp-16);
  width: 100%;
}

.hero-eyebrow {
  margin-bottom: var(--sp-6);
}

.hero-heading {
  font-family: var(--font-sans);
  font-size: clamp(var(--text-3xl), 6vw, var(--text-5xl));
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  margin-bottom: var(--sp-3);
}

.hero-subheading {
  font-family: var(--font-mono);
  font-size: clamp(var(--text-lg), 3vw, var(--text-2xl));
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wider);
  color: var(--accent-primary);
  margin-bottom: var(--sp-6);
  text-transform: uppercase;
  line-height: 1;
}

.hero-description {
  font-size: var(--text-md);
  color: var(--text-secondary);
  max-width: 560px;
  line-height: var(--leading-normal);
  margin-bottom: var(--sp-10);
}

.purpose-label-text {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
}

.hero-actions {
  margin-top: var(--sp-8);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

/* ─── HOW IT WORKS ───────────────────────────────────────────── */
.how-section {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.how-section .section-heading {
  font-size: var(--text-2xl);
  font-family: var(--font-sans);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  text-transform: none;
}

.how-section .section-heading::before {
  display: none;
}

/* ─── RT60 INFO SECTION ──────────────────────────────────────── */
.info-section {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-base);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
}

.info-text .section-heading {
  font-family: var(--font-sans);
  font-size: var(--text-2xl);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  text-transform: none;
}

.info-text .section-heading::before {
  display: none;
}

.info-text p {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--sp-4);
}

/* ─── RT60 STATIC CHART ──────────────────────────────────────── */
.rt60-visual {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
}

.rt60-chart-static {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.rt60-bar-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--sp-1);
  text-transform: uppercase;
}

.rt60-bar-track {
  height: 10px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.rt60-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: var(--sp-2);
  transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rt60-bar-mid  { background: var(--accent-blue); }
.rt60-bar-high { background: var(--accent-amber); }
.rt60-bar-max  { background: var(--accent-red); }

.rt60-bar-val {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: var(--weight-bold);
  color: var(--text-inverse);
  white-space: nowrap;
  opacity: 0.85;
}

/* ─── LIMITATION SECTION ─────────────────────────────────────── */
.limitation-section {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.limitation-card {
  display: flex;
  gap: var(--sp-6);
  align-items: flex-start;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 184, 79, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
}

.limitation-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.limitation-heading {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--accent-amber);
  margin-bottom: var(--sp-4);
}

.limitation-text p {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--sp-8) 0;
  background: var(--bg-base);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.footer-tagline {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

.footer-link {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: var(--weight-medium);
  transition: color var(--transition-fast);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.footer-link:hover {
  color: var(--text-primary);
}

/* ─── PAGE LAYOUT (shared across inner pages) ────────────────── */
.page-content {
  padding-top: var(--header-height);
  min-height: 100vh;
}

.page-body {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--sp-12) var(--sp-6);
}

.page-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-8);
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.page-title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}

.page-title-main {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-3xl));
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

/* ─── MEASUREMENT STATUS DISPLAY ─────────────────────────────── */
.measurement-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-8);
  text-align: center;
}

.status-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-primary-dim);
  border: 1px solid rgba(79, 255, 176, 0.25);
}

.status-text {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-primary);
}

.status-subtext {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 320px;
  line-height: var(--leading-normal);
}

/* ─── COUNTDOWN ──────────────────────────────────────────────── */
.countdown-display {
  font-family: var(--font-mono);
  font-size: 96px;
  font-weight: var(--weight-black);
  color: var(--accent-primary);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  text-shadow: 0 0 40px var(--accent-primary-glow);
  animation: countdownPulse 1s ease-in-out;
}

@keyframes countdownPulse {
  0%   { transform: scale(1.2); opacity: 0; }
  40%  { opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* ─── RESULTS LAYOUT ─────────────────────────────────────────── */
.results-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--sp-6);
  align-items: start;
}

.results-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  position: sticky;
  top: calc(var(--header-height) + var(--sp-4));
}

.results-main {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

/* ─── RT60 DISPLAY ───────────────────────────────────────────── */
.rt60-display {
  text-align: center;
  padding: var(--sp-8) var(--sp-6);
}

.rt60-value-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
}

.rt60-value {
  font-family: var(--font-mono);
  font-size: clamp(var(--text-3xl), 6vw, 72px);
  font-weight: var(--weight-black);
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
}

.rt60-unit {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  color: var(--text-muted);
  font-weight: var(--weight-regular);
}

.rt60-estimate-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  color: var(--accent-amber);
  text-transform: uppercase;
  margin-top: var(--sp-2);
}

.rt60-description {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 280px;
  margin: var(--sp-4) auto 0;
  line-height: var(--leading-normal);
}

/* ─── RECOMMENDATION CARD ────────────────────────────────────── */
.recommendation-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.recommendation-item {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-primary);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.recommendation-item:hover {
  background: var(--bg-overlay);
  border-left-color: var(--accent-blue);
}

.recommendation-priority {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  flex-shrink: 0;
  padding-top: 2px;
}

/* ─── HISTORY TABLE ──────────────────────────────────────────── */
.history-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.history-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--sp-5) var(--sp-6);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-4);
  align-items: center;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.history-item:hover {
  background: var(--bg-elevated);
  border-color: var(--border-default);
}

.history-item-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.history-item-name {
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  font-size: var(--text-base);
}

.history-item-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.history-meta-item {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: var(--tracking-wide);
}

.history-item-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

/* ─── COMPARISON LAYOUT ──────────────────────────────────────── */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  gap: var(--sp-4);
  align-items: start;
}

.comparison-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: var(--sp-8);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
}

.comparison-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
}

.delta-display {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}

.delta-positive { color: var(--accent-green); }
.delta-negative { color: var(--accent-red); }
.delta-neutral  { color: var(--text-muted); }

/* ─── POSITION MAP ───────────────────────────────────────────── */
.position-map {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.position-map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.5;
}

.position-marker {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform var(--transition-spring), box-shadow var(--transition-base);
  z-index: 2;
}

.position-marker:hover {
  transform: translate(-50%, -50%) scale(1.15);
}

.position-marker-good {
  background: rgba(79, 255, 176, 0.2);
  border: 2px solid var(--accent-green);
  color: var(--accent-green);
  box-shadow: 0 0 12px rgba(79, 255, 176, 0.3);
}

.position-marker-mid {
  background: rgba(255, 184, 79, 0.2);
  border: 2px solid var(--accent-amber);
  color: var(--accent-amber);
}

.position-marker-poor {
  background: rgba(255, 79, 107, 0.2);
  border: 2px solid var(--accent-red);
  color: var(--accent-red);
}

/* ─── TECHNICAL VIEW ─────────────────────────────────────────── */
.technical-panel {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.technical-panel-header {
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.technical-panel-title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--accent-blue);
}

.technical-panel-body {
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.tech-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-1);
  border-bottom: 1px solid var(--border-subtle);
  min-height: 44px;
}

.tech-row:last-child {
  border-bottom: none;
}

.tech-key {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
  letter-spacing: 0;
  text-transform: none;
  flex-shrink: 0;
}

.tech-val {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  text-align: right;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Device name — slightly dimmer since it's long detail text */
#dev-input {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  max-width: 200px;
}

.tech-val.good    { color: var(--accent-green); }
.tech-val.warn    { color: var(--accent-amber); }
.tech-val.danger  { color: var(--accent-red); }

/* ── STAT PILLS — for audio spec grids ────────────────────────── */
.stat-pill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
}

.stat-pill {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.stat-pill-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: var(--weight-medium);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-pill-value {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
}

