/* ---------- base ---------- */

::selection {
  background: #F0A202;
  color: #201B14;
}

.text-balance { text-wrap: balance; }

:focus-visible {
  outline: 3px solid #1979B9;
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #201B14;
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 50;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #C4820A;
}
.eyebrow::before {
  content: '';
  width: 1.5rem;
  height: 2px;
  background: #F0A202;
  display: inline-block;
}

/* ---------- hero panel-grid motif (echoes the roof-mounted array + logo chevron) ---------- */

.panel-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(#20191014 1px, transparent 1px),
    linear-gradient(90deg, #20191014 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(115deg, transparent 25%, black 55%);
  mask-image: linear-gradient(115deg, transparent 25%, black 55%);
}
.panel-grid::after {
  content: '';
  position: absolute;
  top: -10%;
  right: -6%;
  width: 46%;
  height: 140%;
  background: linear-gradient(160deg, #F0A20222, #1979B914 60%, transparent 100%);
  clip-path: polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%);
}

/* ---------- buttons ---------- */

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #F0A202;
  color: #201B14;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.6rem 0.85rem 1.9rem;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.cta-primary:hover { background: #C4820A; }
.cta-primary:active { transform: translateY(1px); }
.cta-primary:disabled {
  background: #20191022;
  color: #20191055;
  cursor: not-allowed;
}
.cta-primary:disabled:hover { background: #20191022; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #201B14B3;
}
.back-link:hover { color: #201B14; }

/* ---------- simulator layout ---------- */

.simulator-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .simulator-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
  #monitor { position: sticky; top: 1.5rem; }
}

.sim-card {
  background: #ffffff;
  border: 1px solid #20191014;
  border-radius: 20px;
  padding: 2rem;
}
@media (min-width: 640px) { .sim-card { padding: 2.5rem; } }

/* ---------- slider ---------- */

.slider {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: #20191016;
  outline-offset: 6px;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 22px;
  width: 22px;
  border-radius: 50%;
  background: #F0A202;
  border: 3px solid #F3F5F0;
  box-shadow: 0 0 0 1px #20191022;
  cursor: pointer;
}
.slider::-moz-range-thumb {
  height: 22px;
  width: 22px;
  border-radius: 50%;
  background: #F0A202;
  border: 3px solid #F3F5F0;
  box-shadow: 0 0 0 1px #20191022;
  cursor: pointer;
}
.slider::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: #20191016;
}

/* ---------- form fields ---------- */

.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #201B14B3;
  margin-bottom: 0.4rem;
}
.field-input {
  width: 100%;
  border: 1px solid #20191024;
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  background: #fff;
  color: #201B14;
}
.field-input:focus {
  border-color: #1979B9;
}
.field-input.has-error {
  border-color: #C0362C;
}
.field-error {
  display: none;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #C0362C;
}
.field-error.is-visible { display: block; }

/* ---------- monitor / signature element ---------- */

.monitor-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #1B1712;
  color: #F3F5F0;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 20px 50px -20px #1b171280;
}
.monitor-card > p:last-child { margin-top: auto; padding-top: 1.25rem; }

.monitor-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FFC94D;
}

.readout-number {
  font-family: 'IBM Plex Mono', monospace;
  font-variant-numeric: tabular-nums;
  font-size: 2.75rem;
  font-weight: 500;
  color: #FFC94D;
  text-shadow: 0 0 24px #ffc94d55;
  line-height: 1;
}

.readout-secondary {
  font-family: 'IBM Plex Mono', monospace;
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
  font-weight: 500;
  color: #F3F5F0;
}

.scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    #ffffff08 0px,
    #ffffff08 1px,
    transparent 1px,
    transparent 3px
  );
  animation: scan-drift 9s linear infinite;
}

@keyframes scan-drift {
  from { background-position: 0 0; }
  to { background-position: 0 240px; }
}

#monitor.is-empty #monitor-empty { display: block; }
#monitor:not(.is-empty) #monitor-empty { display: none; }
#monitor-empty { display: none; }

/* ---------- motion & accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
  .scanline { animation: none; }
  .cta-primary, .field-input, #step-progress, #arc { transition: none !important; }
  * { scroll-behavior: auto !important; }
}
