:root {
    --ink: #20231f;
    --muted: #666960;
    --paper: #f7f4ed;
    --card: rgba(255, 255, 252, 0.9);
    --line: rgba(32, 35, 31, 0.13);
    --purple: #6d5bd0;
    --purple-dark: #5544bb;
    --purple-soft: #e9e4ff;
    --coral: #ed745d;
    --green: #377d5a;
    --green-soft: #e5f2e8;
    --warning: #8b6518;
    --warning-soft: #fff4d8;
    --shadow: 0 28px 80px rgba(45, 40, 28, 0.12);
    --radius-lg: 32px;
    --radius-md: 18px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--paper);
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background:
        radial-gradient(circle at 15% 15%, rgba(249, 201, 154, 0.18), transparent 28rem),
        radial-gradient(circle at 92% 40%, rgba(109, 91, 208, 0.09), transparent 30rem),
        var(--paper);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
label[for="video"] {
    -webkit-tap-highlight-color: transparent;
}

.ambient {
    position: fixed;
    z-index: -1;
    width: 18rem;
    height: 18rem;
    border: 1px solid rgba(109, 91, 208, 0.13);
    border-radius: 50%;
    pointer-events: none;
}

.ambient::before,
.ambient::after {
    position: absolute;
    content: "";
    border-radius: 50%;
    border: 1px solid rgba(109, 91, 208, 0.09);
}

.ambient::before {
    inset: 2.25rem;
}

.ambient::after {
    inset: 5rem;
}

.ambient-one {
    top: -8rem;
    right: -5rem;
}

.ambient-two {
    bottom: -12rem;
    left: -8rem;
    transform: scale(1.35);
}

.site-header {
    width: min(1180px, calc(100% - 48px));
    min-height: 96px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    gap: 11px;
    align-items: center;
    color: var(--ink);
    text-decoration: none;
    font-size: 20px;
    font-weight: 750;
    letter-spacing: -0.04em;
}

.brand-dot {
    color: var(--coral);
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    background: var(--purple);
    box-shadow: 0 8px 18px rgba(109, 91, 208, 0.25);
    transform: rotate(-4deg);
}

.brand-mark span {
    width: 0;
    height: 0;
    margin-left: 2px;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid white;
}

.privacy-badge,
.secure-mark {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    color: #55594f;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.privacy-badge span {
    color: var(--green);
    font-size: 9px;
}

.text-button {
    padding: 9px 0;
    color: var(--muted);
    border: 0;
    border-bottom: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.text-button:hover {
    color: var(--ink);
    border-color: var(--ink);
}

.login-shell,
.upload-shell {
    width: min(1120px, calc(100% - 48px));
    min-height: calc(100vh - 176px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(400px, 0.78fr);
    gap: clamp(48px, 8vw, 110px);
    align-items: center;
    padding: 38px 0 80px;
}

.upload-shell {
    grid-template-columns: minmax(0, 0.82fr) minmax(470px, 1fr);
    gap: clamp(48px, 7vw, 92px);
    align-items: start;
    padding-top: clamp(48px, 8vh, 94px);
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 24px;
    color: var(--coral);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow::before {
    width: 28px;
    height: 2px;
    content: "";
    background: currentColor;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    max-width: 670px;
    margin-bottom: 28px;
    font-size: clamp(46px, 5.3vw, 74px);
    line-height: 0.98;
    letter-spacing: -0.058em;
}

h1 em {
    color: var(--purple);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    letter-spacing: -0.05em;
}

.intro-copy,
.upload-intro > p:not(.eyebrow) {
    max-width: 550px;
    margin-bottom: 36px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.75;
}

.keepsake-note {
    max-width: 480px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.keepsake-note p {
    margin: 0;
    color: #70736a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    font-style: italic;
    line-height: 1.55;
}

.note-number {
    color: var(--purple);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.card {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.card::after {
    position: absolute;
    z-index: -1;
    inset: 10px -10px -10px 10px;
    content: "";
    border: 1px solid rgba(109, 91, 208, 0.1);
    border-radius: inherit;
}

.login-card {
    padding: clamp(34px, 5vw, 54px);
}

.card-kicker {
    display: flex;
    gap: 9px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--purple);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.card-kicker span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--coral);
    box-shadow: 0 0 0 5px rgba(237, 116, 93, 0.12);
}

.card h2 {
    margin-bottom: 10px;
    font-size: clamp(28px, 3vw, 36px);
    line-height: 1.1;
    letter-spacing: -0.045em;
}

.card > p,
.card-heading + p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.login-form,
.upload-form {
    display: grid;
    gap: 12px;
    margin-top: 30px;
}

label:not(.dropzone) {
    color: #474a44;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.015em;
}

label span {
    color: #8d8f87;
    font-weight: 500;
}

input[type="password"],
input[type="text"] {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    color: var(--ink);
    border: 1px solid #dcdcd5;
    border-radius: 13px;
    outline: none;
    background: rgba(255, 255, 255, 0.74);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

input::placeholder {
    color: #a7a89f;
}

input[type="password"]:focus,
input[type="text"]:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 4px rgba(109, 91, 208, 0.11);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 88px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 13px;
    padding: 7px;
    color: var(--purple);
    border: 0;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 800;
}

.primary-button {
    width: 100%;
    min-height: 56px;
    margin-top: 8px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    border: 0;
    border-radius: 14px;
    background: var(--purple);
    box-shadow: 0 10px 24px rgba(109, 91, 208, 0.23);
    cursor: pointer;
    font-weight: 800;
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.primary-button:hover {
    background: var(--purple-dark);
    box-shadow: 0 13px 28px rgba(109, 91, 208, 0.28);
    transform: translateY(-2px);
}

.primary-button:disabled {
    cursor: wait;
    opacity: 0.65;
    transform: none;
}

.primary-button span {
    color: white;
    font-size: 20px;
    font-weight: 400;
}

.card-footnote {
    margin: 22px 0 0 !important;
    text-align: center;
    color: #888a82 !important;
    font-size: 11px !important;
}

.card-footnote span {
    margin-right: 6px;
    color: var(--coral);
    font-size: 8px;
}

.notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 18px 0;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.45;
}

.notice p {
    margin: 0;
}

.notice-icon {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 900;
}

.notice-error {
    color: #812d27;
    border-color: #f1c8c2;
    background: #fff0ed;
}

.notice-error .notice-icon {
    color: white;
    background: var(--coral);
}

.notice-success {
    color: #285d42;
    border-color: #c1dec9;
    background: var(--green-soft);
}

.notice-success .notice-icon {
    color: white;
    background: var(--green);
}

.notice-warning {
    color: #765619;
    border-color: #ecdaad;
    background: var(--warning-soft);
}

.notice-warning .notice-icon {
    color: white;
    background: #ba8423;
}

.help-line {
    margin-top: 4px !important;
    font-size: 12px;
}

.help-line a {
    color: inherit;
    font-weight: 800;
}

.upload-intro h1 {
    font-size: clamp(44px, 5vw, 67px);
}

.steps {
    margin: 42px 0 0;
    padding: 0;
    display: grid;
    gap: 16px;
    list-style: none;
}

.steps li {
    display: flex;
    gap: 14px;
    align-items: center;
}

.steps li > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--purple);
    border: 1px solid rgba(109, 91, 208, 0.2);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    font-style: italic;
}

.steps div {
    display: grid;
    gap: 3px;
}

.steps strong {
    font-size: 13px;
}

.steps small {
    color: #85877f;
    font-size: 11px;
}

.upload-card {
    padding: clamp(28px, 4vw, 44px);
}

.card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.card-heading h2 {
    margin: 0;
}

.secure-mark {
    color: var(--green);
    border-color: rgba(55, 125, 90, 0.18);
    background: var(--green-soft);
}

.upload-form {
    margin-top: 28px;
}

.dropzone {
    min-height: 220px;
    margin-top: 4px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    border: 1.5px dashed rgba(109, 91, 208, 0.42);
    border-radius: var(--radius-md);
    outline: none;
    background:
        linear-gradient(rgba(255,255,255,0.65), rgba(255,255,255,0.65)),
        repeating-linear-gradient(135deg, rgba(109, 91, 208, 0.055) 0, rgba(109, 91, 208, 0.055) 8px, transparent 8px, transparent 17px);
    cursor: pointer;
    text-align: center;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.dropzone:hover,
.dropzone.is-dragging,
.dropzone:focus-within {
    border-color: var(--purple);
    background: rgba(242, 239, 255, 0.78);
    transform: translateY(-1px);
}

.dropzone input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.upload-symbol {
    width: 52px;
    height: 52px;
    margin-bottom: 15px;
    display: grid;
    place-items: center;
    color: var(--purple);
    border-radius: 17px;
    background: var(--purple-soft);
    box-shadow: inset 0 0 0 1px rgba(109, 91, 208, 0.1);
}

.upload-symbol span {
    color: var(--purple);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 27px;
    line-height: 1;
}

.dropzone strong {
    margin-bottom: 5px;
    color: var(--ink);
    font-size: 16px;
}

.dropzone > span:not(.upload-symbol):not(.choose-chip) {
    color: #85877f;
    font-size: 12px;
}

.choose-chip {
    margin-top: 15px;
    padding: 8px 13px;
    color: var(--purple) !important;
    border: 1px solid rgba(109, 91, 208, 0.18);
    border-radius: 999px;
    background: white;
    font-size: 11px;
    font-weight: 800;
}

.format-row,
.progress-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #898b83;
    font-size: 10px;
    line-height: 1.4;
}

.progress-wrap {
    padding: 11px 0 2px;
    border: 1px solid transparent;
    border-radius: 14px;
    transition: padding 180ms ease, color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.progress-copy {
    margin-bottom: 8px;
    color: var(--muted);
}

.progress-copy span {
    font-weight: 650;
}

.progress-copy strong {
    white-space: nowrap;
}

.progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--purple-soft);
}

.progress-track span {
    width: 0;
    height: 100%;
    display: block;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--purple), #9b72da);
    transition: width 180ms ease;
}

.progress-wrap.is-processing .progress-copy strong {
    color: var(--purple);
}

.progress-wrap.is-processing .progress-track span {
    background: linear-gradient(90deg, var(--purple), #aa82e9, var(--purple));
    background-size: 200% 100%;
    animation: progress-processing 1.4s linear infinite;
}

.progress-wrap.is-success {
    padding: 14px;
    color: var(--green);
    border-color: #c1dec9;
    background: var(--green-soft);
}

.progress-wrap.is-success .progress-copy {
    color: var(--green);
}

.progress-wrap.is-success .progress-copy strong {
    font-size: 11px;
}

.progress-wrap.is-success .progress-track {
    background: rgba(55, 125, 90, 0.14);
}

.progress-wrap.is-success .progress-track span {
    background: var(--green);
}

@keyframes progress-processing {
    to {
        background-position: -200% 0;
    }
}

.upload-button {
    margin-top: 8px;
}

footer {
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
    padding: 22px 0 30px;
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: center;
    color: #96978f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 11px;
    font-style: italic;
}

footer span:nth-child(2) {
    color: var(--coral);
    font-size: 8px;
}

@media (max-width: 880px) {
    .login-shell,
    .upload-shell {
        grid-template-columns: 1fr;
        gap: 52px;
        align-items: initial;
        padding-top: 46px;
    }

    .intro,
    .upload-intro {
        max-width: 670px;
    }

    .login-card,
    .upload-card {
        width: min(100%, 600px);
        margin: 0 auto;
    }

    .steps {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .site-header,
    .login-shell,
    .upload-shell,
    footer {
        width: min(100% - 30px, 1120px);
    }

    .site-header {
        min-height: 76px;
    }

    .privacy-badge {
        padding: 8px 10px;
        font-size: 10px;
    }

    .login-shell,
    .upload-shell {
        gap: 38px;
        min-height: auto;
        padding: 32px 0 56px;
    }

    h1,
    .upload-intro h1 {
        margin-bottom: 22px;
        font-size: clamp(39px, 12.5vw, 54px);
    }

    .eyebrow {
        margin-bottom: 18px;
        font-size: 10px;
    }

    .intro-copy,
    .upload-intro > p:not(.eyebrow) {
        font-size: 15px;
        line-height: 1.65;
    }

    .login-card,
    .upload-card {
        padding: 28px 21px;
        border-radius: 24px;
    }

    .card::after {
        inset: 6px -5px -6px 5px;
    }

    .steps {
        grid-template-columns: 1fr;
        margin-top: 30px;
    }

    .dropzone {
        min-height: 205px;
        padding: 22px 16px;
    }

    .format-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    footer {
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
