/* ---------------------------
   FONTS
   Put these @font-face blocks at top of your CSS.
   Assumes /fonts folder in project root.
---------------------------- */

@font-face {
    font-family: 'ClashDisplay';
    src: url('./fonts/ClashDisplay-Extralight.woff2') format('woff2'),
        url('./fonts/ClashDisplay-Extralight.woff') format('woff'),
        url('./fonts/ClashDisplay-Extralight.ttf') format('truetype');
    font-weight: 200;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: 'ClashDisplay';
    src: url('./fonts/ClashDisplay-Light.woff2') format('woff2'),
        url('./fonts/ClashDisplay-Light.woff') format('woff'),
        url('./fonts/ClashDisplay-Light.ttf') format('truetype');
    font-weight: 300;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: 'ClashDisplay';
    src: url('./fonts/ClashDisplay-Regular.woff2') format('woff2'),
        url('./fonts/ClashDisplay-Regular.woff') format('woff'),
        url('./fonts/ClashDisplay-Regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: 'ClashDisplay';
    src: url('./fonts/ClashDisplay-Medium.woff2') format('woff2'),
        url('./fonts/ClashDisplay-Medium.woff') format('woff'),
        url('./fonts/ClashDisplay-Medium.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: 'ClashDisplay';
    src: url('./fonts/ClashDisplay-Semibold.woff2') format('woff2'),
        url('./fonts/ClashDisplay-Semibold.woff') format('woff'),
        url('./fonts/ClashDisplay-Semibold.ttf') format('truetype');
    font-weight: 600;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: 'ClashDisplay';
    src: url('./fonts/ClashDisplay-Bold.woff2') format('woff2'),
        url('./fonts/ClashDisplay-Bold.woff') format('woff'),
        url('./fonts/ClashDisplay-Bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: 'ClashDisplay';
    src: url('./fonts/ClashDisplay-Variable.woff2') format('woff2'),
        url('./fonts/ClashDisplay-Variable.woff') format('woff'),
        url('./fonts/ClashDisplay-Variable.ttf') format('truetype');
    font-weight: 200 700;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'ClashGrotesk';
    src: url('./fonts/ClashGrotesk-Extralight.woff2') format('woff2'),
        url('./fonts/ClashGrotesk-Extralight.woff') format('woff'),
        url('./fonts/ClashGrotesk-Extralight.ttf') format('truetype');
    font-weight: 200;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: 'ClashGrotesk';
    src: url('./fonts/ClashGrotesk-Light.woff2') format('woff2'),
        url('./fonts/ClashGrotesk-Light.woff') format('woff'),
        url('./fonts/ClashGrotesk-Light.ttf') format('truetype');
    font-weight: 300;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: 'ClashGrotesk';
    src: url('./fonts/ClashGrotesk-Regular.woff2') format('woff2'),
        url('./fonts/ClashGrotesk-Regular.woff') format('woff'),
        url('./fonts/ClashGrotesk-Regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: 'ClashGrotesk';
    src: url('./fonts/ClashGrotesk-Medium.woff2') format('woff2'),
        url('./fonts/ClashGrotesk-Medium.woff') format('woff'),
        url('./fonts/ClashGrotesk-Medium.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: 'ClashGrotesk';
    src: url('./fonts/ClashGrotesk-Semibold.woff2') format('woff2'),
        url('./fonts/ClashGrotesk-Semibold.woff') format('woff'),
        url('./fonts/ClashGrotesk-Semibold.ttf') format('truetype');
    font-weight: 600;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: 'ClashGrotesk';
    src: url('./fonts/ClashGrotesk-Bold.woff2') format('woff2'),
        url('./fonts/ClashGrotesk-Bold.woff') format('woff'),
        url('./fonts/ClashGrotesk-Bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: 'ClashGrotesk-Variable';
    src: url('./fonts/ClashGrotesk-Variable.woff2') format('woff2'),
        url('./fonts/ClashGrotesk-Variable.woff') format('woff'),
        url('./fonts/ClashGrotesk-Variable.ttf') format('truetype');
    font-weight: 200 700;
    font-display: swap;
    font-style: normal;
}
/* --- fonts + theme already provided earlier --- */
/* keep your full @font-face blocks from last version */

:root {
    --bg: #000;
    --card: #171a17;
    --text: #f3f5f7;
    --muted: #9aa6b2;
    --lime: #c9ff27;
    --lime-soft: #edffbf;
    --error: #ff6b6b;
}

* {
    box-sizing: border-box;
    border-radius: 0 !important;
}
a {
    color: white;
}
a:hover {
    text-decoration: none;
    color: white;
}
p code {
    font-size: 75%;
}
body {
    margin: 0;
    font-family: 'ClashGrotesk', system-ui, sans-serif;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 300;
    background: var(--bg);
    color: var(--text);
}

/* HEADER */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #1f231f;
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10;
}
.brand {
    font-weight: 600;
    letter-spacing: 0.3px;
}
.highlight {
    color: var(--lime);
}
.muted.small {
    font-size: 14px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.screen {
    display: none;
    padding: 18px;
}
.screen.landing.active {
    min-height: calc(100vh - 71px);
    display: flex;
    flex-direction: column;
}
.footer {
    margin-top: auto;
    text-align: center;
}
.screen.active {
    display: block;
}

/* BUTTONS — matches your attachments */
.primary,
.ghost-btn {
    border: 1px solid var(--lime);
    padding: 12px 18px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'ClashGrotesk';
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.primary {
    background: var(--lime);
    color: #000;
}
.primary:hover {
    background: #000;
    color: var(--lime);
    border-color: var(--lime);
}
.primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ghost-btn {
    background: #000;
    color: var(--lime);
}
.ghost-btn:hover {
    background: var(--lime);
    color: #000;
}

/* LANDING */
.hero {
    max-width: 680px;
    margin: 10vh auto;
    text-align: center;
}
.hero h1 {
    font-size: 44px;
    margin-bottom: 10px;
    font-family: 'ClashDisplay';
    font-weight: 700;
    line-height: 0.8;
}
.hero p {
    color: var(--muted);
    font-size: 18px;
}

/* UPLOADS */
.wizard {
    max-width: 760px;
    margin: 20px auto;
}
.card {
    margin-top: 14px;
    background: var(--card);
    padding: 18px;
}
.muted {
    color: var(--muted);
}

.dropzone {
    margin-top: 12px;
    border: 2px dashed #2a312a;
    padding: 22px;
    text-align: center;
    cursor: pointer;
}
.dropzone.dragover {
    border-color: var(--lime);
    background: rgba(201, 255, 39, 0.06);
}
.dropzone-title {
    font-weight: 600;
    font-size: 18px;
}
.dropzone-sub {
    color: var(--muted);
    margin-top: 4px;
}

.summary {
    margin-top: 12px;
    padding: 12px;
    background: #0d0f0d;
    border: 1px solid #223022;
    font-size: 14px;
}
.error {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.35);
    color: #ffd2d2;
}

.hidden {
    display: none;
}
.nav {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
    gap: 10px;
}

/* RESULTS */
.results {
    max-width: 900px;
    margin: 20px auto;
}
.results h2 {
    font-size: 34px;
    margin-bottom: 14px;
    font-family: 'ClashDisplay';
    font-weight: 700;
    line-height: 0.8;
}

.stepper-results {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    background: var(--card);
    padding: 6px;
    gap: 6px;
    margin-bottom: 14px;
    border: 1px solid #222722;
}
.stepper-results .step {
    padding: 8px 10px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}
.stepper-results .step.active {
    background: #0d0f0d;
    color: var(--lime);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.stat {
    background: var(--card);
    padding: 14px;
    border: 1px solid #222722;
}
.stat .label {
    color: var(--muted);
    font-size: 13px;
}
.stat .value {
    font-size: 26px;
    font-weight: 700;
    margin-top: 4px;
}
.stat .value .unit {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-left: 6px;
    vertical-align: super;
}

/* Utility: force a stat card to span the full grid width */
.stat.full-width {
    grid-column: 1 / -1;
}

/* Month bar chart (app view) */
.month-chart-wrap {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
}
.month-chart {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 8px;
    align-items: end;
    height: 180px;
    min-width: 680px;
}
.bar-col {
    display: grid;
    grid-template-rows: 1fr auto auto;
    gap: 4px;
    align-items: end;
    justify-items: center;
}
.bar {
    width: 100%;
    height: 120px;
    background: #0d0f0d;
    border: 1px solid #223022;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.bar-fill {
    width: 100%;
    background: var(--lime);
}
.bar-label {
    font-size: 11px;
    color: var(--muted);
}
.bar-value {
    font-size: 12px;
    font-weight: 600;
}

/* CAROUSEL PREVIEW */
.carousel-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin-top: 16px;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}
.slide-preview-wrap {
    width: 100%;
    max-width: 850px;
    height: 850px;
    overflow: hidden;
    border: 1px solid #222722;
}
.slide-preview-wrap .slide {
    transform: scale(0.787);
    transform-origin: top left;
    width: 1080px;
    height: 1080px;
}

/* SLIDES */
.slide {
    width: 1080px;
    height: 1080px;
    background: var(--bg);
    border: 1px solid #222722;
    padding: 72px;
    position: relative;
    overflow: hidden;
    color: var(--text);

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    /* bigger base typography */
    font-family: 'ClashGrotesk';
    font-size: 22px;
    line-height: 1.2;
    font-weight: 300;
}

.slide-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.eyebrow {
    font-size: 20px;
    color: var(--lime);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: 'ClashGrotesk';
}

.slide-title {
    font-family: 'ClashDisplay';
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.1px;
    font-size: 86px;
    margin-bottom: 10px;
}

.slide-sub {
    font-size: 28px;
    color: var(--muted);
    font-weight: 400;
    font-family: 'ClashGrotesk';
}

.big-number {
    font-family: 'ClashDisplay';
    font-size: 190px;
    font-weight: 700;
    line-height: 0.8;
    letter-spacing: -0.1px;
    color: var(--lime);
}
.big-number .unit {
    font-size: 36px;
    color: var(--muted);
    margin-left: 10px;
    vertical-align: super;
    font-weight: 600;
    font-family: 'ClashGrotesk';
}

.row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: 30px;
    font-weight: 500;
}
.row .label {
    color: var(--muted);
    font-weight: 400;
    font-family: 'ClashGrotesk';
}

/* tiles / panels used in slides */
.tile {
    background: var(--card);
    border: 1px solid #223022;
    padding: 18px;
    display: grid;
    gap: 8px;
}
.tile-label {
    font-size: 20px;
    color: var(--muted);
    font-weight: 400;
    font-family: 'ClashGrotesk';
}
.tile-value {
    font-size: 46px;
    font-weight: 700;
    font-family: 'ClashDisplay';
    line-height: 0.9;
}

/* Optional supporting line under a tile value (e.g., streak date range). */
.tile-sub {
    font-size: 20px;
    opacity: 0.7;
    margin-top: 6px;
    font-family: 'ClashGrotesk';
}

.panel {
    background: var(--card);
    border: 1px solid #223022;
    padding: 18px;
    display: grid;
    gap: 12px;
}
.panel-title {
    font-size: 18px;
    color: var(--lime);
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-family: 'ClashGrotesk';
}
.center-panel {
    align-content: center;
}

/* habits bar */
.habits-bar {
    margin-top: auto;
    background: #0d0f0d;
    border: 1px solid #223022;
    padding: 18px;
    display: grid;
    gap: 10px;
}
.habits-title {
    font-size: 18px;
    color: var(--lime);
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
.habits-row {
    display: flex;
    justify-content: space-between;
    font-size: 34px;
    font-weight: 600;
}
.habits-k {
    color: var(--muted);
    font-weight: 400;
}
.habits-v {
    font-weight: 700;
}

/* slide chart */
.slide-chart {
    margin-top: 6px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 10px;
    align-items: end;
    height: 620px;
}
.slide-chart .bar {
    height: 540px;
}
.slide-chart .bar-fill {
    background: var(--lime);
}
.slide-chart .bar-label {
    font-size: 14px;
}
.slide-chart .bar-value {
    font-size: 14px;
    font-weight: 600;
}

/* cover docking + photo */
.cover-docked {
    position: absolute;
    left: 72px;
    bottom: 72px;
    z-index: 2;
    max-width: 80%;
}
.cover-photo {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.65;
    z-index: 1;
}
.slide-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35); /* keeps lime readable */
    z-index: 1;
}
.stat.attendance-stat.attendance-chart {
    grid-column: span 2;
}
/* MODAL */
.modal {
    background: var(--card);
    color: var(--text);
    border: 1px solid #2a312a;
    padding: 16px;
    max-width: 520px;
}
.modal::backdrop {
    background: rgba(0, 0, 0, 0.6);
}

/* FAKE LOADING OVERLAY (shown only after clicking Next) */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.82);
}
.loading-overlay.hidden {
    display: none;
}

.loading-card {
    width: min(520px, calc(100vw - 32px));
    background: var(--card);
    border: 1px solid #2a312a;
    border-radius: 18px;
    padding: 22px 18px;
    text-align: center;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

/* Simple ring spinner (CodePen-style): one lime segment rotating */
.loader-ring {
    width: 56px;
    height: 56px;
    border-radius: 50% !important;
    border: 6px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--lime);
    margin: 0 auto 12px;
    animation: loaderSpin 0.9s linear infinite;
}

@keyframes loaderSpin {
    to {
        transform: rotate(360deg);
    }
}

.loading-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}
