/* ==========================================================================
   Linea Pronta (lineapronta.com) — Industrial Studio Manual & Left-Rail UI
   Inspired by Braun / Olivetti Technical Manuals • Zero Top-Navbar Clones
   Warm Stone #ECEBE6 • Pure Module #FFFFFF • Signal Vermilion #E04F26
   ========================================================================== */

:root {
  --lp-stone: #ECEBE6;
  --lp-stone-mid: #DFDDD5;
  --lp-module: #FFFFFF;
  --lp-ink: #191B1E;
  --lp-ink-soft: #262A2F;
  --lp-petrol: #1F3A4D;
  --lp-vermilion: #E04F26;
  --lp-vermilion-dark: #BE3C17;
  --lp-vermilion-tint: #FDF1ED;
  --lp-signal-green: #16A34A;
  --lp-amber: #D97706;

  --lp-text: #191B1E;
  --lp-body: #454A52;
  --lp-muted: #6E747E;
  --lp-seam: #D6D4CB;

  --lp-font-display: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --lp-font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --lp-font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --lp-rail-w: 276px;
  --lp-radius: 20px;
  --lp-radius-sm: 12px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

.lp-skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 200;
  padding: 8px 14px;
  background: var(--lp-vermilion);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}
.lp-skip:focus { top: 12px; }

.lp-map-frame iframe {
  width: 100%;
  min-height: 280px;
  border: 0;
  border-radius: 12px;
}

.lp-contact-form {
  display: grid;
  gap: 8px;
  max-width: 520px;
}
.lp-contact-form input,
.lp-contact-form textarea {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--lp-seam);
  border-radius: 8px;
  background: #fff;
}
.lp-contact-form button { justify-self: start; margin-top: 8px; }

body {
  margin: 0;
  background-color: var(--lp-stone);
  color: var(--lp-text);
  font-family: var(--lp-font-body);
  font-size: 15.5px;
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--lp-font-display);
  color: var(--lp-ink);
  margin-top: 0;
  line-height: 1.14;
  letter-spacing: -0.025em;
}

a {
  color: var(--lp-vermilion);
  text-decoration: none;
  transition: all 0.18s ease;
}

/* ==========================================================================
   Original Braun Oscilloscope Signal-Lock Preloader (Progressive Enhancement)
   ========================================================================== */
.lp-scope-loader {
  display: none;
}

html.lp-js .lp-scope-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--lp-stone);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.52s cubic-bezier(0.7, 0, 0.2, 1), opacity 0.4s ease;
}

html.lp-js.lp-locked .lp-scope-loader {
  transform: translateY(-102%);
  pointer-events: none;
}

.lp-scope-dial {
  background: var(--lp-module);
  border: 1.5px solid var(--lp-seam);
  border-radius: 22px;
  padding: 26px 34px;
  box-shadow: 0 20px 50px rgba(25, 27, 30, 0.08);
  text-align: center;
}

.lp-scope-leds {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.lp-led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lp-stone-mid);
}

.lp-led-1 { background: var(--lp-vermilion); }
.lp-led-2 { background: var(--lp-amber); animation: lpBlink 0.35s 0.12s forwards; }
.lp-led-3 { animation: lpLedGreen 0.35s 0.26s forwards; }

@keyframes lpBlink {
  to { background: var(--lp-amber); }
}

@keyframes lpLedGreen {
  to { background: var(--lp-signal-green); box-shadow: 0 0 10px rgba(22, 163, 74, 0.5); }
}

.lp-scope-wave {
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: lpTraceWave 0.44s ease-out forwards;
}

@keyframes lpTraceWave {
  to { stroke-dashoffset: 0; }
}

.lp-scope-label {
  font-family: var(--lp-font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--lp-ink);
  margin-top: 10px;
}

/* ==========================================================================
   Persistent Left Vertical Architectural Rail + Right Modular Workspace
   ========================================================================== */
.lp-app-shell {
  display: grid;
  grid-template-columns: var(--lp-rail-w) minmax(0, 1fr);
  min-height: 100vh;
  max-width: 1480px;
  margin-inline: auto;
  padding: 14px;
  gap: 14px;
}

.lp-rail {
  position: sticky;
  top: 14px;
  height: calc(100vh - 28px);
  background: var(--lp-module);
  border: 1px solid var(--lp-seam);
  border-radius: var(--lp-radius);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}

.lp-brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--lp-seam);
  color: var(--lp-ink);
}

.lp-brand-title {
  font-family: var(--lp-font-display);
  font-weight: 800;
  font-size: 1.24rem;
  line-height: 1.05;
  display: block;
}

.lp-brand-code {
  font-family: var(--lp-font-mono);
  font-size: 0.68rem;
  color: var(--lp-muted);
  letter-spacing: 0.05em;
}

.lp-rail-section-lbl {
  font-family: var(--lp-font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--lp-muted);
  margin: 18px 8px 8px;
}

.lp-rail-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lp-rail-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  color: var(--lp-body);
  font-weight: 600;
  font-size: 0.88rem;
  position: relative;
}

.lp-rail-link:hover {
  background: var(--lp-stone);
  color: var(--lp-ink);
}

.lp-rail-link.is-active {
  background: var(--lp-ink);
  color: #FFFFFF;
}

.lp-rail-idx {
  font-family: var(--lp-font-mono);
  font-size: 0.72rem;
  color: var(--lp-vermilion);
  font-weight: 700;
  flex-shrink: 0;
}

.lp-rail-link.is-active .lp-rail-idx {
  color: #FCA5A5;
}

.lp-rail-dial {
  background: var(--lp-stone);
  border-radius: 14px;
  padding: 14px;
  margin-top: 18px;
  font-size: 0.79rem;
}

.lp-rail-dial-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 4px;
}

.lp-rail-dial-row strong {
  font-family: var(--lp-font-mono);
  color: var(--lp-ink);
}

/* Mobile Compact Bar + Bottom Slide-Up Sheet (< 980px) */
.lp-mobile-bar {
  display: none;
}

@media (max-width: 980px) {
  .lp-app-shell {
    grid-template-columns: 1fr;
    padding: 10px;
    padding-top: 72px;
  }
  .lp-rail {
    display: none;
  }
  .lp-mobile-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--lp-seam);
    z-index: 1050;
    padding-inline: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
}

.lp-sheet-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--lp-ink);
  background: var(--lp-ink);
  color: #FFFFFF;
  font-family: var(--lp-font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.lp-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(25, 27, 30, 0.6);
  z-index: 1200;
  display: none;
}

.lp-sheet-backdrop.is-open {
  display: block;
}

.lp-bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 84vh;
  background: var(--lp-module);
  border-radius: 24px 24px 0 0;
  z-index: 1250;
  padding: 20px 18px 28px;
  display: none;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.22);
}

.lp-bottom-sheet.is-open {
  display: flex;
}

.lp-sheet-handle {
  width: 44px;
  height: 5px;
  border-radius: 99px;
  background: var(--lp-seam);
  margin: 0 auto 10px;
}

/* ==========================================================================
   Right Modular Bento Workspace & Panels
   ========================================================================== */
.lp-stage {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.lp-panel {
  background: var(--lp-module);
  border: 1px solid var(--lp-seam);
  border-radius: var(--lp-radius);
  padding: 32px;
}

@media (max-width: 640px) {
  .lp-panel {
    padding: 22px 18px;
  }
}

.lp-panel-dark {
  background: var(--lp-ink);
  color: #F3F4F6;
  border-color: var(--lp-ink);
}

.lp-panel-dark h1,
.lp-panel-dark h2,
.lp-panel-dark h3 {
  color: #FFFFFF;
}

.lp-panel-petrol {
  background: var(--lp-petrol);
  color: #F8FAFC;
  border-color: var(--lp-petrol);
}

.lp-panel-petrol h2,
.lp-panel-petrol h3 {
  color: #FFFFFF;
}

.lp-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--lp-font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 7px;
  background: var(--lp-stone);
  color: var(--lp-ink);
  margin-bottom: 14px;
}

.lp-chip-vermilion {
  background: var(--lp-vermilion-tint);
  color: var(--lp-vermilion);
}

.lp-dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lp-signal-green);
  display: inline-block;
  animation: lpPulseDot 2s infinite;
}

@keyframes lpPulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.3); }
}

/* Mosaic Grids (Asymmetric Bento) */
.lp-bento-top {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 14px;
}

.lp-bento-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.lp-bento-asymmetric {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 14px;
}

@media (max-width: 860px) {
  .lp-bento-top,
  .lp-bento-pair,
  .lp-bento-asymmetric {
    grid-template-columns: 1fr;
  }
}

.lp-h1 {
  font-size: clamp(2rem, 3.5vw, 3.05rem);
  margin-bottom: 14px;
}

.lp-lead {
  font-size: 1.05rem;
  color: var(--lp-body);
  margin: 0 0 22px;
  max-width: 62ch;
}

.lp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1.5px solid transparent;
}

.lp-btn-vermilion {
  background: var(--lp-vermilion);
  color: #FFFFFF;
}

.lp-btn-vermilion:hover {
  background: var(--lp-vermilion-dark);
  color: #FFFFFF;
}

.lp-btn-stone {
  background: var(--lp-stone);
  color: var(--lp-ink);
  border-color: var(--lp-seam);
}

.lp-btn-stone:hover {
  border-color: var(--lp-ink);
}

/* ==========================================================================
   Widget 1: 4-Scenario Usage Dial (Smartphone / Router / Famiglia / Viaggi)
   ========================================================================== */
.lp-dial-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 18px 22px;
}

.lp-dial-pill {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--lp-seam);
  background: var(--lp-stone);
  color: var(--lp-ink);
  font-family: var(--lp-font-body);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.lp-dial-pill:hover {
  border-color: var(--lp-ink);
}

.lp-dial-pill.is-selected {
  background: var(--lp-vermilion);
  border-color: var(--lp-vermilion);
  color: #FFFFFF;
}

.lp-scenario-view {
  display: none;
  background: var(--lp-stone);
  border-radius: 16px;
  padding: 24px;
}

.lp-scenario-view.is-selected {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: center;
  animation: lpPopIn 0.25s ease;
}

@media (max-width: 760px) {
  .lp-scenario-view.is-selected {
    grid-template-columns: 1fr;
  }
}

@keyframes lpPopIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Widget 2: Horizontal Connected 4-Node Lifecycle Strip
   ========================================================================== */
.lp-lifecycle-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 20px;
}

@media (max-width: 820px) {
  .lp-lifecycle-track {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .lp-lifecycle-track {
    grid-template-columns: 1fr;
  }
}

.lp-node-card {
  background: var(--lp-stone);
  border-radius: 15px;
  padding: 18px;
  border-top: 4px solid var(--lp-vermilion);
}

.lp-node-step {
  font-family: var(--lp-font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--lp-vermilion);
  display: block;
  margin-bottom: 6px;
}

/* ==========================================================================
   Widget 3: Interactive Self-Service Totem Screen Walkthrough
   ========================================================================== */
.lp-totem-frame {
  background: var(--lp-ink);
  color: #FFFFFF;
  border-radius: 24px;
  padding: 26px;
  border: 4px solid #32363D;
}

.lp-totem-steps-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.lp-totem-tab {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #3F444E;
  background: #252930;
  color: #D1D5DB;
  font-family: var(--lp-font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.lp-totem-tab.is-on {
  background: var(--lp-vermilion);
  border-color: var(--lp-vermilion);
  color: #FFFFFF;
}

.lp-totem-screen {
  display: none;
  background: #111316;
  border: 1px solid #2E333B;
  border-radius: 16px;
  padding: 22px;
}

.lp-totem-screen.is-on {
  display: block;
  animation: lpPopIn 0.24s ease;
}

/* Filterable Q&A Index Cards */
.lp-qa-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 780px) {
  .lp-qa-grid {
    grid-template-columns: 1fr;
  }
}

.lp-qa-card {
  background: var(--lp-module);
  border: 1px solid var(--lp-seam);
  border-radius: 16px;
  padding: 22px;
}

.lp-qa-card[hidden] {
  display: none !important;
}

/* Numbered Vertical Timeline Steps */
.lp-v-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lp-v-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--lp-stone);
  border-radius: 16px;
  padding: 20px;
}

.lp-v-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--lp-ink);
  color: #FFFFFF;
  font-family: var(--lp-font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Compact Inline Footer Strip Inside Right Stage (No 4-Col Dark Footer!) */
.lp-stage-footer {
  background: var(--lp-module);
  border: 1px solid var(--lp-seam);
  border-radius: var(--lp-radius);
  padding: 22px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.84rem;
  color: var(--lp-muted);
}

.lp-stage-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.lp-stage-footer-links a {
  color: var(--lp-body);
  font-weight: 600;
}

.lp-stage-footer-links a:hover {
  color: var(--lp-vermilion);
}

/* SVG Utilities */
.lp-svg-fit {
  width: 100%;
  height: auto;
  display: block;
}

.lp-wave-anim {
  stroke-dasharray: 12 8;
  animation: lpWaveMarch 1.3s linear infinite;
}

@keyframes lpWaveMarch {
  to { stroke-dashoffset: -40; }
}

/* Technical Storage Toast (Top-Right Compact Card, NOT a Wide Bottom Bar!) */
.lp-storage-toast {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: min(360px, calc(100vw - 32px));
  background: var(--lp-ink);
  color: #F3F4F6;
  border-radius: 16px;
  padding: 16px 18px;
  z-index: 1150;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.25);
  display: none;
  font-size: 0.82rem;
}

.lp-storage-toast.is-shown {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
