/* ==========================================================================
   Ink Craft Academy - public theme
   A dark "tattoo studio" surface: near black paper, crimson ink, amber accents.
   Colours marked with var(--primary) / var(--accent) come from the admin settings.
   ========================================================================== */

:root {
    --ink-950: #07070a;
    --ink-900: #0d0d12;
    --ink-850: #12121a;
    --ink-800: #191922;
    --ink-750: #21212c;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.16);

    --text: #ecedf2;
    --text-dim: #b6b8c4;
    --text-muted: #868a9b;

    --primary: #e11d48;
    --accent: #f59e0b;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;

    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 18px 50px -12px color-mix(in srgb, var(--primary) 55%, transparent);

    --font-display: "Oswald", "Segoe UI Semibold", "Arial Narrow", system-ui, sans-serif;
    --font-body: "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --header-h: 72px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--ink-950);
    background-image:
        radial-gradient(1200px 600px at 12% -10%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 60%),
        radial-gradient(900px 500px at 92% 4%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .display-font {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.12;
    color: #fff;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.1rem, 5vw, 3.6rem);
}

h2 {
    font-size: clamp(1.7rem, 3.4vw, 2.6rem);
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.6rem);
}

p {
    color: var(--text-dim);
}

a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.18s ease, opacity 0.18s ease;
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
}

::selection {
    background: var(--primary);
    color: #fff;
}

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

.container-site {
    width: 100%;
    max-width: 1240px;
    margin-inline: auto;
    padding-inline: 16px;
}

/* ---------- Utility ------------------------------------------------------ */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 0.82rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    background: currentColor;
    opacity: 0.8;
}

.muted {
    color: var(--text-muted);
}

.text-dim {
    color: var(--text-dim);
}

.divider {
    height: 1px;
    background: var(--line);
    border: 0;
    margin: 0;
}

.stack-sm > * + * {
    margin-top: 8px;
}

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

.btn-ink,
.btn-ghost,
.btn-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-ink {
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 60%, #7f1d1d));
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.btn-ink:hover {
    color: #fff;
    transform: translateY(-2px);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--line-strong);
    color: var(--text);
    backdrop-filter: blur(6px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-2px);
}

.btn-line {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-line:hover {
    background: var(--primary);
    color: #fff;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.82rem;
}

.btn-block {
    width: 100%;
}

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

.topbar {
    background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 85%, #000), color-mix(in srgb, var(--accent) 60%, #000));
    color: #fff;
    font-size: 0.85rem;
    padding: 7px 0;
}

.topbar .container-site {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    align-items: center;
    justify-content: space-between;
}

.topbar a {
    color: #fff;
    opacity: 0.95;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: color-mix(in srgb, var(--ink-950) 86%, transparent);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.site-header .container-site {
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 1.24rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
}

.brand img {
    height: 38px;
    width: auto;
}

.brand:hover {
    color: #fff;
}

.nav-main {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-inline-start: auto;
}

.nav-main > li {
    position: relative;
    list-style: none;
}

.nav-link-ink {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.95rem;
    color: var(--text-dim);
}

.nav-link-ink:hover,
.nav-link-ink.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.nav-link-ink.active {
    box-shadow: inset 0 -2px 0 var(--primary);
}

.nav-submenu {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-start: 0;
    min-width: 210px;
    padding: 8px;
    margin: 0;
    list-style: none;
    background: var(--ink-850);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all 0.18s ease;
}

.nav-main > li:hover > .nav-submenu,
.nav-main > li:focus-within > .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-submenu a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 0.92rem;
    color: var(--text-dim);
}

.nav-submenu a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 1.3rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.avatar-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 6px 14px 6px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    font-size: 0.9rem;
    color: var(--text);
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.95rem;
}

.dropdown-ink {
    background: var(--ink-850);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: 8px;
    min-width: 220px;
}

.dropdown-ink .dropdown-item {
    color: var(--text-dim);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.92rem;
}

.dropdown-ink .dropdown-item:hover,
.dropdown-ink .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.dropdown-ink .dropdown-divider {
    border-color: var(--line);
}

/* Mobile drawer */
.mobile-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(88vw, 340px);
    background: var(--ink-900);
    border-inline-start: 1px solid var(--line);
    padding: 22px;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1060;
    overflow-y: auto;
}

.mobile-nav.open {
    transform: translateX(0);
}

.mobile-nav a {
    display: block;
    padding: 13px 12px;
    border-radius: 10px;
    color: var(--text-dim);
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
}

.mobile-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
    z-index: 1050;
}

.nav-backdrop.open {
    opacity: 1;
    visibility: visible;
}

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

.hero {
    position: relative;
    min-height: clamp(520px, 78vh, 760px);
    display: grid;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    animation: heroDrift 18s ease-in-out infinite alternate;
}

@keyframes heroDrift {
    from {
        transform: scale(1.04) translate3d(0, 0, 0);
    }
    to {
        transform: scale(1.12) translate3d(-1.5%, -1%, 0);
    }
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 5, 8, 0.94) 0%, rgba(5, 5, 8, 0.72) 45%, rgba(5, 5, 8, 0.35) 100%),
        linear-gradient(0deg, var(--ink-950), transparent 55%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    padding: 96px 0 72px;
    max-width: 700px;
}

.hero-inner h1 {
    margin: 0 0 16px;
    text-transform: uppercase;
}

.hero-inner p {
    font-size: 1.1rem;
    color: var(--text-dim);
    margin-bottom: 30px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-dots-wrap {
    position: absolute;
    inset-inline: 0;
    bottom: 28px;
    z-index: 3;
}

.hero-dots {
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 4px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: background 0.2s ease, width 0.2s ease;
}

.hero-dot.active {
    background: var(--primary);
    width: 56px;
}

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

.section {
    padding: clamp(56px, 8vw, 104px) 0;
    position: relative;
}

.section-alt {
    background: linear-gradient(180deg, transparent, var(--ink-900) 22%, var(--ink-900) 78%, transparent);
}

.section-head {
    max-width: 720px;
    margin-bottom: 44px;
}

.section-head.center {
    margin-inline: auto;
    text-align: center;
}

.section-head p {
    margin: 12px 0 0;
    font-size: 1.05rem;
}

.section-head-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 40px;
}

.grid {
    display: grid;
    gap: 26px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}

/* ---------- Cards ------------------------------------------------------- */

.card-ink {
    position: relative;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--ink-850), var(--ink-900));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
    height: 100%;
}

.card-ink:hover {
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
    box-shadow: var(--shadow);
}

.card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--ink-800), var(--ink-750));
    overflow: hidden;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-ink:hover .card-media img {
    transform: scale(1.06);
}

.card-media-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 2.4rem;
    color: rgba(255, 255, 255, 0.14);
}

.card-body-ink {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.card-body-ink h3 {
    margin: 0;
    font-size: 1.15rem;
}

.card-body-ink h3 a:hover {
    color: var(--primary);
}

.card-excerpt {
    margin: 0;
    font-size: 0.94rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.badge-ink {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 18%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent);
    color: color-mix(in srgb, var(--primary) 70%, #fff);
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: var(--font-display);
}

.badge-accent {
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    border-color: color-mix(in srgb, var(--accent) 42%, transparent);
    color: color-mix(in srgb, var(--accent) 78%, #fff);
}

.badge-neutral {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--line-strong);
    color: var(--text-dim);
}

.card-float-badge {
    position: absolute;
    top: 14px;
    inset-inline-start: 14px;
    z-index: 2;
}

.card-float-badge-end {
    inset-inline: auto 14px;
}

/* Product price */
.price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.price {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: #fff;
}

.price-old {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* Video card */
.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(5, 5, 8, 0.35);
    transition: background 0.25s ease;
}

.card-ink:hover .play-overlay {
    background: rgba(5, 5, 8, 0.12);
}

.play-button {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--primary) 88%, transparent);
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 0 0 10px color-mix(in srgb, var(--primary) 22%, transparent);
    transition: transform 0.25s ease;
}

.card-ink:hover .play-button {
    transform: scale(1.08);
}

.duration-chip {
    position: absolute;
    bottom: 12px;
    inset-inline-end: 12px;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

/* ---------- Stats / feature blocks ------------------------------------- */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    gap: 18px;
}

.stat-card {
    padding: 28px 22px;
    text-align: center;
    background: linear-gradient(180deg, var(--ink-850), var(--ink-900));
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.stat-value {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 4vw, 3rem);
    line-height: 1;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    margin-top: 8px;
    font-size: 0.86rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.feature-split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: clamp(28px, 5vw, 60px);
    align-items: center;
}

.feature-media {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, var(--ink-800), var(--ink-750));
}

.feature-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-list {
    display: grid;
    gap: 16px;
}

.course-item {
    display: flex;
    gap: 18px;
    padding: 22px;
    background: var(--ink-850);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.course-item:hover {
    border-color: color-mix(in srgb, var(--primary) 40%, var(--line));
    transform: translateX(4px);
}

.course-index {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: color-mix(in srgb, var(--primary) 75%, #fff);
    min-width: 46px;
}

.cta-panel {
    position: relative;
    padding: clamp(36px, 6vw, 72px);
    border-radius: var(--radius-lg);
    border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line));
    background:
        radial-gradient(700px 300px at 15% 0%, color-mix(in srgb, var(--primary) 26%, transparent), transparent 70%),
        linear-gradient(135deg, var(--ink-850), var(--ink-900));
    text-align: center;
}

/* ---------- Filters, search, pager ------------------------------------- */

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
    background: var(--ink-850);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 30px;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--text-dim);
    font-size: 0.88rem;
}

.chip:hover {
    color: #fff;
    border-color: var(--primary);
}

.chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.search-inline {
    display: flex;
    gap: 8px;
    min-width: min(100%, 320px);
}

.pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.pager a,
.pager span {
    min-width: 44px;
    height: 44px;
    padding-inline: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--ink-850);
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}

.pager a:hover {
    border-color: var(--primary);
    color: #fff;
}

.pager .current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pager .disabled {
    opacity: 0.4;
}

/* ---------- Forms ------------------------------------------------------- */

.form-ink label,
.form-label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.88rem;
    color: var(--text-dim);
    font-weight: 500;
}

.form-ink input[type="text"],
.form-ink input[type="email"],
.form-ink input[type="password"],
.form-ink input[type="tel"],
.form-ink input[type="url"],
.form-ink input[type="number"],
.form-ink input[type="search"],
.form-ink input[type="file"],
.form-ink input[type="color"],
.form-ink select,
.form-ink textarea,
.input-ink {
    width: 100%;
    padding: 13px 16px;
    background: var(--ink-800);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 0.97rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.form-ink input::placeholder,
.input-ink::placeholder,
.form-ink textarea::placeholder {
    color: #6c7080;
}

.form-ink input:focus,
.form-ink select:focus,
.form-ink textarea:focus,
.input-ink:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--ink-750);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent);
}

.form-ink textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}

.form-ink input[type="color"] {
    height: 50px;
    padding: 6px;
    cursor: pointer;
}

.form-ink select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
    background-position: calc(100% - 20px) center, calc(100% - 14px) center;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-inline-end: 42px;
}

.field {
    margin-bottom: 20px;
}

.field-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 15px;
    background: var(--ink-800);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
}

.check-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.check-row label {
    margin: 0;
    color: var(--text);
    font-size: 0.94rem;
    cursor: pointer;
}

.field-validation-error,
.text-danger,
.validation-summary-errors ul {
    color: #fb7185;
    font-size: 0.86rem;
}

.validation-summary-errors {
    padding: 14px 16px;
    margin-bottom: 20px;
    background: rgba(251, 113, 133, 0.1);
    border: 1px solid rgba(251, 113, 133, 0.35);
    border-radius: var(--radius-sm);
}

.validation-summary-errors ul {
    margin: 0;
    padding-inline-start: 20px;
}

.validation-summary-valid {
    display: none;
}

.input-validation-error {
    border-color: #fb7185 !important;
}

/* ---------- Auth pages -------------------------------------------------- */

.auth-shell {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: calc(100vh - var(--header-h));
}

.auth-aside {
    position: relative;
    padding: clamp(40px, 6vw, 80px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        radial-gradient(600px 400px at 20% 20%, color-mix(in srgb, var(--primary) 30%, transparent), transparent 70%),
        linear-gradient(160deg, var(--ink-900), var(--ink-950));
    border-inline-end: 1px solid var(--line);
    overflow: hidden;
}

.auth-aside ul {
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
    display: grid;
    gap: 14px;
}

.auth-aside li {
    display: flex;
    gap: 12px;
    color: var(--text-dim);
}

.auth-aside li i {
    color: var(--accent);
    margin-top: 3px;
}

.auth-main {
    display: grid;
    place-items: center;
    padding: clamp(32px, 5vw, 64px) 20px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
}

.auth-card h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    margin: 0 0 8px;
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin-top: 22px;
    font-size: 0.92rem;
}

.captcha-block {
    margin-bottom: 18px;
    min-height: 78px;
}

.captcha-note {
    padding: 12px 14px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
}

.panel {
    padding: clamp(22px, 4vw, 34px);
    background: linear-gradient(180deg, var(--ink-850), var(--ink-900));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* ---------- Article / detail pages ------------------------------------- */

.page-head {
    padding: clamp(40px, 7vw, 78px) 0 clamp(26px, 4vw, 44px);
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 10%, transparent), transparent);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.breadcrumbs a {
    color: var(--text-muted);
}

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

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
}

.article-cover {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    margin-bottom: 30px;
    aspect-ratio: 16 / 9;
    background: var(--ink-800);
}

.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prose {
    font-size: 1.05rem;
    color: var(--text-dim);
}

.prose h2,
.prose h3 {
    margin: 34px 0 14px;
}

.prose p {
    margin: 0 0 18px;
}

.prose ul,
.prose ol {
    margin: 0 0 18px;
    padding-inline-start: 24px;
}

.prose li {
    margin-bottom: 8px;
}

.prose a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.prose img {
    border-radius: var(--radius);
    margin: 18px 0;
}

.prose blockquote {
    margin: 24px 0;
    padding: 18px 22px;
    border-inline-start: 3px solid var(--primary);
    background: var(--ink-850);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text);
}

.sidebar-card {
    padding: 22px;
    background: var(--ink-850);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 22px;
}

.sidebar-card h4 {
    margin: 0 0 16px;
    font-size: 1.02rem;
}

.mini-list {
    display: grid;
    gap: 14px;
}

.mini-item {
    display: flex;
    gap: 12px;
    align-items: center;
}

.mini-thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--ink-800);
    flex-shrink: 0;
}

.mini-item strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.35;
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    background: #000;
}

.video-frame iframe,
.video-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.locked-frame {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 30px;
    background: linear-gradient(160deg, var(--ink-850), var(--ink-950));
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 26px;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

/* ---------- Alerts ------------------------------------------------------ */

.alert-ink {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--ink-850);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-success {
    border-color: rgba(52, 211, 153, 0.4);
    background: rgba(52, 211, 153, 0.1);
    color: #a7f3d0;
}

.alert-danger {
    border-color: rgba(251, 113, 133, 0.4);
    background: rgba(251, 113, 133, 0.1);
    color: #fecdd3;
}

.alert-info {
    border-color: rgba(96, 165, 250, 0.4);
    background: rgba(96, 165, 250, 0.1);
    color: #bfdbfe;
}

.empty-state {
    padding: clamp(40px, 8vw, 80px) 24px;
    text-align: center;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2.6rem;
    opacity: 0.4;
    display: block;
    margin-bottom: 14px;
}

/* ---------- Footer ------------------------------------------------------ */

.site-footer {
    margin-top: 40px;
    padding-top: clamp(48px, 7vw, 84px);
    background: linear-gradient(180deg, transparent, var(--ink-900));
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
    gap: 40px;
    padding-bottom: 46px;
}

.footer-col h4 {
    font-size: 0.92rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin: 0 0 18px;
    color: #fff;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 11px;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.94rem;
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-contact li {
    display: flex;
    gap: 11px;
    color: var(--text-muted);
    font-size: 0.94rem;
}

.footer-contact i {
    color: var(--primary);
    margin-top: 3px;
}

.social-row {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.social-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    color: var(--text-dim);
    font-size: 1.05rem;
}

.social-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 22px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.footer-bottom-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.to-top {
    position: fixed;
    inset-block-end: 26px;
    inset-inline-end: 26px;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--ink-850) 92%, transparent);
    backdrop-filter: blur(8px);
    color: var(--text);
    display: grid;
    place-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    z-index: 1040;
    cursor: pointer;
}

.to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ---------- Reveal on scroll ------------------------------------------- */

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

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

@media (max-width: 1100px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 34px;
    }

    .article-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .nav-main,
    .header-cta-desktop {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
        margin-inline-start: auto;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-aside {
        display: none;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 15px;
    }

    .hero {
        min-height: 78vh;
    }

    .hero-inner {
        padding: 72px 0 64px;
    }

    .hero-cta .btn-ink,
    .hero-cta .btn-ghost {
        width: 100%;
    }

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

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .section {
        padding: 48px 0;
    }

    .course-item {
        flex-direction: column;
        gap: 10px;
    }
}
