/* ==========================================================================
   Audio Kotha — PLATFORM DESIGN SYSTEM (v1)
   Loaded after site-v4.css and before page styles, so pages can still
   override. Raises the whole platform to one professional standard:
   typography scale, control system, card system, layout rhythm, motion.

   Palette is locked: blue / white / silver.
   ========================================================================== */

/* ------------------------------------------------------------- 1. tokens */
:root {
    /* type scale — one ratio, rounded to whole pixels */
    --t-xs: 11px;
    --t-sm: 12.5px;
    --t-base: 14px;
    --t-md: 16px;
    --t-lg: 19px;
    --t-xl: 23px;
    --t-2xl: clamp(25px, 2.5vw, 32px);
    --t-3xl: clamp(30px, 3.4vw, 44px);
    --t-4xl: clamp(34px, 4.2vw, 56px);

    /* rhythm */
    --gap-1: 4px;
    --gap-2: 8px;
    --gap-3: 12px;
    --gap-4: 16px;
    --gap-5: 22px;
    --gap-6: 30px;
    --gap-7: 42px;
    --gap-8: 58px;

    /* surfaces */
    --s-card: linear-gradient(160deg, rgba(255, 255, 255, .94) 0%, rgba(250, 252, 255, .78) 100%);
    --s-glass: linear-gradient(155deg, rgba(255, 255, 255, .9) 0%, rgba(255, 255, 255, .62) 100%);
    --s-line: rgba(255, 255, 255, .92);
    --s-hair: rgba(15, 35, 95, .075);

    /* elevation */
    --e-1: 0 1px 2px rgba(15, 35, 95, .05);
    --e-2: 0 2px 4px rgba(15, 35, 95, .04), 0 10px 24px -18px rgba(15, 35, 95, .3);
    --e-3: 0 2px 6px rgba(15, 35, 95, .05), 0 24px 52px -30px rgba(15, 35, 95, .32);
    --e-4: 0 3px 8px rgba(15, 35, 95, .06), 0 44px 88px -44px rgba(15, 35, 95, .36);
    --e-brand: 0 14px 30px -14px rgba(29, 78, 216, .55);
    --e-lift: 0 24px 52px -30px rgba(29, 78, 216, .38);

    /* radii */
    --r-xs: 10px;
    --r-sm: 14px;
    --r-md: 18px;
    --r-lg: 24px;
    --r-xl: 30px;
    --r-pill: 999px;
}

/* ------------------------------------------------------- 2. typography */
body {
    font-size: var(--t-base);
    line-height: 1.6;
    letter-spacing: -.002em;
}

h1, h2, h3, h4 {
    text-wrap: balance;
    font-variant-ligatures: common-ligatures;
}

/* Tabular figures anywhere numbers matter — stats, prices, durations. */
.hero-stats strong,
.as-stat strong,
.am-stat strong,
.am-stat strong,
.stat-card strong,
.stat-card b,
.rank-num,
.rank-plays,
.mp-time,
.mp-t,
.music-row .mr-dur,
.mu-row-cell b,
.price,
.amount {
    font-variant-numeric: tabular-nums;
}

/* Section headings: consistent size, weight and rhythm across the platform. */
.section-head h2,
.section > .container > .section-head h2 {
    font-size: var(--t-2xl);
    letter-spacing: -.038em;
    line-height: 1.12;
    font-weight: 800;
}

.section-head p,
.section-head .sh-left > p {
    font-size: var(--t-sm);
    line-height: 1.65;
    color: #55637D;
    max-width: 58ch;
}

.eyebrow {
    font-size: 10px;
    letter-spacing: .17em;
    font-weight: 800;
}

.lede {
    font-size: var(--t-md);
    line-height: 1.7;
}

/* ---------------------------------------------------------- 3. controls */
/* One button language across the whole platform. */
.btn {
    border-radius: var(--r-xs);
    padding: 11px 18px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -.005em;
    transition: transform .2s var(--ease), box-shadow .2s, background .2s, border-color .2s, color .2s;
}

.btn-primary {
    background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 100%);
    box-shadow: var(--e-brand), inset 0 1px 0 rgba(255, 255, 255, .24);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px -16px rgba(29, 78, 216, .62), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.btn-ghost {
    background: rgba(255, 255, 255, .72);
    border-color: rgba(15, 35, 95, .1);
    box-shadow: inset 0 1px 0 #fff;
}

.btn-ghost:hover {
    background: #fff;
    border-color: rgba(37, 99, 235, .3);
    color: var(--blue-700);
}

.btn-soft {
    background: rgba(239, 245, 255, .9);
    color: var(--blue-700);
    border-color: rgba(37, 99, 235, .12);
}

.btn-lg { padding: 13px 22px; font-size: 14px; border-radius: var(--r-sm); }
.btn-sm { padding: 8px 13px; font-size: 12px; border-radius: 9px; }

.btn:focus-visible,
a.btn:focus-visible {
    outline: 2px solid var(--blue-600);
    outline-offset: 3px;
}

/* Inputs: 40px minimum, one radius, one focus ring. */
.field input,
.field textarea,
.field select {
    min-height: 42px;
    padding: 10px 13px;
    border-radius: var(--r-xs);
    background: rgba(255, 255, 255, .92);
    border-color: rgba(15, 35, 95, .12);
    font-size: 13px;
    transition: border-color .18s, box-shadow .18s, background .18s;
}

.field textarea { min-height: 88px; }

.field input:focus,
.field textarea:focus,
.field select:focus {
    border-color: rgba(37, 99, 235, .5);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
    background: #fff;
}

.field > span {
    font-size: 9.5px;
    letter-spacing: .1em;
    color: #55637D;
}

/* Search fields inside heroes / headers. */
.hero-search,
.browse-search {
    border-radius: var(--r-sm);
}


/* Search inputs live inside a styled wrapper — the wrapper is the control,
   so it sets the height and the input just fills it. */
.hero-search,
.browse-search {
    min-height: 48px;
    align-items: center;
}

.hero-search input,
.browse-search input {
    min-height: 0;
    padding: 0;
    font-size: 15px;
    background: none;
    border: 0;
}

.hero-search:focus-within,
.browse-search:focus-within {
    border-color: rgba(37, 99, 235, .5);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

/* Any remaining bare input at body level should still be a usable height. */
input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),
select,
textarea {
    min-height: 42px;
}

/* ------------------------------------------------------------- 4. cards */
/* One card recipe: soft glass, hairline inner highlight, two-layer shadow. */
.glass,
.filter-bar,
.story-card,
.side-card,
.plan-card,
.mini-post,
.rank-list {
    border-radius: var(--r-md);
}

.glass {
    background: var(--s-glass);
    border: 1px solid var(--s-line);
    box-shadow: var(--e-2), inset 0 1px 0 rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    backdrop-filter: blur(20px) saturate(150%);
}

/* Hover lift is a platform behaviour, not per-page. */
.story-card,
.plan-card,
.side-card,
.mini-post {
    transition: transform .24s var(--ease), box-shadow .24s, border-color .24s;
}

.story-card:hover,
.plan-card:hover,
.mini-post:hover {
    transform: translateY(-4px);
    box-shadow: var(--e-3);
}

/* ---------------------------------------------------------- 5. layout */
.container { max-width: 1240px; }

.section { padding: 56px 0; }
.section-tight { padding: 30px 0; }

.section-head {
    margin-bottom: 22px;
    align-items: flex-end;
}

/* A tinted band should read as a deliberate section, not a stripe. */
.section-tint {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .5) 0%, rgba(244, 248, 255, .42) 100%);
    border-top: 1px solid rgba(255, 255, 255, .9);
    border-bottom: 1px solid rgba(255, 255, 255, .9);
}

/* ---------------------------------------------------------- 6. header */
.site-head {
    background: rgba(255, 255, 255, .82);
    -webkit-backdrop-filter: blur(24px) saturate(170%);
    backdrop-filter: blur(24px) saturate(170%);
    box-shadow: 0 1px 0 rgba(15, 35, 95, .07), 0 10px 30px -26px rgba(15, 35, 95, .4);
}

/* ---------------------------------------------------------- 7. footer */
.site-foot {
    margin-top: 56px;
    padding-top: 46px;
    background:
        radial-gradient(700px 320px at 88% 0%, rgba(59, 130, 246, .3) 0%, rgba(59, 130, 246, 0) 62%),
        linear-gradient(155deg, #0B1533 0%, #102A63 58%, #0B1533 100%);
}

.foot-col a {
    font-size: 12px;
    padding: 2px 0;
    transition: color .18s;
}

/* ------------------------------------------------------ 8. accessibility */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--blue-600);
    outline-offset: 3px;
    border-radius: 8px;
}

.skip-link:focus { outline-offset: 0; }

/* Never rely on colour alone for state. */
.is-active,
[aria-current="page"],
[aria-pressed="true"] {
    text-decoration-thickness: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .btn,
    .story-card,
    .plan-card,
    .mini-post,
    .side-card {
        transition: none !important;
    }
    .btn-primary:hover,
    .story-card:hover,
    .plan-card:hover,
    .mini-post:hover {
        transform: none !important;
    }
}

/* -------------------------------------------------------- 9. responsive */
@media (max-width: 900px) {
    .container { max-width: none; }
    .section { padding: 40px 0; }
    .section-tight { padding: 22px 0; }
    .section-head { margin-bottom: 18px; }
    .section-head h2 { font-size: clamp(21px, 3.4vw, 27px); }
}

@media (max-width: 620px) {
    .btn { padding: 10px 15px; font-size: 12.5px; }
    .btn-lg { padding: 12px 18px; font-size: 13px; }
    .field input, .field textarea, .field select { min-height: 44px; font-size: 16px; } /* 16px stops iOS zoom */
}
/* ------------------------------------------------------ screen-reader only */
/* Visually hidden but available to assistive tech. Several views were relying
   on this class before it existed, which made their labels render visibly. */
.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
