/* ==========================================================================
   GOONS - SEO landing pages (silos / "cocons")
   Extends /shared/css/play.css with the three pieces the app pages don't need:
     1. .lp-demo    - the playable instrument brick + its deep-link card
     2. .lp-compare - comparison table
     3. .lp-silo    - internal navigation between the pages of a silo
   Tokens (--play-*, --accent*) come from play.css.
   ========================================================================== */

/* ==========================================================================
   1. PLAYABLE BRICK
   ========================================================================== */

.lp-demo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}

.lp-demo-stage {
    position: relative;
    min-height: 300px;
    padding: 22px;
    border: 1px solid var(--play-border);
    border-radius: var(--play-radius);
    background:
        radial-gradient(120% 100% at 50% -20%, var(--accent-soft), transparent 60%),
        rgba(255, 255, 255, 0.028);
    box-shadow: var(--play-shadow);
    overflow: hidden;
}

.lp-demo-stage::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
}

.lp-demo-fallback {
    margin: 0;
    color: var(--play-muted);
    font-size: 14px;
}

/* Deep-link card ---------------------------------------------------------- */
.lp-demo-aside {
    padding: 24px 22px;
    border: 1px solid var(--play-border);
    border-radius: var(--play-radius);
    background: rgba(255, 255, 255, 0.03);
}

.lp-demo-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 14px;
    border-radius: 16px;
    border: 1px solid var(--accent-line);
    background: var(--accent-soft);
    box-shadow: 0 0 26px var(--accent-glow);
}

.lp-demo-tag svg { width: 34px; height: 34px; display: block; }

.lp-demo-aside h3 {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.lp-demo-aside p {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--play-muted);
}

.lp-demo-aside .play-btn { width: 100%; justify-content: center; }

.lp-demo-aside small {
    display: block;
    margin-top: 14px;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--play-faint);
}

.lp-demo-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.lp-demo-link:hover { text-decoration: underline; }

/* ==========================================================================
   1b. THE WIDGET ITSELF (rendered by /shared/js/lp-instrument.js)
   ========================================================================== */

.lpi {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-family: var(--play-font);
}

.lpi-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.lpi-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--play-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--play-faint);
}

.lpi-title .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.lpi-transport {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lpi-btn {
    padding: 9px 15px;
    border: 1px solid var(--play-border-strong);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--play-text);
    font-family: var(--play-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.12s;
}

.lpi-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--accent-line); }
.lpi-btn:active { transform: translateY(1px); }

.lpi-btn.is-go {
    border-color: var(--accent-line);
    background: var(--accent-soft);
    color: var(--accent);
}

.lpi-btn.is-on {
    background: var(--accent);
    border-color: var(--accent);
    color: #05050a;
    box-shadow: 0 0 22px var(--accent-glow);
}

/* Knobs / sliders --------------------------------------------------------- */
.lpi-knobs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 10px;
}

.lpi-knob {
    padding: 9px 12px 11px;
    border: 1px solid var(--play-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.026);
}

.lpi-knob-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 6px;
    font-family: var(--play-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--play-faint);
}

.lpi-knob-top b { color: var(--accent); font-size: 11.5px; }

.lpi-knob input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.14);
    outline: none;
    cursor: pointer;
}

.lpi-knob input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
    cursor: pointer;
}

.lpi-knob input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: none;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}

/* Step grid --------------------------------------------------------------- */
.lpi-grid { display: flex; flex-direction: column; gap: 7px; }

.lpi-grid-row {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.lpi-row-name {
    font-family: var(--play-mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--play-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lpi-steps {
    display: grid;
    grid-template-columns: repeat(16, minmax(0, 1fr));
    gap: 4px;
}

.lpi-step {
    position: relative;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.035);
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
}

.lpi-step:nth-child(4n + 1) { background: rgba(255, 255, 255, 0.07); }
.lpi-step:hover { border-color: var(--accent-line); }

.lpi-step.is-on {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 14px var(--accent-glow);
}

.lpi-step.is-roll::after {
    content: '';
    position: absolute;
    inset: 40% 30%;
    border-radius: 2px;
    background: #05050a;
    opacity: 0.55;
}

.lpi-step.is-cursor { outline: 2px solid rgba(255, 255, 255, 0.55); outline-offset: 1px; }

.lpi-ruler {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    margin-top: 2px;
}

.lpi-ruler-cells {
    display: grid;
    grid-template-columns: repeat(16, minmax(0, 1fr));
    gap: 4px;
    font-family: var(--play-mono);
    font-size: 9.5px;
    color: var(--play-faint);
    text-align: center;
}

/* Pads -------------------------------------------------------------------- */
.lpi-pads {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.lpi-pad {
    position: relative;
    height: 94px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--play-border-strong);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--play-text);
    font-family: var(--play-mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.08s, background 0.12s, box-shadow 0.15s, border-color 0.15s;
}

.lpi-pad b {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: var(--play-faint);
}

.lpi-pad:hover { border-color: var(--accent-line); }

.lpi-pad.is-hit {
    background: var(--accent);
    border-color: var(--accent);
    color: #05050a;
    box-shadow: 0 0 28px var(--accent-glow);
    transform: translateY(2px) scale(0.98);
}

.lpi-pad.is-hit b { color: rgba(5, 5, 10, 0.65); }

/* Keys -------------------------------------------------------------------- */
.lpi-keys {
    position: relative;
    display: flex;
    height: 150px;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--play-border);
}

.lpi-key {
    position: relative;
    flex: 1 0 auto;
    border: none;
    border-right: 1px solid rgba(0, 0, 0, 0.55);
    background: linear-gradient(180deg, #f4f6ff, #c9cee4);
    cursor: pointer;
    padding: 0 0 9px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    font-family: var(--play-mono);
    font-size: 9.5px;
    font-weight: 700;
    color: rgba(5, 5, 10, 0.42);
    transition: background 0.08s, box-shadow 0.12s;
}

.lpi-key.is-black {
    position: absolute;
    top: 0;
    width: 26px;
    height: 62%;
    margin-left: -13px;
    border-radius: 0 0 6px 6px;
    background: linear-gradient(180deg, #22243a, #0a0b14);
    color: rgba(232, 236, 255, 0.5);
    z-index: 2;
}

.lpi-key.is-down {
    background: var(--accent);
    color: #05050a;
    box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.35);
}

/* Scope ------------------------------------------------------------------- */
.lpi-scope {
    width: 100%;
    height: 74px;
    display: block;
    border: 1px solid var(--play-border);
    border-radius: 12px;
    /* A centred baseline so the scope reads as an instrument before it runs */
    background-color: rgba(0, 0, 0, 0.4);
    background-image: linear-gradient(
        to bottom,
        transparent calc(50% - 1px),
        rgba(255, 255, 255, 0.13) calc(50% - 1px),
        rgba(255, 255, 255, 0.13) calc(50% + 1px),
        transparent calc(50% + 1px)
    );
}

.lpi-foot {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--play-faint);
}

.lpi-foot kbd {
    padding: 2px 6px;
    border: 1px solid var(--play-border-strong);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.06);
    font-family: var(--play-mono);
    font-size: 11px;
    color: var(--play-text);
}

/* "Enable audio" veil ------------------------------------------------------ */
.lpi-arm {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
    text-align: center;
    border: none;
    border-radius: var(--play-radius);
    background: rgba(5, 5, 10, 0.66);
    backdrop-filter: blur(1.5px);
    color: var(--play-text);
    cursor: pointer;
    font-family: var(--play-font);
}

.lpi-arm span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 24px;
    border-radius: 999px;
    border: 1px solid var(--accent-line);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 0 34px var(--accent-glow);
}

.lpi-arm small { color: var(--play-faint); font-size: 12px; }

/* ==========================================================================
   2. COMPARISON TABLE
   ========================================================================== */

.lp-compare-wrap {
    overflow-x: auto;
    border: 1px solid var(--play-border);
    border-radius: var(--play-radius);
    background: rgba(255, 255, 255, 0.026);
}

.lp-compare {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-size: 14.5px;
}

.lp-compare th,
.lp-compare td {
    padding: 16px 20px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    line-height: 1.6;
}

.lp-compare thead th {
    font-family: var(--play-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--play-faint);
    background: rgba(255, 255, 255, 0.03);
}

.lp-compare thead th.is-us { color: var(--accent); }

.lp-compare tbody th {
    width: 24%;
    font-weight: 700;
    color: var(--play-text);
}

.lp-compare td { color: var(--play-muted); }

.lp-compare td.is-us {
    color: var(--play-text);
    background: var(--accent-soft);
    box-shadow: inset 1px 0 0 var(--accent-line), inset -1px 0 0 var(--accent-line);
}

.lp-compare tr:last-child th,
.lp-compare tr:last-child td { border-bottom: none; }

/* ==========================================================================
   3. SILO NAVIGATION + APP CARDS
   ========================================================================== */

.lp-silo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.lp-silo-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px 22px;
    border: 1px solid var(--play-border);
    border-radius: var(--play-radius);
    background: rgba(255, 255, 255, 0.028);
    text-decoration: none;
    transition: transform 0.18s, border-color 0.18s, background 0.18s;
}

.lp-silo-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-line);
    background: rgba(255, 255, 255, 0.05);
}

.lp-silo-card.is-pillar { border-color: var(--accent-line); background: var(--accent-soft); }

.lp-silo-kicker {
    font-family: var(--play-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.lp-silo-card h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.lp-silo-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--play-muted);
}

.lp-silo-go {
    margin-top: auto;
    padding-top: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
}

.lp-silo-go .arrow { transition: transform 0.18s; display: inline-block; }
.lp-silo-card:hover .lp-silo-go .arrow { transform: translateX(4px); }

.lp-app-card { cursor: default; }

.lp-app-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: auto;
    padding-top: 16px;
}

.lp-app-actions .lp-demo-link { margin-top: 0; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1000px) {
    .lp-demo { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
    .lp-demo-stage { padding: 16px; }
    .lpi-grid-row,
    .lpi-ruler { grid-template-columns: 58px minmax(0, 1fr); }
    .lpi-steps { gap: 3px; }
    .lpi-step { height: 28px; border-radius: 5px; }
    .lpi-row-name { font-size: 9.5px; }
    .lpi-pads { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
    .lpi-pad { height: 68px; font-size: 9.5px; }
    .lpi-keys { height: 120px; }
    .lpi-key.is-black { width: 20px; margin-left: -10px; }
    .lpi-ruler-cells { font-size: 8.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .lp-silo-card,
    .lpi-btn,
    .lpi-pad { transition: none; }
}

/* ==========================================================================
   4. LINKS INSIDE COPY
   play.css sets `.play-page a { color: inherit }` for cards, which wins over a
   bare class - these rules take the specificity back for editorial links.
   ========================================================================== */

.lp-page .app-prose a,
.lp-page .app-feature a,
.lp-page .lp-compare a,
.lp-page .app-faq a,
.lp-page .lp-demo-link {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--accent-line);
}

.lp-page .app-prose a:hover,
.lp-page .app-feature a:hover,
.lp-page .lp-compare a:hover,
.lp-page .app-faq a:hover,
.lp-page .lp-demo-link:hover {
    text-decoration-color: var(--accent);
}

.lp-page .lp-silo-card { text-decoration: none; }
