:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --ink: #111827;
    --muted: #5b667a;
    --line: #dce3ee;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --teal: #0f766e;
    --amber: #b7791f;
    --green: #168552;
    --red: #b42318;
    --shadow: 0 20px 55px rgba(17, 24, 39, 0.10);
    --soft-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
}

a {
    color: var(--blue);
}

h1,
h2,
h3,
h4,
p {
    overflow-wrap: anywhere;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 16px 28px;
    background: rgba(244, 247, 251, 0.88);
    backdrop-filter: blur(14px);
}

.brand {
    color: var(--ink);
    font-size: 18px;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.site-nav a {
    border-radius: 7px;
    color: #475569;
    font-size: 14px;
    font-weight: 750;
    padding: 8px 10px;
    text-decoration: none;
}

.site-nav a:hover {
    background: #e7edf6;
    color: var(--ink);
}

.nav-language {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 6px;
    color: #475569;
    font-size: 14px;
    font-weight: 750;
}

.nav-language select {
    width: auto;
    min-width: 118px;
    padding: 7px 9px;
    border-radius: 7px;
    font-size: 14px;
}

main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 28px 64px;
}

.hero-band {
    display: grid;
    gap: 34px;
    padding: 46px 0 34px;
}

.landing-hero {
    grid-template-columns: minmax(0, 0.95fr) minmax(420px, 0.8fr);
    align-items: center;
    min-height: calc(100vh - 108px);
}

.hero-copy {
    max-width: 760px;
}

.eyebrow,
.section-kicker {
    margin: 0 0 9px;
    color: var(--teal);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    max-width: 780px;
    margin: 0 0 18px;
    font-size: 56px;
    line-height: 1.04;
    letter-spacing: 0;
}

.lead {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 19px;
}

.hero-actions,
.inline-actions,
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-actions {
    margin-top: 28px;
}

.hero-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-notes span,
.demo-card-topline span,
.endpoint-note {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #425168;
    font-size: 13px;
    font-weight: 800;
    padding: 8px 11px;
}

.hero-demo-card {
    scroll-margin-top: 96px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 20px;
    background: #111827;
    box-shadow: 0 28px 70px rgba(17, 24, 39, 0.22);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hero-demo-card.is-focused {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.20), 0 28px 70px rgba(17, 24, 39, 0.22);
    transform: translateY(-2px);
}

.demo-card-topline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.20), rgba(15, 118, 110, 0.22));
}

.demo-card-topline span {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.10);
    color: #eef2ff;
}

.hero-demo-media {
    position: relative;
    background: #05070d;
}

.hero-demo-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #05070d;
    object-fit: cover;
}

.demo-cover {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 10px;
    min-height: auto;
    border: 0;
    border-radius: 0;
    padding: 24px;
    background:
        linear-gradient(180deg, rgba(4, 8, 18, 0.26), rgba(4, 8, 18, 0.92)),
        linear-gradient(135deg, #0f172a, #0b1120 55%, #082f49);
    color: #fff;
    text-align: center;
    box-shadow: none;
}

.demo-cover.is-hidden {
    display: none;
}

.demo-play-icon {
    position: relative;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.demo-play-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 53%;
    width: 0;
    height: 0;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    border-left: 17px solid var(--blue);
    transform: translate(-50%, -50%);
}

.demo-cover-title {
    font-size: 18px;
    font-weight: 900;
}

.demo-subtitle-line {
    width: min(92%, 420px);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.58);
    color: #f8fafc;
    font-size: 14px;
    font-weight: 800;
    padding: 8px 10px;
}

.demo-subtitle-line.muted {
    color: #cbd5e1;
    font-size: 13px;
}

.tool-workspace,
.use-case-section,
.guidance-section,
.publisher-content,
.feedback-card,
.content-page {
    margin-top: 26px;
}

.tool-workspace {
    scroll-margin-top: 96px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    padding: 26px;
    box-shadow: var(--soft-shadow);
}

.workspace-heading,
.section-heading {
    max-width: 820px;
    margin-bottom: 22px;
}

.workspace-heading h2,
.section-heading h2,
.guidance-section h2 {
    margin: 0;
    font-size: 30px;
    line-height: 1.2;
}

.workspace-heading p:not(.section-kicker),
.section-heading p:not(.section-kicker) {
    margin: 10px 0 0;
    color: var(--muted);
}

.workspace-card-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.82fr);
    gap: 18px;
    align-items: stretch;
}

.tool-card,
.script-panel,
.settings-panel,
.result-panel,
.publisher-content,
.feedback-card,
.content-page {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--soft-shadow);
}

.tool-card {
    padding: 22px;
}

.results-section {
    scroll-margin-top: 96px;
    margin-top: 10px;
}

body:not(.results-revealed) .results-section,
body:not(.results-revealed) .result-ad-slot {
    display: none;
}

.result-card {
    max-width: 100%;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.result-card.is-focused {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16), var(--soft-shadow);
    transform: translateY(-1px);
}

.result-ad-slot {
    border-radius: 16px;
}

.result-ad-slot.no-ad {
    height: 10px;
    margin: 8px 0;
}

.result-ad-slot.has-ad {
    min-height: 120px;
    margin: 28px 0;
    padding: 12px;
    border: 1px dashed rgba(148, 163, 184, 0.55);
    background: rgba(255, 255, 255, 0.62);
}

.card-heading,
.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.card-heading h3,
.panel-heading h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}

.step-label {
    margin: 0;
    color: var(--amber);
    font-size: 12px;
    font-weight: 900;
}

.field-hint {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    padding: 11px 12px;
}

textarea {
    min-height: 280px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--blue);
    outline: 3px solid rgba(37, 99, 235, 0.14);
}

.field-meta {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

.inline-actions {
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
}

.text-actions-left {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.generate-inline-button {
    margin-left: auto;
}

.field-grid,
.inline-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field-wide {
    grid-column: 1 / -1;
}

.slider-stack {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.slider-stack label > span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

button,
.download-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 10px;
    border: 1px solid transparent;
    padding: 10px 16px;
    font: inherit;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

.primary-button {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.20);
}

.primary-button:hover {
    background: var(--blue-dark);
}

.secondary-button {
    background: #eef6ff;
    color: var(--blue-dark);
    border-color: #c8dbf7;
}

.ghost-button {
    min-height: 38px;
    background: var(--surface-soft);
    color: #475569;
    border-color: var(--line);
}

.full-button {
    width: 100%;
    margin-top: 16px;
}

button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.compact-audio {
    margin-top: 12px;
}

audio {
    width: 100%;
}

.status {
    min-height: 24px;
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.status.success {
    color: var(--green);
}

.status.error {
    color: var(--red);
}

.status.ready {
    color: var(--teal);
}

.preview-status {
    min-height: 22px;
    margin-top: 10px;
    font-size: 13px;
}

.output-player-row {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.output-player-row h4,
.output-layout h3 {
    margin: 0;
    color: #334155;
    font-size: 14px;
}

.download-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

.download-link {
    background: var(--surface-soft);
    border-color: var(--line);
    color: var(--blue-dark);
}

.download-link.disabled {
    pointer-events: none;
    color: #9aa7b7;
}

.download-note {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.editor-usage-note {
    white-space: pre-line;
    color: #334155;
    font-weight: 750;
}

.use-case-section,
.guidance-section {
    border-radius: 22px;
    background: var(--surface);
    padding: 28px;
    box-shadow: var(--soft-shadow);
}

.use-case-grid,
.depth-grid,
.feature-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.use-case-grid article,
.depth-grid article,
.feature-list li {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
    padding: 18px;
}

.use-case-grid article:nth-child(2) {
    border-top: 3px solid var(--teal);
}

.use-case-grid article:nth-child(3) {
    border-top: 3px solid var(--amber);
}

.use-case-grid article:nth-child(4) {
    border-top: 3px solid var(--blue);
}

.use-case-grid h3,
.depth-grid h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.25;
}

.use-case-grid p,
.depth-grid p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.guidance-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.guidance-section article {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-soft);
    padding: 22px;
}

.guidance-section p:not(.section-kicker) {
    color: var(--muted);
}

.publisher-content,
.feedback-card,
.content-page {
    padding: 26px 30px;
}

.feature-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0;
    list-style: none;
}

.content-page {
    max-width: 920px;
    margin: 28px auto 0;
}

.publisher-content h2,
.feedback-card h2,
.content-page h1 {
    margin-top: 0;
}

.publisher-content p,
.publisher-content li,
.feedback-card p,
.content-page p,
.content-page li {
    color: var(--muted);
}

.feedback-form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.language-panel {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    padding: 16px;
    box-shadow: var(--soft-shadow);
}

.inline-language {
    max-width: 320px;
    margin: 0 0 24px;
    box-shadow: none;
}

.endpoint-note {
    border-radius: 7px;
    margin: 0;
}

.ad-section {
    min-height: 120px;
    margin: 28px 0;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    max-width: 1240px;
    margin: 0 auto;
    padding: 30px 28px 42px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

.site-footer a {
    color: var(--muted);
    text-decoration: none;
}

@media (max-width: 1040px) {
    .landing-hero,
    .workspace-card-grid,
    .guidance-section,
    .use-case-grid,
    .depth-grid {
        grid-template-columns: 1fr;
    }

    .landing-hero {
        min-height: auto;
    }

    .input-card {
        grid-row: auto;
    }

}

@media (max-width: 700px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .site-nav {
        justify-content: flex-start;
    }

    .nav-language {
        margin-left: 0;
    }

    main {
        padding: 0 16px 46px;
    }

    h1 {
        font-size: 38px;
    }

    .lead {
        font-size: 17px;
    }

    .tool-workspace,
    .use-case-section,
    .guidance-section {
        padding: 18px;
        border-radius: 18px;
    }

    .tool-card,
    .publisher-content,
    .feedback-card,
    .content-page {
        padding: 18px;
    }

    .hero-demo-video {
        aspect-ratio: 16 / 9;
    }

    .inline-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .text-actions-left,
    .generate-inline-button {
        width: 100%;
    }

    .text-actions-left button,
    .generate-inline-button {
        width: 100%;
    }

    .field-grid,
    .inline-fields,
    .download-row,
    .feature-list {
        grid-template-columns: 1fr;
    }

    textarea {
        min-height: 270px;
    }
}
