/* ============================================================
   Avainly Landing Pages — Shared Design System
   ============================================================ */

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

/* ── Tokens ── */
:root {
    --primary:          #1976D2;
    --primary-dark:     #1565C0;
    --secondary:        #26A69A;
    --surface:          #ffffff;
    --on-surface:       #1C1B1F;
    --on-surface-muted: #49454F;
    --outline:          rgba(28, 27, 31, 0.12);
    --bg:               #F6F5F8;
    --radius-card:      16px;
    --radius-chip:      100px;
    --shadow-card:
        0 2px 8px rgba(0, 0, 0, 0.06),
        0 6px 24px rgba(0, 0, 0, 0.04);
}

@media (prefers-color-scheme: dark) {
    :root {
        --surface:          #1C1B1F;
        --on-surface:       #E6E1E5;
        --on-surface-muted: #CAC4D0;
        --outline:          rgba(230, 225, 229, 0.12);
        --bg:               #141218;
        --shadow-card:
            0 2px 8px rgba(0, 0, 0, 0.3),
            0 6px 24px rgba(0, 0, 0, 0.2);
    }
}

/* ── Base ── */
html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--on-surface);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ── Animated background (mirrors Auth.vue) ── */
.bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background-color: var(--bg);
}

.bg__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(25, 118, 210, 0.03) 0%,
        var(--surface) 40%,
        var(--surface) 60%,
        rgba(38, 166, 154, 0.05) 100%
    );
}

.bg__shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.shape--1 {
    width: 600px;
    height: 600px;
    background: rgba(25, 118, 210, 0.15);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.shape--2 {
    width: 400px;
    height: 400px;
    background: rgba(38, 166, 154, 0.12);
    bottom: -100px;
    left: -100px;
    animation-delay: -7s;
}

.shape--3 {
    width: 300px;
    height: 300px;
    background: rgba(25, 118, 210, 0.08);
    top: 40%;
    left: 20%;
    animation-delay: -14s;
}

@keyframes float {
    0%,  100% { transform: translate(0, 0) scale(1); }
    33%        { transform: translate(30px, -30px) scale(1.05); }
    66%        { transform: translate(-20px, 20px) scale(0.95); }
}

/* ── Page layout ── */
.page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Header ── */
.header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.logo__img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow:
        0 8px 32px rgba(25, 118, 210, 0.35),
        0 4px 16px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.logo__name {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--on-surface);
}

/* ── Language toggle ── */
#lang-toggle {
    margin-left: auto;
    position: relative;
}

.lang-toggle__btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1px solid var(--outline);
    border-radius: var(--radius-chip);
    padding: 4px 10px 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--on-surface-muted);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.lang-toggle__btn:hover,
.lang-toggle--open .lang-toggle__btn {
    color: var(--primary);
    border-color: var(--primary);
}

.lang-toggle__arrow {
    width: 8px;
    height: 5px;
    fill: currentColor;
    transition: transform 0.15s;
}

.lang-toggle--open .lang-toggle__arrow {
    transform: rotate(180deg);
}

.lang-toggle__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: 10px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    min-width: 60px;
    z-index: 100;
}

.lang-toggle__option {
    padding: 8px 16px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--on-surface-muted);
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
}

.lang-toggle__option:hover,
.lang-toggle__option[aria-selected="true"] {
    background: rgba(25, 118, 210, 0.08);
    color: var(--primary);
}

/* ── Main ── */
.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

/* ── Card (centered, compact — used by 50x page) ── */
.card {
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 48px 40px;
    max-width: 520px;
    width: 100%;
    text-align: center;
}

.card__icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(25, 118, 210, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
}

.card__icon-wrap svg {
    width: 36px;
    height: 36px;
    fill: var(--primary);
}

.card__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(25, 118, 210, 0.08);
    border-radius: var(--radius-chip);
    padding: 4px 12px;
    margin-bottom: 20px;
}

.card__chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}

.card__title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--on-surface);
    margin-bottom: 12px;
}

.card__body {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--on-surface-muted);
    margin-bottom: 36px;
}

.divider {
    border: none;
    border-top: 1px solid var(--outline);
    margin: 32px 0;
}

.status-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--on-surface-muted);
}

.status-row svg {
    width: 16px;
    height: 16px;
    fill: var(--on-surface-muted);
    flex-shrink: 0;
}

/* ── Legal content (wide card — used by imprint/privacy) ── */
.legal {
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 48px 56px;
    max-width: 760px;
    width: 100%;
}

.legal__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 32px;
    transition: opacity 0.15s;
}

.legal__back:hover { opacity: 0.75; }

.legal__back svg {
    width: 16px;
    height: 16px;
    fill: var(--primary);
}

.legal__eyebrow {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 8px;
}

.legal__title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--on-surface);
    margin-bottom: 8px;
}

.legal__meta {
    font-size: 0.8125rem;
    color: var(--on-surface-muted);
    margin-bottom: 40px;
}

.legal__divider {
    border: none;
    border-top: 1px solid var(--outline);
    margin: 32px 0;
}

.legal__section {
    margin-bottom: 36px;
}

.legal__section:last-child {
    margin-bottom: 0;
}

.legal__section h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--on-surface);
    margin-bottom: 10px;
}

.legal__section p,
.legal__section address {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--on-surface-muted);
    font-style: normal;
}

.legal__section a {
    color: var(--primary);
    text-decoration: none;
}

.legal__section a:hover {
    text-decoration: underline;
}

.legal__section ul {
    margin: 8px 0 0 20px;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--on-surface-muted);
}

.legal__section ul ul {
    margin-top: 4px;
}

.legal__section code {
    font-family: ui-monospace, 'SF Mono', Consolas, 'Liberation Mono', monospace;
    font-size: 0.8125rem;
    background: rgba(25, 118, 210, 0.07);
    color: var(--primary);
    padding: 1px 5px;
    border-radius: 4px;
}

/* ── Footer ── */
.footer {
    position: relative;
    z-index: 1;
    padding: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 20px;
    border-top: 1px solid var(--outline);
}

.footer__copy {
    font-size: 0.8125rem;
    color: var(--on-surface-muted);
}

.footer__links {
    display: flex;
    gap: 16px;
}

.footer__link {
    font-size: 0.8125rem;
    color: var(--on-surface-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.footer__link:hover { color: var(--primary); }

/* ── Responsive ── */
@media (max-width: 600px) {
    .card   { padding: 36px 24px; }
    .legal  { padding: 36px 24px; }

    .footer {
        flex-direction: column;
        gap: 8px;
    }

    .shape--1 { width: 300px; height: 300px; }
    .shape--2 { width: 200px; height: 200px; }
    .shape--3 { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .shape          { animation: none; }
    .card__chip-dot { animation: none; }
}
