/* ==========================================================================
   aiofm.eu
   ========================================================================== */

:root {
    --bg: #000;
    --bg-alt: #05070a;
    --surface: #0b0e14;
    --line: rgba(255, 255, 255, .08);
    --line-strong: rgba(255, 255, 255, .16);
    --text: #eef2f8;
    --muted: #8a94a6;
    --accent: #a9b8d2;
    --silver: linear-gradient(180deg, #ffffff 0%, #eef2f8 40%, #9aabc8 100%);
    --radius: 18px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --header-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

html.intro-playing body { overflow: hidden; }

a { color: inherit; }
img { max-width: 100%; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container {
    width: 100%;
    max-width: 1160px;
    margin-inline: auto;
    padding-inline: 24px;
}

/* ---------- Wordmark (the logo, rendered as text) ---------- */

.wordmark {
    display: inline-block;
    font-family: var(--font);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1;
    white-space: nowrap;
    font-kerning: none;
    background: var(--silver);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.wordmark .l { display: inline-block; }

/* Split letters each carry their own gradient so transforms don't break clipping */
.wordmark--split { background: none; }
.wordmark--split .l {
    background: var(--silver);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- Intro ---------- */

.intro {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    /* Fallback: if JS never runs, get out of the way */
    animation: intro-fallback .6s ease 6s forwards;
}

html.no-intro .intro { display: none; }

.intro::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #000;
    transition: opacity .9s ease;
}

.intro.is-leaving::before { opacity: 0; }
.intro.is-leaving .intro__skip { opacity: 0; pointer-events: none; }

.intro__logo {
    position: relative;
    font-size: clamp(3.2rem, 15vw, 10rem);
    transform-origin: center center;
    will-change: transform;
}

.intro__logo .wordmark { font-size: 1em; }

.intro .wordmark--split .l {
    opacity: 0;
    transform: translateY(.35em) scale(.96);
    filter: blur(14px);
    animation: letter-in .9s var(--ease) forwards;
    animation-delay: calc(.25s + var(--i) * .075s);
}

.intro .wordmark--split .l--dot {
    transform: scale(0);
    filter: none;
    animation: dot-in .6s cubic-bezier(.3, 1.6, .5, 1) forwards;
    animation-delay: calc(.25s + var(--i) * .075s + .15s);
}

/* Light sweep across the finished logo */
.intro__shine {
    position: absolute;
    inset: 0;
    background: none;
    color: #fff;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 50%, transparent 65%);
    mask-image: linear-gradient(100deg, transparent 35%, #000 50%, transparent 65%);
    -webkit-mask-size: 300% 100%;
    mask-size: 300% 100%;
    -webkit-mask-position: 100% 0;
    mask-position: 100% 0;
    opacity: 0;
    animation: shine 1.1s ease-in-out 1.35s forwards;
}

.intro.is-leaving .intro__shine { animation: none; opacity: 0; }

.intro__skip {
    position: absolute;
    right: 24px;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    z-index: 1;
    background: none;
    border: 1px solid var(--line-strong);
    color: var(--muted);
    font: 500 13px/1 var(--font);
    letter-spacing: .04em;
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    opacity: 0;
    animation: fade-in .6s ease 1s forwards;
    transition: color .2s, border-color .2s, opacity .3s;
}
.intro__skip:hover { color: var(--text); border-color: var(--accent); }

@keyframes letter-in {
    to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes dot-in {
    0%   { opacity: 0; transform: scale(0); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes shine {
    0%   { opacity: .9; -webkit-mask-position: 100% 0; mask-position: 100% 0; }
    100% { opacity: .9; -webkit-mask-position: 0 0;   mask-position: 0 0; }
}
@keyframes fade-in { to { opacity: 1; } }
@keyframes intro-fallback { to { opacity: 0; visibility: hidden; } }

/* While the intro plays, hide the header logo (the intro logo flies into its place) */
html.has-intro:not(.intro-done) .brand .wordmark { opacity: 0; }

/* Hero content enters after the intro */
[data-hero] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
    transition-delay: calc(var(--d, 0) * .1s + .15s);
}
html.hero-in [data-hero] { opacity: 1; transform: none; }

.header {
    opacity: 1;
    transition: background .3s, border-color .3s, backdrop-filter .3s;
}
html.has-intro:not(.intro-leaving):not(.intro-done) .header .nav,
html.has-intro:not(.intro-leaving):not(.intro-done) .header .header__end { opacity: 0; }
.header .nav, .header .header__end { transition: opacity .8s ease .3s; }

/* ---------- Header ---------- */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    border-bottom: 1px solid transparent;
}

.header.is-scrolled {
    background: rgba(0, 0, 0, .72);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom-color: var(--line);
}

.header__inner {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.brand .wordmark { font-size: 1.7rem; transition: opacity .2s; }

.nav { display: flex; gap: 32px; }
.nav a {
    text-decoration: none;
    color: var(--muted);
    font-size: 15px;
    font-weight: 500;
    transition: color .2s;
}
.nav a:hover { color: var(--text); }

.header__end {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Language switcher */
.lang {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(255, 255, 255, .03);
}
.lang__link {
    min-width: 36px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    color: var(--muted);
    transition: color .2s, background .2s;
}
.lang__link:hover { color: var(--text); }
.lang__link.is-active {
    background: var(--silver);
    color: #05070a;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: none;
    border: 0;
    cursor: pointer;
    position: relative;
}
.nav-toggle span:not(.sr-only) {
    position: absolute;
    left: 11px;
    right: 11px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 25px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 999px;
    font: 600 15px/1 var(--font);
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
    background: var(--silver);
    color: #05070a;
    box-shadow: 0 8px 30px rgba(154, 171, 200, .18);
}
.btn--primary:hover { box-shadow: 0 10px 40px rgba(154, 171, 200, .32); }
.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); }
.btn--discord { background: #5865f2; color: #fff; box-shadow: 0 8px 30px rgba(88, 101, 242, .25); }
.btn--discord:hover { background: #4752c4; }
.btn--discord svg { flex: none; }
.btn--sm { padding: 10px 16px; font-size: 14px; }
.header__cta { white-space: nowrap; }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: calc(var(--header-h) + 40px) 0;
    overflow: hidden;
    text-align: center;
}

.hero__glow {
    position: absolute;
    left: 50%;
    top: 38%;
    width: min(900px, 120vw);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: radial-gradient(closest-side, rgba(140, 162, 200, .18), rgba(140, 162, 200, .05) 55%, transparent);
    pointer-events: none;
}

.hero__inner { position: relative; }

.eyebrow {
    display: inline-block;
    margin: 0 0 24px;
    padding: 8px 16px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--accent);
}

.hero__title {
    margin: 0 auto;
    max-width: 14ch;
    font-size: clamp(2.6rem, 7vw, 5.4rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.silver {
    background: var(--silver);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__text {
    margin: 28px auto 0;
    max-width: 560px;
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    color: var(--muted);
}

.hero__actions {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

/* Frequency bars */
.wave {
    position: relative;
    margin-top: auto;
    height: 120px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    padding-top: 56px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
}
.wave span {
    width: 3px;
    height: 100%;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(154, 171, 200, .05));
    transform-origin: bottom;
    animation: bar 2.4s ease-in-out infinite alternate;
    animation-delay: calc(var(--b) * -0.13s);
}
@keyframes bar {
    0%   { transform: scaleY(.08); }
    50%  { transform: scaleY(.55); }
    100% { transform: scaleY(.2); }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(80px, 12vw, 140px); }
.section--alt {
    background: var(--bg-alt);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.kicker {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
}

.section__title {
    margin: 0 0 20px;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.lead {
    margin: 0;
    max-width: 640px;
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    color: var(--muted);
}
.lead a { color: var(--text); }

.about { text-align: center; }
.about .lead { margin-inline: auto; }

/* Features grid */
.grid {
    margin-top: 56px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color .3s, transform .3s var(--ease);
}
.card:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.card__num {
    display: block;
    margin-bottom: 28px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: .08em;
}
.card h3 { margin: 0 0 8px; font-size: 1.25rem; letter-spacing: -0.02em; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* Steps */
.steps {
    list-style: none;
    margin: 56px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    counter-reset: none;
}
.step {
    position: relative;
    padding-top: 28px;
    border-top: 1px solid var(--line-strong);
}
.step__num {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 20px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    font-weight: 600;
    background: var(--surface);
}
.step h3 { margin: 0 0 6px; font-size: 1.35rem; letter-spacing: -0.02em; }
.step p { margin: 0; color: var(--muted); }

/* Contact */
.contact {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 64px;
    align-items: start;
}

.form {
    display: grid;
    gap: 18px;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label {
    display: grid;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
}
.form input,
.form textarea {
    width: 100%;
    padding: 14px 16px;
    background: #000;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    color: var(--text);
    font: 400 16px/1.4 var(--font);
    resize: vertical;
    transition: border-color .2s, box-shadow .2s;
}
.form input:focus,
.form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(169, 184, 210, .15);
}
.form .btn { justify-self: start; }
.form .btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.form__status { margin: 0; min-height: 1.6em; font-size: 15px; color: var(--accent); }
.form__status.is-error { color: #ff8a8a; }
.hp { position: absolute !important; left: -9999px; }

/* Footer */
.footer { padding-block: 40px; }
.footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: 14px;
}
.footer__inner p { margin: 0; }
.footer .brand .wordmark { font-size: 1.4rem; }
.footer__replay { color: var(--muted); text-decoration: none; }
.footer__replay:hover { color: var(--text); }

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
    transition-delay: calc(var(--d, 0) * .08s);
}
.reveal.is-visible { opacity: 1; transform: none; }

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

/* ---------- Responsive ---------- */

@media (max-width: 1040px) and (min-width: 861px) {
    .nav { gap: 18px; }
    .nav a { font-size: 14px; white-space: nowrap; }
    .brand .wordmark { font-size: 1.5rem; }
}

@media (max-width: 900px) {
    .grid, .steps { grid-template-columns: 1fr 1fr; }
    .contact { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 860px) {
    :root { --header-h: 64px; }
    .container { padding-inline: 20px; }
    .nav-toggle { display: block; }
    .nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: 8px 20px 20px;
        background: rgba(0, 0, 0, .94);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--line);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s, transform .25s var(--ease), visibility .25s;
    }
    .nav.is-open { opacity: 1 !important; transform: none; visibility: visible; }
    .nav a { padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
    .nav a:last-child { border-bottom: 0; }
    .brand .wordmark { font-size: 1.45rem; }
    .grid, .steps { grid-template-columns: 1fr; }
    .form { padding: 22px; }
    .form__row { grid-template-columns: 1fr; }
    .wave { gap: 4px; height: 90px; }
    .footer__inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .wave span { animation: none; transform: scaleY(.3); }
    .intro .wordmark--split .l,
    .intro .wordmark--split .l--dot {
        animation: fade-in .4s ease forwards;
        transform: none;
        filter: none;
    }
    .intro__shine { display: none; }
    .reveal, [data-hero] { transition-duration: .01s; transform: none; }
}

/* Header login button: icon only when space is tight */
@media (max-width: 1180px) {
    .header__cta-text { display: none; }
    .btn--discord.header__cta { padding: 10px; }
}

@media (max-width: 400px) {
    .lang__link { min-width: 30px; padding: 6px 7px; }
    .header__end { gap: 6px; }
}

/* ---------- Pricing ---------- */

.pricing__head { text-align: center; }
.pricing__head .lead { margin-inline: auto; }

.plans {
    margin: 56px auto 0;
    max-width: 880px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: stretch;
}

.plan {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 36px 32px 32px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
}
.plan--premium {
    border-color: rgba(169, 184, 210, .45);
    background:
        radial-gradient(420px 220px at 50% 0%, rgba(140, 162, 200, .18), transparent 70%),
        var(--surface);
    box-shadow: 0 30px 80px rgba(140, 162, 200, .12);
}
.plan__badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--silver);
    color: #05070a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}
.plan__name { margin: 0; font-size: 1.4rem; letter-spacing: -0.02em; }
.plan__desc { margin: 6px 0 0; color: var(--muted); font-size: 15.5px; }
.plan__price { margin: 26px 0 0; display: flex; align-items: baseline; gap: 8px; }
.plan__amount { font-size: clamp(2.6rem, 6vw, 3.4rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.plan--premium .plan__amount {
    background: var(--silver);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.plan__period { color: var(--muted); font-size: 15px; }
.plan__list {
    list-style: none;
    margin: 26px 0 30px;
    padding: 24px 0 0;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 12px;
    flex: 1;
}
.plan__list li { position: relative; padding-left: 28px; font-size: 15.5px; }
.plan__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(169, 184, 210, .15) no-repeat center / 10px
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.5 3.5L11 1.5' fill='none' stroke='%23a9b8d2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.plan__cta { width: 100%; }

@media (max-width: 760px) {
    .plans { grid-template-columns: 1fr; max-width: 460px; gap: 28px; }
    .plan { padding: 32px 24px 26px; }
}

/* ---------- Powered by (in the hero, under the buttons) ---------- */

.powered {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.powered__label {
    margin-right: 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}
.powered__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 7px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(255, 255, 255, .03);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: border-color .2s, background .2s;
}
.powered__item:hover { border-color: var(--accent); background: rgba(255, 255, 255, .06); }
.powered__icon { flex: none; width: 22px; height: 22px; color: var(--text); }
.powered__icon--fanlyx { color: #2b3242; }

@media (max-width: 560px) {
    .powered__label { flex-basis: 100%; margin: 0; text-align: center; }
}
