/*
 * RevolutKasino light polish layer, v1.3.1
 * Scope: hero, article readability, notice boxes, and Kadence-friendly design tokens.
 */

:root {
    --rk-dark: #1c1410;
    --rk-dark-soft: #241812;
    --rk-brown: #3d2b1f;
    --rk-muted: #6b5344;
    --rk-accent: var(--global-palette1, #d97706);
    --rk-accent-dark: var(--global-palette2, #92400e);
    --rk-cream: var(--global-palette9, #fdf8f0);
    --rk-page: var(--global-palette8, #f4f6f8);
    --rk-border: #ede4d6;
    --rk-shadow-soft: 0 18px 50px rgba(28, 20, 16, 0.08);
    --rk-copy-width: 1060px;
}

body {
    background: var(--rk-page);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* 1. First screen: keep the current structure, but make the hero feel intentional. */
header#masthead .site-main-header-wrap,
header#mobile-header .site-main-header-wrap {
    background: linear-gradient(180deg, #1d140f 0%, var(--rk-dark) 100%) !important;
    border-bottom-color: rgba(217, 119, 6, 0.18) !important;
}

.entry-hero .entry-hero-container-inner {
    background:
        radial-gradient(circle at 16% 18%, rgba(217, 119, 6, 0.18), transparent 30%),
        radial-gradient(circle at 78% 30%, rgba(146, 64, 14, 0.18), transparent 32%),
        linear-gradient(135deg, var(--rk-dark) 0%, var(--rk-dark-soft) 58%, #170f0b 100%) !important;
    border-bottom: 1px solid rgba(217, 119, 6, 0.16) !important;
    padding-top: clamp(46px, 6.4vw, 78px) !important;
    padding-bottom: clamp(48px, 6.8vw, 84px) !important;
    overflow: hidden;
}

.entry-hero .entry-header.page-title {
    max-width: 980px;
}

.entry-hero h1.entry-title {
    max-width: 920px;
    font-size: clamp(1.9rem, 4vw, 3.35rem) !important;
    line-height: 1.12 !important;
    letter-spacing: -0.045em !important;
    text-wrap: balance;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
}

.entry-hero h1.entry-title::before {
    width: 4px;
    top: 0.08em;
    bottom: 0.08em;
    background: linear-gradient(180deg, #f59e0b 0%, var(--rk-accent) 100%);
    box-shadow: 0 0 20px rgba(217, 119, 6, 0.35);
}

.entry-hero h1.entry-title::after {
    content: "Päivitetty 2026";
    display: table;
    margin-top: 18px;
    padding: 7px 12px;
    border: 1px solid rgba(245, 158, 11, 0.34);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #fef3c7;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: none;
}

/* 2. Article readability: improve rhythm without changing the content model. */
.entry-content {
    color: var(--rk-brown);
    font-size: clamp(1rem, 0.96rem + 0.18vw, 1.075rem);
    line-height: 1.78;
}

.entry-content > p,
.entry-content > h2,
.entry-content > h3,
.entry-content > h4,
.entry-content > ul,
.entry-content > ol,
.entry-content > .wp-block-list,
.entry-content > .wp-block-buttons,
.entry-content > .wp-block-quote {
    max-width: var(--rk-copy-width);
    margin-left: auto;
    margin-right: auto;
}

.entry-content > p {
    margin-bottom: 1.2em;
}

.entry-content > p:first-of-type {
    color: #2a211a;
    font-size: clamp(1.06rem, 1rem + 0.35vw, 1.22rem);
    line-height: 1.74;
}

.entry-content > p:first-of-type::first-line {
    color: var(--rk-dark);
}

.entry-content h2.wp-block-heading,
.entry-content > h2 {
    margin-top: 2.55em;
    margin-bottom: 0.72em;
    color: #111827;
    font-size: clamp(1.55rem, 1.25rem + 1.15vw, 2.12rem) !important;
    line-height: 1.18 !important;
    letter-spacing: -0.035em !important;
    text-wrap: balance;
}

.entry-content h2.wp-block-heading::before,
.entry-content > h2::before {
    content: "";
    display: block;
    width: 46px;
    height: 3px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: var(--rk-accent);
}

.entry-content h3.wp-block-heading,
.entry-content > h3 {
    margin-top: 1.75em;
    margin-bottom: 0.58em;
    color: #1f2937;
    font-size: clamp(1.22rem, 1.08rem + 0.62vw, 1.58rem) !important;
    line-height: 1.28 !important;
    letter-spacing: -0.02em !important;
    text-wrap: balance;
}

.entry-content a:where(:not(.button):not(.wp-block-button__link):not(.wp-element-button):not(.tcr-enlist):not(.tcr-look-in)) {
    color: var(--rk-accent-dark);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

.entry-content a:where(:not(.button):not(.wp-block-button__link):not(.wp-element-button):not(.tcr-enlist):not(.tcr-look-in)):hover {
    color: var(--rk-accent);
}

.entry-content .wp-block-table,
.entry-content .tcr-stand,
.entry-content .pl-miin-list {
    margin-top: 1.6rem;
    margin-bottom: 2.15rem;
}

.wp-block-table {
    background: #fff;
    border: 1px solid var(--rk-border) !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 28px rgba(28, 20, 16, 0.045) !important;
    overflow: hidden !important;
}

.wp-block-table table thead th:first-child,
.wp-block-table table tbody td:first-child {
    padding-left: 18px !important;
}

/* 3. Notice/trust boxes: use these classes in Gutenberg when a paragraph/group needs emphasis. */
.entry-content .rk-note,
.entry-content .rk-warning,
.entry-content .rk-responsible,
.entry-content .is-style-rk-note,
.entry-content .is-style-rk-warning,
.entry-content .is-style-rk-responsible {
    max-width: var(--rk-copy-width);
    margin: 1.55em auto;
    padding: 18px 20px;
    border: 1px solid #f0ddbf;
    border-left: 4px solid var(--rk-accent);
    border-radius: 14px;
    background: #fff8ed;
    color: var(--rk-brown);
    box-shadow: 0 10px 28px rgba(217, 119, 6, 0.07);
}

.entry-content .rk-warning,
.entry-content .is-style-rk-warning {
    border-color: #f3c7c7;
    border-left-color: #c2410c;
    background: #fff7ed;
}

.entry-content .rk-responsible,
.entry-content .is-style-rk-responsible {
    border-color: #d7e7d9;
    border-left-color: #2d6a40;
    background: #f5fbf6;
}

.entry-content .rk-note > :first-child,
.entry-content .rk-warning > :first-child,
.entry-content .rk-responsible > :first-child,
.entry-content .is-style-rk-note > :first-child,
.entry-content .is-style-rk-warning > :first-child,
.entry-content .is-style-rk-responsible > :first-child {
    margin-top: 0;
}

.entry-content .rk-note > :last-child,
.entry-content .rk-warning > :last-child,
.entry-content .rk-responsible > :last-child,
.entry-content .is-style-rk-note > :last-child,
.entry-content .is-style-rk-warning > :last-child,
.entry-content .is-style-rk-responsible > :last-child {
    margin-bottom: 0;
}

.entry-content .rk-note strong,
.entry-content .rk-warning strong,
.entry-content .rk-responsible strong,
.entry-content .is-style-rk-note strong,
.entry-content .is-style-rk-warning strong,
.entry-content .is-style-rk-responsible strong {
    color: var(--rk-dark);
}

/* Responsible-gambling links get a softer, more trustworthy treatment where supported. */
.entry-content > p:has(a[href*="peluuri.fi"]),
.entry-content > p:has(a[href*="peliklinikka.fi"]),
.entry-content > p:has(a[href*="nimettomatpelurit.fi"]) {
    max-width: var(--rk-copy-width);
    margin: 1.55em auto;
    padding: 18px 20px;
    border: 1px solid #d7e7d9;
    border-left: 4px solid #2d6a40;
    border-radius: 14px;
    background: #f5fbf6;
}

footer#colophon a[href*="peluuri.fi"],
footer#colophon a[href*="peliklinikka.fi"],
footer#colophon a[href*="nimettomatpelurit.fi"] {
    color: #fbbf24 !important;
    text-decoration: underline !important;
    text-decoration-color: rgba(251, 191, 36, 0.45) !important;
    text-underline-offset: 0.18em;
}

footer#colophon a[href*="peluuri.fi"]:hover,
footer#colophon a[href*="peliklinikka.fi"]:hover,
footer#colophon a[href*="nimettomatpelurit.fi"]:hover {
    color: #fff7ed !important;
}

/* 6. Small Kadence-friendly tuning: keep hard overrides isolated to this polish layer. */
.wp-block-button__link,
.wp-element-button {
    border-radius: 10px;
}

.has-background,
.wp-block-group.has-background {
    border-radius: 14px;
}

@media (max-width: 921px) {
    .entry-hero .entry-hero-container-inner {
        padding-top: 38px !important;
        padding-bottom: 44px !important;
    }

    .entry-hero h1.entry-title {
        font-size: clamp(1.65rem, 7vw, 2.45rem) !important;
        letter-spacing: -0.035em !important;
    }
}

@media (max-width: 680px) {
    .entry-content {
        font-size: 1rem;
        line-height: 1.72;
    }

    .entry-content > p,
    .entry-content > h2,
    .entry-content > h3,
    .entry-content > h4,
    .entry-content > ul,
    .entry-content > ol,
    .entry-content > .wp-block-list,
    .entry-content > .wp-block-buttons,
    .entry-content > .wp-block-quote {
        max-width: none;
    }

    .entry-content h2.wp-block-heading,
    .entry-content > h2 {
        margin-top: 2.15em;
    }

    .entry-hero h1.entry-title::after {
        margin-top: 14px;
        font-size: 0.68rem;
    }

    .entry-content .rk-note,
    .entry-content .rk-warning,
    .entry-content .rk-responsible,
    .entry-content .is-style-rk-note,
    .entry-content .is-style-rk-warning,
    .entry-content .is-style-rk-responsible {
        padding: 16px;
        border-radius: 12px;
    }
}
