/* HopeCAD landing — palette from UI_REFERENCE.md */
:root {
    --primary: #54c0a5;
    --secondary: #1b4332;
    --bg: #0b1512;
    /* CAD axis convention */
    --axis-x: #e5484d;
    --axis-y: #46a758;
    --axis-z: #3e8edd;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
    background: var(--bg);
    overflow: hidden;
}

#bg,
#axes-layer {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: block;
}

#axes-layer {
    z-index: 1;
    pointer-events: none;
}

.grid-line {
    stroke: var(--primary);
    stroke-width: 1;
    opacity: 0.14;
    fill: none;
}

.axis {
    stroke-width: 2;
    opacity: 0.9;
}

.axis-x { stroke: var(--axis-x); }
.axis-y { stroke: var(--axis-y); }
.axis-z { stroke: var(--axis-z); }

.axis-label {
    font-family: "Source Code Pro", monospace;
    font-size: 20px;
    font-weight: 600;
}

.label-x { fill: var(--axis-x); }
.label-y { fill: var(--axis-y); }
.label-z { fill: var(--axis-z); }

@font-face {
    font-family: "Open Sans";
    src: url("fonts/OpenSans-VariableFont_wdth,wght.ttf") format("truetype");
    font-weight: 100 900;
}

@font-face {
    font-family: "Montserrat";
    src: url("fonts/Montserrat-VariableFont_wght.ttf") format("truetype");
    font-weight: 100 900;
}

main {
    position: relative;
    z-index: 1;
    padding: 48px;
}

.hero {
    font-family: "Montserrat", sans-serif;
    font-size: 72px;
    font-weight: 800;
    line-height: 1.1;
    text-align: left;
    color: #f2f7f5;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
    max-width: 12ch;
}

.tagline {
    font-family: "Open Sans", sans-serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--primary);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
    max-width: 34ch;
    margin-top: 24px;
}

.cta {
    display: inline-block;
    margin-top: 40px;
    padding: 14px 36px;
    font-family: "Montserrat", sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #0b1512;
    background: var(--primary);
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    transition: background 0.15s ease;
}

.cta:hover {
    background: #6ad3b9;
}

.cta-row {
    display: flex;
    gap: 16px;
    margin-top: 40px;
}

.cta-row .cta {
    margin-top: 0;
}

.cta-secondary {
    color: var(--primary);
    background: transparent;
    border: 2px solid var(--primary);
    font-family: "Montserrat", sans-serif;
    font-size: 20px;
    font-weight: 700;
    padding: 14px 36px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.cta-secondary:hover {
    background: var(--primary);
    color: #0b1512;
}

/* Demo modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(11, 21, 18, 0.8);
}

.modal-backdrop[hidden] {
    display: none;
}

.modal {
    position: relative;
    width: min(800px, 90vw);
    background: #12211c;
    border: 1px solid rgba(84, 192, 165, 0.35);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    color: rgba(242, 247, 245, 0.7);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #f2f7f5;
}

.modal-video-slot {
    aspect-ratio: 16 / 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 1.5px dashed rgba(242, 247, 245, 0.4);
    border-radius: 8px;
    color: rgba(242, 247, 245, 0.6);
    font-family: "Open Sans", sans-serif;
    font-size: 16px;
}

.play-ring {
    fill: none;
    stroke: var(--primary);
    stroke-width: 2.5;
}

.play-triangle {
    fill: var(--primary);
}

/* FAQ column mirrors the hero column on the left */
.faq {
    position: fixed;
    top: 48px;
    right: 48px;
    z-index: 1;
    max-width: 36ch;
}

.faq section {
    margin-bottom: 32px;
}

.faq h2 {
    font-family: "Montserrat", sans-serif;
    font-size: 30px;
    font-weight: 700;
    color: #f2f7f5;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
    margin-bottom: 10px;
}

.faq p {
    font-family: "Open Sans", sans-serif;
    font-size: 18px;
    line-height: 1.55;
    color: rgba(242, 247, 245, 0.85);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

/* Phrases projected onto the XY plane: 3D tilt matches the iso grid. */
.plane-phrases {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.plane-phrase {
    position: absolute;
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 20px;
    white-space: nowrap;
    color: rgba(242, 247, 245, 0.75);
    /* Subtle extrusion along -Z: stacked offsets down-screen, fading to dark. */
    text-shadow:
        0.7px 0.7px 0 rgba(27, 67, 50, 0.9),
        1.4px 1.4px 0 rgba(27, 67, 50, 0.75),
        2.1px 2.1px 0 rgba(27, 67, 50, 0.6),
        2.8px 2.8px 0 rgba(27, 67, 50, 0.45),
        0 0 14px rgba(84, 192, 165, 0.35);
    /* Grid's iso affine map, rotated 90deg about Z: baselines run along Y. */
    transform: translate(-50%, -50%) matrix(0.866, -0.5, 0.866, 0.5, 0, 0);
}

/* Scattered around screen center, kept clear of the hero and FAQ columns. */
.plane-phrase.p1 { left: 38%; top: 30%; }
.plane-phrase.p2 { left: 56%; top: 72%; color: var(--primary); }
.plane-phrase.p3 { left: 42%; top: 76%; }
.plane-phrase.p4 { left: 56%; top: 34%; }
.plane-phrase.p5 { left: 55%; top: 82%; color: var(--primary); }
.plane-phrase.p6 { left: 38%; top: 58%; color: var(--primary); }
.plane-phrase.p7 { left: 66%; top: 52%; }

/* Product Hunt placeholder with CAD dimensions */
.ph-mockup {
    position: fixed;
    left: 48px;
    bottom: 48px;
    z-index: 1;
}

.ph-slot {
    fill: none;
    stroke: rgba(242, 247, 245, 0.5);
    stroke-width: 1.5;
    stroke-dasharray: 6 4;
}

.ph-slot-label {
    font-family: "Open Sans", sans-serif;
    font-size: 16px;
    fill: rgba(242, 247, 245, 0.5);
}

.dim-line,
.dim-ext {
    stroke: var(--primary);
    stroke-width: 1;
    fill: none;
}

.dim-arrow {
    fill: var(--primary);
}

.dim-text {
    font-family: "Source Code Pro", monospace;
    font-size: 13px;
    fill: var(--primary);
}

/* Mobile: single column, background elements recede via blur.
   Kept last so these overrides win over the desktop rules above. */
@media (max-width: 768px) {
    /* Undo the fixed-height canvas: the document itself must scroll, not a
       nested body scroller (which breaks address-bar collapse and momentum). */
    html, body {
        height: auto;
        min-height: 100%;
        overflow: visible;
    }

    #bg,
    #axes-layer,
    .plane-phrases {
        filter: blur(2.5px);
    }

    main {
        padding: 32px 24px;
    }

    .hero {
        font-size: 48px;
    }

    .tagline {
        font-size: 24px;
    }

    .cta {
        font-size: 18px;
        padding: 12px 24px;
    }

    .cta-secondary {
        font-size: 18px;
        padding: 12px 24px;
    }

    .faq {
        position: static;
        max-width: none;
        margin: 40px 24px 0;
        padding: 24px;
        background: rgba(18, 33, 28, 0.6);
        border: 1px solid rgba(84, 192, 165, 0.2);
        border-radius: 12px;
        backdrop-filter: blur(6px);
    }

    .faq h2 {
        font-size: 24px;
    }

    .faq p {
        font-size: 16px;
    }

    /* Mockup flows after the FAQ instead of pinning to the viewport. */
    .ph-mockup {
        position: static;
        padding: 24px;
    }
}
