/* Shared styles: welcome.php (landing page) and signin.php */
body {
    background: #17140f !important;
    color: #f3ede2;
}
.lp {
    --lp-ink: #17140f;
    --lp-ink-2: #211d17;
    --lp-amber: #ffbf00;
    --lp-amber-soft: #ffd54f;
    --lp-paper: #f3ede2;
    --lp-dust: #a39e94;
    --lp-line: rgba(243, 237, 226, 0.14);
    font-family: 'Figtree', system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--lp-paper);
    overflow-x: hidden;
}
.lp *, .lp *::before, .lp *::after { box-sizing: border-box; }
.lp h1, .lp h2, .lp h3 {
    font-family: 'Big Shoulders Display', Impact, 'Arial Narrow', sans-serif;
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: 0.01em;
    margin: 0;
    color: var(--lp-paper);
    text-align: left;
}
.lp h2 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin-bottom: 18px; }
.lp h3 { font-size: 1.7rem; font-weight: 700; margin-bottom: 8px; }
.lp p { margin: 0 0 1em; max-width: 34em; }
.lp a { color: var(--lp-amber); }
.lp :focus-visible { outline: 3px solid var(--lp-amber); outline-offset: 3px; border-radius: 4px; }

.lp-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.lp-section { padding: 96px 0; border-top: 1px solid var(--lp-line); }
.lp-lede { color: var(--lp-dust); font-size: 1.1rem; }

/* ---------- Buttons ---------- */
.lp-btn {
    display: inline-block;
    font: 700 1rem 'Figtree', sans-serif;
    padding: 14px 26px;
    border-radius: 999px;
    border: 2px solid var(--lp-amber);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.lp-btn-primary { background: var(--lp-amber); color: #1a1407; }
.lp-btn-primary:hover { background: var(--lp-amber-soft); border-color: var(--lp-amber-soft); }
.lp-btn-ghost { background: transparent; color: var(--lp-amber); }
.lp-btn-ghost:hover { background: rgba(255, 191, 0, 0.12); }

/* ---------- Hero ---------- */
.lp-hero {
    position: relative;
    min-height: calc(100vh - var(--header-height, 60px));
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 64px 0;
}
.lp-hero-copy { position: relative; z-index: 2; max-width: 540px; }
.lp-hero h1 {
    font-size: clamp(3.4rem, 8vw, 6.4rem);
    margin-bottom: 24px;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}
.lp-hero .lp-lede { color: #d9d2c4; font-size: 1.2rem; margin-bottom: 32px; }
.lp-hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.lp-browse { font-size: 0.95rem; color: var(--lp-dust); }
.lp-browse a { color: var(--lp-paper); }

/* Poster wall: the page's one bold moment. Real posters, most dimmed
   with low scores, a few lit up as strong matches - the product
   explained in one picture. */
.lp-wall {
    position: absolute;
    z-index: 1;
    top: 50%;
    right: -6%;
    width: 68%;
    transform: translateY(-50%) rotate(-7deg);
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    animation: lp-drift 60s linear infinite alternate;
}
.lp-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(90deg, var(--lp-ink) 0%, var(--lp-ink) 30%, rgba(23, 20, 15, 0.55) 55%, rgba(23, 20, 15, 0.15) 100%);
}
.lp-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 6px;
    overflow: hidden;
    background: var(--lp-ink-2);
}
.lp-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(0.85) brightness(0.45);
}
.lp-score {
    position: absolute;
    right: 6px;
    bottom: 6px;
    font: 700 12px 'Figtree', sans-serif;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--lp-dust);
}
.lp-poster.lit {
    box-shadow: 0 0 0 3px var(--lp-amber), 0 0 40px rgba(255, 191, 0, 0.45);
    z-index: 2;
    opacity: 0;
    animation: lp-light 0.6s ease forwards;
}
.lp-poster.lit img { filter: none; }
.lp-poster.lit .lp-score { background: var(--lp-amber); color: #1a1407; font-size: 13px; }
.lp-poster.lit:nth-of-type(n) { animation-delay: var(--d, 0.6s); }

@keyframes lp-light { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }
@keyframes lp-drift { from { margin-top: 0; } to { margin-top: -120px; } }

/* ---------- Screenshot frames + slideshows ---------- */
.lp-shot {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--lp-line);
    background: var(--lp-ink-2);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}
.lp-shot-bar { display: flex; gap: 6px; padding: 10px 12px; background: #2a251d; }
.lp-shot-bar span { width: 10px; height: 10px; border-radius: 50%; background: #4a4337; }
.lp-stage {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #1c1813;
}
.lp-stage img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1s ease;
    /* Own compositor layer: GPU-scaled, no per-frame repaint = no judder */
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
}
.lp-stage img.on { opacity: 1; }
.lp-stage img.zin  { animation: lp-zoom-in  var(--dur, 8s) ease-in-out forwards; }
.lp-stage img.zout { animation: lp-zoom-out var(--dur, 8s) ease-in-out forwards; }
/* Narrow strips (menu bars): natural height, panned across */
.lp-stage img.pan {
    inset: auto;
    top: 50%;
    left: 0;
    width: auto;
    height: var(--ph);
    max-width: none;
    object-fit: initial;
    transform: translate(0, -50%);
    animation: lp-pan var(--dur, 10s) ease-in-out forwards;
}
.lp-show.paused .lp-stage img { animation-play-state: paused; }
@keyframes lp-zoom-in  { from { transform: translateZ(0) scale(1); }    to { transform: translateZ(0) scale(1.05); } }
@keyframes lp-zoom-out { from { transform: translateZ(0) scale(1.05); } to { transform: translateZ(0) scale(1); } }
@keyframes lp-pan {
    0%, 12%   { transform: translate(0, -50%); }
    88%, 100% { transform: translate(var(--pan, 0px), -50%); }
}
.lp-show-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 40px;
    padding: 8px 14px;
    background: #2a251d;
}
.lp-caption { color: #d9d2c4; font-size: 0.9rem; }
.lp-dots { display: flex; gap: 8px; margin-left: auto; }
.lp-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 50%;
    border: none;
    background: #4a4337;
    cursor: pointer;
}
.lp-dot[aria-current="true"] { background: var(--lp-amber); }
/* Shown until the real screenshot files are uploaded */
.lp-shot.missing .lp-stage,
.lp-shot.missing .lp-show-foot { display: none; }
.lp-shot.missing::after {
    content: attr(data-file);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    color: var(--lp-dust);
    font-size: 0.9rem;
    border: 2px dashed var(--lp-line);
    margin: 12px;
    border-radius: 6px;
}

/* ---------- What you'll see ---------- */
.lp-feature {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 56px;
    align-items: center;
    margin-top: 72px;
}
.lp-feature.flip { grid-template-columns: 7fr 5fr; }
.lp-feature.flip .lp-feature-copy { order: 2; }
.lp-feature-copy p { color: #d9d2c4; }

/* ---------- Setup stepper ---------- */
.lp-steps { display: grid; grid-template-columns: 4fr 7fr; gap: 56px; margin-top: 48px; align-items: start; }
.lp-step-list { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.lp-step-btn {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 16px;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-left: 3px solid var(--lp-line);
    padding: 18px 16px;
    color: var(--lp-dust);
    cursor: pointer;
    font: inherit;
}
.lp-step-btn .lp-step-num {
    font: 900 2.6rem/1 'Big Shoulders Display', sans-serif;
    color: #4a4337;
}
.lp-step-btn strong { display: block; color: var(--lp-paper); font-size: 1.15rem; margin-bottom: 4px; }
.lp-step-btn[aria-selected="true"] { border-left-color: var(--lp-amber); background: rgba(255, 191, 0, 0.06); }
.lp-step-btn[aria-selected="true"] .lp-step-num { color: var(--lp-amber); }
.lp-step-panel[hidden] { display: none; }
.lp-step-nav { display: flex; gap: 12px; margin-top: 20px; }

.lp-explain { margin-top: 48px; max-width: 760px; border: 1px solid var(--lp-line); border-radius: 10px; }
.lp-explain summary {
    cursor: pointer;
    padding: 18px 22px;
    font-weight: 700;
    color: var(--lp-amber);
    list-style: none;
}
.lp-explain summary::-webkit-details-marker { display: none; }
.lp-explain summary::before { content: '+ '; }
.lp-explain[open] summary::before { content: '\2212  '; }
.lp-explain-body { padding: 0 22px 8px; color: #d9d2c4; }

/* ---------- Matching engine layers ---------- */
.lp-step-btn .lp-layer-icon {
    width: 40px;
    height: 40px;
    color: #4a4337;
    fill: currentColor;
}
.lp-step-btn[aria-selected="true"] .lp-layer-icon { color: var(--lp-amber); }
.lp-step-btn em { display: block; font-style: normal; color: var(--lp-dust); font-size: 0.9rem; }
.lp-layer-panel {
    background: var(--lp-ink-2);
    border: 1px solid var(--lp-line);
    border-radius: 14px;
    padding: 36px;
}
.lp-layer-panel[hidden] { display: none; }
.lp-layer-panel .lp-layer-big {
    width: 72px;
    height: 72px;
    color: var(--lp-amber);
    fill: currentColor;
    margin-bottom: 16px;
}
.lp-layer-panel h3 { font-size: 2.2rem; margin-bottom: 4px; }
.lp-layer-sub { color: var(--lp-amber); font-weight: 700; margin-bottom: 18px; }
.lp-layer-panel p { color: #d9d2c4; }
.lp-layer-count { color: var(--lp-dust); font-size: 0.9rem; margin: 0 0 0 auto; align-self: center; }

.lp-guarantee { margin-top: 64px; text-align: center; }
.lp-guarantee p { margin: 0 auto; max-width: none; }
.lp-guarantee .big { font: 900 clamp(1.8rem, 4vw, 2.6rem)/1.05 'Big Shoulders Display', sans-serif; }
.lp-guarantee .small { color: var(--lp-dust); margin-top: 10px; }

/* ---------- Join (sign up / sign in) ---------- */
.lp-join { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.lp-card { background: var(--lp-ink-2); border: 1px solid var(--lp-line); border-radius: 14px; padding: 28px; }
.lp-tabs { display: flex; gap: 4px; margin-bottom: 24px; background: rgba(0, 0, 0, 0.3); border-radius: 999px; padding: 4px; }
.lp-tab {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--lp-dust);
    font: 700 0.95rem 'Figtree', sans-serif;
    cursor: pointer;
}
.lp-tab[aria-selected="true"] { background: var(--lp-amber); color: #1a1407; }
.lp-field { margin-bottom: 16px; }
.lp-field label { display: block; font-weight: 500; font-size: 0.9rem; margin-bottom: 6px; color: #d9d2c4; }
.lp-field input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #4a4337;
    background: #15120d;
    color: var(--lp-paper);
    font: 1rem 'Figtree', sans-serif;
}
.lp-field input:focus { outline: none; border-color: var(--lp-amber); }
.lp-hint { color: var(--lp-dust); font-size: 0.8rem; margin-top: 4px; }
.lp-card .lp-btn { width: 100%; margin-top: 6px; }
.lp-or { text-align: center; color: var(--lp-dust); font-size: 0.85rem; margin: 18px 0 12px; }
.lp-google {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 12px 16px;
    background: #fff; color: #3c4043;
    border: 1px solid #dadce0; border-radius: 999px;
    font: 500 14px Arial, sans-serif; cursor: pointer;
}
.lp-alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 0.95rem; }
.lp-alert-error { background: rgba(198, 40, 40, 0.18); border: 1px solid #c62828; color: #ffb4b4; }
.lp-alert-success { background: rgba(76, 175, 80, 0.15); border: 1px solid #4caf50; color: #b9f5bc; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .lp-section { padding: 64px 0; }
    .lp-wall { width: 130%; right: -40%; opacity: 0.5; }
    .lp-hero::after { background: linear-gradient(180deg, rgba(23, 20, 15, 0.6), var(--lp-ink) 85%); }
    .lp-feature, .lp-feature.flip, .lp-steps, .lp-join { grid-template-columns: 1fr; gap: 28px; }
    .lp-feature.flip .lp-feature-copy { order: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .lp-wall { animation: none; }
    .lp-poster.lit { animation: none; opacity: 1; }
    .lp-stage img.zin, .lp-stage img.zout, .lp-stage img.pan { animation: none; }
}

/* ---------- Guarantee strike-through ---------- */
.lp-strike {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    transition: color 0.4s ease 0.8s;
}
.lp-strike-line {
    position: absolute;
    left: -4%;
    top: 36%;
    width: 108%;
    height: 0.4em;
    overflow: visible;
    pointer-events: none;
}
.lp-strike-line path {
    fill: none;
    stroke: var(--lp-amber);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 0.7s cubic-bezier(0.6, 0, 0.3, 1);
}
.lp-strike-line path.thin { stroke-width: 2; opacity: 0.7; transition-delay: 0.15s; }
.lp-guarantee.drawn .lp-strike-line path { stroke-dashoffset: 0; }
.lp-guarantee.drawn .lp-strike { color: var(--lp-dust); }
.lp-guarantee .small { opacity: 0; transition: opacity 0.6s ease 1.1s; }
.lp-guarantee.drawn .small { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    .lp-strike, .lp-strike-line path, .lp-guarantee .small { transition: none; }
}

/* ---------- Plain sign-in page ---------- */
.lp-signin-page { min-height: calc(100vh - var(--header-height, 60px)); display: flex; align-items: center; }
.lp-signin-page .lp-section { border-top: none; width: 100%; }
.lp-signin-page h1 { font-size: clamp(3rem, 7vw, 5rem); margin-bottom: 18px; }

/* ---------- Sign-in card: light card on the dark page ---------- */
.lp-card { background: #fff; border-color: #fff; color: #333; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); }
.lp-tabs { background: #f1ede6; }
.lp-tab { color: #555; }
.lp-tab[aria-selected="true"] { background: var(--lp-amber); color: #1a1407; }
.lp-field label { color: #333; font-weight: 700; }
.lp-field input { background: #fff; color: #666; border: 1px solid #cfc8bc; }
.lp-field input:focus { border-color: #b88a00; box-shadow: 0 0 0 3px rgba(255, 191, 0, 0.35); }
.lp-hint { color: #777; }
.lp-or { color: #888; }
.lp-alert-error { background: #fdecea; color: #b71c1c; }
.lp-alert-success { background: #e8f5e9; color: #1b5e20; }
.lp-match { font-size: 0.85rem; margin-top: 6px; min-height: 1.2em; font-weight: 700; }
.lp-match.ok { color: #2e7d32; }
.lp-match.no { color: #c62828; }