/* ==========================================================================
   DHIVE — Innovation Lab page (innovation.html)
   Uses the tokens from /theme.css, so it follows light / dark mode.
   ========================================================================== */

.page-innovation { background: var(--bg); }

/* ---------- Hero ---------- */
.ix-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-h) + 3rem) 0 5rem;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(45% 50% at 50% 45%, rgba(18, 225, 159, 0.16) 0%, rgba(18, 225, 159, 0) 70%),
        radial-gradient(35% 40% at 12% 85%, rgba(92, 120, 255, 0.10) 0%, rgba(92, 120, 255, 0) 70%),
        linear-gradient(180deg, #f7fafc 0%, #eef4f8 100%);
}
:root[data-theme="dark"] .ix-hero {
    background:
        radial-gradient(45% 50% at 50% 45%, rgba(18, 225, 159, 0.16) 0%, rgba(18, 225, 159, 0) 70%),
        radial-gradient(35% 40% at 12% 85%, rgba(92, 120, 255, 0.16) 0%, rgba(92, 120, 255, 0) 70%),
        linear-gradient(180deg, #060d19 0%, #0a1527 100%);
}

#ideaCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    cursor: crosshair;
}

.ix-hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    pointer-events: none;
}
.ix-hero-inner a, .ix-hero-inner button { pointer-events: auto; }

.ix-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background: var(--accent-soft);
    border: 1px solid rgba(18, 225, 159, 0.35);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1.75rem;
}

.ix-title {
    font-size: clamp(2.6rem, 7.5vw, 5.6rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.04em;
    margin: 0 auto 1.5rem;
    color: var(--text);
}

.ix-big {
    position: relative;
    display: inline-block;
    color: var(--navy);
    padding: 0 0.2em;
    z-index: 0;
}
.ix-big::before {
    /* highlighter-pen swipe behind BIG IDEA */
    content: "";
    position: absolute;
    left: 0; right: 0;
    bottom: 0.08em;
    height: 0.62em;
    background: var(--brand);
    border-radius: 0.12em;
    transform: skew(-8deg) scaleX(0);
    transform-origin: left center;
    z-index: -1;
    animation: ix-swipe 0.9s 0.3s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}
:root[data-theme="dark"] .ix-big { color: #fff; }
:root[data-theme="dark"] .ix-big::before { opacity: 0.45; }
@keyframes ix-swipe { to { transform: skew(-8deg) scaleX(1); } }

.ix-rotator {
    display: inline-block;
    color: var(--accent);
}
.ix-rotator-word {
    display: inline-block;
    transition: opacity 0.35s ease, transform 0.35s ease, filter 0.35s ease;
}
.ix-rotator-word.is-out {
    opacity: 0;
    transform: translateY(0.35em);
    filter: blur(6px);
}

.ix-lead {
    max-width: 640px;
    margin: 0 auto 2.25rem;
    font-size: clamp(1.05rem, 1.8vw, 1.3rem);
    color: var(--text-muted);
    line-height: 1.6;
}

.ix-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: center;
}

.ix-hint {
    margin-top: 2.25rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    opacity: 0.85;
}
.ix-hint i { color: var(--accent); margin-right: 0.35rem; }

.ix-scroll {
    position: absolute;
    bottom: 1.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 46px;
    border: 2px solid var(--text-muted);
    border-radius: 999px;
    opacity: 0.6;
    z-index: 1;
}
.ix-scroll span {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: var(--accent);
    animation: ix-scroll 1.6s ease-in-out infinite;
}
@keyframes ix-scroll {
    0% { opacity: 0; transform: translateY(0); }
    40% { opacity: 1; }
    100% { opacity: 0; transform: translateY(16px); }
}

/* ---------- What-if prompts ---------- */
.ix-prompts {
    padding: 4.5rem 0 3.5rem;
    background: var(--bg);
    border-top: 1px solid var(--border);
}
.ix-prompts-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
    color: var(--text);
}
.ix-prompts-sub { color: var(--text-muted); margin: 0.35rem 0 2rem; }

.ix-marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    padding: 0.5rem 0;
}
.ix-marquee-track {
    display: flex;
    gap: 1rem;
    width: max-content;
    animation: ix-marquee 55s linear infinite;
}
.ix-marquee:hover .ix-marquee-track,
.ix-marquee:focus-within .ix-marquee-track { animation-play-state: paused; }
@keyframes ix-marquee { to { transform: translateX(calc(-50% - 0.5rem)); } }

.ix-prompt {
    flex-shrink: 0;
    padding: 1rem 1.4rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 1.05rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.ix-prompt:hover,
.ix-prompt:focus-visible {
    transform: translateY(-3px) rotate(-1deg);
    border-color: var(--brand);
    background: var(--accent-soft);
}

/* ---------- Generic sections ---------- */
.ix-section { padding: 6rem 0; background: var(--bg); color: var(--text); }
.ix-section.alt { background: var(--bg-alt); }

.ix-head { text-align: center; max-width: 720px; margin: 0 auto 3.5rem; }
.ix-head h2 {
    font-size: clamp(1.9rem, 3.6vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.75rem;
}
.ix-head p { color: var(--text-muted); font-size: 1.08rem; margin: 0; }
.ix-kicker {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

/* ---------- Idea Lab ---------- */
.ix-lab {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.ix-step {
    border: 0;
    padding: 0;
    margin: 0 0 2rem;
}
.ix-step legend {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}
.ix-step legend small { font-weight: 500; color: var(--text-muted); font-size: 0.85rem; }
.ix-step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    color: var(--brand);
    font-size: 0.85rem;
}
:root[data-theme="dark"] .ix-step-num { background: var(--accent-soft); }

.ix-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.ix-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.ix-chip i { color: var(--accent); transition: color 0.18s ease; }
.ix-chip:hover { border-color: var(--brand); transform: translateY(-2px); }
.ix-chip[aria-pressed="true"] {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--navy);
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(18, 225, 159, 0.3);
}
.ix-chip[aria-pressed="true"] i { color: var(--navy); }

/* Concept card */
.ix-concept {
    position: sticky;
    top: calc(var(--nav-h) + 1.5rem);
    padding: 1.75rem;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    isolation: isolate;
}
.ix-concept-glow {
    position: absolute;
    top: -40%;
    right: -30%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(18, 225, 159, 0.22) 0%, rgba(18, 225, 159, 0) 70%);
    z-index: -1;
    transition: transform 0.6s ease;
}
.ix-concept.is-updated .ix-concept-glow { transform: scale(1.25); }

.ix-concept-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.ix-concept-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.ix-concept-tag .pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
    animation: ix-pulse 1.8s infinite;
}
@keyframes ix-pulse {
    0% { box-shadow: 0 0 0 0 rgba(18, 225, 159, 0.6); }
    70%, 100% { box-shadow: 0 0 0 8px rgba(18, 225, 159, 0); }
}
.ix-codename {
    font-family: 'Mokoto', var(--font);
    font-size: 0.95rem;
    color: var(--accent);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.ix-meter {
    height: 6px;
    border-radius: 999px;
    background: var(--surface-2);
    overflow: hidden;
}
.ix-meter span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand), #5cf2c4);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.ix-meter-label { font-size: 0.82rem; color: var(--text-muted); margin: 0.5rem 0 1.25rem; }

.ix-concept-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
    color: var(--text);
}
.ix-concept-text { color: var(--text-muted); line-height: 1.6; margin-bottom: 1.25rem; }

.ix-concept-block { margin-bottom: 1.25rem; animation: ix-fade 0.4s ease; }
.ix-concept-block h4 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}
@keyframes ix-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.ix-how {
    list-style: none;
    counter-reset: how;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}
.ix-how li {
    counter-increment: how;
    position: relative;
    padding-left: 2rem;
    color: var(--text);
    line-height: 1.5;
    font-size: 0.95rem;
}
.ix-how li::before {
    content: counter(how);
    position: absolute;
    left: 0;
    top: 0.05rem;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ix-stack { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ix-stack span {
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text);
}

.ix-road {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
}
.ix-road div {
    position: relative;
    padding: 0.6rem 0.5rem;
    border-radius: 10px;
    background: var(--surface-2);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.ix-road div::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    height: 3px;
    width: 100%;
    border-radius: 10px 10px 0 0;
    background: var(--brand);
    opacity: 0.35;
}
.ix-road div:first-child::before { opacity: 1; }
.ix-road strong { font-size: 0.82rem; color: var(--text); }
.ix-road span { font-size: 0.72rem; color: var(--text-muted); }

.ix-send { width: 100%; border: 0; margin-top: 0.25rem; }
.ix-send:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.ix-reset {
    display: block;
    margin: 0.75rem auto 0;
    background: none;
    border: 0;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.88rem;
    text-decoration: underline;
    cursor: pointer;
}
.ix-reset:hover { color: var(--text); }

/* ---------- Journey ---------- */
.ix-journey {
    --progress: 0;
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    position: relative;
}
.ix-journey::before,
.ix-journey::after {
    content: "";
    position: absolute;
    top: 32px;
    left: 12.5%;
    right: 12.5%;
    height: 3px;
    border-radius: 3px;
    background: var(--border);
}
.ix-journey::after {
    background: linear-gradient(90deg, var(--brand), #5cf2c4);
    right: auto;
    width: calc(75% * var(--progress));
    transition: width 0.15s linear;
}
.ix-stage {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 0.5rem;
    opacity: 0.45;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.ix-stage.is-lit { opacity: 1; transform: none; }
.ix-stage-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--text-muted);
    transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}
.ix-stage.is-lit .ix-stage-icon {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--navy);
    box-shadow: 0 0 0 8px var(--accent-soft);
}
.ix-stage-step { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; color: var(--accent); }
.ix-stage h3 { font-size: 1.3rem; font-weight: 800; margin: 0.25rem 0 0.5rem; }
.ix-stage p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.55; }
.ix-stage-out {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
}

/* ---------- Labs wall ---------- */
.ix-labs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}
.ix-exp {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
    overflow: hidden;
}
.ix-exp::after {
    /* light that follows the cursor */
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(18, 225, 159, 0.16), transparent 60%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.ix-exp:hover { box-shadow: var(--shadow-lg); border-color: rgba(18, 225, 159, 0.5); color: var(--text); text-decoration: none; }
.ix-exp:hover::after { opacity: 1; }
.ix-exp-id {
    font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.ix-exp-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    padding: 6px;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}
.ix-exp h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 0.4rem; }
.ix-exp p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.55; flex: 1; margin-bottom: 1rem; }
.ix-exp-link { color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.ix-exp-link.muted { color: var(--text-muted); font-weight: 500; }
.ix-exp-next {
    border-style: dashed;
    border-width: 2px;
    background: transparent;
    box-shadow: none;
}
.ix-exp-plus {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

/* ---------- Contact ---------- */
.ix-contact {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 3rem;
    align-items: center;
}
.ix-contact-copy h2 {
    font-size: clamp(1.9rem, 3.6vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.025em;
}
.ix-contact-copy p { color: var(--text-muted); font-size: 1.08rem; line-height: 1.6; margin: 1rem 0 1.5rem; }
.ix-promise { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.ix-promise li { display: flex; align-items: center; gap: 0.75rem; color: var(--text); }
.ix-promise i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ix-form {
    padding: 2rem;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transition: box-shadow 0.4s ease;
}
.ix-form.is-highlighted { box-shadow: 0 0 0 4px var(--brand), var(--shadow-lg); }
.ix-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.ix-field { display: block; margin: 0; }
.ix-field.full { grid-column: 1 / -1; }
.ix-field span { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text); }
.ix-field input,
.ix-field textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-alt);
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.ix-field textarea { resize: vertical; min-height: 150px; line-height: 1.5; }
.ix-field input:focus,
.ix-field textarea:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--surface);
    box-shadow: 0 0 0 4px var(--accent-soft);
}
.ix-submit { width: 100%; border: 0; margin-top: 1.5rem; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .ix-lab { grid-template-columns: 1fr; }
    .ix-concept { position: relative; top: 0; }
    .ix-labs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ix-contact { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 767.98px) {
    .ix-section { padding: 4.5rem 0; }
    .ix-journey { grid-template-columns: 1fr; gap: 2rem; }
    .ix-journey::before,
    .ix-journey::after {
        top: 32px;
        bottom: 32px;
        left: 31px;
        right: auto;
        width: 3px;
        height: auto;
    }
    .ix-journey::after { height: calc((100% - 64px) * var(--progress)); bottom: auto; }
    .ix-stage { text-align: left; padding-left: 84px; min-height: 64px; }
    .ix-stage-icon { position: absolute; left: 0; top: 0; margin: 0; }
    .ix-road { grid-template-columns: repeat(2, 1fr); }
    .ix-form { padding: 1.5rem; }
    .ix-form-grid { grid-template-columns: 1fr; }
    .ix-hint { display: none; }
}

@media (max-width: 575.98px) {
    .ix-labs { grid-template-columns: 1fr; }
    .ix-actions { flex-direction: column; max-width: 300px; margin: 0 auto; }
}
