/*
    Docfield landing page.

    Hand-written rather than generated by a utility framework, because the page
    has to be one request with no external fetches: no web font, no CDN, no
    build step. That is the single biggest lever on Largest Contentful Paint,
    and this page is the one that has to rank.
*/

:root {
    --ink: #0b0d14;
    --ink-2: #11141f;
    --ink-3: #171b29;
    --line: #232838;
    --line-2: #2f3548;
    --text: #f3f4f8;
    --text-2: #a9b0c6;
    --text-3: #767e96;
    --accent: #8b82fa;
    --accent-2: #6366f1;
    --accent-soft: rgba(139, 130, 250, 0.12);
    --good: #34d399;
    --warn: #fbbf24;
    --radius: 14px;
    --max: 1120px;
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter,
        "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--ink);
    color: var(--text);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.025em; margin: 0 0 .6em; font-weight: 680; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.16rem; letter-spacing: -0.015em; }
p { margin: 0 0 1.1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 92px 0; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
    .section { padding: 62px 0; }
    .wrap { padding: 0 18px; }
    .hero { padding: 52px 0 56px; }
}
.section--plain { border-top: 0; }
.eyebrow {
    font-size: .78rem;
    font-weight: 640;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}
.lede { font-size: 1.16rem; color: var(--text-2); max-width: 62ch; }
.muted { color: var(--text-2); }
.small { font-size: .93rem; }

/* ---------- header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 13, 20, .82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); }
.site-header .wrap {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 680; letter-spacing: -.02em; font-size: 1.08rem; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.site-nav { display: flex; gap: 26px; margin-left: auto; }
.site-nav a { color: var(--text-2); font-size: .95rem; font-weight: 520; }
.site-nav a:hover { color: var(--text); text-decoration: none; }

/* Five links plus the wordmark and a button do not fit a phone. The page is a
   single scroll and the footer carries the same links, so they are dropped
   rather than hidden behind a menu button nobody would press. */
@media (max-width: 860px) {
    .site-nav { display: none; }
    .site-header .wrap > .btn { margin-left: auto; }
}

/* ---------- buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 620;
    font-size: .98rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--accent-2); color: #fff; }
.btn--primary:hover { background: #7c7ef5; }
.btn--ghost { border-color: var(--line-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--text-3); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ---------- hero ---------- */

.hero { padding: 84px 0 76px; position: relative; overflow: hidden; }
.hero::before {
    content: "";
    position: absolute;
    inset: -30% 20% auto -10%;
    height: 620px;
    background: radial-gradient(closest-side, rgba(99, 102, 241, .17), transparent 72%);
    pointer-events: none;
}
.hero .wrap { position: relative; }
.hero h1 { max-width: 17ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { font-size: 1.24rem; margin-top: 4px; }
.hero-note { margin-top: 22px; font-size: .93rem; color: var(--text-3); }

/* ---------- the form-to-CSV demo ---------- */

.demo {
    margin-top: 60px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--ink-2);
    overflow: hidden;
}
.demo-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--ink-3);
    font-size: .84rem;
    color: var(--text-3);
    font-family: var(--mono);
}
.demo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.demo-body { display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) { .demo-body { grid-template-columns: 1fr 1fr; } }

.demo-pane { padding: 26px; }
.demo-pane + .demo-pane { border-top: 1px solid var(--line); }
@media (min-width: 900px) {
    .demo-pane + .demo-pane { border-top: 0; border-left: 1px solid var(--line); }
}
.demo-label { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px; font-weight: 620; }

/* The scanned form, drawn rather than photographed so it stays crisp and weighs nothing. */
.scan { border: 1px solid var(--line-2); border-radius: 8px; padding: 16px; background: #fdfdfb; position: relative; overflow: hidden; }
.scan-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 11px; }
.scan-key { font-size: .72rem; color: #6a6f7e; white-space: nowrap; }
.scan-val {
    flex: 1;
    border-bottom: 1px solid #c9cddb;
    font-family: "Segoe Script", "Bradley Hand", cursive;
    color: #26408f;
    font-size: .96rem;
    line-height: 1.4;
    min-height: 1.4em;
}
.scan-photo {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 54px;
    height: 66px;
    border-radius: 3px;
    background: linear-gradient(180deg, #6fc4e8 0%, #6fc4e8 46%, #c9a892 46%, #b5876c 100%);
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #d5d9e4;
}
.scan-inner { padding-right: 74px; }

/* The scanning sweep. */
.scan-beam {
    position: absolute;
    left: 0;
    right: 0;
    height: 44px;
    background: linear-gradient(180deg, transparent, rgba(99, 102, 241, .22), transparent);
    border-top: 1px solid rgba(99, 102, 241, .5);
    border-bottom: 1px solid rgba(99, 102, 241, .5);
    transform: translateY(-60px);
    opacity: 0;
}
.demo.is-running .scan-beam { animation: sweep 2.6s ease-in-out infinite; }
@keyframes sweep {
    0% { transform: translateY(-50px); opacity: 0; }
    12% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(190px); opacity: 0; }
}

/* The CSV that comes out. */
.csv { font-family: var(--mono); font-size: .82rem; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.csv-row { display: grid; grid-template-columns: 4.6em 1fr 5.2em; }
.csv-row + .csv-row { border-top: 1px solid var(--line); }
.csv-row span { padding: 9px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csv-row span + span { border-left: 1px solid var(--line); }
.csv-head { background: var(--ink-3); color: var(--text-3); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }
.csv-body span { color: var(--text-2); }
.csv-body { opacity: 0; transform: translateY(6px); transition: opacity .45s ease, transform .45s ease; }
.csv-body.is-in { opacity: 1; transform: none; }
.csv-photo { color: var(--accent) !important; }

.demo-foot { padding: 14px 26px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--text-3); background: var(--ink-3); }

/* ---------- generic layout pieces ---------- */

.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    background: var(--ink-2);
    transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card h3 { margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; }
.card-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
    font-size: .92rem;
    margin-bottom: 16px;
}

.split { display: grid; gap: 44px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } }
.split--flip > :first-child { order: 2; }
@media (max-width: 899px) { .split--flip > :first-child { order: 0; } }

.ticks { list-style: none; padding: 0; margin: 22px 0 0; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 13px; color: var(--text-2); }
.ticks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .48em;
    width: 16px;
    height: 9px;
    border-left: 2px solid var(--good);
    border-bottom: 2px solid var(--good);
    transform: rotate(-45deg);
}
.ticks strong { color: var(--text); font-weight: 620; }

/* ---------- stats ---------- */

.stats { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat { border-left: 2px solid var(--accent); padding-left: 18px; }
.stat b { display: block; font-size: 2.15rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.stat span { color: var(--text-2); font-size: .95rem; }

/* ---------- card designer illustration ---------- */

.mock-card {
    position: relative;
    aspect-ratio: 86 / 54;
    border-radius: 10px;
    background: linear-gradient(135deg, #1c2340 0%, #2b2160 100%);
    border: 1px solid var(--line-2);
    overflow: hidden;
    padding: 16px;
}
.mock-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 26px;
    background: rgba(139, 130, 250, .18);
}
.mock-photo { position: absolute; left: 16px; top: 16px; width: 62px; height: 76px; border-radius: 4px; background: linear-gradient(180deg, #6fc4e8 0%, #6fc4e8 44%, #c9a892 44%, #ab7f63 100%); }
.mock-fields { position: absolute; left: 92px; top: 20px; right: 16px; }
.mock-field {
    border: 1px dashed rgba(139, 130, 250, .55);
    border-radius: 5px;
    padding: 4px 8px;
    margin-bottom: 8px;
    font-size: .72rem;
    color: #d9dcff;
    font-family: var(--mono);
    background: rgba(139, 130, 250, .09);
    position: relative;
}
.mock-field::after {
    content: "";
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 2px;
}
.crop-marks { position: absolute; inset: 0; pointer-events: none; }
.crop-marks i { position: absolute; width: 12px; height: 12px; border-color: rgba(255,255,255,.42); border-style: solid; border-width: 0; }
.crop-marks i:nth-child(1) { top: 5px; left: 5px; border-top-width: 1px; border-left-width: 1px; }
.crop-marks i:nth-child(2) { top: 5px; right: 5px; border-top-width: 1px; border-right-width: 1px; }
.crop-marks i:nth-child(3) { bottom: 5px; left: 5px; border-bottom-width: 1px; border-left-width: 1px; }
.crop-marks i:nth-child(4) { bottom: 5px; right: 5px; border-bottom-width: 1px; border-right-width: 1px; }

/* ---------- pricing ---------- */

.price-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; background: var(--ink-2); }
.price-card--lead { border-color: var(--accent-2); background: linear-gradient(180deg, rgba(99,102,241,.09), transparent 60%), var(--ink-2); }
.price-tag { font-size: 2rem; font-weight: 700; letter-spacing: -.03em; }
.price-tag small { font-size: .95rem; font-weight: 500; color: var(--text-3); letter-spacing: 0; }

/* ---------- faq ---------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
    cursor: pointer;
    padding: 22px 40px 22px 0;
    font-weight: 620;
    font-size: 1.06rem;
    list-style: none;
    position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 30px;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--text-3);
    border-bottom: 2px solid var(--text-3);
    transform: rotate(45deg);
    transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { color: var(--text-2); margin: 0 0 22px; max-width: 74ch; }

/* ---------- cta + footer ---------- */

.cta { text-align: center; padding: 96px 0; background: linear-gradient(180deg, transparent, rgba(99,102,241,.08)); }
.cta h2 { max-width: 20ch; margin-inline: auto; }
.cta .lede { margin-inline: auto; }
.cta .btn-row { justify-content: center; }

.site-footer { border-top: 1px solid var(--line); padding: 42px 0; color: var(--text-3); font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.site-footer nav { margin-left: auto; display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--text-2); }

/* ---------- scroll reveal ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* Motion is decoration here; anyone who has asked for less gets the page
   fully formed and static instead. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .csv-body { opacity: 1; transform: none; }
    .demo.is-running .scan-beam { animation: none; }
    .btn:hover, .card:hover { transform: none; }
}
