@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,700&family=Space+Grotesk:wght@400;500;700&display=swap");

:root {
    --canvas: #f6efe4;
    --canvas-strong: #f1e2c6;
    --surface: rgba(255, 252, 247, 0.82);
    --surface-strong: rgba(255, 248, 239, 0.95);
    --border: rgba(95, 57, 34, 0.16);
    --ink: #1f241e;
    --muted: #5d6057;
    --accent: #b5402a;
    --accent-deep: #82281a;
    --forest: #1f5145;
    --shadow: 0 24px 60px rgba(90, 55, 22, 0.12);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #f1e2c6;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.65), transparent 30%),
        linear-gradient(135deg, #f8f0e2 0%, #f1e2c6 45%, #efe6d8 100%);
    overflow-x: hidden;
}

.background-glow {
    position: fixed;
    inset: auto;
    width: 32rem;
    height: 32rem;
    border-radius: 999px;
    filter: blur(18px);
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
}

.background-glow--one {
    top: -6rem;
    right: -8rem;
    background: rgba(181, 64, 42, 0.18);
}

.background-glow--two {
    bottom: -8rem;
    left: -10rem;
    background: rgba(31, 81, 69, 0.16);
}

.page-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 2rem));
    min-height: 100dvh;
    margin: 0 auto;
    padding: clamp(0.65rem, 1.4vh, 1.25rem) 0 clamp(0.85rem, 2vh, 2rem);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.site-header,
.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-header {
    padding: clamp(0.35rem, 0.9vh, 0.75rem) 0 clamp(0.9rem, 2vh, 1.6rem);
}

main {
    min-height: 0;
    display: grid;
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    color: inherit;
    text-decoration: none;
}

.brand__badge {
    background: none;
    border-radius: 0;
    display: flex;
    align-items: center;
}

.brand__badge img {
    height: 28px;
    width: auto;
}

.brand__text {
    display: grid;
    gap: 0.15rem;
}

.brand__text strong {
    font-size: 1rem;
}

.brand__text small,
.site-footer,
.stat-card span,
.feature-card p,
.hero__lead,
.usage-note,
.upload-zone__meta,
.profile-card small,
.section-heading p {
    color: var(--muted);
}

.flash-stack {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.flash {
    padding: 0.95rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(181, 64, 42, 0.18);
    background: rgba(255, 246, 240, 0.9);
}

.hero {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(1rem, 2.4vw, 2rem);
    align-items: center;
}

.hero__copy,
.upload-panel,
.feature-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.hero__copy {
    border-radius: var(--radius-xl);
    padding: clamp(1.25rem, 2.8vw, 2rem);
    position: relative;
    overflow: hidden;
}

.hero__copy::after {
    content: "";
    position: absolute;
    inset: auto -12% -35% 35%;
    height: 18rem;
    background: radial-gradient(circle, rgba(181, 64, 42, 0.12), transparent 60%);
    pointer-events: none;
}

.eyebrow {
    margin: 0 0 clamp(0.55rem, 1.2vh, 0.9rem);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.8rem;
    color: var(--forest);
}

h1,
h2,
h3 {
    margin: 0;
}

h1,
.upload-zone h2 {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 700;
    line-height: 1.02;
}

h1 {
    font-size: clamp(2.35rem, 4.6vw, 4.1rem);
    max-width: 11ch;
}

.hero__lead {
    max-width: 42rem;
    font-size: clamp(1rem, 1.15vw, 1.08rem);
    line-height: 1.6;
    margin: clamp(0.85rem, 1.7vh, 1.2rem) 0 0;
}

.usage-note {
    max-width: 34rem;
    margin: clamp(0.7rem, 1.4vh, 1rem) 0 0;
    line-height: 1.5;
    font-size: 0.98rem;
}

.hero__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.stat-card {
    padding: 1rem;
    border-radius: var(--radius-md);
    background: var(--surface-strong);
    border: 1px solid rgba(31, 81, 69, 0.12);
}

.stat-card strong {
    display: block;
    font-size: 1.35rem;
    color: var(--forest);
}

.upload-panel {
    border-radius: var(--radius-xl);
    padding: clamp(0.85rem, 1.7vh, 1.2rem);
}

.upload-form {
    display: grid;
    gap: clamp(0.75rem, 1.55vh, 1.25rem);
}

.upload-zone {
    position: relative;
    border-radius: calc(var(--radius-xl) - 6px);
    padding: clamp(0.65rem, 1.2vh, 1rem);
    border: 1.5px dashed rgba(181, 64, 42, 0.35);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 247, 238, 0.92)),
        repeating-linear-gradient(
            -45deg,
            rgba(181, 64, 42, 0.04) 0,
            rgba(181, 64, 42, 0.04) 14px,
            transparent 14px,
            transparent 28px
        );
    cursor: pointer;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.upload-zone:hover,
.upload-zone:focus-visible,
.upload-zone.is-active {
    transform: translateY(-2px);
    border-color: rgba(181, 64, 42, 0.7);
    box-shadow: 0 18px 40px rgba(181, 64, 42, 0.14);
    outline: none;
}

.upload-zone.is-busy,
.upload-zone.is-busy:hover,
.upload-zone.is-busy:focus-visible {
    cursor: progress;
    transform: none;
    border-color: rgba(95, 57, 34, 0.2);
    box-shadow: none;
    opacity: 0.7;
}

.upload-zone__inner {
    min-height: clamp(12rem, 31vh, 17rem);
    display: grid;
    place-items: center;
    text-align: center;
    gap: clamp(0.45rem, 1vh, 0.75rem);
    padding: clamp(0.85rem, 1.6vh, 1.2rem);
}

.upload-zone__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(3.9rem, 8vh, 5rem);
    height: clamp(3.9rem, 8vh, 5rem);
    border-radius: clamp(1.15rem, 2.3vh, 1.6rem);
    background: linear-gradient(135deg, var(--forest), #296f61);
    color: white;
    font-weight: 700;
    letter-spacing: 0.08em;
    box-shadow: 0 18px 35px rgba(31, 81, 69, 0.25);
}

.upload-zone h2 {
    font-size: clamp(1.45rem, 2.25vw, 2.1rem);
}

.upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-input:disabled {
    cursor: progress;
}

.upload-zone__meta {
    font-size: 0.96rem;
}

.file-list {
    list-style: none;
    margin: 0.2rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
    width: min(100%, 28rem);
}

.file-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(95, 57, 34, 0.1);
    text-align: left;
    animation: file-slide 180ms ease;
}

.file-list strong {
    font-size: 0.92rem;
}

.file-list span {
    color: var(--muted);
    font-size: 0.82rem;
}

.profile-section {
    display: grid;
    gap: clamp(0.55rem, 1.1vh, 0.9rem);
}

.section-heading {
    display: grid;
    gap: 0.3rem;
}

.section-heading h3,
.feature-card h3 {
    font-size: 1.05rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.profile-card {
    position: relative;
    display: block;
}

.profile-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.profile-card__surface {
    display: grid;
    gap: 0.35rem;
    min-height: clamp(5.8rem, 12vh, 7.2rem);
    padding: clamp(0.72rem, 1.25vh, 1rem);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(95, 57, 34, 0.12);
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background 180ms ease,
        box-shadow 180ms ease;
}

.profile-card:hover .profile-card__surface,
.profile-card input:focus-visible + .profile-card__surface {
    transform: translateY(-2px);
    border-color: rgba(31, 81, 69, 0.35);
    box-shadow: 0 14px 30px rgba(31, 81, 69, 0.12);
}

.profile-card input:checked + .profile-card__surface {
    background: linear-gradient(180deg, rgba(31, 81, 69, 0.1), rgba(255, 255, 255, 0.95));
    border-color: rgba(31, 81, 69, 0.62);
    box-shadow: 0 16px 32px rgba(31, 81, 69, 0.14);
}

.profile-card input:disabled + .profile-card__surface {
    opacity: 0.58;
    cursor: progress;
    transform: none;
    box-shadow: none;
}

.submit-button {
    border: 0;
    border-radius: 999px;
    padding: clamp(0.78rem, 1.45vh, 1rem) 1.35rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: white;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 18px 40px rgba(181, 64, 42, 0.28);
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        opacity 180ms ease;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 42px rgba(181, 64, 42, 0.34);
}

.submit-button[disabled] {
    opacity: 0.82;
    cursor: progress;
    transform: none;
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.2rem;
}

.feature-card {
    border-radius: var(--radius-lg);
    padding: 1.2rem;
}

.field-errors {
    display: grid;
    gap: 0.35rem;
    color: var(--accent-deep);
    font-size: 0.94rem;
}

.field-errors p {
    margin: 0;
}

.upload-status {
    margin: 0;
    min-height: 1.25rem;
    color: var(--forest);
    font-size: 0.94rem;
}

.site-footer {
    margin-top: clamp(0.65rem, 1.5vh, 1.2rem);
    padding: 0 0.2rem;
    font-size: 0.92rem;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: var(--forest);
    font-weight: 700;
    text-decoration-color: rgba(31, 81, 69, 0.35);
    text-underline-offset: 0.18em;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: var(--accent-deep);
}

code {
    font-family: "Space Grotesk", "Consolas", monospace;
    font-size: 0.95em;
}

@keyframes file-slide {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 960px) {
    .page-shell,
    main {
        display: block;
    }

    .hero,
    .feature-strip,
    .profile-grid,
    .hero__stats {
        grid-template-columns: 1fr;
    }

    h1 {
        max-width: none;
    }
}

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 1rem, 100%);
        padding-bottom: 2rem;
    }

    .hero__copy,
    .upload-panel,
    .feature-card {
        border-radius: 24px;
    }

    .hero__copy,
    .upload-panel {
        padding: 1rem;
    }

    .upload-zone__inner {
        min-height: 16rem;
        padding: 1rem 0.75rem;
    }
}

@media (min-width: 961px) and (max-height: 880px) {
    .brand__text small,
    .usage-note,
    .section-heading p,
    .profile-card small,
    .upload-zone__meta,
    .site-footer {
        font-size: 0.88rem;
    }

    .hero__lead {
        line-height: 1.45;
    }

    .upload-zone__inner {
        min-height: 10.5rem;
    }

    .profile-card__surface {
        min-height: 5.1rem;
    }
}

@media (min-width: 961px) and (max-height: 760px) {
    .brand__text small,
    .usage-note {
        display: none;
    }

    .upload-zone__inner {
        min-height: 9rem;
    }
}
