/**
 * CineDistro Styles
 */

:root {
    --bg: #09090b;
    --bg-light: #0f0f0f;
    --bg-card: #111113;
    --border: #27272a;
    --text: #fff;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --primary: #6366f1;
    --primary-light: #818cf8;
    --accent: #d4af37;
    --success: #10b981;
    --error: #ef4444;
    --font-head: 'Bebas Neue', sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --radius: 10px;
    --radius-lg: 16px;
}

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

body.cd-platform {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.cd-container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.cd-container--sm { max-width: 800px; }

/* Header */
.cd-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 9, 11, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.cd-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}
.cd-header__logo {
    font-family: var(--font-head);
    font-size: 1.5rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.05em;
}
.cd-header__logo img { max-height: 40px; }
.cd-header__nav { display: flex; align-items: center; gap: 2rem; }
.cd-header__nav a { color: var(--text-muted); text-decoration: none; font-size: 0.9375rem; transition: color 0.2s; }
.cd-header__nav a:hover { color: var(--text); }
.cd-header__actions { display: flex; align-items: center; gap: 1rem; }
.cd-header__user { color: var(--text-muted); font-size: 0.875rem; }
.cd-header__menu { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* Buttons */
.cd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}
.cd-btn--primary {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: #fff;
}
.cd-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}
.cd-btn--ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.cd-btn--ghost:hover { background: var(--bg-card); border-color: #3f3f46; }
.cd-btn--lg { padding: 1rem 2rem; font-size: 1rem; }

/* Badges */
.cd-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.cd-badge--gold { background: rgba(212, 175, 55, 0.1); border-color: rgba(212, 175, 55, 0.3); color: var(--accent); }
.cd-badge--success { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.2); color: var(--success); }

.cd-pulse { width: 8px; height: 8px; background: var(--success); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } }

/* Hero */
.cd-hero {
    position: relative;
    padding: 8rem 0 6rem;
    overflow: hidden;
}
.cd-hero__bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, #0f0f1a 0%, var(--bg) 100%);
}
.cd-hero__content { position: relative; z-index: 1; max-width: 800px; }

.cd-hero h1 {
    font-family: var(--font-head);
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1.05;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}
.cd-gradient {
    background: linear-gradient(135deg, var(--accent) 0%, #f4d03f 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.cd-hero__sub { font-size: 1.25rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 2rem; max-width: 600px; }
.cd-hero__btns { display: flex; gap: 1rem; margin-bottom: 4rem; }

.cd-hero__stats { display: flex; gap: 3rem; padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.cd-stat { display: flex; flex-direction: column; }
.cd-stat__num { font-family: var(--font-head); font-size: 2.5rem; color: var(--accent); line-height: 1; }
.cd-stat__label { font-size: 0.8125rem; color: var(--text-dim); max-width: 120px; }

/* Sections */
.cd-section { padding: 6rem 0; }
.cd-section--dark { background: var(--bg-light); }
.cd-section--gradient { background: linear-gradient(180deg, var(--bg) 0%, #0f0f1a 100%); }
.cd-section--cta { background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 100%); text-align: center; }

.cd-section__header { text-align: center; margin-bottom: 4rem; }
.cd-section__header h1, .cd-section__header h2 { font-family: var(--font-head); font-size: clamp(2rem, 4vw, 3rem); letter-spacing: 0.02em; margin-top: 1rem; }
.cd-section__header p { color: var(--text-muted); font-size: 1.125rem; max-width: 600px; margin: 1rem auto 0; }

/* Grid */
.cd-grid { display: grid; gap: 2rem; }
.cd-grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cd-grid--3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Cards */
.cd-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}
.cd-card__icon { font-size: 2.5rem; margin-bottom: 1rem; }
.cd-card h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.cd-card p { color: var(--text-muted); font-size: 0.9375rem; line-height: 1.7; }

/* Lead text */
.cd-lead { font-size: 1.25rem; color: var(--text-muted); max-width: 800px; margin: 0 auto 3rem; text-align: center; line-height: 1.8; }

/* Benefits */
.cd-benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; max-width: 900px; margin: 0 auto; }
.cd-benefit { display: flex; align-items: flex-start; gap: 1rem; padding: 1.5rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.cd-benefit__icon { width: 40px; height: 40px; background: rgba(16, 185, 129, 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--success); font-weight: bold; flex-shrink: 0; }
.cd-benefit strong { display: block; margin-bottom: 0.25rem; }
.cd-benefit span { font-size: 0.875rem; color: var(--text-dim); }

/* Steps */
.cd-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.cd-step { text-align: center; padding: 2rem; }
.cd-step__num { width: 60px; height: 60px; background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 1.5rem; margin: 0 auto 1.5rem; }
.cd-step h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.cd-step p { color: var(--text-muted); font-size: 0.9375rem; }

/* FAQs */
.cd-faqs { display: flex; flex-direction: column; gap: 1rem; }
.cd-faq { padding: 2rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.cd-faq h3 { font-size: 1.125rem; margin-bottom: 0.75rem; }
.cd-faq p { color: var(--text-muted); font-size: 0.9375rem; line-height: 1.7; }

/* CTA */
.cd-cta { max-width: 600px; margin: 0 auto; }
.cd-cta h2 { font-family: var(--font-head); font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
.cd-cta p { color: var(--text-muted); font-size: 1.125rem; margin-bottom: 2rem; }

/* Footer */
.cd-footer { background: var(--bg-light); border-top: 1px solid var(--border); padding: 4rem 0 2rem; }
.cd-footer__inner { max-width: 1200px; margin: 0 auto; padding: 0 2rem; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; }
.cd-footer__brand img { max-height: 32px; margin-bottom: 1rem; }
.cd-footer__brand strong { display: block; font-family: var(--font-head); font-size: 1.25rem; margin-bottom: 1rem; }
.cd-footer__brand p { color: var(--text-dim); font-size: 0.875rem; line-height: 1.6; }
.cd-footer__links { display: flex; flex-direction: column; gap: 0.75rem; }
.cd-footer__links h4 { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; color: var(--text); }
.cd-footer__links a { color: var(--text-muted); text-decoration: none; font-size: 0.9375rem; transition: color 0.2s; }
.cd-footer__links a:hover { color: var(--text); }
.cd-footer__copy { grid-column: 1 / -1; padding-top: 2rem; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 0.8125rem; text-align: center; }

/* Forms */
.cd-form-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2.5rem; max-width: 600px; margin: 0 auto; }
.cd-form-section { margin-bottom: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--border); }
.cd-form-section h2 { font-family: var(--font-head); font-size: 1.25rem; margin-bottom: 1.5rem; }
.cd-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.cd-form-group { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.25rem; }
.cd-form-group label { font-size: 0.8125rem; font-weight: 500; color: var(--text-muted); }
.cd-form-group input, .cd-form-group select, .cd-form-group textarea { width: 100%; padding: 0.875rem 1rem; background: #18181b; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 0.9375rem; font-family: var(--font-body); transition: all 0.2s; }
.cd-form-group input::placeholder, .cd-form-group textarea::placeholder { color: #52525b; }
.cd-form-group input:focus, .cd-form-group select:focus, .cd-form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); }
.cd-form-group select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2371717a' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
.cd-form-hint { font-size: 0.75rem; color: var(--text-dim); }

.cd-checkbox { display: flex; align-items: flex-start; gap: 0.75rem; cursor: pointer; margin-bottom: 1rem; }
.cd-checkbox input { display: none; }
.cd-checkbox__box { width: 20px; height: 20px; background: #18181b; border: 1px solid var(--border); border-radius: 4px; flex-shrink: 0; margin-top: 2px; transition: all 0.2s; }
.cd-checkbox input:checked + .cd-checkbox__box { background: var(--primary); border-color: var(--primary); }
.cd-checkbox input:checked + .cd-checkbox__box::after { content: '✓'; display: block; text-align: center; color: #fff; font-size: 12px; line-height: 18px; }
.cd-checkbox span:last-child { color: var(--text-muted); font-size: 0.9375rem; line-height: 1.5; }
.cd-checkbox a { color: var(--accent); text-decoration: none; }

.cd-info-box { background: rgba(99, 102, 241, 0.05); border: 1px solid rgba(99, 102, 241, 0.2); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.cd-info-box h3 { font-size: 1rem; margin-bottom: 1rem; }
.cd-info-box ol { margin-left: 1.25rem; color: var(--text-muted); font-size: 0.9375rem; }
.cd-info-box li { margin-bottom: 0.5rem; }

/* Alerts */
.cd-alert { padding: 1rem 1.5rem; border-radius: var(--radius); margin-bottom: 1.5rem; }
.cd-alert--success { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.2); color: var(--success); }
.cd-alert--error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2); color: var(--error); }

.cd-success-box { text-align: center; padding: 3rem; }
.cd-success-box__icon { width: 80px; height: 80px; background: rgba(16, 185, 129, 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--success); margin: 0 auto 1.5rem; }
.cd-success-box h3 { font-family: var(--font-head); font-size: 1.5rem; margin-bottom: 0.75rem; }
.cd-success-box p { color: var(--text-muted); margin-bottom: 2rem; }

/* Dashboard */
body.cd-dashboard-page { font-family: var(--font-body); background: var(--bg); color: var(--text); }
.cd-dash { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.cd-dash__side { background: var(--bg-light); border-right: 1px solid var(--border); padding: 2rem; display: flex; flex-direction: column; }
.cd-dash__logo { margin-bottom: 2rem; }
.cd-dash__logo a { font-family: var(--font-head); font-size: 1.25rem; color: var(--text); text-decoration: none; }
.cd-dash__nav { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.cd-dash__nav a { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; color: var(--text-muted); text-decoration: none; border-radius: var(--radius); transition: all 0.2s; }
.cd-dash__nav a:hover, .cd-dash__nav a.active { background: var(--bg-card); color: var(--text); }
.cd-dash__user { display: flex; align-items: center; gap: 0.75rem; padding-top: 1.5rem; border-top: 1px solid var(--border); margin-top: auto; }
.cd-dash__avatar { width: 40px; height: 40px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.cd-dash__user strong { display: block; font-size: 0.875rem; }
.cd-dash__user span { font-size: 0.75rem; color: var(--text-dim); }
.cd-dash__main { padding: 2rem; background: var(--bg); }
.cd-dash__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.cd-dash__header h1 { font-family: var(--font-head); font-size: 2rem; }
.cd-dash__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 3rem; }
.cd-stat-card { display: flex; align-items: center; gap: 1rem; padding: 1.5rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.cd-stat-card__icon { font-size: 2rem; }
.cd-stat-card__num { display: block; font-family: var(--font-head); font-size: 2rem; line-height: 1; }
.cd-stat-card__label { font-size: 0.8125rem; color: var(--text-dim); }
.cd-dash__section { margin-bottom: 3rem; }
.cd-dash__section h2 { font-family: var(--font-head); font-size: 1.5rem; margin-bottom: 1.5rem; }

.cd-empty { text-align: center; padding: 4rem 2rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.cd-empty__icon { font-size: 4rem; margin-bottom: 1rem; }
.cd-empty h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.cd-empty p { color: var(--text-muted); margin-bottom: 2rem; }

.cd-table-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.cd-table { width: 100%; border-collapse: collapse; }
.cd-table th, .cd-table td { padding: 1rem 1.5rem; text-align: left; border-bottom: 1px solid var(--border); }
.cd-table th { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); }
.cd-table tr:last-child td { border-bottom: none; }

.cd-status { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 100px; font-size: 0.75rem; font-weight: 600; }
.cd-status--pending { background: rgba(234, 179, 8, 0.1); color: #eab308; }
.cd-status--published { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.cd-status--rejected { background: rgba(239, 68, 68, 0.1); color: var(--error); }

.cd-account-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; max-width: 400px; }
.cd-account-box__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.cd-account-box__header h3 { font-family: var(--font-head); font-size: 1.25rem; }
.cd-account-box ul { list-style: none; margin-bottom: 1.5rem; }
.cd-account-box li { padding: 0.5rem 0; color: var(--text-muted); font-size: 0.9375rem; }
.cd-account-box__note { font-size: 0.8125rem; color: var(--text-dim); padding-top: 1rem; border-top: 1px solid var(--border); }

/* Responsive */
@media (max-width: 768px) {
    .cd-header__nav { display: none; }
    .cd-header__menu { display: block; }
    .cd-hero__btns { flex-direction: column; }
    .cd-hero__stats { flex-wrap: wrap; gap: 2rem; }
    .cd-form-row { grid-template-columns: 1fr; }
    .cd-footer__inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .cd-footer__brand { grid-column: 1 / -1; }
    .cd-dash { grid-template-columns: 1fr; }
    .cd-dash__side { display: none; }
}

/* ---- Alert variants ----------------------------------------------------
   cd-alert--info was already in use in the submit flow with no rule behind
   it, so those panels rendered as bare text on the card background. */
.cd-alert--info    { background: rgba(99, 102, 241, 0.10); border: 1px solid rgba(99, 102, 241, 0.25); color: var(--text); }
.cd-alert--warning { background: rgba(212, 175, 55, 0.10); border: 1px solid rgba(212, 175, 55, 0.30); color: var(--text); }
.cd-alert--info strong,
.cd-alert--warning strong { display: block; margin-bottom: .25rem; }
.cd-alert--warning strong { color: var(--accent); }
.cd-alert--info strong    { color: var(--primary-light); }
.cd-alert p { color: var(--text-muted); font-size: .875rem; line-height: 1.6; }

/* "(Optional)" markers next to field labels */
.cd-optional { color: var(--text-dim); font-weight: 400; font-size: .8125rem; letter-spacing: .02em; }

/* ---- Documentation / eligibility score --------------------------------- */
.cd-eligibility { background: var(--bg-light); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.cd-eligibility__head { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.cd-eligibility__score { font-family: var(--font-head); font-size: 2.5rem; line-height: 1; letter-spacing: .02em; }
.cd-eligibility__band { color: var(--text-muted); font-size: .9375rem; margin-left: .5rem; }
.cd-eligibility__bar { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; margin: .85rem 0 .75rem; }
.cd-eligibility__bar span { display: block; height: 100%; border-radius: 999px; transition: width .4s ease; }
.cd-eligibility__blurb { color: var(--text-muted); font-size: .875rem; line-height: 1.6; margin: 0 0 1rem; }

.cd-eligibility__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.cd-eligibility__list li {
    display: grid;
    grid-template-columns: 1.25rem 1fr auto;
    gap: .25rem .6rem;
    align-items: baseline;
    padding: .55rem .7rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    font-size: .875rem;
}
.cd-eligibility__list li.is-full    { border-color: rgba(16, 185, 129, 0.35); }
.cd-eligibility__list li.is-partial { border-color: rgba(212, 175, 55, 0.35); }
.cd-eligibility__mark { text-align: center; }
.cd-eligibility__list li.is-full .cd-eligibility__mark    { color: var(--success); }
.cd-eligibility__list li.is-partial .cd-eligibility__mark { color: var(--accent); }
.cd-eligibility__list li.is-none .cd-eligibility__mark    { color: var(--text-dim); }
.cd-eligibility__item-label { color: var(--text); }
.cd-eligibility__item-label em { color: var(--text-dim); font-style: normal; font-size: .8125rem; }
.cd-eligibility__pts { color: var(--text-dim); font-variant-numeric: tabular-nums; font-size: .8125rem; }
/* The explanation sits under the label, spanning the label and points columns. */
.cd-eligibility__why { grid-column: 2 / -1; color: var(--text-muted); font-size: .8125rem; line-height: 1.5; }
.cd-eligibility__foot { color: var(--text-dim); font-size: .8125rem; line-height: 1.6; margin: 1rem 0 0; }

@media (max-width: 640px) {
    .cd-eligibility__list li { grid-template-columns: 1.25rem 1fr; }
    .cd-eligibility__pts { grid-column: 2; justify-self: start; }
    .cd-eligibility__why { grid-column: 1 / -1; }
}
