/* AvatarReacts base styles */

:root {
    --bg: #f7f6f3;
    --surface: #ffffff;
    --text: #16161a;
    --text-muted: #5c5c63;
    --border: #e3e1dc;
    --accent: #ea4c71;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Announcement bar */

.announcement-bar {
    background: var(--accent);
    color: #ffffff;
    font-weight: 500;
    text-align: center;
    font-size: 0.8rem;
    padding: 0.45rem 1rem;
}

/* Header */

.site-header {
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wordmark {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.site-nav a:not(.btn) {
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.site-nav a:not(.btn):hover {
    color: var(--text-muted);
}

/* Hero / builder */

.hero {
    flex: 1;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

/* Hero intro */

.hero-intro {
    text-align: center;
    margin-bottom: 2.5rem;
}

.hero-badge {
    position: relative;
    display: inline-block;
    overflow: hidden;
    background: rgba(234, 76, 113, 0.08);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.35rem 0.85rem;
}

.hero-badge::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 25%, rgba(255, 255, 255, 0.65) 50%, transparent 75%);
    transform: translateX(-100%);
    animation: badge-shimmer 2.5s ease-in-out infinite;
}

@keyframes badge-shimmer {
    to {
        transform: translateX(100%);
    }
}

.hero-headline {
    font-size: 2.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-top: 1rem;
}

.hero-subheadline {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.5rem;
}

.builder {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.builder-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.builder-box.box-attention {
    border-color: var(--accent);
}

.box-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.box-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.box-sublabel {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.35rem;
}

.box-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    border: 2px dashed var(--border);
    border-radius: 10px;
    margin-top: 1.25rem;
    padding: 1.5rem;
}

.box-hint {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Buttons */

.btn {
    font: inherit;
    line-height: 1;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 0.75rem 1.5rem;
}

.btn-secondary {
    background: var(--text);
    color: #ffffff;
}

.btn-secondary:hover {
    background: #34343c;
    color: #ffffff;
}

.btn-avatar {
    display: flex;
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.65rem 1.2rem;
}

.btn-avatar:hover {
    border-color: #d8d6d0;
    color: var(--text);
    background: #eceae4;
}

.btn-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-nav {
    padding: 0.65rem 1.2rem;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: 8px;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    font-size: 1.1rem;
    padding: 1.1rem 2rem;
    min-width: 340px;
}

.btn-primary:hover {
    background: #d43e63;
}

.cta-row {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.cta-message {
    color: var(--accent);
    font-size: 0.85rem;
    text-align: center;
    margin-top: 0.6rem;
    min-height: 1.3em;
}

.cta-chips {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.chip {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    font-size: 0.8125rem;
    line-height: 1;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
}

/* Equation row */

.equation-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 4rem;
    overflow-x: auto;
}

/* Auto margins center the row when it fits and keep the left edge reachable when it scrolls */
.eq-tile:first-child {
    margin-left: auto;
}

.eq-tile:last-child {
    margin-right: auto;
}

.eq-tile {
    position: relative;
    overflow: hidden;
    width: 170px;
    aspect-ratio: 9 / 16;
    flex-shrink: 0;
    background: #e9e7e2;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eq-sign {
    color: var(--text);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

.play-icon {
    width: 32px;
    height: 32px;
    color: #b3b1ab;
}

/* Sample clips */

.samples {
    margin-top: 4rem;
}

.samples-title {
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}

.samples-row {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    overflow-x: auto;
}

/* Auto margins center the row when it fits and keep the left edge reachable when it scrolls */
.sample-tile:first-child {
    margin-left: auto;
}

.sample-tile:last-child {
    margin-right: auto;
}

.sample-tile {
    position: relative;
    overflow: hidden;
    width: 140px;
    aspect-ratio: 9 / 16;
    flex-shrink: 0;
    background: #e9e7e2;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sample-tile video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Footer */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 1rem 2rem;
}

.footer-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.footer-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
}

.footer-nav a:hover {
    color: var(--text);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Legal pages */

.legal-page {
    flex: 1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
    line-height: 1.65;
}

.legal-page h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-top: 2.5rem;
}

.legal-page h1:first-child {
    margin-top: 0;
}

.legal-page h2 {
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 2.5rem;
}

.legal-page h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.75rem;
}

.legal-page h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.5rem;
}

.legal-page p {
    margin-top: 0.9rem;
}

.legal-page ul {
    margin-top: 0.9rem;
    padding-left: 1.5rem;
}

.legal-page li {
    margin-top: 0.5rem;
}

.legal-page a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-page a:hover {
    color: var(--text-muted);
}

.legal-page .notice {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-top: 1.25rem;
}

/* Mobile */

@media (max-width: 720px) {
    .site-header {
        padding: 1rem 1.25rem;
    }

    .builder {
        grid-template-columns: 1fr;
    }

    .builder-box {
        min-height: 260px;
    }

    .btn-primary {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .equation-row {
        gap: 0.6rem;
    }

    .eq-tile {
        width: 110px;
    }

    .eq-sign {
        font-size: 1.5rem;
    }

    .footer-inner {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .footer-nav {
        justify-content: center;
    }
}
