/* ==========================================================================
   FIRM PERSUASION - design layer on top of Source
   THIS IS THE FILE TO EDIT for look-and-feel changes. It loads directly
   (no build step): edit, re-zip the theme, upload in Ghost.

   QUICK TWEAKS: change the values in the block just below.
   Palette: streetlight amber on near-black, warm off-white type
   Type:    Bebas Neue (display) / Source Serif 4 (reading) / Inter (interface)
   Bebas Neue only has one weight: always keep font-weight at 400.
   ========================================================================== */

:root {
    /* ---- SIZES: each one controls ONE place only ---- */
    --fp-hero-title-size: clamp(6.4rem, 1.2rem + 13.5vw, 15.2rem);    /* homepage headline */
    --fp-article-title-size: clamp(3.6rem, 1.2rem + 3.4vw, 6rem);     /* title on each post/page */
    --fp-card-title-size: 2.1rem;                                      /* titles in the post grid */
    --fp-nav-logo-size: 3.2rem;                                        /* site name in the header */
    --fp-footer-title-size: clamp(4.8rem, 1.6rem + 6vw, 9.6rem);      /* big site name in the footer */
}

:root {
    --fp-bg: #0b0b0c;
    --fp-surface: #151517;
    --fp-text: #f2ede4;
    --fp-muted: #8c877e;
    --fp-line: rgb(242 237 228 / 0.12);
    --fp-amber: #e3a33b;
    --fp-amber-bright: #f0b857;
    --fp-ink: #0b0b0c;
    --fp-display: "Bebas Neue", "Oswald", Impact, "Arial Narrow Bold", sans-serif;
    --fp-reading: "Source Serif 4", "Iowan Old Style", Georgia, serif;
    --fp-ui: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --background-color: var(--fp-bg);
}

:root.has-light-text {
    --color-darker-gray: var(--fp-text);
    --color-primary-text: var(--fp-text);
    --color-secondary-text: var(--fp-muted);
    --color-border: var(--fp-line);
    --color-lighter-gray: var(--fp-surface);
    --color-dark-border: rgb(242 237 228 / 0.45);
    color-scheme: dark;
}

::selection {
    color: var(--fp-ink);
    background: var(--fp-amber);
}

:focus-visible {
    outline: 2px solid var(--fp-amber);
    outline-offset: 3px;
}

/* ---------- Typography roles ---------- */

:root body .is-title,
:root body .gh-content :is(h2, h3) {
    --gh-font-heading: var(--fp-display);
    font-weight: 400;
    letter-spacing: 0.02em;
}

:root body .is-body {
    --gh-font-body: var(--fp-reading);
}

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

:root body .gh-button {
    color: var(--fp-ink);
    background-color: var(--fp-amber);
    font-family: var(--fp-ui);
    font-weight: 650;
}

:root body .gh-button:hover {
    opacity: 1;
    background-color: var(--fp-amber-bright);
}

/* ---------- Navigation ---------- */

:root body .gh-navigation {
    height: 88px;
    background-color: var(--fp-bg);
    border-bottom: 1px solid var(--fp-line);
}

:root body .gh-navigation-logo,
:root body .gh-footer-logo {
    font-family: var(--fp-display);
    font-size: var(--fp-nav-logo-size);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

:root body .gh-navigation-menu a {
    font-weight: 500;
    color: var(--fp-muted);
}

:root body .gh-navigation-menu a:hover,
:root body .gh-navigation-menu .nav-current a {
    color: var(--fp-text);
    opacity: 1;
}

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

.fp-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: clamp(72px, 11vw, 160px) clamp(56px, 8vw, 112px);
    text-align: center;
    background-color: var(--fp-bg);
}

/* The streetlight: a single amber cone from above the page, fades in once */
.fp-hero::before {
    position: absolute;
    inset: 0;
    z-index: -2;
    content: "";
    background:
        radial-gradient(ellipse 55% 75% at 50% -12%, rgb(227 163 59 / 0.34), rgb(227 163 59 / 0.08) 48%, transparent 72%);
}

/* Film grain */
.fp-hero::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    opacity: 0.09;
    mix-blend-mode: overlay;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.4 -0.2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.fp-hero-image {
    position: absolute;
    inset: 0;
    z-index: -3;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
}

.fp-hero.has-image {
    background: linear-gradient(to bottom, transparent 55%, var(--fp-bg)), var(--fp-bg);
}

.fp-hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fp-hero-title {
    max-width: 6.2em;
    font-family: var(--fp-display);
    font-size: var(--fp-hero-title-size);
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: 0.012em;
    text-transform: uppercase;
    text-wrap: balance;
    color: var(--fp-text);
}

.fp-hero-lede {
    margin-top: 28px;
    max-width: 52ch;
    font-family: var(--fp-reading);
    font-size: clamp(1.7rem, 0.4vw + 1.55rem, 2rem);
    line-height: 1.55;
    color: var(--fp-muted);
    text-wrap: pretty;
}

.fp-hero .gh-form {
    margin-top: 40px;
}

.fp-hero-note {
    margin-top: 16px;
    max-width: 46ch;
    font-size: 1.3rem;
    line-height: 1.5;
    color: var(--fp-muted);
}

@media (prefers-reduced-motion: no-preference) {
    .fp-hero::before {
        animation: fp-light-on 1.8s ease-out both;
    }

    @keyframes fp-light-on {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

/* ---------- Signup form (hero + footer) ---------- */

:root body .gh-form {
    height: 56px;
    border-radius: 14px;
    background-color: var(--fp-surface);
    box-shadow: inset 0 0 0 1px var(--fp-line);
    transition: box-shadow 0.2s ease;
}

:root body .gh-form:hover {
    background-color: var(--fp-surface);
}

:root body .gh-form:focus-within {
    box-shadow: inset 0 0 0 1px var(--fp-amber);
}

:root body .gh-form-input {
    color: var(--fp-text);
    border-radius: 14px;
    font-family: var(--fp-ui);
}

:root body .gh-form-input::placeholder,
:root body button.gh-form-input {
    color: var(--fp-muted);
}

:root body .gh-form .gh-button {
    height: 42px;
    border-radius: 10px;
}

:root body .gh-form [data-members-error] {
    color: #ff8a7a;
}

/* ---------- Category pills ---------- */

.fp-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 0 clamp(32px, 4vw, 48px);
}

.fp-pill {
    padding: 9px 18px;
    font-family: var(--fp-ui);
    font-size: 1.4rem;
    font-weight: 550;
    line-height: 1;
    color: var(--fp-muted);
    border: 1px solid var(--fp-line);
    border-radius: 999px;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.fp-pill:hover {
    color: var(--fp-text);
    border-color: rgb(242 237 228 / 0.45);
    opacity: 1;
}

.fp-pill.is-active {
    color: var(--fp-ink);
    background-color: var(--fp-text);
    border-color: var(--fp-text);
}

/* ---------- Post grid ---------- */

.fp-hero + .gh-container {
    margin-top: 0;
}

:root .gh-container.is-grid :is(.gh-container-title, .gh-main, .gh-more) {
    grid-column: 1 / -1;
}

:root body .gh-container-title {
    font-family: var(--fp-display);
    font-size: 3.2rem;
    font-weight: 400;
    letter-spacing: 0.04em;
}

:root body .gh-container.is-grid .gh-feed {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(40px, 4vw, 64px) clamp(20px, 2.4vw, 32px);
    overflow: visible;
}

.gh-container.is-grid .gh-card::before,
.gh-container.is-grid .gh-card::after {
    display: none;
}

:root body .gh-card-link {
    gap: 18px;
}

:root body .gh-card-image {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 12px;
    background-color: var(--fp-surface);
}

:root body .gh-card-image img {
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.fp-card-placeholder {
    border: 1px solid var(--fp-line);
    background:
        radial-gradient(110% 90% at 50% -10%, rgb(227 163 59 / 0.22), transparent 62%),
        var(--fp-surface);
}

:root body .gh-card .gh-card-title.is-title {
    font-family: var(--fp-reading);
    font-size: var(--fp-card-title-size);
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -0.008em;
    text-transform: none;
    text-wrap: balance;
}

:root body .gh-card-link:hover .gh-card-title {
    opacity: 1;
    color: var(--fp-amber);
}

:root body .gh-card-excerpt {
    margin-top: 10px;
    font-size: 1.55rem;
    line-height: 1.5;
    color: var(--fp-muted);
    -webkit-line-clamp: 3;
}

:root body .gh-card-meta {
    font-family: var(--fp-ui);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--fp-muted);
}

@media (prefers-reduced-motion: no-preference) {
    .gh-card:hover .gh-card-image img {
        transform: scale(1.04);
    }
}

@media (max-width: 991px) {
    :root body .gh-container.is-grid .gh-feed {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    :root body .gh-container.is-grid .gh-feed {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .fp-pills {
        justify-content: flex-start;
    }
}

/* ---------- Archive (tag / author) headers ---------- */

:root .gh-archive:not(.has-image) .gh-archive-inner {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    padding-bottom: 8px;
    border-bottom: 0;
}

/* ---------- Article ---------- */

:root body .gh-article-title {
    font-family: var(--fp-display);
    font-size: var(--fp-article-title-size);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: 0.015em;
    text-transform: uppercase;
    text-wrap: balance;
}

:root body .gh-article-tag {
    font-family: var(--fp-ui);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--fp-amber);
}

:root body .gh-article-excerpt {
    margin-top: 20px;
    font-family: var(--fp-reading);
    font-size: clamp(1.9rem, 0.5vw + 1.7rem, 2.3rem);
    font-style: italic;
    line-height: 1.45;
    letter-spacing: 0;
    color: var(--fp-muted);
}

:root body .gh-article-author-name {
    font-family: var(--fp-ui);
}

:root body .gh-content {
    font-size: 2rem;
    line-height: 1.7;
    letter-spacing: 0;
    color: rgb(242 237 228 / 0.92);
}

:root body .gh-content a:not(.gh-button, .kg-btn, [class*="kg-"]) {
    color: var(--fp-amber);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

:root body .gh-content :is(h2, h3) {
    line-height: 1;
    text-transform: uppercase;
    color: var(--fp-text);
}

:root body .gh-content h2 {
    font-size: 4.2rem;
}

:root body .gh-content h3 {
    font-size: 3.2rem;
}

:root body .gh-content > blockquote:not([class]) {
    padding-left: 28px;
    font-family: var(--fp-reading);
    font-style: italic;
    border-left: 3px solid var(--fp-amber);
}

:root body .gh-content > hr {
    border-color: var(--fp-line);
}

:root body .gh-content :is(pre, code):not([class*="language-"]) {
    background-color: var(--fp-surface);
}

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

:root body .gh-footer {
    margin-top: clamp(80px, 10vw, 140px);
    padding-top: clamp(64px, 8vw, 112px);
    border-top: 1px solid var(--fp-line);
}

:root body .gh-footer-signup {
    margin-bottom: clamp(64px, 8vw, 112px);
}

:root body .gh-footer-signup-header {
    font-family: var(--fp-display);
    font-size: var(--fp-footer-title-size);
    font-weight: 400;
    line-height: 0.92;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

:root body .gh-footer-signup-subhead {
    font-family: var(--fp-reading);
    font-size: 1.9rem;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--fp-muted);
    opacity: 1;
}

:root body .gh-footer-bar {
    margin-bottom: 56px;
    border-bottom: 0;
    border-top-color: var(--fp-line);
    font-family: var(--fp-ui);
    font-weight: 500;
    color: var(--fp-muted);
}

:root body .gh-footer-menu a:hover {
    color: var(--fp-text);
    opacity: 1;
}

:root body .gh-social-links a {
    color: var(--fp-muted);
}

:root body .gh-social-links a:hover {
    color: var(--fp-amber);
    opacity: 1;
}

/* Share button is a quiet outline so the amber stays reserved for Subscribe */
:root body .gh-button-share {
    color: var(--fp-text);
    background-color: transparent;
    border: 1px solid var(--fp-line);
}

:root body .gh-button-share:hover {
    background-color: transparent;
    border-color: rgb(242 237 228 / 0.5);
}

/* Article feature image: one consistent 3:2 crop so tall AI images don't fill the screen */
:root body .gh-article-image img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 12px;
}

/* Members-only gate (only shows if a post is set to Members or Paid): keep it on-brand */
:root body .gh-post-upgrade-cta .gh-post-upgrade-cta-content {
    color: var(--fp-text) !important;
    background-color: var(--fp-surface) !important;
    border: 1px solid var(--fp-line);
    border-radius: 14px;
}

:root body .gh-post-upgrade-cta h2 {
    color: var(--fp-text) !important;
    font-family: var(--fp-display);
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

:root body .gh-post-upgrade-cta .gh-btn {
    color: var(--fp-ink) !important;
    background-color: var(--fp-amber) !important;
}

:root body .gh-post-upgrade-cta :is(p, small) {
    color: var(--fp-muted) !important;
}

:root body .gh-post-upgrade-cta a:not(.gh-btn) {
    color: var(--fp-amber) !important;
}


/* ---------- Pills as buttons, filtering, anchors ---------- */

.fp-pills[hidden],
.gh-card[hidden] {
    display: none;
}

button.fp-pill {
    appearance: none;
    cursor: pointer;
    background: transparent;
}

button.fp-pill:hover {
    background: transparent;
}

button.fp-pill.is-active:hover {
    background: var(--fp-text);
}

.fp-hero-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#top-subscribe,
#subscribe {
    scroll-margin-top: 120px;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

:root body .gh-footer-copyright {
    font-family: var(--fp-ui);
    font-size: 1.3rem;
    white-space: normal;
    color: var(--fp-muted);
}
