/* Reusable UI components: buttons, cards, badges, icons */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.75rem 1.35rem;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1;
    letter-spacing: 0.005em;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform var(--dur-fast) var(--ease-out),
                background var(--dur-mid) var(--ease-out),
                border-color var(--dur-mid) var(--ease-out),
                box-shadow var(--dur-mid) var(--ease-out),
                color var(--dur-mid) var(--ease-out);
    user-select: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--dur-mid) var(--ease-out);
}

.btn:hover { transform: translateY(-1px); }
.btn:hover::after { opacity: 1; }
.btn:active { transform: translateY(0); }

.btn--primary {
    background: var(--grad-gold);
    color: var(--bg-deep);
    box-shadow: var(--shadow-gold), var(--shadow-inset);
}
.btn--primary:hover {
    color: var(--bg-deep);
    box-shadow: 0 12px 40px rgba(244, 181, 74, 0.4), 0 4px 12px rgba(244, 181, 74, 0.25), var(--shadow-inset);
}

.btn--ghost {
    background: var(--surface-1);
    color: var(--text-primary);
    border-color: var(--border-mid);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.btn--ghost:hover {
    background: var(--surface-3);
    border-color: var(--border-strong);
}

.btn--outline {
    background: transparent;
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}
.btn--outline:hover {
    background: var(--accent-gold-faint);
    color: var(--accent-gold-bright);
    border-color: var(--accent-gold-bright);
}

.btn--lg {
    padding: 1rem 1.85rem;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
}

.btn--sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
}

.btn--icon-end svg { transition: transform var(--dur-mid) var(--ease-out); }
.btn--icon-end:hover svg { transform: translateX(3px); }

/* Cards */
.card {
    position: relative;
    background: var(--grad-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md), var(--shadow-inset);
    transition: transform var(--dur-mid) var(--ease-out),
                border-color var(--dur-mid) var(--ease-out),
                box-shadow var(--dur-mid) var(--ease-out);
    overflow: hidden;
}

.card--hover:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-lg), var(--shadow-inset);
}

.card--feature {
    padding: var(--space-7);
}

.card__eyebrow {
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: var(--space-3);
}

.card__title {
    font-family: var(--font-display);
    font-size: var(--fs-xl);
    font-weight: 700;
    margin-bottom: var(--space-3);
    letter-spacing: -0.015em;
    color: var(--text-primary);
}

.card__desc {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-4);
}

.card__footer {
    margin-top: var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    justify-content: space-between;
}

/* Glow accent for featured cards */
.card--glow::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(244, 181, 74, 0.35), transparent 40%, transparent 60%, rgba(244, 181, 74, 0.18) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    color: var(--text-secondary);
}

.badge--gold {
    background: var(--accent-gold-faint);
    border-color: rgba(244, 181, 74, 0.25);
    color: var(--accent-gold-bright);
}

.badge--green {
    background: rgba(74, 222, 128, 0.10);
    border-color: rgba(74, 222, 128, 0.30);
    color: #6ee7a0;
}

.badge__dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

/* Pill cluster (tags row) */
.pills {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

/* Game portfolio card variant */
.game-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
    overflow: hidden;
    min-height: 360px;
}

@media (min-width: 760px) {
    .game-card { grid-template-columns: 1.1fr 1fr; min-height: 420px; }
}

.game-card__media {
    position: relative;
    background:
        radial-gradient(circle at 30% 40%, rgba(244, 181, 74, 0.22), transparent 60%),
        linear-gradient(135deg, #0a1a2e 0%, #050810 100%);
    min-height: 240px;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.game-card__media::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(244, 181, 74, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(244, 181, 74, 0.06) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(circle at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 75%);
}

.game-card__sigil {
    position: relative;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    letter-spacing: -0.04em;
    background: var(--grad-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 60px rgba(244, 181, 74, 0.3);
}

.game-card__body {
    padding: var(--space-6) var(--space-6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-3);
}

@media (min-width: 760px) {
    .game-card__body { padding: var(--space-7); }
}

/* Logo mark fallback */
.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--grad-gold);
    color: var(--bg-deep);
    font-weight: 800;
    font-family: var(--font-display);
}

/* Reveal animation hooks (used by main.js IntersectionObserver) */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
.reveal[data-delay="4"] { transition-delay: 320ms; }
.reveal[data-delay="5"] { transition-delay: 400ms; }

/* Decorative glow blob (background ornament) */
.glow-blob {
    position: absolute;
    pointer-events: none;
    width: 60vw;
    height: 60vw;
    max-width: 800px;
    max-height: 800px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
    z-index: 0;
}
.glow-blob--gold {
    background: radial-gradient(circle, rgba(244, 181, 74, 0.35), transparent 70%);
}
.glow-blob--top-right {
    top: -25%;
    right: -15%;
}
.glow-blob--bottom-left {
    bottom: -25%;
    left: -15%;
    opacity: 0.3;
}

/* Background lines ornament. Two completely independent SVG patterns: one
   painted only in the LEFT gutter via ::before, the other in the RIGHT
   gutter via ::after. The two patterns have different element counts and
   different vertical rhythms so the two sides never look like clones. */
.bg-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.85;
}
.bg-lines::before,
.bg-lines::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: calc((100vw - 1240px) / 2);
    background-size: 100% auto;
    background-repeat: repeat-y;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 18%, black 82%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, black 18%, black 82%, transparent 100%);
}
/* LEFT gutter pattern: top triangle node, mid 3-dot tight cluster, bottom
   pair-with-line node, bottom 3-dot tight cluster. Mini-clusters replace
   what used to be solo dots so the pattern never reads as a single point. */
.bg-lines::before {
    left: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 1600'><g stroke='rgba(244,181,74,0.9)' stroke-width='1.2' fill='none' stroke-linecap='round'><line x1='60' y1='240' x2='140' y2='320'/><line x1='140' y1='320' x2='80' y2='440'/><line x1='40' y1='1180' x2='130' y2='1280'/></g><g fill='rgba(244,181,74,1)'><circle cx='60' cy='240' r='2.6'/><circle cx='140' cy='320' r='2.6'/><circle cx='80' cy='440' r='2.6'/><circle cx='160' cy='740' r='2.2'/><circle cx='180' cy='760' r='2.2'/><circle cx='170' cy='790' r='2.2'/><circle cx='40' cy='1180' r='2.6'/><circle cx='130' cy='1280' r='2.6'/><circle cx='80' cy='1510' r='2.2'/><circle cx='100' cy='1520' r='2.2'/><circle cx='90' cy='1545' r='2.2'/></g></svg>");
}
/* RIGHT gutter pattern: top 3-dot tight cluster, mid pair-with-line, lower
   triangle of 3 dots with 2 lines, bottom 3-dot tight cluster. Different
   element count, different vertical rhythm, different x positions. */
.bg-lines::after {
    right: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 1600'><g stroke='rgba(244,181,74,0.9)' stroke-width='1.2' fill='none' stroke-linecap='round'><line x1='50' y1='540' x2='160' y2='620'/><line x1='80' y1='980' x2='170' y2='1080'/><line x1='170' y1='1080' x2='110' y2='1220'/></g><g fill='rgba(244,181,74,1)'><circle cx='100' cy='110' r='2.2'/><circle cx='120' cy='130' r='2.2'/><circle cx='110' cy='150' r='2.2'/><circle cx='50' cy='540' r='2.6'/><circle cx='160' cy='620' r='2.6'/><circle cx='80' cy='980' r='2.6'/><circle cx='170' cy='1080' r='2.6'/><circle cx='110' cy='1220' r='2.6'/><circle cx='30' cy='1470' r='2.2'/><circle cx='50' cy='1480' r='2.2'/><circle cx='40' cy='1505' r='2.2'/></g></svg>");
}
/* Mirror swaps which SVG renders in which gutter. So a section using the
   default variant followed by a section using --mirror will show the
   "left" pattern on the right side and vice versa. */
.bg-lines--mirror::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 1600'><g stroke='rgba(244,181,74,0.9)' stroke-width='1.2' fill='none' stroke-linecap='round'><line x1='50' y1='540' x2='160' y2='620'/><line x1='80' y1='980' x2='170' y2='1080'/><line x1='170' y1='1080' x2='110' y2='1220'/></g><g fill='rgba(244,181,74,1)'><circle cx='100' cy='110' r='2.2'/><circle cx='120' cy='130' r='2.2'/><circle cx='110' cy='150' r='2.2'/><circle cx='50' cy='540' r='2.6'/><circle cx='160' cy='620' r='2.6'/><circle cx='80' cy='980' r='2.6'/><circle cx='170' cy='1080' r='2.6'/><circle cx='110' cy='1220' r='2.6'/><circle cx='30' cy='1470' r='2.2'/><circle cx='50' cy='1480' r='2.2'/><circle cx='40' cy='1505' r='2.2'/></g></svg>");
}
.bg-lines--mirror::after {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 1600'><g stroke='rgba(244,181,74,0.9)' stroke-width='1.2' fill='none' stroke-linecap='round'><line x1='60' y1='240' x2='140' y2='320'/><line x1='140' y1='320' x2='80' y2='440'/><line x1='40' y1='1180' x2='130' y2='1280'/></g><g fill='rgba(244,181,74,1)'><circle cx='60' cy='240' r='2.6'/><circle cx='140' cy='320' r='2.6'/><circle cx='80' cy='440' r='2.6'/><circle cx='160' cy='740' r='2.2'/><circle cx='180' cy='760' r='2.2'/><circle cx='170' cy='790' r='2.2'/><circle cx='40' cy='1180' r='2.6'/><circle cx='130' cy='1280' r='2.6'/><circle cx='80' cy='1510' r='2.2'/><circle cx='100' cy='1520' r='2.2'/><circle cx='90' cy='1545' r='2.2'/></g></svg>");
}
/* Shift moves the visible vertical band of both patterns so consecutive
   sections don't show the same y region of the constellation. */
.bg-lines--shift::before,
.bg-lines--shift::after {
    background-position-y: -700px;
}
.bg-lines--shift-2::before,
.bg-lines--shift-2::after {
    background-position-y: -1100px;
}
.bg-lines--dense {
    opacity: 1;
}
.bg-lines--soft {
    opacity: 0.55;
}
/* When placed in a hero that already has its own veil/grid stacking,
   bump z-index above those layers so lines remain visible. */
.bg-lines--over {
    z-index: 2;
}

/* On narrow viewports there are no side gutters wide enough to decorate.
   Hide bg-lines so the pattern does not collide with content. */
@media (max-width: 1400px) {
    .bg-lines { display: none; }
}

/* Content layer above background ornaments */
.section > .container { position: relative; z-index: 1; }

/* Arrow icon inline */
.icon-arrow {
    width: 1em;
    height: 1em;
    display: inline-block;
    flex-shrink: 0;
}

/* ---------------------------------------------------------------
   .media-frame - cinematic glass treatment for any image / video.
   Layers, from bottom to top:
     1. The media itself (<img>, <video>, or background-image)
     2. ::before - inner highlights (top-left whitish glass shine,
        bottom-right golden warmth) for that "behind fine glass" feel
     3. .media-frame__shine - faint diagonal sheen
     4. ::after - thin gold border with subtle outer glow

   Subtle by design. Should read as "a frame, not a filter".
   --------------------------------------------------------------- */

.media-frame {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-lg);
    isolation: isolate;
    background: var(--bg-deep);
    box-shadow:
        0 30px 80px -20px rgba(0, 0, 0, 0.6),
        0 12px 32px -12px rgba(0, 0, 0, 0.5),
        0 1px 0 rgba(255, 255, 255, 0.04) inset;
    transition:
        transform var(--dur-slow) var(--ease-out),
        box-shadow var(--dur-slow) var(--ease-out);
}

.media-frame > img,
.media-frame > video,
.media-frame > picture > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 0;
}

/* Variant for transparent PNGs where you want the placeholder pattern
   visible behind. Use `media-frame--showcase` and `object-fit: contain`. */
.media-frame--showcase > img {
    object-fit: contain;
    padding: clamp(1rem, 3vw, 2rem);
}

/* Trailer player injected by trailer.js after the visitor clicks play. */
.trailer__embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: inherit;
    z-index: 3;
}

/* Layer 1: glass highlights + warm gold drift.
   Top-left: cool white shine (the "looking through fine glass" cue).
   Bottom-right: very faint warm gold tint (the "auriu fin"). */
.media-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background:
        radial-gradient(ellipse 60% 50% at 12% 8%,
            rgba(255, 255, 255, 0.14) 0%,
            rgba(255, 255, 255, 0.06) 25%,
            transparent 55%),
        radial-gradient(ellipse 70% 55% at 88% 92%,
            rgba(244, 181, 74, 0.10) 0%,
            rgba(244, 181, 74, 0.03) 30%,
            transparent 60%),
        linear-gradient(160deg,
            rgba(255, 255, 255, 0.025) 0%,
            transparent 35%,
            transparent 65%,
            rgba(0, 0, 0, 0.18) 100%);
    mix-blend-mode: screen;
}

/* Layer 3: thin gold border with subtle outer warmth */
.media-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(255, 210, 121, 0.45) 0%,
        rgba(244, 181, 74, 0.18) 20%,
        rgba(255, 255, 255, 0.04) 50%,
        rgba(244, 181, 74, 0.12) 80%,
        rgba(255, 210, 121, 0.35) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
}

/* Layer 2: faint diagonal sheen, sits between highlight and border */
.media-frame__shine {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background: linear-gradient(115deg,
        transparent 30%,
        rgba(255, 255, 255, 0.05) 48%,
        rgba(255, 230, 180, 0.04) 52%,
        transparent 70%);
    opacity: 0.7;
}

/* Optional corner brackets, very fine, cinematic */
.media-frame--bracketed::before,
.media-frame--bracketed::after { z-index: 1; }

.media-frame--bracketed > .media-frame__corners {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}
.media-frame--bracketed > .media-frame__corners::before,
.media-frame--bracketed > .media-frame__corners::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(244, 181, 74, 0.55);
    opacity: 0.9;
}
.media-frame--bracketed > .media-frame__corners::before {
    top: 10px; left: 10px;
    border-right: 0;
    border-bottom: 0;
}
.media-frame--bracketed > .media-frame__corners::after {
    bottom: 10px; right: 10px;
    border-left: 0;
    border-top: 0;
}

/* Hover lift for interactive frames */
.media-frame--hover:hover {
    transform: translateY(-3px);
    box-shadow:
        0 40px 100px -20px rgba(0, 0, 0, 0.7),
        0 16px 40px -12px rgba(244, 181, 74, 0.15),
        0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

/* Aspect ratios */
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--21x9 { aspect-ratio: 21 / 9; }
.media-frame--4x3  { aspect-ratio: 4 / 3; }
.media-frame--1x1  { aspect-ratio: 1 / 1; }
.media-frame--3x4  { aspect-ratio: 3 / 4; }

/* Placeholder content shown until a real image is dropped in */
.media-frame__placeholder {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 30% 30%, rgba(244, 181, 74, 0.18), transparent 60%),
        radial-gradient(circle at 80% 70%, rgba(60, 90, 140, 0.25), transparent 60%),
        linear-gradient(135deg, #0a1626 0%, #050810 100%);
    color: var(--text-faint);
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}
.media-frame__placeholder::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(244, 181, 74, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(244, 181, 74, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
}
.media-frame__placeholder > span {
    position: relative;
    z-index: 1;
    padding: 0.4rem 0.9rem;
    border: 1px solid rgba(244, 181, 74, 0.25);
    border-radius: var(--radius-sm);
    background: rgba(244, 181, 74, 0.06);
    color: var(--accent-gold);
}

/* Variant: hero media, full bleed background image with glass treatment */
.media-frame--bleed {
    border-radius: 0;
    box-shadow: none;
}
.media-frame--bleed::after {
    display: none;
}

/* ===============================================================
   Forms - shared across contact, admin and any future form.
   =============================================================== */

.form-row {
    display: grid;
    gap: var(--space-5);
    grid-template-columns: 1fr;
}
@media (min-width: 640px) {
    .form-row { grid-template-columns: 1fr 1fr; }
}

.form-field {
    display: grid;
    gap: var(--space-2);
    min-width: 0;
}

.form-field label {
    font-size: var(--fs-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-faint);
    font-weight: 600;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color var(--dur-fast) var(--ease-out),
                background var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out);
}

.form-field input[type="date"] {
    color-scheme: dark;
}

.form-field input:hover,
.form-field textarea:hover,
.form-field select:hover {
    border-color: var(--border-mid);
    background: rgba(255, 255, 255, 0.045);
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(244, 181, 74, 0.18);
}

.form-field textarea { resize: vertical; min-height: 140px; }

.form-field.is-invalid input,
.form-field.is-invalid textarea,
.form-field.is-invalid select {
    border-color: var(--color-danger);
}

.form-error {
    font-size: 0.85rem;
    color: var(--color-danger);
    margin-top: var(--space-1);
}

.form-honey {
    position: absolute;
    left: -10000px;
    top: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-top: var(--space-2);
}

.form-hint {
    font-size: 0.85rem;
    max-width: 42ch;
    color: var(--text-muted);
}

.form-banner {
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    margin-bottom: var(--space-4);
}
.form-banner--error {
    background: rgba(244, 115, 115, 0.10);
    border: 1px solid rgba(244, 115, 115, 0.35);
    color: #ffb4b4;
}
.form-banner--success {
    background: rgba(91, 217, 160, 0.10);
    border: 1px solid rgba(91, 217, 160, 0.35);
    color: var(--color-success);
}

/* ===============================================================
   News cards - shared between news listing and any other page
   that wants to embed news teasers (homepage, future widgets).
   =============================================================== */

.news-grid {
    display: grid;
    gap: var(--space-5);
    grid-template-columns: 1fr;
}

@media (min-width: 720px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
}

@media (min-width: 1080px) {
    .news-grid { grid-template-columns: repeat(3, 1fr); }
    .news-card--feature { grid-column: span 2; }
    .news-card--feature .news-card__link { grid-template-columns: 1.1fr 1fr; }
    .news-card--feature .news-card__media { aspect-ratio: 16 / 10; }
}

.news-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.news-card__link {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    height: 100%;
    color: inherit;
    text-decoration: none;
    transition: color var(--dur-mid) var(--ease-out);
}
.news-card__link:hover { color: var(--text-primary); }

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

.news-card__body {
    display: grid;
    align-content: start;
    gap: var(--space-2);
    padding-block: var(--space-1) var(--space-2);
}

.news-card__date {
    font-size: var(--fs-xs);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-faint);
    font-weight: 600;
}

.news-card__title {
    font-family: var(--font-display);
    font-size: var(--fs-xl);
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--text-primary);
    line-height: 1.2;
}

.news-card__excerpt { color: var(--text-secondary); line-height: 1.55; }

.news-card__cta {
    margin-top: var(--space-3);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-gold);
    letter-spacing: 0.02em;
}

.news-card__cta .icon-arrow {
    transition: transform var(--dur-mid) var(--ease-out);
}
.news-card__link:hover .news-card__cta .icon-arrow {
    transform: translateX(3px);
}

.news-card--feature .news-card__title { font-size: var(--fs-2xl); }

/* ===============================================================
   Section heads - shared layout for any section title block.
   =============================================================== */

.section-head {
    margin-bottom: var(--space-7);
    max-width: 720px;
}

.section-head h2 { margin-top: var(--space-3); }

.section-head--row {
    max-width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-5);
    flex-wrap: wrap;
}

.section-head--center {
    margin-inline: auto;
    text-align: center;
}
.section-head--center h2 { margin-top: var(--space-3); }

/* ===============================================================
   Meta rows - inline label + value rows under a card header.
   =============================================================== */

.meta-rows {
    display: grid;
    gap: 0;
    margin-top: var(--space-3);
    border-top: 1px solid var(--border-soft);
}

.meta-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: var(--space-4);
    padding-block: 0.65rem;
    border-bottom: 1px solid var(--border-soft);
    align-items: baseline;
}

.meta-row dt {
    font-size: var(--fs-xs);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-faint);
    font-weight: 600;
}

.meta-row dd {
    color: var(--text-primary);
    font-weight: 500;
    margin: 0;
}

/* ===============================================================
   Lightbox - full-size image overlay with blur backdrop.
   =============================================================== */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(6, 8, 15, 0.78);
    backdrop-filter: blur(22px) saturate(120%);
    -webkit-backdrop-filter: blur(22px) saturate(120%);
    display: grid;
    place-items: center;
    padding: clamp(1rem, 4vh, 3rem) clamp(1rem, 4vw, 3rem);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s var(--ease-out);
}

.lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox__stage {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    cursor: zoom-out;
}

.lightbox__img {
    display: block;
    max-width: min(100%, 1600px);
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow:
        0 40px 100px -20px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(244, 181, 74, 0.25);
    transform: scale(0.96);
    opacity: 0;
    transition: transform 0.32s var(--ease-spring), opacity 0.28s var(--ease-out);
    cursor: default;
}
.lightbox.is-open .lightbox__img {
    transform: scale(1);
    opacity: 1;
}

.lightbox__close {
    position: fixed;
    top: clamp(1rem, 2.5vw, 1.75rem);
    right: clamp(1rem, 2.5vw, 1.75rem);
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: rgba(6, 8, 15, 0.78);
    border: 1px solid rgba(244, 181, 74, 0.35);
    color: var(--accent-gold);
    display: grid;
    place-items: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition:
        background var(--dur-mid) var(--ease-out),
        border-color var(--dur-mid) var(--ease-out),
        color var(--dur-mid) var(--ease-out),
        transform var(--dur-mid) var(--ease-spring);
    z-index: 1;
}
.lightbox__close:hover {
    background: var(--accent-gold-faint);
    border-color: var(--accent-gold);
    color: var(--accent-gold-bright);
    transform: scale(1.08) rotate(90deg);
}
.lightbox__close:active { transform: scale(0.96); }

body.is-lightbox-open {
    overflow: hidden;
}

/* ===============================================================
   Back-to-top button.
   =============================================================== */

.back-to-top {
    position: fixed;
    bottom: clamp(1rem, 3vh, 1.75rem);
    right: clamp(1rem, 3vw, 1.75rem);
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: rgba(6, 8, 15, 0.72);
    border: 1px solid rgba(244, 181, 74, 0.35);
    color: var(--accent-gold);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 90;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px) scale(0.85);
    pointer-events: none;
    display: grid;
    place-items: center;
    transition:
        opacity 0.35s var(--ease-out),
        transform 0.45s var(--ease-spring),
        background var(--dur-mid) var(--ease-out),
        border-color var(--dur-mid) var(--ease-out),
        color var(--dur-mid) var(--ease-out);
    box-shadow:
        0 16px 36px -10px rgba(0, 0, 0, 0.6),
        0 6px 12px -6px rgba(244, 181, 74, 0.25);
}
.back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.back-to-top:hover {
    background: var(--accent-gold-faint);
    border-color: var(--accent-gold);
    color: var(--accent-gold-bright);
    transform: translateY(-3px) scale(1.06);
}
.back-to-top:active { transform: translateY(0) scale(0.97); }

.back-to-top__icon {
    width: 22px;
    height: 22px;
    animation: btt-bob 2.6s var(--ease-soft) infinite;
}
.back-to-top:hover .back-to-top__icon {
    animation-duration: 1.4s;
}

@keyframes btt-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
    .back-to-top__icon { animation: none; }
}

/* ====================  Cookie consent banner  ==================== */

.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: clamp(12px, 2vw, 24px);
    transform: translateX(-50%);
    z-index: 9000;
    width: min(960px, calc(100vw - 24px));
    padding: 0;
    animation: cookie-banner-in 320ms cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}
.cookie-banner[hidden] { display: none; }

.cookie-banner__inner {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: 14px 18px;
    background: rgba(6, 8, 15, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(244, 181, 74, 0.28);
    border-radius: 14px;
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(0, 0, 0, 0.4);
    flex-wrap: wrap;
}

.cookie-banner__text {
    flex: 1;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.88rem;
    line-height: 1.45;
}
.cookie-banner__text strong { color: var(--text-primary); font-weight: 600; }
.cookie-banner__text span { color: var(--text-secondary); }

.cookie-banner__actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

.cookie-banner__link {
    font-size: 0.86rem;
    color: var(--accent-gold);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.cookie-banner__link:hover { color: var(--accent-gold-soft); }

.cookie-banner__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.2rem;
    background: var(--accent-gold);
    color: var(--bg-deep);
    border: none;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.cookie-banner__btn:hover { background: var(--accent-gold-soft); transform: translateY(-1px); }
.cookie-banner__btn:active { transform: translateY(0); }

@keyframes cookie-banner-in {
    from { opacity: 0; transform: translate(-50%, 24px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 560px) {
    .cookie-banner__inner { flex-direction: column; align-items: stretch; gap: var(--space-3); }
    .cookie-banner__actions { justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-banner { animation: none; }
}
