/* Landing page: "Why LogicFlux" comparison and the hands-free trade management timeline (index.html only) */

/* Comparison table */
.why-compare-wrap { max-width: 1040px; margin: 0 auto; overflow-x: auto; -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-glass); border-radius: var(--radius-lg); background: var(--bg-card); }
.why-compare { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14px; }
/* Answers start at the same left edge in every column, so the icons line up */
.why-compare th, .why-compare td { padding: 14px 16px 14px 22px; text-align: left; border-bottom: 1px solid var(--border-glass); vertical-align: middle; }
.why-compare th:first-child, .why-compare td:first-child { text-align: left; color: var(--text-main); font-weight: 600; }
.why-compare thead th { font-size: 13px; font-weight: 700; color: var(--text-muted); text-transform: none; }
.why-compare thead th.why-lf { color: #fff; background: linear-gradient(135deg, #2563eb, #7c3aed); }
.why-compare td.why-lf { background: rgba(37, 99, 235, 0.08); font-weight: 600; color: var(--text-main); }
.why-compare tbody tr:last-child td { border-bottom: 0; }
.why-yes, .why-no, .why-mid { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 1.35; }
.why-yes::before, .why-no::before, .why-mid::before { flex: none; width: 18px; height: 18px; border-radius: 50%; display: inline-grid;
    place-items: center; font-size: 11px; font-weight: 800; color: #fff; }
.why-yes::before { content: "✓"; background: var(--color-success, #10b981); }
.why-no::before  { content: "✕"; background: var(--color-danger, #ef4444); }
.why-mid::before { content: "~"; background: var(--color-warning, #f59e0b); }
.why-no, .why-mid { color: var(--text-muted); }
.why-foot { max-width: 1040px; margin: 14px auto 0; font-size: 12px; color: var(--text-muted); text-align: center; }

/* Hands-free trade management timeline */
.auto-flow { list-style: none; margin: 0 auto; padding: 0; max-width: 1040px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: auto; }
.auto-step { position: relative; background: var(--bg-card); border: 1px solid var(--border-glass); border-radius: var(--radius-md); padding: 18px 16px 16px; }
.auto-step::before { counter-increment: auto; content: counter(auto); position: absolute; top: -12px; left: 16px; width: 26px; height: 26px;
    border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: #2563eb; }
.auto-step h3 { margin: 6px 0 6px; font-size: 15px; color: var(--text-main); }
.auto-step p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.auto-step .auto-tag { display: inline-block; margin-bottom: 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--color-accent, #3b82f6); }
.auto-cta { display: flex; justify-content: center; margin-top: 28px; }

.broker-note { max-width: 1000px; margin: 18px auto 0; font-size: 12px; color: var(--text-muted); text-align: center; }

@media (max-width: 1024px) { .auto-flow { grid-template-columns: repeat(2, 1fr); row-gap: 22px; } }
@media (max-width: 560px) {
    .auto-flow { grid-template-columns: 1fr; }
    .why-compare th, .why-compare td { padding: 12px 10px; }
}

/* Phones: each comparison row becomes a small card. Every option is stacked: its name on one line,
   then its answer with the icon attached to the start of that answer, so no icon floats between two. */
@media (max-width: 640px) {
    .why-compare-wrap { overflow: visible; border: 0; background: transparent; }
    .why-compare { min-width: 0; }
    .why-compare thead { display: none; }
    .why-compare, .why-compare tbody, .why-compare tr, .why-compare th, .why-compare td { display: block; width: 100%; }
    .why-compare tr { margin-bottom: 14px; border: 1px solid var(--border-glass); border-radius: var(--radius-md); background: var(--bg-card); overflow: hidden; }
    .why-compare th[scope="row"] { padding: 14px 14px 10px; border-bottom: 1px solid var(--border-glass); font-size: 15px; }
    .why-compare td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border-glass); white-space: normal; }
    .why-compare td::before { content: attr(data-label); display: block; margin-bottom: 4px; font-size: 11px; font-weight: 600;
        letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted); }
    .why-compare td.why-lf::before { content: "LogicFlux"; color: var(--color-accent, #3b82f6); }
    .why-compare td > span { display: inline-flex; align-items: flex-start; text-align: left; white-space: normal; }
    .why-compare td > span::before { margin-top: 1px; }
    .why-compare td:last-child { border-bottom: 0; }
}

/* Landing: four short "Why LogicFlux" cards and the link to /why-logicflux */
.why-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 1100px; margin: 0 auto; }
.why-more { display: flex; justify-content: center; margin-top: 22px; }
.why-hero { padding-bottom: 8px; }
@media (max-width: 1024px) { .why-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .why-cards { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
    .why-cards { gap: 10px; }
    .why-cards .shield-card { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; align-items: start; padding: 14px; }
    .why-cards .shield-icon { grid-row: span 2; width: 44px; height: 44px; margin: 0; }
    .why-cards .shield-name { margin: 0 0 4px; font-size: 15px; }
    .why-cards .shield-desc { margin: 0; }
}

/* ===== Hero: copy on the left, an "autopilot" card on the right that plays one managed trade ===== */
html[data-theme] .hero-split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; width: 100%; max-width: 1180px; margin: 0 auto; }
html[data-theme] .hero-split .hero-inner { align-items: flex-start; text-align: left; max-width: none; margin: 0; min-width: 0; }
html[data-theme] .hero-split .hero-subtext { text-align: left !important; margin: 0 0 22px; max-width: 560px; }
html[data-theme] .hero-split .hero-cta-row { justify-content: flex-start; margin-bottom: 0; }
html[data-theme] .hero-split .hero-headline { font-size: clamp(40px, 5.6vw, 76px); margin-bottom: 18px; }

/* Journal line above the headline: what happens to each signal, typed out */
.hero-journal { display: inline-flex; align-items: stretch; margin-bottom: 22px; border-radius: 6px; overflow: hidden; text-decoration: none;
    font: 600 12.5px/1 ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace; letter-spacing: 0;
    background: #0d1117; border: 1px solid #263041; box-shadow: 0 10px 24px -14px rgba(37, 99, 235, 0.6); }
.hero-journal > span { display: flex; align-items: center; padding: 8px 10px; }
/* fixed width so the box doesn't grow while the text types */
.hero-journal > .hj-line { color: #7ee2b8; justify-content: flex-start; box-sizing: content-box; width: calc(33ch + 2px); }
.hj-type { display: inline-block; width: 33ch; overflow: hidden; white-space: nowrap; border-right: 2px solid #7ee2b8;
    animation: hjType 7s steps(33, end) infinite, hjCaret .7s step-end infinite; }
@keyframes hjType { 0% { width: 0; } 45%, 90% { width: 33ch; } 100% { width: 0; } }
@keyframes hjCaret { 50% { border-color: transparent; } }

/* Rotating line: what each trade does next */
.hero-rotator { display: block; height: 1.5em; overflow: hidden; margin: 4px 0; font-size: 1.18em; font-weight: 700; color: #60a5fa; }
.hero-rotator-track { display: flex; flex-direction: column; animation: lfRotate 10s cubic-bezier(.7, 0, .3, 1) infinite; }
.hero-rotator-track > span { display: block; height: 1.5em; line-height: 1.5em; white-space: nowrap; }
@keyframes lfRotate { 0%, 20% { transform: translateY(0); } 25%, 45% { transform: translateY(-1.5em); } 50%, 70% { transform: translateY(-3em); }
    75%, 95% { transform: translateY(-4.5em); } 100% { transform: translateY(-6em); } }

.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 28px; padding: 0; font-size: 14px; font-weight: 600; color: #e4e4e7; }
.hero-trust li { display: inline-flex; align-items: flex-start; gap: 9px; line-height: 1.4; text-align: left; }
/* Tick drawn as an icon (a text check mark can render as an emoji on phones) */
.hero-trust li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: -0.5px; border-radius: 50%;
    background: #10b981 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 12.5 10 16.5 18 8'/%3E%3C/svg%3E") center / 13px no-repeat;
    box-shadow: 0 0 0 3px rgba(16,185,129,.16); }

/* Autopilot card (14s loop). The price path draws 6%→70%; it reaches TP1 at 36% and TP2 at 70%. */
.ap-card { margin: 0; padding: 16px 16px 14px; border-radius: 22px; text-align: left; background: rgba(17, 22, 34, 0.78); border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 30px 60px -30px rgba(37, 99, 235, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05); backdrop-filter: blur(10px); }
.ap-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.ap-live { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: #d4d4d8; }
.ap-on { font-weight: 800; color: #10b981; animation: apOn 14s infinite; }
/* Autopilot switch flips on as each example trade starts, off as it resets */
.ap-switch { position: relative; width: 28px; height: 16px; border-radius: 8px; background: #10b981; animation: apSwitch 14s infinite; }
.ap-switch i { position: absolute; top: 2px; left: 14px; width: 12px; height: 12px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .35); animation: apKnob 14s infinite; }
@keyframes apSwitch { 0%, 1% { background: #3f3f46; } 4%, 96% { background: #10b981; } 100% { background: #3f3f46; } }
@keyframes apKnob { 0%, 1% { left: 2px; } 4%, 96% { left: 14px; } 100% { left: 2px; } }
@keyframes apOn { 0%, 2% { opacity: .3; } 4%, 96% { opacity: 1; } 100% { opacity: .3; } }
.ap-sym { font-weight: 700; color: #f4f4f5; white-space: nowrap; }
.ap-tag { margin-left: auto; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #71717a; }
.ap-chart { display: block; width: 100%; height: auto; overflow: visible; }
.ap-lvl line { stroke-width: 1.2; stroke-dasharray: 4 4; }
.ap-lvl text { font-size: 10px; font-weight: 700; text-anchor: end; font-family: inherit; }
.ap-tp line { stroke: #10b981; } .ap-tp text { fill: #10b981; }
.ap-entry line { stroke: #94a3b8; } .ap-entry text { fill: #94a3b8; }
.ap-sl line { stroke: #ef4444; } .ap-sl text { fill: #ef4444; }
.ap-sl { animation: apSl 14s infinite; }
.ap-sl .ap-sl-b { fill: #f59e0b; opacity: 0; animation: apSlB 14s infinite; }
.ap-sl-a { animation: apSlA 14s infinite; }
.ap-price { fill: none; stroke: #3b82f6; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: apDraw 14s infinite; }
.ap-area { fill: rgba(59, 130, 246, 0.12); opacity: 0; animation: apArea 14s infinite; }
.ap-dot { stroke: #0b0c10; stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.ap-dot-entry { fill: #3b82f6; animation: apDotE 14s infinite; }
.ap-dot-tp1 { fill: #10b981; animation: apDot1 14s infinite; }
.ap-dot-tp2 { fill: #10b981; animation: apDot2 14s infinite; }
@keyframes apDraw { 0%, 6% { stroke-dashoffset: 100; opacity: 1; } 70%, 94% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes apArea { 0%, 70% { opacity: 0; } 76%, 94% { opacity: 1; } 100% { opacity: 0; } }
@keyframes apDotE { 0%, 3% { opacity: 0; transform: scale(0); } 6%, 94% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
@keyframes apDot1 { 0%, 35% { opacity: 0; transform: scale(0); } 37% { opacity: 1; transform: scale(1.6); } 40%, 94% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
@keyframes apDot2 { 0%, 69% { opacity: 0; transform: scale(0); } 71% { opacity: 1; transform: scale(1.6); } 74%, 94% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
@keyframes apSl { 0%, 39% { transform: translateY(0); } 44%, 96% { transform: translateY(-35px); } 100% { transform: translateY(0); } }
@keyframes apSlA { 0%, 40% { opacity: 1; } 43%, 97% { opacity: 0; } 100% { opacity: 1; } }
@keyframes apSlB { 0%, 40% { opacity: 0; } 43%, 94% { opacity: 1; } 97%, 100% { opacity: 0; } }

.ap-log { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 7px; font-size: 13.5px; color: #a1a1aa; }
.ap-log li { display: flex; align-items: center; gap: 9px; opacity: .4; }
.ap-log li::before { content: "✓"; flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 800;
    color: transparent; border: 1.5px solid rgba(255, 255, 255, 0.25); background: transparent; }
.ap-log b { color: #f4f4f5; font-weight: 700; }
.ap-log li, .ap-log li::before { animation-duration: 14s; animation-iteration-count: infinite; }
.ap-e1 { animation-name: apLi1; } .ap-e2 { animation-name: apLi2; } .ap-e3 { animation-name: apLi3; } .ap-e4 { animation-name: apLi4; }
.ap-e1::before { animation-name: apTick1; } .ap-e2::before { animation-name: apTick2; }
.ap-e3::before { animation-name: apTick3; } .ap-e4::before { animation-name: apTick4; }
@keyframes apLi1 { 0%, 5% { opacity: .4; } 7%, 94% { opacity: 1; } 100% { opacity: .4; } }
@keyframes apLi2 { 0%, 36% { opacity: .4; } 38%, 94% { opacity: 1; } 100% { opacity: .4; } }
@keyframes apLi3 { 0%, 41% { opacity: .4; } 43%, 94% { opacity: 1; } 100% { opacity: .4; } }
@keyframes apLi4 { 0%, 70% { opacity: .4; } 72%, 94% { opacity: 1; } 100% { opacity: .4; } }
@keyframes apTick1 { 0%, 5% { color: transparent; background: transparent; } 7%, 94% { color: #fff; background: #10b981; border-color: #10b981; } 100% { color: transparent; background: transparent; } }
@keyframes apTick2 { 0%, 36% { color: transparent; background: transparent; } 38%, 94% { color: #fff; background: #10b981; border-color: #10b981; } 100% { color: transparent; background: transparent; } }
@keyframes apTick3 { 0%, 41% { color: transparent; background: transparent; } 43%, 94% { color: #fff; background: #10b981; border-color: #10b981; } 100% { color: transparent; background: transparent; } }
@keyframes apTick4 { 0%, 70% { color: transparent; background: transparent; } 72%, 94% { color: #fff; background: #10b981; border-color: #10b981; } 100% { color: transparent; background: transparent; } }
html[data-theme="light"] .ap-log li::before { border-color: #cbd5e1; }
.ap-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 11.5px; color: #71717a; }

/* Light theme */
html[data-theme="light"] .ap-live { color: #334155; }
html[data-theme="light"] .hero-rotator { color: #2563eb; }
html[data-theme="light"] .hero-trust { color: #1f2937; }
html[data-theme="light"] .ap-card { background: rgba(255, 255, 255, 0.92); border-color: #e2e8f0; box-shadow: 0 30px 60px -30px rgba(37, 99, 235, 0.35); }
html[data-theme="light"] .ap-sym, html[data-theme="light"] .ap-log b { color: #0b0f19; }
html[data-theme="light"] .ap-log { color: #475569; }
html[data-theme="light"] .ap-tag { color: #94a3b8; }
html[data-theme="light"] .ap-dot { stroke: #fff; }
html[data-theme="light"] .ap-foot { color: #94a3b8; border-top-color: #e2e8f0; }

/* Tablet and phone: one column, centred copy, card below the buttons */
@media (max-width: 1023px) {
    html[data-theme] .hero-split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    html[data-theme] .hero-split .hero-inner { align-items: center; text-align: center; }
    html[data-theme] .hero-split .hero-subtext { text-align: center !important; margin: 0 auto 20px; }
    html[data-theme] .hero-split .hero-cta-row { justify-content: center; }
    .hero-trust { justify-content: center; }
    .ap-card { width: 100%; max-width: 460px; margin: 0 auto; }
}
@media (max-width: 640px) {
    html[data-theme] .hero-split .hero-headline { font-size: 38px !important; }
    .hero-rotator { font-size: 1.05em; }
    /* One left-aligned column, centred as a block, so the ticks line up */
    .hero-trust { flex-direction: column; align-items: flex-start; gap: 10px; width: fit-content; max-width: 100%;
        margin: 0 auto 22px; font-size: 14px; }
    .ap-log { font-size: 13px; }
}

/* No motion: show the finished trade and the first line */
@media (prefers-reduced-motion: reduce) {
    .hero-rotator-track, .hj-type, .ap-switch, .ap-switch i, .ap-on, .ap-price, .ap-area, .ap-dot, .ap-sl, .ap-sl-a, .ap-sl .ap-sl-b, .ap-log li, .ap-log li::before { animation: none !important; }
    .ap-price { stroke-dashoffset: 0; } .ap-area, .ap-dot { opacity: 1; } .ap-sl { transform: translateY(-35px); } .ap-sl-a { opacity: 0; } .ap-sl .ap-sl-b { opacity: 1; }
    .ap-log li { opacity: 1; } .ap-log li::before { color: #fff; background: #10b981; border-color: #10b981; }
}

/* How It Works on phones: number beside the title, description under it */
@media (max-width: 560px) {
    html[data-theme] .steps-grid { gap: 10px; }
    html[data-theme] .steps-grid .step-card { display: grid; grid-template-columns: 32px 1fr; column-gap: 12px; align-items: center; padding: 14px 16px; }
    html[data-theme] .steps-grid .step-num { grid-row: span 2; align-self: start; margin: 0; }
    html[data-theme] .steps-grid .step-title { margin: 0 0 2px; line-height: 1.3; }
}

/* Billing switch: Monthly | Yearly on one row, with a sliding highlight */
html[data-theme] .pricing-interval-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: min(340px, 100%); max-width: none;
    margin: 0 auto 28px; padding: 4px; gap: 0; border-radius: 999px; flex-wrap: nowrap; }
html[data-theme] .pricing-interval-tabs::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px;
    background: #2563eb; box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .7); transition: transform .3s cubic-bezier(.4, 0, .2, 1); }
html[data-theme] .pricing-interval-tabs:has(#pricing-tab-annual.active)::before { transform: translateX(100%); }
html[data-theme] .pricing-interval-btn { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 8px; font-size: 14px; font-weight: 700; white-space: nowrap; background: transparent !important; box-shadow: none !important; transition: color .2s; }
html[data-theme] .pricing-interval-btn, html[data-theme] .pricing-interval-btn:hover, html[data-theme] .pricing-interval-btn.active { border-color: transparent !important; background: transparent !important; box-shadow: none !important; }
html[data-theme] .pricing-interval-btn.active { color: #fff !important; }
.pi-save { padding: 2px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; color: #047857; background: #d1fae5; }
html[data-theme="dark"] .pi-save { color: #6ee7b7; background: rgba(16, 185, 129, .16); }
.pricing-interval-btn.active .pi-save { color: #fff; background: rgba(255, 255, 255, .22); }
