/* Payless Auto Leasing — coming soon
   Brand red + white over the night garage photo.
   The one loud thing: the dealer worksheet getting struck out in red pen. */

:root {
    --pine:     #0b1110;   /* night background, pulled from the photo */
    --sodium:   #e1263c;   /* brand red (accents, focus, hovers) */
    --red:      #e1263c;   /* brand red */
    --red-dark: #c01d31;   /* button hover */
    --canary:   #f4f3ef;   /* worksheet paper */
    --rule:     #d9d6cf;   /* ruled lines on the paper */
    --ink:      #1a1d1c;   /* printed form text */
    --ballpoint:#d81f35;   /* red pen marks */
    --mist:     #d2d6d5;   /* body text on dark */

    --wide: "Archivo", "Arial Black", Arial, sans-serif;
    --hand: "Kalam", "Segoe Print", cursive;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    background: var(--pine);
    color: var(--mist);
    font-family: var(--wide);
    font-size: 1.0625rem;
    line-height: 1.6;
    font-variation-settings: "wdth" 100;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
    outline: 3px solid var(--sodium);
    outline-offset: 3px;
}

/* ---------- Page frame + photo ---------- */

.page {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: clamp(20px, 4vw, 48px) clamp(16px, 5vw, 72px);
    overflow: hidden;
    isolation: isolate;
}

.page::before,
.page::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
}

.page::before {
    background: url("../assets/automotive-bg.JPG") 70% center / cover no-repeat;
    filter: saturate(0.95) contrast(1.05) brightness(1.1);
}

.page::after {
    background:
        linear-gradient(90deg, var(--pine) 0%, rgba(11, 17, 16, 0.9) 30%, rgba(11, 17, 16, 0.5) 60%, rgba(11, 17, 16, 0.3) 100%),
        linear-gradient(0deg, var(--pine) 0%, rgba(11, 17, 16, 0) 30%);
}

/* ---------- Wordmark ---------- */

.brand {
    display: flex;
    align-items: baseline;
    gap: 0.6em;
    color: #fff;
    line-height: 1;
}

.brand-name {
    font-size: 1.375rem;
    font-weight: 900;
    font-variation-settings: "wdth" 125;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.brand-sub {
    font-size: 0.9375rem;
    font-weight: 500;
    font-variation-settings: "wdth" 125;
    color: var(--red);
}

/* ---------- Hero ---------- */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: clamp(32px, 5vw, 80px);
    padding: clamp(48px, 8vh, 96px) 0;
}

.tag {
    display: inline-block;
    margin-bottom: 1.75rem;
    padding: 5px 11px;
    background: var(--red);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    font-variation-settings: "wdth" 100;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.4;
}

h1 {
    color: #fff;
    font-size: clamp(3.5rem, 8.4vw, 8rem);
    font-weight: 800;
    font-variation-settings: "wdth" 62;
    text-transform: uppercase;
    line-height: 0.95;
    letter-spacing: 0;
}

h1 .win { color: var(--red); }

.lede {
    max-width: 34em;
    margin-top: 1.75em;
    font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 2.25rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 28px;
    border-radius: 3px;
    font-size: 0.9375rem;
    font-weight: 700;
    font-variation-settings: "wdth" 100;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-red {
    background: var(--red);
    color: #fff;
    border: 2px solid var(--red);
}

.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); }

.btn-line {
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.55);
}

.btn-line:hover { background: #fff; border-color: #fff; color: var(--ink); }

/* ---------- The worksheet ---------- */

.sheet {
    justify-self: end;
    width: min(100%, 460px);
    padding: 28px 30px 24px;
    background:
        radial-gradient(circle at 50% 50%, var(--pine) 3px, transparent 3.5px) 0 0 / 18px 10px repeat-x,
        var(--canary);
    background-origin: border-box;
    color: var(--ink);
    transform: rotate(-2deg);
    border-radius: 2px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.4) inset,
        0 30px 60px -20px rgba(0, 0, 0, 0.7),
        0 12px 24px -12px rgba(0, 0, 0, 0.6);
    font-variation-settings: "wdth" 75;
}

.sheet-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 6px 0 12px;
    border-bottom: 2px solid var(--ink);
}

.sheet-title {
    font-size: 1.25rem;
    font-weight: 800;
    font-variation-settings: "wdth" 70;
}

.sheet-field {
    font-size: 0.8125rem;
    font-weight: 500;
}

.sheet-field .ink { margin-left: 0.4em; font-size: 1.35rem; }

.ink {
    font-family: var(--hand);
    font-weight: 700;
    color: var(--ballpoint);
    line-height: 1;
}

.sheet-rows { list-style: none; }

.row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    border-bottom: 1px solid var(--rule);
    font-size: 1.1875rem;
    font-weight: 500;
}

.row-text { position: relative; }

.struck .row-text { color: #4a524f; }

/* pen strike across the text */
.strike {
    position: absolute;
    left: -6px;
    top: 50%;
    width: calc(100% + 12px);
    height: 18px;
    transform: translateY(-50%);
    overflow: visible;
    pointer-events: none;
}

.strike path,
.circle path {
    fill: none;
    stroke: var(--ballpoint);
    stroke-width: 2.6;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 0.45s cubic-bezier(0.55, 0.1, 0.4, 1) forwards;
    animation-delay: calc(0.7s + var(--i) * 0.42s);
}

.kept { font-weight: 700; }

.circle {
    position: absolute;
    left: -12px;
    top: 50%;
    width: calc(100% + 24px);
    height: 42px;
    transform: translateY(-50%);
    overflow: visible;
    pointer-events: none;
}

.circle path { animation-duration: 0.7s; }

.note {
    font-size: 1.6rem;
    transform: rotate(-6deg);
    opacity: 0;
    animation: appear 0.3s ease forwards;
    animation-delay: calc(0.7s + 4 * 0.42s + 0.6s);
}

.sheet-foot {
    padding-top: 16px;
    font-size: 0.8125rem;
    font-weight: 500;
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

/* ---------- Footer ---------- */

.foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(196, 211, 207, 0.18);
    font-size: 0.875rem;
    color: rgba(196, 211, 207, 0.75);
}

.foot a { text-decoration: none; }
.foot a:hover { color: var(--sodium); text-decoration: underline; }
.sep { margin: 0 0.5em; opacity: 0.5; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .page::before { background-position: 62% 30%; }

    .page::after {
        background:
            linear-gradient(180deg, rgba(12, 26, 24, 0.55) 0%, rgba(12, 26, 24, 0.88) 45%, var(--pine) 80%);
    }

    .hero {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .sheet {
        justify-self: start;
        transform: rotate(-1.5deg);
    }
}

@media (max-width: 520px) {
    .actions { flex-direction: column; }
    .btn { width: 100%; }
    .sheet { padding: 22px 18px 18px; }
    .row { font-size: 1.0625rem; }
    .foot { flex-direction: column; }
}

/* ---------- Reduced motion: show the finished sheet ---------- */

@media (prefers-reduced-motion: reduce) {
    .strike path,
    .circle path { animation: none; stroke-dashoffset: 0; }
    .note { animation: none; opacity: 1; }
}
