/* ============================================================
   Catharisis — shared visual language (tester / home / login)
   Loads after style.css. Tokens, atmosphere, nav, tiles, motion.
   ============================================================ */

:root {
    --ink: #0e0e11;
    --card: #15151a;
    --card-2: #1b1b21;
    --line: rgba(255, 255, 255, 0.08);
    --text: #ece7df;
    --muted: #8f887c;
    --gold: #d4a857;
    --gold-2: #f0cf7a;
    --gold-dim: rgba(212, 168, 87, 0.18);
    --display: 'Fraunces', Georgia, serif;
    --body: 'Outfit', 'Inter', system-ui, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --gutter: clamp(1.5rem, 6vw, 5rem);
}

body.themed {
    display: block;
    min-height: 100svh;
    background: var(--ink);
    background-image: none;
    color: var(--text);
    font-family: var(--body);
    font-weight: 300;
    overflow-x: hidden;
}

/* ---------- atmosphere ---------- */
.grain {
    position: fixed;
    inset: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 3;
    opacity: 0.045;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.glow {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(80px);
    will-change: transform;
}

.glow-a {
    width: 60vw;
    height: 60vw;
    top: -30vw;
    right: -20vw;
    background: radial-gradient(circle, rgba(212, 168, 87, 0.16), transparent 65%);
}

.glow-b {
    width: 50vw;
    height: 50vw;
    bottom: -25vw;
    left: -15vw;
    background: radial-gradient(circle, rgba(120, 90, 200, 0.10), transparent 65%);
}

.rule-v {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--line) 20%, var(--line) 80%, transparent);
    pointer-events: none;
    z-index: 0;
}

.rule-v.l { left: clamp(1rem, 5vw, 4rem); }
.rule-v.r { right: clamp(1rem, 5vw, 4rem); }

/* ---------- nav ---------- */
.top {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem var(--gutter);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: var(--text);
    font-family: var(--display);
    font-size: 1.2rem;
}

.brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.brand-tag {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    color: var(--gold);
    border: 1px solid var(--gold-dim);
    border-radius: 99px;
    padding: 0.25rem 0.6rem;
    margin-left: 0.4rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

body.themed .language-dropdown {
    position: static;
}

/* ---------- type ---------- */
.eyebrow {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.4rem;
}

.eyebrow::before {
    content: '';
    flex-shrink: 0;
    width: 2.2rem;
    height: 1px;
    background: var(--gold);
}

.eyebrow.center {
    justify-content: center;
}

.eyebrow.center::after {
    content: '';
    flex-shrink: 0;
    width: 2.2rem;
    height: 1px;
    background: var(--gold);
}

.pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold-2);
    animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(240, 207, 122, 0.55); }
    100% { box-shadow: 0 0 0 12px rgba(240, 207, 122, 0); }
}

.display {
    font-family: var(--display);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 0.98;
    background: linear-gradient(115deg, #fdfaf2 25%, var(--gold) 70%, #8a6d1f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lede {
    font-family: var(--display);
    font-style: italic;
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    color: #b8b0a0;
    line-height: 1.5;
}

/* ---------- platform tiles ---------- */
.platforms {
    display: grid;
    gap: 0.8rem;
    max-width: 480px;
}

.platform {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.1rem;
    padding: 1.1rem 1.3rem;
    border-radius: 1rem;
    text-decoration: none;
    color: var(--text);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--line);
    overflow: hidden;
    transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}

.platform::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--gold-dim), transparent 60%);
    opacity: 0;
    transition: opacity 0.35s;
}

.platform:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 168, 87, 0.45);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(212, 168, 87, 0.15) inset;
}

.platform:hover::before { opacity: 1; }

.platform:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

.platform .ico {
    position: relative;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--gold);
    color: var(--ink);
}

.platform.ios .ico {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.platform .ico svg {
    width: 24px;
    height: 24px;
}

.platform strong {
    position: relative;
    display: block;
    font-weight: 500;
    font-size: 1.05rem;
}

.platform small {
    position: relative;
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    margin-top: 0.15rem;
}

.platform .arrow {
    position: relative;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    color: var(--muted);
    transition: transform 0.35s var(--ease), color 0.35s, border-color 0.35s;
}

.platform:hover .arrow {
    transform: translateX(4px);
    color: var(--gold);
    border-color: var(--gold);
}

/* ---------- generic panel ---------- */
.panel {
    padding: 1.6rem 1.7rem;
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--line);
}

/* ---------- motion ---------- */
.rise {
    animation: rise 0.9s var(--ease) both;
    animation-delay: var(--d, 0ms);
}

@keyframes rise {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -8px; }
}

@media (prefers-reduced-motion: reduce) {
    .rise, .pulse { animation: none; }
}

@media (max-width: 880px) {
    .rule-v { display: none; }
}

@media (max-width: 480px) {
    .brand .name { display: none; }
    .platform { padding: 1rem; gap: 0.9rem; }
}
