:root {
    --bg-page: #0b0b0b;
    --bg-surface: #141313;
    --bg-elevated: #1a1a1a;
    --accent: #c3f200;
    --accent-border: #495b00;
    --accent-border-soft: rgba(195, 242, 0, 0.6);
    --accent-glow: rgba(195, 242, 0, 0.14);
    --text-primary: #ffffff;
    --text-secondary: #dddddd;
    --text-muted: #8a8a8a;
    --text-on-accent: #141313;
    --border: #333333;
    --font-family: 'Work Sans', sans-serif;
}

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

body {
    position: relative;
    background-color: #0b0b0b;
    color: var(--text-primary);
    font-family: var(--font-family);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 48px 20px 32px;
    overflow-x: hidden;
}

.page-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: #0b0b0b url('/tlo-summer.jpg') center center / cover no-repeat;
}

.pixel-accent {
    position: absolute;
    width: 120px;
    height: 120px;
    background: var(--accent);
    opacity: 0.08;
}

.pixel-accent--tl {
    top: 48px;
    left: -24px;
    clip-path: polygon(
        0 0, 100% 0, 100% 20%, 80% 20%, 80% 40%, 60% 40%,
        60% 60%, 40% 60%, 40% 80%, 20% 80%, 20% 100%, 0 100%
    );
}

.pixel-accent--br {
    right: -20px;
    bottom: 80px;
    clip-path: polygon(
        100% 100%, 0 100%, 0 80%, 20% 80%, 20% 60%, 40% 60%,
        40% 40%, 60% 40%, 60% 20%, 80% 20%, 80% 0, 100% 0
    );
}

.container {
    position: relative;
    z-index: 1;
    max-width: 720px;
    width: 100%;
    margin-bottom: auto;
}

.page-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    text-align: center;
}

.brand-logo {
    display: block;
    width: min(100%, 323px);
    height: auto;
}

.page-intro {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 560px;
}

h1 {
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: var(--accent);
}

.page-subtitle {
    font-size: clamp(16px, 2.5vw, 18px);
    font-weight: 400;
    line-height: 1.4;
    color: var(--text-secondary);
}

body.is-revealing {
    overflow: hidden;
}

body.is-result-mode .generator-form,
body.is-result-mode .page-header {
    display: none !important;
}

.generator-panel.is-result-view {
    background: transparent;
    border-color: transparent;
    padding: 0;
}

.generator-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.generator-form[hidden] {
    display: none !important;
}

.generator-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 28px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (max-width: 640px) {
    .generator-panel {
        padding: 20px;
    }
}

label {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--accent);
    text-transform: uppercase;
}

input,
select {
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 400;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 0;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: var(--text-primary);
    background: var(--bg-elevated);
}

input[type="file"] {
    padding: 10px 12px;
}

input:focus,
select:focus {
    border-color: var(--accent-border-soft);
    box-shadow: 0 0 0 1px var(--accent-border-soft);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23c3f200' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 44px;
}

select option {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.custom-select {
    position: relative;
    width: 100%;
}

.custom-select__trigger {
    width: 100%;
    min-height: 52px;
    padding: 14px 44px 14px 16px;
    border: 1px solid var(--border);
    border-radius: 0;
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23c3f200' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.custom-select__trigger:hover,
.custom-select.is-open .custom-select__trigger {
    border-color: var(--accent-border-soft);
    box-shadow: 0 0 0 1px var(--accent-border-soft);
}

.custom-select__value {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select__value.is-placeholder {
    color: var(--text-muted);
}

.custom-select__list {
    position: absolute;
    z-index: 10;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.custom-select__option {
    padding: 14px 16px;
    font-size: 16px;
    line-height: 1.35;
    color: var(--text-primary);
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}

.custom-select__option:last-child {
    border-bottom: none;
}

.custom-select__option:hover,
.custom-select__option.is-selected {
    background: rgba(195, 242, 0, 0.08);
    color: var(--accent);
}

@media (max-width: 640px) {
    .custom-select__trigger {
        min-height: 56px;
    }

    .custom-select__value {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }

    .custom-select__option {
        white-space: normal;
    }
}

.upload-section {
    position: relative;
}

.upload-zone {
    width: 100%;
    min-height: 180px;
    border: 1px dashed var(--border);
    background: var(--bg-elevated);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px 24px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    color: var(--text-primary);
    font-family: var(--font-family);
}

button.upload-zone,
button.upload-zone:hover,
button.upload-zone:active {
    width: 100%;
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px dashed var(--border);
    transform: none;
    box-shadow: none;
}

button.upload-zone:hover,
button.upload-zone.is-dragover {
    background: var(--bg-surface);
    border-color: var(--accent-border-soft);
}

button.upload-zone.is-dragover {
    box-shadow: 0 0 0 1px var(--accent-border-soft), 0 0 24px var(--accent-glow);
}

button.upload-zone:active {
    transform: scale(0.998);
}

.upload-icon {
    color: var(--accent);
}

.upload-title {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.02em;
    text-transform: lowercase;
    color: var(--accent);
}

.upload-subtitle {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.upload-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.upload-zone-empty,
.upload-zone-preview:not([hidden]) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.upload-zone-preview:not([hidden]) {
    gap: 12px;
}

.upload-zone.has-photo {
    padding: 20px 24px;
    border-style: solid;
}

.upload-thumbnail {
    display: block;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 2px solid var(--accent);
    border-radius: 12px;
    background: #000;
}

.change-photo-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
}

button.upload-zone.has-photo:hover .change-photo-label {
    color: var(--text-primary);
    text-decoration: underline;
}

.btn-generate {
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.btn-generate:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.preview-container {
    border: 1px solid var(--border);
    overflow: hidden;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.reveal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #0b0b0b;
    overflow-x: hidden;
    overflow-y: auto;
}

.reveal-overlay[hidden] {
    display: none !important;
}

.reveal-intro {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: #0b0b0b;
    opacity: 0;
}

.reveal-intro[hidden] {
    display: none !important;
}

.reveal-overlay.is-intro .reveal-intro {
    animation: revealIntroFade 0.55s ease forwards;
}

.reveal-intro__glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(130vw, 1000px);
    height: min(130vw, 1000px);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.15);
    background: radial-gradient(
        circle,
        rgba(195, 242, 0, 0.72) 0%,
        rgba(195, 242, 0, 0.42) 24%,
        rgba(195, 242, 0, 0.18) 48%,
        rgba(195, 242, 0, 0.06) 68%,
        transparent 82%
    );
    box-shadow:
        0 0 80px 40px rgba(195, 242, 0, 0.35),
        0 0 160px 80px rgba(195, 242, 0, 0.15);
    opacity: 0;
}

.reveal-overlay.is-intro .reveal-intro__glow {
    animation: revealIntroGlow 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes revealIntroFade {
    0% {
        opacity: 0;
    }

    18% {
        opacity: 1;
    }

    100% {
        opacity: 1;
    }
}

@keyframes revealIntroGlow {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.15);
    }

    18% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.reveal-stage {
    position: relative;
    z-index: 3;
    width: min(100%, 720px);
    margin: 0 auto;
    padding: 0 20px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.reveal-overlay.is-headline:not(.is-complete) .reveal-stage {
    min-height: 100dvh;
}

.reveal-overlay.is-complete .reveal-stage {
    min-height: auto;
    padding-top: clamp(24px, 4vh, 40px);
}

.reveal-headline {
    position: relative;
    width: 100%;
    margin: 0 0 32px;
    text-align: center;
    font-size: clamp(32px, 7vw, 56px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--accent);
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity 0.55s ease,
        transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        margin-top 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-headline.is-centered {
    margin-top: 38vh;
}

.reveal-headline.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-headline.is-settled {
    margin-top: 0;
}

.reveal-body {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 24px;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-overlay.is-complete .reveal-body {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.result-start-over {
    margin: 4px 0 0;
    text-align: center;
}

.start-over-link {
    color: var(--accent);
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
}

.start-over-link:hover {
    text-decoration: underline;
}

.linkedin-prompt {
    padding: 20px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
}

canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--text-on-accent);
    border: 1px solid var(--accent-border);
    padding: 18px 32px;
    font-size: 18px;
    font-weight: 600;
    font-family: var(--font-family);
    letter-spacing: -0.02em;
    border-radius: 0;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s, transform 0.1s, opacity 0.2s, box-shadow 0.2s;
}

.btn-primary:hover:not(:disabled) {
    background-color: #d4ff1a;
    box-shadow: 0 0 24px var(--accent-glow);
}

.btn-primary:active:not(:disabled) {
    transform: scale(0.99);
}

.btn-primary:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.linkedin-prompt__intro {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.linkedin-prompt__text {
    margin: 0 0 16px;
    padding: 16px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.linkedin-prompt__copy {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent-border);
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.linkedin-prompt__copy:hover {
    background: rgba(195, 242, 0, 0.08);
    border-color: var(--accent-border-soft);
}

footer,
.site-footer {
    position: relative;
    z-index: 1;
    align-self: stretch;
    margin-top: 48px;
    margin-left: -20px;
    margin-right: -20px;
    padding: 0 24px;
    font-size: 14px;
    color: var(--text-secondary);
    width: auto;
    max-width: none;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 24px;
    align-items: start;
    width: 100%;
}

.site-footer__col {
    margin: 0;
    line-height: 1.5;
}

.site-footer__col:first-child {
    text-align: left;
}

.site-footer__col:nth-child(2) {
    text-align: center;
}

.site-footer__col:last-child {
    text-align: right;
}

@media (max-width: 768px) {
    .site-footer__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .site-footer__col:first-child,
    .site-footer__col:nth-child(2),
    .site-footer__col:last-child {
        text-align: center;
    }
}

footer a,
.site-footer a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 400;
}

footer a:hover,
.site-footer a:hover {
    text-decoration: underline;
}
