/* ============================================================
   XFlow v2 — additive layer on top of styles.css
   Trust & Authority + Conversion pattern: split hero with form,
   trust strip, scannable stage rail, FAQ, condensed showcase.
   ============================================================ */

/* ── Hero: split layout with contact form on the right ── */
.hero-v2 { text-align: left; padding-top: clamp(3rem, 6vw, 5rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.hero-v2-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: center;
}
.hero-v2-copy { max-width: 640px; }
.hero-v2 .hero-badge { margin-bottom: 1.5rem; }
.hero-title-v2 {
    font-size: clamp(2.4rem, 5.2vw, 4rem);
    line-height: 1.02;
    margin-bottom: 1.4rem;
}
.hero-sub-v2 { margin-left: 0; margin-right: 0; margin-bottom: 1.75rem; }

.hero-bullets { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.hero-bullets li {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    font-size: 0.95rem;
    color: var(--fg-2);
    line-height: 1.5;
}
.hero-bullets .check {
    color: var(--accent-400);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Contact form — the primary conversion vehicle ── */
.hero-form {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
    border: 1px solid var(--line-2);
    border-radius: 14px;
    padding: clamp(1.5rem, 3vw, 2rem);
    box-shadow:
        0 30px 60px -20px rgba(0, 0, 0, 0.5),
        0 20px 40px -20px var(--glow-soft);
    backdrop-filter: blur(8px);
}
.form-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--accent-300);
    margin-bottom: 0.85rem;
}
.form-pulse {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent-400);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.22);
    animation: hero-pulse 2.4s ease-in-out infinite;
}
.form-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.4rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--fg-0);
    margin-bottom: 0.4rem;
}
.form-sub { font-size: 0.92rem; color: var(--fg-2); margin-bottom: 1.25rem; line-height: 1.5; }

.lead-form { display: flex; flex-direction: column; gap: 0.85rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field-label {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fg-3);
    font-weight: 500;
}
.field-label .optional { color: var(--fg-4); text-transform: none; letter-spacing: 0; font-size: 0.62rem; }
.field input, .field textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line-2);
    border-radius: 8px;
    color: var(--fg-0);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    line-height: 1.4;
    transition: border-color 150ms var(--ease), background 150ms var(--ease);
    box-sizing: border-box;
}
.field input::placeholder, .field textarea::placeholder { color: var(--fg-4); }
.field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--accent-500);
    background: rgba(59, 130, 246, 0.06);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.field textarea { resize: vertical; min-height: 80px; font-family: var(--font-sans); }
.btn-block { width: 100%; justify-content: center; margin-top: 0.35rem; }
.form-foot {
    font-size: 0.8rem;
    color: var(--fg-3);
    text-align: center;
    margin-top: 0.4rem;
}
.form-foot a { color: var(--accent-400); text-decoration: underline; text-decoration-color: rgba(96, 165, 250, 0.35); }
.form-foot a:hover { text-decoration-color: var(--accent-400); }
.form-success {
    margin-top: 0.85rem;
    padding: 0.7rem 0.9rem;
    background: rgba(16, 185, 129, 0.10);
    border: 1px solid rgba(16, 185, 129, 0.30);
    border-radius: 8px;
    color: var(--go);
    font-size: 0.88rem;
    line-height: 1.45;
    text-align: center;
}

/* ── Industry strip — icon grid of supported equipment categories ── */
.industry-strip {
    padding: clamp(2.5rem, 5vw, 3.5rem) 0;
    border-top: 1px solid var(--line);
    text-align: center;
}
.industry-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fg-3);
    margin-bottom: 1.5rem;
}
.industry-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    max-width: 1080px;
    margin: 0 auto;
}
.industry-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1.1rem 1.1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008));
    border: 1px solid var(--line-2);
    border-radius: 14px;
    text-align: left;
    transition: border-color 200ms var(--ease), transform 200ms var(--ease), background 200ms var(--ease);
}
.industry-cell:hover {
    border-color: var(--accent-700);
    transform: translateY(-2px);
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.06), rgba(59, 130, 246, 0.015));
}
.industry-cell-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: rgba(59, 130, 246, 0.10);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: var(--accent-300);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.industry-cell-icon svg { width: 20px; height: 20px; display: block; }
.industry-cell-label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--fg-1);
    line-height: 1.35;
    letter-spacing: -0.005em;
}
.industry-cell-more .industry-cell-icon {
    background: rgba(255, 255, 255, 0.025);
    border-color: var(--line-2);
    color: var(--fg-3);
}
.industry-cell-more .industry-cell-label {
    color: var(--fg-3);
    font-style: italic;
}
/* legacy .industry-row retained for backwards compatibility but no longer rendered */

/* ── Trust strip ── */
.trust-strip {
    padding: 3rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(700px 200px at 50% 0%, rgba(59, 130, 246, 0.06), transparent 70%);
}
.trust-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.trust-card {
    padding: 1.5rem 1.5rem 1.5rem 1.5rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--line-2);
    border-radius: 12px;
    transition: border-color 200ms var(--ease), transform 200ms var(--ease);
}
.trust-card:hover {
    border-color: var(--accent-700);
    transform: translateY(-2px);
}
.trust-icon {
    width: 38px; height: 38px;
    border-radius: 9px;
    background: rgba(59, 130, 246, 0.10);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: var(--accent-300);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.trust-icon svg { width: 20px; height: 20px; }
.trust-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--fg-0);
    margin-bottom: 0.45rem;
    letter-spacing: -0.015em;
}
.trust-card p {
    font-size: 0.9rem;
    color: var(--fg-2);
    line-height: 1.55;
}

/* ── Stage rail — scannable nine-step pipeline ── */
.how-section .stage-rail {
    list-style: none;
    padding: 0;
    margin: 3rem 0 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.rail-step {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.25rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.008));
    border: 1px solid var(--line);
    border-radius: 11px;
    transition: border-color 200ms var(--ease), background 200ms var(--ease);
}
.rail-step:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.035); }
.rail-step-spot {
    border-color: rgba(59, 130, 246, 0.35);
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.02));
}
.rail-num {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-300);
    flex-shrink: 0;
    line-height: 1.2;
    padding-top: 0.1rem;
}
.rail-body { flex: 1; min-width: 0; }
.rail-body h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--fg-0);
    margin-bottom: 0.35rem;
    letter-spacing: -0.015em;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.rail-tag {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.18);
    color: var(--accent-300);
    border: 1px solid rgba(59, 130, 246, 0.35);
    font-weight: 500;
    text-transform: none;
}
.rail-body p {
    font-size: 0.84rem;
    color: var(--fg-2);
    line-height: 1.5;
    margin-bottom: 0.65rem;
}
.rail-feats {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.rail-feats li {
    position: relative;
    padding-left: 0.95rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--fg-2);
}
.rail-feats li::before {
    content: "›";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-400);
    font-weight: 700;
}
.rail-feats strong { color: var(--fg-0); font-weight: 600; }
.rail-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line-2);
    color: var(--fg-3);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
}

.mid-cta { display: flex; justify-content: center; margin-top: 2.5rem; }

/* ── Showcase — single deep dive (CCF) ── */
.showcase-grid {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 3rem;
    align-items: center;
}
.showcase-copy .feats {
    margin-bottom: 1.75rem;
    border-top: 1px solid var(--line);
}
.showcase-copy .feats li {
    position: relative;
    padding: 0.85rem 0 0.85rem 1.7rem;
    border-bottom: 1px solid var(--line);
    color: var(--fg-1);
    font-size: 0.94rem;
    line-height: 1.55;
}
.showcase-copy .feats li::before {
    content: "→";
    position: absolute;
    left: 0;
    top: 0.85rem;
    color: var(--accent-400);
    font-weight: 500;
}

/* ── Deep-dive showcase section (4 stages with screenshots) ── */
.showcase-section .stage:first-of-type { padding-top: 4rem; }
.showcase-section .stage { border-top: 1px solid var(--line); }
.showcase-section .stage:first-of-type { border-top: none; }
.stage-awe {
    position: relative;
}
.stage-awe::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(900px 320px at 50% 0%, rgba(59, 130, 246, 0.10), transparent 70%);
    pointer-events: none;
    z-index: -1;
}
.deep-cta {
    display: flex;
    justify-content: center;
    padding-top: 1.5rem;
}

/* ── FAQ ── */
.faq-section { background: rgba(255, 255, 255, 0.01); }
.faq-grid {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}
.faq-item {
    padding: 1.2rem 1.4rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.008));
    border: 1px solid var(--line-2);
    border-radius: 10px;
    transition: border-color 200ms var(--ease);
}
.faq-item[open] { border-color: var(--accent-700); }
.faq-item summary {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    color: var(--fg-0);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    letter-spacing: -0.01em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    color: var(--accent-400);
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1;
    transition: transform 200ms var(--ease);
    flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--line);
    font-size: 0.92rem;
    color: var(--fg-2);
    line-height: 1.6;
}

/* ── Final CTA card variant ── */
.cta-card-v2 { padding: clamp(2rem, 5vw, 3.5rem) 2rem; }

/* ============================================================
   Mobile breakpoints
   ============================================================ */
@media (max-width: 960px) {
    .hero-v2-grid { grid-template-columns: 1fr; }
    .hero-form { order: 2; }
    .hero-v2-copy { order: 1; max-width: none; }
    .trust-cards { grid-template-columns: 1fr; gap: 0.85rem; }
    .stage-rail { grid-template-columns: 1fr !important; }
    .showcase-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .faq-grid { grid-template-columns: 1fr; }
    .industry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    /* Touch-target floor: ensure all interactive controls are ≥44px tall */
    .field input, .field textarea {
        font-size: 16px; /* prevents iOS auto-zoom on focus */
        padding: 0.85rem 0.9rem;
    }
    .field input { min-height: 44px; }
    .btn { min-height: 44px; }
    .nav-cta { padding: 0.7rem 1rem; }
    .nav-actions { gap: 0.5rem; }

    .hero-form { padding: 1.25rem; }
    .form-title { font-size: 1.2rem; }
    .form-sub { font-size: 0.88rem; }

    .trust-strip { padding: 2rem 0; }
    .trust-card { padding: 1.25rem; }
    .trust-card h3 { font-size: 1rem; }

    .rail-step { padding: 1.1rem; }
    .rail-body h3 { font-size: 0.98rem; }
    .rail-body p { font-size: 0.85rem; }

    .faq-item { padding: 1rem 1.15rem; }
    .faq-item summary { font-size: 0.95rem; }
    .faq-item p { font-size: 0.88rem; }

    .industry-strip { padding: 2rem 0; }
    .industry-label { font-size: 0.62rem; margin-bottom: 1.1rem; }
    .industry-grid { grid-template-columns: 1fr; gap: 0.6rem; padding: 0 0.25rem; }
    .industry-cell { flex-direction: row; align-items: center; gap: 0.85rem; padding: 0.85rem 1rem; }
    .industry-cell-icon { width: 34px; height: 34px; }
    .industry-cell-icon svg { width: 18px; height: 18px; }
    .industry-cell-label { font-size: 0.86rem; }
    .rail-feats li { font-size: 0.76rem; }
}

/* ── Reduce motion preference ── */
@media (prefers-reduced-motion: reduce) {
    .form-pulse { animation: none; }
}
