/* ================================================================
   PathPal — kevintang.xyz/apps/pathpal
   Theme: "the filesystem path" — deep-ink dark, periwinkle→violet
   (drawn from the app icon), mono path accents, keycap chips.
   ================================================================ */

:root {
    --ink: #0d0b1a;
    --ink-2: #131022;
    --panel: #17132a;
    --panel-2: #1d1834;
    --line: rgba(163, 149, 230, 0.14);
    --line-strong: rgba(163, 149, 230, 0.28);
    --text: #ece9fb;
    --dim: #a79fce;
    --faint: #6f6899;
    --peri: #8787fb;
    --vio: #9b65f2;
    --accent-grad: linear-gradient(100deg, #8787fb, #9b65f2);
    --ok: #6ee7a8;
    --display: "Bricolage Grotesque", "Avenir Next", sans-serif;
    --body: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
    --radius: 16px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
    font-family: var(--body);
    background: var(--ink);
    color: var(--text);
    line-height: 1.6;
    font-size: 17px;
    overflow-x: hidden;
}

/* --- atmosphere: glows + faint grid + grain ------------------- */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(900px 600px at 12% -5%, rgba(135, 135, 251, 0.16), transparent 60%),
        radial-gradient(1000px 700px at 105% 40%, rgba(155, 101, 242, 0.12), transparent 65%),
        radial-gradient(800px 600px at 40% 110%, rgba(135, 135, 251, 0.08), transparent 60%);
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(1200px 800px at 50% 0%, rgba(0,0,0,0.5), transparent 75%);
    -webkit-mask-image: radial-gradient(1200px 800px at 50% 0%, rgba(0,0,0,0.5), transparent 75%);
    pointer-events: none;
}

::selection { background: rgba(135, 135, 251, 0.35); }

a { color: var(--peri); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* --- top path bar --------------------------------------------- */
.pathbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(13, 11, 26, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.pathbar .inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 28px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.crumbs {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--faint);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.crumbs img { width: 22px; height: 22px; border-radius: 5px; }
.crumbs a { color: var(--faint); }
.crumbs a:hover { color: var(--peri); text-decoration: none; }
.crumbs .sep { color: var(--faint); opacity: 0.5; }
.crumbs .here { color: var(--text); font-weight: 600; }
.pathbar .price {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--dim);
}

/* --- buttons --------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--body);
    font-weight: 700;
    font-size: 16px;
    padding: 14px 26px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s;
    cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
    background: var(--accent-grad);
    color: #fff;
    box-shadow: 0 8px 28px -8px rgba(135, 135, 251, 0.55);
}
.btn-primary:hover { box-shadow: 0 12px 34px -8px rgba(155, 101, 242, 0.65); }
.btn-primary .sub { font-weight: 500; opacity: 0.85; font-size: 14px; }
.btn-ghost {
    color: var(--text);
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover { border-color: var(--peri); }
.btn-sm { padding: 8px 18px; font-size: 14px; border-radius: 10px; }

/* --- hero ------------------------------------------------------ */
.hero { padding: 84px 0 30px; position: relative; }
.hero .grid {
    display: grid;
    grid-template-columns: 0.94fr 1.06fr;
    gap: 48px;
    align-items: center;
}
.eyebrow {
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.06em;
    color: var(--peri);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 6px 14px;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    background: rgba(135, 135, 251, 0.06);
}
h1 {
    font-family: var(--display);
    font-size: clamp(38px, 4.6vw, 58px);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.015em;
    margin-bottom: 20px;
}
h1 .grad {
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.lede { font-size: 19px; color: var(--dim); margin-bottom: 14px; max-width: 54ch; }
.lede b, .lede strong { color: var(--text); }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin: 26px 0 20px; }
.proof {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 14px;
    color: var(--dim);
    font-family: var(--mono);
}
.proof .ok { color: var(--ok); margin-right: 6px; }
.byline { margin-top: 18px; font-size: 14px; color: var(--faint); }

.hero-shot { position: relative; }
.hero-shot img {
    width: 112%;
    max-width: 112%;
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.65), 0 0 80px -30px rgba(135, 135, 251, 0.35);
}
.hero-shot .glow {
    position: absolute;
    inset: -8%;
    z-index: -1;
    background: radial-gradient(60% 60% at 50% 50%, rgba(135, 135, 251, 0.22), transparent 70%);
    filter: blur(20px);
}
.hero-keys {
    position: absolute;
    bottom: -18px;
    right: 22px;
    display: flex;
    gap: 8px;
}

/* --- keycaps --------------------------------------------------- */
kbd {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text);
    background: linear-gradient(180deg, #262042, #1a1530);
    border: 1px solid var(--line-strong);
    border-bottom-width: 3px;
    border-radius: 7px;
    padding: 4px 9px;
    display: inline-block;
    line-height: 1.3;
    box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.6);
    transition: transform 0.08s ease, border-bottom-width 0.08s ease;
}
kbd:hover { transform: translateY(2px); border-bottom-width: 1px; }

/* --- sections -------------------------------------------------- */
section { padding: 72px 0 12px; }
.sec-head { margin-bottom: 36px; max-width: 760px; }
.sec-path {
    font-family: var(--mono);
    font-size: 14px;
    color: var(--peri);
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
}
.sec-path::after {
    content: "▍";
    animation: blink 1.15s steps(1) infinite;
    margin-left: 2px;
    opacity: 0.9;
}
@keyframes blink { 50% { opacity: 0; } }
h2 {
    font-family: var(--display);
    font-size: clamp(28px, 3.2vw, 40px);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.1;
    margin-bottom: 12px;
}
.sec-head p { color: var(--dim); font-size: 17px; }

/* --- demo (GIF in a faux macOS window) ------------------------- */
.demo-window {
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: var(--panel);
    overflow: hidden;
    box-shadow: 0 40px 90px -35px rgba(0, 0, 0, 0.7);
}
.demo-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--panel-2);
}
.demo-titlebar .dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.demo-titlebar .t {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--faint);
    margin: 0 auto;
    transform: translateX(-26px);
}
.demo-window img { width: 100%; }
.demo-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 22px;
}
.demo-steps .step {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    padding: 16px 18px;
    font-size: 15px;
    color: var(--dim);
}
.demo-steps .n {
    font-family: var(--mono);
    color: var(--peri);
    font-size: 13px;
    display: block;
    margin-bottom: 6px;
}
.demo-steps b { color: var(--text); }

/* --- features --------------------------------------------------- */
.shot-wide { margin-bottom: 20px; }
.shots-duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 22px;
    align-items: stretch;
}
.shot-card {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    overflow: hidden;
    background: var(--panel);
    display: flex;
    flex-direction: column;
}
.shot-card img { width: 100%; height: 100%; object-fit: cover; flex: 1; }
.shot-card figcaption {
    padding: 13px 18px;
    font-size: 14px;
    color: var(--dim);
    border-top: 1px solid var(--line);
    font-family: var(--mono);
}
.shot-card figcaption b { color: var(--text); font-weight: 600; }

.feat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.feat {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.025), transparent 55%);
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.feat:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.feat .tag {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--peri);
    display: block;
    margin-bottom: 12px;
    letter-spacing: 0.04em;
}
.feat h3 {
    font-family: var(--display);
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 8px;
}
.feat p { font-size: 15px; color: var(--dim); }
.feat kbd { font-size: 11px; padding: 2px 6px; }

/* --- shadow-windows spotlight ----------------------------------- */
.spotlight {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background:
        radial-gradient(760px 320px at 18% 0%, rgba(135, 135, 251, 0.12), transparent 70%),
        var(--panel);
    padding: 32px;
    margin-bottom: 22px;
}
.spot-copy { max-width: 730px; margin-bottom: 28px; }
.spot-copy .tag {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--peri);
    display: block;
    margin-bottom: 12px;
    letter-spacing: 0.04em;
}
.spot-copy h3 {
    font-family: var(--display);
    font-size: 30px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.015em;
    margin-bottom: 12px;
}
.spot-copy p { color: var(--dim); font-size: 17px; line-height: 1.55; }
.spot-copy b { color: var(--text); font-weight: 600; }
.spotlight img {
    width: 100%;
    display: block;
    border-radius: 12px;
    border: 1px solid var(--line);
    box-shadow: 0 40px 90px -35px rgba(0, 0, 0, 0.7);
}
@media (max-width: 640px) {
    .spotlight { padding: 22px; }
    .spot-copy h3 { font-size: 24px; }
}

/* --- setup ------------------------------------------------------ */
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps3 .card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 24px;
    background: var(--panel);
    position: relative;
}
.steps3 .idx {
    font-family: var(--mono);
    color: var(--vio);
    font-size: 13px;
    display: block;
    margin-bottom: 10px;
}
.steps3 h3 { font-family: var(--display); font-size: 19px; margin-bottom: 8px; }
.steps3 p { font-size: 15px; color: var(--dim); }
.steps3 code {
    font-family: var(--mono);
    font-size: 13px;
    background: rgba(135, 135, 251, 0.1);
    border-radius: 5px;
    padding: 1px 6px;
    color: var(--peri);
}

/* --- trust ------------------------------------------------------ */
.trust {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    padding: 12px 26px;
}
.trust ul { list-style: none; }
.trust li {
    display: flex;
    gap: 18px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15.5px;
    color: var(--dim);
}
.trust li:last-child { border-bottom: none; }
.trust .mk {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--vio);
    min-width: 74px;
    padding-top: 2px;
}
.trust b { color: var(--text); }

/* --- faq -------------------------------------------------------- */
.faq details {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.015);
    margin-bottom: 10px;
    overflow: hidden;
}
.faq summary {
    cursor: pointer;
    padding: 16px 20px;
    font-weight: 600;
    font-size: 16px;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: color 0.15s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
    content: "▸";
    color: var(--peri);
    font-size: 13px;
    transition: transform 0.18s ease;
}
.faq details[open] summary::before { transform: rotate(90deg); }
.faq summary:hover { color: var(--peri); }
.faq details p {
    padding: 0 20px 18px 41px;
    color: var(--dim);
    font-size: 15.5px;
}
.faq details p + p { margin-top: -6px; }

/* --- buy -------------------------------------------------------- */
.buy-box {
    text-align: center;
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    padding: 64px 40px 58px;
    background:
        radial-gradient(600px 300px at 50% -20%, rgba(135, 135, 251, 0.18), transparent 70%),
        var(--panel);
    position: relative;
    overflow: hidden;
}
.buy-box .sec-path { justify-content: center; }
.buy-box h2 { font-size: clamp(30px, 3.6vw, 46px); }
.buy-box .anchor { color: var(--dim); margin: 10px auto 26px; max-width: 56ch; }
.buy-box .anchor s { color: var(--faint); }
.buy-box .cta-row { justify-content: center; }
.buy-box .micro {
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--faint);
    margin-top: 22px;
}

/* --- footer ----------------------------------------------------- */
footer {
    margin-top: 90px;
    border-top: 1px solid var(--line);
    padding: 40px 0 56px;
    text-align: center;
}
.socials { display: flex; gap: 22px; justify-content: center; margin-bottom: 22px; }
.socials a { color: var(--faint); font-size: 20px; }
.socials a:hover { color: var(--peri); text-decoration: none; }
.foot-links {
    display: flex;
    gap: 26px;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 14px;
    margin-bottom: 18px;
}
.foot-links a { color: var(--dim); }
.made { font-size: 13px; color: var(--faint); font-family: var(--mono); }

/* --- reveal on scroll ------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
    .sec-path::after { animation: none; }
}

/* --- responsive -------------------------------------------------- */
@media (max-width: 980px) {
    .hero .grid { grid-template-columns: 1fr; gap: 36px; }
    .feat-grid { grid-template-columns: repeat(2, 1fr); }
    .shots-duo { grid-template-columns: 1fr; }
    .steps3, .demo-steps { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .feat-grid { grid-template-columns: 1fr; }
    .pathbar .price { display: none; }
    body { font-size: 16px; }
}
