/* ==========================================================================
   Publisher Bucks - site-wide styles (public site, affiliate area and admin).
   To re-theme, change the variables in :root below - everything else reads them.
   Colours are taken from the logo: logo red and "bucks" silver on warm charcoal.
   ========================================================================== */
:root {
    /* Brand */
    --red:          #c8161d;   /* logo red - buttons, accents */
    --red-hi:       #e0353c;   /* hover / links on dark */
    --red-deep:     #8f0e12;   /* logo shadow red */
    --silver:       #c9c9c9;   /* logo "bucks" */

    /* Surfaces (dark, warm) */
    --topbar:       #0d0b0b;
    --header:       #211d1d;
    --bg:           #1a1515;   /* page */
    --band:         #211a1a;   /* alternate sections */
    --surface:      #2a2222;   /* cards, inputs */
    --surface-2:    #342a2a;   /* table headers, hovers */
    --line:         #423535;

    /* Text */
    --text:         #efe9e8;
    --muted:        #b2a6a5;
    --faint:        #857877;

    /* Status */
    --ok:           #3fb877;
    --warn:         #e6a23c;
    --bad:          #ef5350;
    --info:         #6aa7e8;

    /* Hero gradient (matches the screenshot) */
    --hero-from:    #2b1616;
    --hero-to:      #1a1515;

    /* Background photos - replace the files in /files/ with your own (same names) */
    --hero-image:   url('../../files/hero-bg.jpg');
    --cta-image:    url('../../files/cta-bg.jpg');

    /* Height of the sticky header, so jump links don't hide a section's start under it */
    --header-h:     126px;

    /* Type */
    --font-hd: 'Oswald', 'Arial Narrow', Arial, sans-serif;
    --font-bd: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

    --radius: 8px;
    --wrap: 1200px;
}

/* ----- Base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; font-family: var(--font-bd); font-size: 16px; line-height: 1.65; color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--red-hi); text-underline-offset: 2px; }
a:hover { color: #ff5a60; }
h1, h2, h3 { font-family: var(--font-hd); font-weight: 500; line-height: 1.15; color: #fff; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--surface-2); padding: 1px 6px; border-radius: 4px; }
:focus-visible { outline: 3px solid var(--red-hi); outline-offset: 2px; }
[hidden] { display: none !important; }
.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.visually-hidden, .p-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--red); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 1000; }
.skip-link:focus { left: 8px; }
.form-trap { position: absolute; left: -9999px; }

/* ----- Buttons ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-hd); font-weight: 500; font-size: 1.05rem;
       letter-spacing: .04em; text-transform: uppercase; text-decoration: none; border: 2px solid transparent; border-radius: var(--radius);
       padding: 11px 24px; cursor: pointer; line-height: 1.2; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-hi); color: #fff; }
.btn-secondary, .btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-secondary:hover, .btn-ghost:hover { border-color: var(--silver); color: #fff; }
.btn-danger { background: transparent; color: var(--bad); border-color: rgba(239, 83, 80, .5); }
.btn-danger:hover { background: var(--bad); color: #fff; }
.btn-lg { font-size: 1.2rem; padding: 14px 32px; }
.btn-sm { font-size: .85rem; padding: 6px 12px; letter-spacing: .03em; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ----- Top bar ----- */
.topbar { background: var(--topbar); font-size: .95rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; flex-wrap: wrap; }
.tagline { color: #e8dede; }
.top-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 28px; }
.top-nav a, .top-nav span { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.top-nav a:hover { color: var(--red-hi); }
.top-nav i { color: #fff; opacity: .9; }

/* ----- Header ----- */
.site-header { background: var(--header); border-bottom: 1px solid rgba(255, 255, 255, .06); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 124px; }
.logo { display: block; flex: 0 0 auto; }
.logo img { display: block; width: 300px; height: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 4px 26px; }
.main-nav a { font-family: var(--font-hd); font-weight: 500; font-size: 1.18rem; letter-spacing: .06em; text-transform: uppercase; color: #fff; text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a.is-active { color: #fff; border-bottom-color: var(--red); }
.main-nav a.nav-cta { color: var(--red-hi); }
.main-nav a.nav-cta:hover { color: #fff; }
.main-nav a.nav-kyc { color: var(--warn); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; color: #fff; font-size: 1.3rem; padding: 6px 12px; cursor: pointer; }

/* Admin / affiliate areas have long menus: smaller type, compact header. */
.area-admin .header-inner, .area-aff .header-inner { min-height: 88px; }
.area-admin .logo img, .area-aff .logo img { width: 220px; }
.area-admin .main-nav a, .area-aff .main-nav a { font-size: 1rem; }
/* Admin has the longest menu (13 links): smaller, tighter type so it stays on one row. */
.area-admin .logo img { width: 190px; }
.area-admin .main-nav ul { gap: 2px 13px; }
.area-admin .main-nav a { font-size: .86rem; letter-spacing: .035em; white-space: nowrap; }

@media (max-width: 1080px) {
    .nav-toggle { display: block; }
    .header-inner { min-height: 84px; flex-wrap: wrap; }
    .logo img, .area-admin .logo img, .area-aff .logo img { width: 210px; }
    .main-nav { display: none; width: 100%; padding: 0 0 16px; }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; align-items: flex-start; gap: 0; }
    .main-nav li { width: 100%; border-top: 1px solid var(--line); }
    .main-nav a { display: block; padding: 12px 0; border-bottom: 0; }
    .site-header { position: static; }
    html { scroll-padding-top: 16px; }   /* header no longer sticks on small screens */
}
@media (max-width: 640px) {
    .tagline { display: none; }
    .top-nav { gap: 4px 18px; font-size: .88rem; }
    .topbar-inner { justify-content: center; min-height: 44px; padding-top: 6px; padding-bottom: 6px; }
}

/* ----- Hero (homepage) ----- */
.hero { position: relative; border-bottom: 1px solid var(--line);
        background: linear-gradient(180deg, rgba(26, 21, 21, .72) 0%, rgba(26, 21, 21, .82) 70%, var(--bg) 100%),
                    radial-gradient(120% 90% at 50% 0%, rgba(43, 22, 22, .55) 0%, rgba(26, 21, 21, .2) 70%),
                    var(--hero-image) center / cover no-repeat, var(--hero-to); }
.hero-inner { position: relative; }
.hero-inner { text-align: center; padding: clamp(64px, 11vw, 150px) 20px clamp(64px, 9vw, 120px); max-width: 980px; }
.hero h1 { margin: 0 0 28px; }
.hero-line { display: block; font-family: var(--font-hd); font-weight: 300; font-size: clamp(2.2rem, 6vw, 4.6rem); letter-spacing: .03em; text-transform: uppercase; color: #fff; line-height: 1.05; }
.hero-shout { display: block; font-family: var(--font-hd); font-weight: 700; font-size: clamp(3rem, 10vw, 7.8rem); text-transform: uppercase; color: var(--red); line-height: 1; margin-top: .25em; letter-spacing: .01em; }
.hero-shout-sm { font-size: clamp(2.2rem, 5.2vw, 4.2rem); margin-top: .35em; }
.hero-lede { font-size: clamp(1.05rem, 1.8vw, 1.45rem); line-height: 1.75; color: #f1eaea; max-width: 760px; margin: 0 auto 36px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ----- Program facts ----- */
.facts { background: var(--header); border-bottom: 1px solid var(--line); }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.facts-grid > div { padding: 34px 24px; border-left: 1px solid var(--line); }
.facts-grid > div:first-child { border-left: 0; }
.facts-grid dt { font-family: var(--font-hd); font-weight: 600; font-size: 2.6rem; color: var(--red-hi); line-height: 1; margin: 0 0 10px; }
.facts-grid dd { margin: 0; color: var(--muted); font-size: .98rem; }
@media (max-width: 900px) { .facts-grid { grid-template-columns: 1fr 1fr; } .facts-grid > div:nth-child(3) { border-left: 0; } .facts-grid > div { border-top: 1px solid var(--line); } }
@media (max-width: 520px) { .facts-grid { grid-template-columns: 1fr; } .facts-grid > div { border-left: 0; } }

/* ----- Sections ----- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 0 0 32px; }
.section-head h2 { margin: 0; font-size: clamp(1.9rem, 3.4vw, 2.6rem); text-transform: uppercase; letter-spacing: .02em; }
.section-head p { margin: 0; color: var(--muted); max-width: 560px; }
.empty { color: var(--muted); }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps li { counter-increment: step; border-top: 3px solid var(--red); padding-top: 18px; }
.steps li::before { content: counter(step); display: block; font-family: var(--font-hd); font-size: 2.4rem; font-weight: 600; color: var(--red-hi); line-height: 1; margin: 0 0 10px; }
.steps h3 { text-transform: uppercase; letter-spacing: .03em; margin: 0 0 6px; }
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* eBook grid */
.books { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 32px 26px; }
/* Each eBook shows its 16:9 website screenshot; without one, its cover sits whole inside the same frame. */
.book-shot { display: block; aspect-ratio: 16 / 9; background: var(--surface); border-radius: 8px; overflow: hidden; box-shadow: 0 14px 30px rgba(0, 0, 0, .45); margin: 0 0 14px; border: 1px solid rgba(255, 255, 255, .08); }
.book-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform .25s; }
.book-shot.is-cover { background: radial-gradient(circle at 50% 40%, var(--surface-2, #2a2323), var(--surface)); }
.book-shot.is-cover img { object-fit: contain; padding: 10px 0; }
.book-shot:hover img { transform: scale(1.03); }
.book-placeholder { display: flex; height: 100%; align-items: center; justify-content: center; font-size: 3rem; color: var(--faint); }
.book h3 { font-size: 1.25rem; margin: 0 0 4px; }
.book h3 a { color: #fff; text-decoration: none; }
.book h3 a:hover { color: var(--red-hi); }
.book-for { color: var(--muted); font-size: .92rem; margin: 0 0 6px; }
.book-earn { margin: 0; font-size: .95rem; color: var(--muted); }
.book-earn strong { color: var(--ok); font-size: 1.1rem; }
.book-earn span { display: block; font-size: .85rem; color: var(--faint); }

.split { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; align-items: start; }
.split h2 { text-transform: uppercase; }
.split > div p { color: var(--muted); }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; gap: 20px; } }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.ticks li { position: relative; padding: 0 0 0 34px; color: var(--muted); }
.ticks li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; top: 1px; color: var(--red-hi); }
.ticks strong { color: var(--text); }

/* News */
.news-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.news-list-page { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 800px) { .news-list, .news-list-page { grid-template-columns: 1fr; } }
.news-item { border-top: 1px solid var(--line); padding-top: 16px; }
.news-item img { border-radius: 6px; margin: 0 0 12px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.news-item time { color: var(--faint); font-size: .88rem; }
.news-item h2, .news-item h3 { font-size: 1.3rem; margin: 4px 0 8px; }
.news-item h2 a, .news-item h3 a { color: #fff; text-decoration: none; }
.news-item h2 a:hover, .news-item h3 a:hover { color: var(--red-hi); }
.news-item p { color: var(--muted); margin: 0; }
.news-lede { font-size: 1.2rem; color: var(--muted); }
.news-meta { color: var(--faint); font-size: .92rem; }
.news-hero { width: 100%; border-radius: 8px; margin: 8px 0 24px; }
.news-body { font-size: 1.05rem; }
.news-body h2 { margin-top: 1.4em; }
.news-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.news-tags a { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; font-size: .88rem; text-decoration: none; color: var(--muted); }
.news-share { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 24px 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* FAQ */
.faq { display: grid; gap: 10px; margin: 0 0 24px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; color: #fff; list-style: none; position: relative; padding-right: 30px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 1.4rem; color: var(--red-hi); }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { color: var(--muted); margin: 0 0 16px; }

/* Final call to action */
.final-cta { text-align: center; padding: clamp(72px, 10vw, 130px) 0; border-top: 1px solid var(--line);
             background: linear-gradient(180deg, rgba(26, 21, 21, .78), rgba(26, 21, 21, .86)), var(--cta-image) center / cover no-repeat, var(--hero-from); }
.final-cta p { color: #e6dcdc; }
.final-cta h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); text-transform: uppercase; }
.final-cta p { max-width: 560px; margin: 0 auto 28px; }

/* ----- Content pages (legal, FAQ, contact, news) ----- */
.legal { padding: 40px 0 72px; }
.legal-wrap { max-width: var(--wrap); }
.legal-crumbs { font-size: .9rem; color: var(--faint); margin: 0 0 20px; }
.legal-crumbs a { color: var(--muted); text-decoration: none; }
.legal-crumbs a:hover { color: var(--red-hi); }
.legal-updated { color: var(--faint); font-size: .92rem; }
.legal-lede { font-size: 1.1rem; color: var(--muted); max-width: 900px; }
.legal h2 { font-size: 1.5rem; margin-top: 1.8em; }
.legal li { margin: 0 0 6px; }
.legal-toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 24px 0; }
.legal-toc h2 { font-size: 1rem; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .05em; }
.legal-toc ol { margin: 0; padding-left: 20px; columns: 3; }
@media (max-width: 900px) { .legal-toc ol { columns: 2; } }
@media (max-width: 600px) { .legal-toc ol { columns: 1; } }
.table-wrap { overflow-x: auto; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.legal-table th, .legal-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal-table th { background: var(--surface-2); color: #fff; }

/* Public forms (contact, sign-up): form on the left, photo filling the space on the right */
.form { max-width: 760px; }
.form-split { display: grid; grid-template-columns: minmax(0, 760px) minmax(0, 1fr); gap: 36px; align-items: stretch; margin: 8px 0 0; }
.form-split .form { max-width: none; }
.form-split-media { position: relative; border-radius: 10px; overflow: hidden; min-height: 320px; background: var(--surface); border: 1px solid var(--line); }
.form-split-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 900px) { .form-split { grid-template-columns: 1fr; } .form-split-media { display: none; } }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; }
.check input { margin-top: 5px; flex: 0 0 auto; }
.form-note { color: var(--muted); font-size: .92rem; margin: 0 0 18px; }
.form .btn + .form-note { margin: 16px 0 0; }
.form .req { font-weight: 400; color: var(--faint); font-size: .88em; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { margin: 0 0 16px; }
.field label { display: block; font-weight: 600; margin: 0 0 6px; color: #fff; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=tel], input[type=date],
input[type=datetime-local], input[type=search], input:not([type]), select, textarea {
    width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px;
}
input:focus, select:focus, textarea:focus { border-color: var(--red-hi); outline: none; box-shadow: 0 0 0 3px rgba(224, 53, 60, .25); }
input[readonly] { color: var(--muted); }
select { appearance: auto; }
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { accent-color: var(--red); width: 1.05em; height: 1.05em; }
.notice { border-radius: var(--radius); padding: 14px 18px; margin: 0 0 18px; border: 1px solid; }
.notice-ok { background: rgba(63, 184, 119, .12); border-color: rgba(63, 184, 119, .45); color: #bfeed3; }
.notice-warn { background: rgba(230, 162, 60, .12); border-color: rgba(230, 162, 60, .45); color: #f7dfb8; }
.notice-bad { background: rgba(239, 83, 80, .12); border-color: rgba(239, 83, 80, .45); color: #ffd1d0; }

/* ----- Footer ----- */
.site-footer { background: var(--topbar); border-top: 3px solid var(--red); padding: 56px 0 24px; color: var(--muted); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand img { width: 220px; height: auto; margin: 0 0 14px; }
.footer-brand p { max-width: 380px; }
.footer-col h2 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; color: #fff; margin: 0 0 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0 0 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--red-hi); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 20px; font-size: .88rem; }
.footer-bottom p { margin: 0; }
.footer-bottom ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 18px; }
.social-links { list-style: none; margin: 16px 0 0; padding: 0; display: flex; gap: 10px; }
.social-links a { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; }
.back-to-top { position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%; background: var(--red); color: #fff;
               display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .2s; text-decoration: none; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { color: #fff; background: var(--red-hi); }

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