/* ==========================================================================
   P&M-Studios: design system
   Dark neutral theme, flat surfaces with thin borders, solid buttons and custom
   form controls (dropdowns are built in assets/js/main.js). The brand colours
   are used sparingly: buttons, focus rings, active states and the hero title.
   Tailwind (assets/css/tailwind.css) handles layout and spacing.

   Colour variables are "r g b" triples filled from config 'theme' in
   includes/header.php and used as rgb(var(--name) / alpha).
   ========================================================================== */

/* Fonts are stored locally (SIL Open Font License, see assets/fonts) */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/inter-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/inter-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }

:root {
    /* Fallbacks, overwritten by the values from the config */
    --primary: 139 92 246;
    --primary-dark: 124 58 237;
    --secondary: 217 70 239;
    --bg: 18 18 18;
    --bg-dark: 10 10 10;

    /* Surfaces and lines: white at low opacity, so they follow the background colour */
    --surface: rgb(255 255 255 / .025);
    --surface-2: rgb(255 255 255 / .05);
    --surface-3: rgb(255 255 255 / .08);
    --stroke: rgb(255 255 255 / .08);
    --stroke-strong: rgb(255 255 255 / .14);
    --popover: #171717;

    --radius-sm: 8px;
    --radius: 10px;
    --radius-lg: 14px;

    --ring: 0 0 0 3px rgb(var(--primary) / .25);
}

html {
    color-scheme: dark;
}

body {
    background-color: rgb(var(--bg));
}

[hidden] {
    display: none !important;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.glass-nav {
    background: rgb(var(--bg) / .72);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--stroke);
    transition: background-color .2s ease;
}

.glass-nav.is-scrolled {
    background: rgb(var(--bg-dark) / .88);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    height: 2.25rem;
    padding: 0 .75rem;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 500;
    color: rgb(255 255 255 / .68);
    transition: color .15s ease, background-color .15s ease;
}

.nav-link:hover,
.nav-dropdown:hover > .nav-link,
.nav-dropdown:focus-within > .nav-link {
    color: #fff;
    background: var(--surface-2);
}

.nav-link.is-active {
    color: #fff;
}

.nav-dropdown-icon {
    transition: transform .2s ease;
}

.nav-dropdown:hover .nav-dropdown-icon,
.nav-dropdown:focus-within .nav-dropdown-icon {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + .5rem);
    left: 50%;
    min-width: 290px;
    padding: .375rem;
    border-radius: 12px;
    border: 1px solid var(--stroke-strong);
    background: var(--popover);
    box-shadow: 0 16px 40px rgb(0 0 0 / .5);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 4px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
}

/* Invisible bridge, so the menu stays open while the mouse crosses the gap */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    inset: -.7rem 0 auto;
    height: .7rem;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem .625rem;
    border-radius: var(--radius-sm);
    transition: background-color .12s ease;
}

.nav-dropdown-item:hover,
.nav-dropdown-item:focus-visible {
    background: var(--surface-2);
}

.nav-dropdown-item-icon {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-sm);
    color: rgb(var(--brand-300));
    background: var(--surface-2);
    border: 1px solid var(--stroke);
}

/* Language switch: a small segmented control */
.lang-switch {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: var(--radius);
    background: var(--surface-2);
    border: 1px solid var(--stroke);
}

.lang-switch a {
    display: block;
    padding: .25rem .55rem;
    border-radius: 7px;
    font-size: .75rem;
    font-weight: 600;
    color: rgb(255 255 255 / .55);
    transition: color .15s ease, background-color .15s ease;
}

.lang-switch a:hover {
    color: #fff;
}

.lang-switch a.is-active {
    color: #fff;
    background: var(--surface-3);
    box-shadow: 0 1px 2px rgb(0 0 0 / .35);
}

/* Flags: inactive ones are dimmed */
.lang-switch .flag {
    display: block;
    width: 20px;
    height: 14px;
    overflow: hidden;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgb(255 255 255 / .15);
    opacity: .45;
    filter: saturate(.5);
    transition: opacity .15s ease, filter .15s ease;
}

.lang-switch .flag svg {
    display: block;
    width: 100%;
    height: 100%;
}

.lang-switch a:hover .flag,
.lang-switch a.is-active .flag {
    opacity: 1;
    filter: none;
}

.lang-switch a:has(.flag) {
    padding: .3rem .5rem;
}

/* --------------------------------------------------------------------------
   Sections and backgrounds
   -------------------------------------------------------------------------- */
.section-hero {
    background:
        radial-gradient(ellipse 60% 50% at 25% 20%, rgb(var(--primary) / .10) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 80% 80%, rgb(var(--secondary) / .06) 0%, transparent 70%);
}

.section-dark {
    background: rgb(var(--bg-dark) / .6);
    border-top: 1px solid var(--stroke);
    border-bottom: 1px solid var(--stroke);
}

.section-color {
    overflow: hidden;
    background: radial-gradient(ellipse 60% 70% at 50% 0%, rgb(var(--primary) / .10) 0%, transparent 70%);
    border-top: 1px solid var(--stroke);
}

.section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.025em;
    color: #fff;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.gradient-text {
    background: linear-gradient(90deg, rgb(var(--brand-300)), rgb(var(--accent-400)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-title {
    width: fit-content;
    font-size: clamp(2.75rem, 7vw, 4.75rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.035em;
    padding-bottom: .1em;
}

.logo-glow {
    filter: drop-shadow(0 0 36px rgb(var(--primary) / .28));
}

.logo-glow-soft {
    box-shadow: 0 24px 60px -24px rgb(0 0 0 / .6);
}

/* --------------------------------------------------------------------------
   Buttons
   Solid primary, neutral secondary, quiet ghost and a red danger variant.
   btn-sm and btn-lg change the size. Buttons never move on hover.
   -------------------------------------------------------------------------- */
.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    height: 2.5rem;
    padding: 0 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: .875rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.btn-primary {
    color: #fff;
    background: rgb(var(--primary));
    border-color: rgb(255 255 255 / .12);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .16), 0 1px 2px rgb(0 0 0 / .35);
}

.btn-primary:hover {
    background: rgb(var(--brand-400));
}

.btn-primary:active {
    background: rgb(var(--primary-dark));
}

.btn-secondary {
    color: #fafafa;
    background: var(--surface-2);
    border-color: var(--stroke-strong);
}

.btn-secondary:hover {
    background: var(--surface-3);
    border-color: rgb(255 255 255 / .2);
}

.btn-ghost {
    height: 2.25rem;
    padding: 0 .75rem;
    color: rgb(255 255 255 / .78);
    background: transparent;
    border-color: var(--stroke);
}

.btn-ghost:hover {
    color: #fff;
    background: var(--surface-2);
    border-color: var(--stroke-strong);
}

.btn-danger {
    color: #fecaca;
    background: rgb(239 68 68 / .1);
    border-color: rgb(239 68 68 / .35);
}

.btn-danger:hover {
    background: rgb(239 68 68 / .18);
}

.btn-sm {
    height: 2.125rem;
    padding: 0 .75rem;
    font-size: .8125rem;
    border-radius: 9px;
}

.btn-lg {
    height: 2.875rem;
    padding: 0 1.25rem;
    font-size: .9375rem;
}

:is(.btn-primary, .btn-secondary, .btn-ghost, .btn-danger):disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* Square button with only an icon (Discord, menu, editor actions). Size and layout come from the markup. */
.icon-btn {
    border: 1px solid var(--stroke);
    border-radius: var(--radius-sm);
    color: rgb(255 255 255 / .6);
    background: transparent;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.icon-btn:hover {
    color: #fff;
    background: var(--surface-2);
    border-color: var(--stroke-strong);
}

/* Remove button of an editor entry after the first click: asks to click again */
.icon-btn.is-armed {
    width: auto;
    padding: 0 .625rem;
    font-size: .75rem;
    font-weight: 600;
    color: #fecaca;
    background: rgb(239 68 68 / .14);
    border-color: rgb(239 68 68 / .5);
}

/* Tabs (administration) */
.tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 3px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--stroke);
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    height: 2.125rem;
    padding: 0 .875rem;
    border-radius: 9px;
    font-size: .875rem;
    font-weight: 500;
    color: rgb(255 255 255 / .6);
    transition: color .15s ease, background-color .15s ease;
}

.tab:hover {
    color: #fff;
}

.tab.is-active {
    color: #fff;
    background: var(--surface-3);
    box-shadow: 0 1px 2px rgb(0 0 0 / .35);
}

.tab-count {
    min-width: 1.25rem;
    padding: 0 .375rem;
    border-radius: 6px;
    font-size: .7rem;
    font-weight: 600;
    line-height: 1.25rem;
    text-align: center;
    color: rgb(var(--brand-200));
    background: rgb(var(--primary) / .2);
}

/* --------------------------------------------------------------------------
   Badges and chips
   -------------------------------------------------------------------------- */
.pill {
    display: inline-flex;
    align-items: center;
    height: 1.375rem;
    padding: 0 .5rem;
    border-radius: 6px;
    font-size: .7rem;
    font-weight: 600;
    border: 1px solid var(--stroke);
}

.pill-brand  { color: rgb(var(--brand-200)); background: rgb(var(--primary) / .12); border-color: rgb(var(--primary) / .28); }
.pill-accent { color: rgb(var(--accent-300)); background: rgb(var(--secondary) / .1); border-color: rgb(var(--secondary) / .28); }

/* "Requires" line (compatibility) */
.req-label {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-right: .15rem;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgb(255 255 255 / .45);
}

.req-chip {
    display: inline-flex;
    align-items: center;
    padding: .125rem .45rem;
    border-radius: 6px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: .7rem;
    color: rgb(255 255 255 / .75);
    background: var(--surface-2);
    border: 1px solid var(--stroke);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--stroke);
    background: var(--surface);
    transition: border-color .2s ease, background-color .2s ease;
}

.card-hover:hover {
    border-color: var(--stroke-strong);
    background: rgb(255 255 255 / .04);
}

.icon-tile {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius);
    color: rgb(var(--brand-300));
    background: rgb(var(--primary) / .1);
    border: 1px solid rgb(var(--primary) / .2);
}

/* Product card: --accent is set per product */
.pcard {
    --accent: rgb(var(--primary));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--stroke);
    background: var(--surface);
    transition: border-color .2s ease, background-color .2s ease;
}

.pcard:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
    background: rgb(255 255 255 / .035);
}

.pcard-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
    overflow: hidden;
    background: var(--surface);
    border-bottom: 1px solid var(--stroke);
}

.pcard-banner::before,
.product-hero::before {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: var(--accent);
    opacity: .1;
    filter: blur(60px);
    transition: opacity .3s ease;
}

.pcard:hover .pcard-banner::before {
    opacity: .16;
}

.pcard-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 92%, #fff), color-mix(in srgb, var(--accent) 70%, #000));
    box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--accent) 50%, transparent), inset 0 1px 0 rgb(255 255 255 / .25);
}

.product-hero {
    --accent: rgb(var(--primary));
    isolation: isolate;
}

.product-hero::before {
    top: -80px;
    left: 5%;
    width: 420px;
    height: 420px;
    opacity: .1;
    filter: blur(90px);
    z-index: -1;
}

/* Decorative code window in "About" */
.code-window {
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--stroke);
    background: rgb(var(--bg-dark) / .85);
}

/* Ticket conversation */
.message {
    border-radius: 12px;
    border: 1px solid var(--stroke);
    background: var(--surface);
    padding: 1rem 1.25rem;
}

.message-staff {
    border-color: rgb(var(--primary) / .3);
    background: rgb(var(--primary) / .06);
}

/* Tables (administration) */
.data-table {
    width: 100%;
    font-size: .875rem;
    text-align: left;
}

.data-table th {
    padding: .5rem .75rem;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: rgb(255 255 255 / .4);
}

.data-table td {
    padding: .75rem;
    border-top: 1px solid var(--stroke);
    vertical-align: middle;
}

.data-table tr:hover td {
    background: rgb(255 255 255 / .02);
}

/* --------------------------------------------------------------------------
   Pixel icons stay sharp at whole multiples of 16 px
   -------------------------------------------------------------------------- */
.icon {
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
}

.icon-pixel {
    width: 16px;
    height: 16px;
}

.icon-xs.icon-pixel {
    width: 16px;
    height: 16px;
    margin-left: -.15rem;
}

.icon-tile .icon-pixel {
    width: 32px;
    height: 32px;
}

.pcard-icon .icon-pixel {
    width: 48px;
    height: 48px;
}

/* --------------------------------------------------------------------------
   Form controls
   Text fields, custom dropdowns (main.js), checkboxes, switches, file and
   colour pickers. All share height, radius, border and focus ring.
   -------------------------------------------------------------------------- */
.field-label {
    display: block;
    font-size: .8125rem;
    font-weight: 500;
    color: rgb(255 255 255 / .72);
}

.field {
    display: block;
    width: 100%;
    min-height: 2.5rem;
    margin-top: .375rem;
    padding: .5rem .75rem;
    border: 1px solid var(--stroke-strong);
    border-radius: var(--radius);
    background: rgb(255 255 255 / .03);
    color: #fafafa;
    font-size: .875rem;
    font-weight: 400;
    line-height: 1.5;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.field::placeholder {
    color: rgb(255 255 255 / .32);
}

.field:hover {
    border-color: rgb(255 255 255 / .22);
}

.field:focus,
.field:focus-visible,
.select.is-open > .select-trigger {
    outline: none;
    border-color: rgb(var(--primary));
    box-shadow: var(--ring);
    background: rgb(255 255 255 / .045);
}

.field:disabled {
    opacity: .5;
    cursor: not-allowed;
}

textarea.field {
    min-height: 5.5rem;
    resize: vertical;
}

.field::-webkit-calendar-picker-indicator {
    opacity: .55;
    filter: invert(1);
    cursor: pointer;
}

.field-hint {
    display: block;
    margin-top: .375rem;
    font-size: .75rem;
    font-weight: 400;
    color: rgb(255 255 255 / .4);
}

/* Native select as fallback without JavaScript */
select.field {
    appearance: none;
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .65rem center;
    background-size: 16px;
    cursor: pointer;
}

select.field option {
    background: var(--popover);
}

/* Custom dropdown (built from a <select> in main.js; the <select> stays hidden in the form) */
.select {
    position: relative;
}

.select-native {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

.select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    text-align: left;
    cursor: pointer;
}

.select-trigger:disabled {
    cursor: not-allowed;
}

.select-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select-chevron {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: rgb(255 255 255 / .45);
    transition: transform .15s ease;
}

.select.is-open .select-chevron {
    transform: rotate(180deg);
}

/* Variant without a field frame, for selects that sit inside another box (product sorting) */
.select-trigger-inline {
    height: 2.5rem;
    padding: 0;
    border: 0;
    background: none;
    font-weight: 600;
    color: #fff;
}

.select-trigger-inline:focus-visible {
    outline-offset: 4px;
}

.select-menu {
    position: fixed;
    z-index: 70;
    max-width: calc(100vw - 16px);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--stroke-strong);
    background: var(--popover);
    box-shadow: 0 16px 40px rgb(0 0 0 / .55);
    animation: menuIn .12s ease-out;
}

@keyframes menuIn {
    from { opacity: 0; transform: translateY(-4px); }
}

.select-search {
    display: block;
    width: 100%;
    height: 2.125rem;
    margin-bottom: 4px;
    padding: 0 .625rem;
    border: 1px solid var(--stroke);
    border-radius: var(--radius-sm);
    background: rgb(255 255 255 / .03);
    color: #fff;
    font-size: .8125rem;
}

.select-search::placeholder {
    color: rgb(255 255 255 / .35);
}

.select-search:focus {
    outline: none;
    border-color: rgb(var(--primary) / .7);
}

.select-options {
    max-height: 280px;
    overflow-y: auto;
    outline: none;
}

.select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .45rem .625rem;
    border-radius: 7px;
    font-size: .875rem;
    color: rgb(255 255 255 / .78);
    cursor: pointer;
    user-select: none;
}

.select-option.is-active {
    color: #fff;
    background: var(--surface-3);
}

.select-option[aria-selected="true"] {
    color: #fff;
    font-weight: 500;
}

.select-option[aria-disabled="true"] {
    opacity: .4;
    cursor: default;
}

.select-check {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: rgb(var(--brand-300));
    visibility: hidden;
}

.select-option[aria-selected="true"] .select-check {
    visibility: visible;
}

.select-empty {
    padding: .5rem .625rem;
    font-size: .8125rem;
    color: rgb(255 255 255 / .4);
}

/* Checkboxes (low specificity, so utility classes such as "hidden" still win) */
:where(input[type="checkbox"]:not(.switch)) {
    appearance: none;
    -webkit-appearance: none;
    display: inline-grid;
    place-content: center;
    width: 1.125rem;
    height: 1.125rem;
    margin: 0;
    flex-shrink: 0;
    border: 1px solid rgb(255 255 255 / .28);
    border-radius: 5px;
    background: rgb(255 255 255 / .03);
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

:where(input[type="checkbox"]:not(.switch))::after {
    content: '';
    width: .7rem;
    height: .7rem;
    background: #fff;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
    transform: scale(0);
    transition: transform .12s ease;
}

:where(input[type="checkbox"]:not(.switch)):hover {
    border-color: rgb(255 255 255 / .45);
}

:where(input[type="checkbox"]:not(.switch)):checked {
    background: rgb(var(--primary));
    border-color: rgb(var(--primary));
}

:where(input[type="checkbox"]:not(.switch)):checked::after {
    transform: scale(1);
}

:where(input[type="checkbox"]):disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* On/off switch (editor) */
.switch {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 2.25rem;
    height: 1.25rem;
    margin: 0;
    flex-shrink: 0;
    border-radius: 999px;
    background: rgb(255 255 255 / .14);
    cursor: pointer;
    transition: background-color .15s ease;
}

.switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgb(0 0 0 / .4);
    transition: transform .15s ease;
}

.switch:checked {
    background: rgb(var(--primary));
}

.switch:checked::after {
    transform: translateX(1rem);
}

/* File picker */
.file-input {
    display: block;
    width: 100%;
    font-size: .8125rem;
    color: rgb(255 255 255 / .5);
}

.file-input::file-selector-button {
    height: 2rem;
    margin-right: .75rem;
    padding: 0 .75rem;
    border: 1px solid var(--stroke-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: #fff;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .15s ease;
}

.file-input::file-selector-button:hover {
    background: var(--surface-3);
}

/* Colour picker: a swatch in a field frame */
.color-input {
    appearance: none;
    -webkit-appearance: none;
    width: 2.5rem;
    height: 2.5rem;
    padding: 3px;
    border: 1px solid var(--stroke-strong);
    border-radius: var(--radius);
    background: rgb(255 255 255 / .03);
    cursor: pointer;
}

.color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input::-webkit-color-swatch {
    border: 0;
    border-radius: 6px;
}

.color-input::-moz-color-swatch {
    border: 0;
    border-radius: 6px;
}

/* --------------------------------------------------------------------------
   Product filter (classes are also switched by main.js in the static version)
   -------------------------------------------------------------------------- */
.filter-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .45rem .625rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: rgb(255 255 255 / .6);
    transition: background-color .15s ease, color .15s ease;
}

.filter-cat:hover {
    color: #fff;
    background: var(--surface-2);
}

.filter-cat.is-active {
    color: #fff;
    background: var(--surface-3);
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    height: 1.75rem;
    padding: 0 .625rem;
    border-radius: 7px;
    font-size: .75rem;
    font-weight: 500;
    color: rgb(255 255 255 / .6);
    border: 1px solid var(--stroke);
    transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.filter-pill:hover {
    color: #fff;
    border-color: var(--stroke-strong);
}

.filter-pill.is-active {
    color: #fff;
    background: rgb(var(--primary) / .18);
    border-color: rgb(var(--primary) / .45);
}

/* --------------------------------------------------------------------------
   Legal texts
   -------------------------------------------------------------------------- */
.legal h2 {
    margin-top: 2rem;
    margin-bottom: .75rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
}

.legal h2:first-child {
    margin-top: 0;
}

.legal p,
.legal ul {
    margin-bottom: 1rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, .65);
}

.legal ul {
    padding-left: 1.25rem;
    list-style: disc;
}

.legal strong {
    color: rgba(255, 255, 255, .85);
}

.legal code {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: .9em;
}

.legal a {
    color: rgb(var(--brand-300));
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Scrollbar and accessibility
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgb(var(--bg-dark));
}

::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 999px;
    border: 2px solid rgb(var(--bg-dark));
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3a3a;
}

:focus-visible {
    outline: 2px solid rgb(var(--primary));
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Motion
   Switched on in config.php ('animations'). Visitors who ask their system
   for reduced motion get none of it.
   -------------------------------------------------------------------------- */
html[data-animations="on"] {
    scroll-behavior: smooth;
}

html[data-animations="on"] .hero-title,
html[data-animations="on"] .hero-fade {
    animation: slideInUp .7s cubic-bezier(.2, .7, .2, 1) both;
}

html[data-animations="on"] .hero-logo {
    animation: fadeIn 1s ease .2s both;
}

html[data-animations="on"] .page-intro > * {
    animation: slideInUp .5s cubic-bezier(.2, .7, .2, 1) both;
}

html[data-animations="on"] .page-intro > :nth-child(2) { animation-delay: .08s; }
html[data-animations="on"] .page-intro > :nth-child(n+3) { animation-delay: .16s; }

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
}

.brand-logo {
    transition: opacity .2s ease;
}

.brand:hover .brand-logo {
    opacity: .85;
}

/* Mobile menu slides in */
html[data-animations="on"] #mobile-menu:not([hidden]) {
    animation: slideDown .22s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
}

/* Content further down fades in once when it comes into view (set up in main.js) */
html[data-animations="on"] .reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .5s ease, transform .5s cubic-bezier(.2, .7, .2, 1);
}

html[data-animations="on"] .reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Video editing request (cutting.php): step navigation */
.cutting-steps {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.cutting-step {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    height: 2.5rem;
    padding: 0 .875rem 0 .5rem;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: var(--surface);
    color: rgb(163 163 163);
    font-size: .875rem;
    font-weight: 600;
    transition: border-color .2s ease, color .2s ease;
}

.cutting-step:hover {
    border-color: var(--stroke-strong);
    color: #fff;
}

.cutting-step-number {
    display: grid;
    place-items: center;
    width: 1.625rem;
    height: 1.625rem;
    border-radius: 999px;
    background: var(--surface-2);
    font-size: .75rem;
}

.cutting-step.is-active {
    border-color: rgb(var(--primary) / .6);
    color: #fff;
}

.cutting-step.is-active .cutting-step-number,
.cutting-step.is-done .cutting-step-number {
    background: rgb(var(--primary));
    color: #fff;
}

[data-step][hidden] {
    display: none;
}

/* Price settings (admin/prices.php): answer, euro field, "on request" */
.price-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 7.5rem auto;
    align-items: center;
    gap: .75rem;
    padding: .375rem 0;
    border-top: 1px solid var(--stroke);
}

.price-row:first-child {
    border-top: 0;
}

.price-input {
    position: relative;
    display: block;
    max-width: 9rem;
}

.price-input .field {
    padding-right: 2rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.price-input > span {
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgb(163 163 163);
    font-size: .875rem;
    pointer-events: none;
}

.price-input .field:disabled {
    opacity: .35;
}

.price-ask {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    font-size: .75rem;
    color: rgb(163 163 163);
    white-space: nowrap;
    cursor: pointer;
}

.prices-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .prices-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.discount-row {
    display: grid;
    grid-template-columns: 1.5rem 4.5rem auto 4.5rem auto;
    justify-content: start;
    align-items: center;
    gap: .5rem;
    font-size: .875rem;
    color: rgb(163 163 163);
}

@media (max-width: 520px) {
    .price-row {
        grid-template-columns: minmax(0, 1fr) 6.5rem;
    }

    .price-ask {
        grid-column: 2;
    }
}

/* Cookie notice (includes/footer.php): small bar at the bottom, only until it is confirmed */
.cookie-notice {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 44rem;
    margin: 0 auto;
    padding: .875rem 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--stroke-strong);
    background: rgb(var(--bg-dark) / .96);
    box-shadow: 0 12px 40px rgb(0 0 0 / .45);
    backdrop-filter: blur(8px);
}

.cookie-notice[hidden] {
    display: none;
}

@media (max-width: 520px) {
    .cookie-notice {
        flex-direction: column;
        align-items: stretch;
    }
}

html:not([data-animations="on"]) *,
html:not([data-animations="on"]) *::before,
html:not([data-animations="on"]) *::after {
    transition: none !important;
    animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }

    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
