/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/* =============================================================================
   DESIGN TOKENS
   Single source of truth for the entire site.
   Every block, page, and component should reference these.
   ============================================================================= */
:root {
    /* === Colour palette === */
    --color-page-bg: #050505;
    /* App root: bg-[#050505]  */
    --color-card-bg: #0a0a0a;
    /* Card surfaces            */
    --color-accent: #FF4E00;
    /* Brand orange             */
    --color-text: #ffffff;
    --color-text-muted: rgba(255, 255, 255, 0.50);
    --color-text-dim: rgba(255, 255, 255, 0.30);
    --color-border: rgba(255, 255, 255, 0.10);

    /* === Font families (sourced from index.css @theme) === */
    --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
    --font-display: "Syne", ui-sans-serif, system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

    /* === Spacing scale (mirrors Tailwind defaults used throughout) === */
    --space-xs: 0.5rem;
    /* 8px  */
    --space-sm: 1rem;
    /* 16px */
    --space-md: 1.5rem;
    /* 24px */
    --space-lg: 3rem;
    /* 48px */
    --space-xl: 5rem;
    /* 80px */
    --space-2xl: 8rem;
    /* 128px */

    /* === Container === */
    --container-max: 80rem;
    /* max-w-7xl */
    --container-px: 1.5rem;

    /* === Border radii === */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* === Transitions === */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-slower: 0.7s ease;
}


/* =============================================================================
   GLOBAL RESETS & BASE
   Only affects the agency pages — scoped to body.
   ============================================================================= */

/* Overflow clipping at body level (stops horizontal scroll from marquees etc.) */
body {
    overflow-x: hidden;
}

/* Page background matches App root: bg-[#050505]
   GeneratePress overrides this with its own body background setting;
   you may also set it in Customizer → Colors → Body Background to #050505.
   The !important below is a safety net for when GP outputs an inline style. */
body.page,
body.home,
body.single {
    background-color: var(--color-page-bg) !important;
}

/* ----- Text selection ----- */
/* App.tsx: selection:bg-[#FF4E00] selection:text-white */
::selection {
    background-color: var(--color-accent);
    color: #ffffff;
}


/* =============================================================================
   GLOBAL TYPOGRAPHY
   All block-level text inherits from these rules.
   Blocks/pages only need to override when purposefully diverging.
   ============================================================================= */

/* Body / paragraph — font-sans (Inter) */
body,
p,
.wp-block-paragraph {
    font-family: var(--font-sans);
    line-height: 1.625;
}

/* Base text color for standard pages like Privacy Policy */
.page .entry-content,
.single .entry-content {
    color: rgba(255, 255, 255, 0.70);
    /* text-white/70 */
}

/* Headings — font-display (Syne) */
h1,
h2,
h3,
h4,
h5,
h6,
.wp-block-heading {
    font-family: var(--font-display);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--color-text);
    font-weight: 700;
}

/* Gutenberg Heading Spacing (mimicking prose) */
.page .entry-content h2:not(.cta-heading):not(.portfolio-heading):not(.edge-label__text),
.single .entry-content h2:not(.cta-heading):not(.portfolio-heading),
.wp-block-heading:is(h2):not(.cta-heading):not(.portfolio-heading) {
    font-size: 1.5rem;
    /* text-2xl */
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.page .entry-content h3:not(.cta-heading):not(.portfolio-heading):not(.portfolio-card__reveal-title),
.single .entry-content h3:not(.cta-heading):not(.portfolio-heading):not(.portfolio-card__reveal-title),
.wp-block-heading:is(h3):not(.cta-heading):not(.portfolio-heading):not(.portfolio-card__reveal-title) {
    font-size: 1.25rem;
    /* text-xl */
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

/* Gutenberg Paragraph Spacing */
.page .entry-content p:not(.portfolio-card__client):not(.hero-hud__line):not(.hero-body__text):not(.narrative-body),
.single .entry-content p:not(.portfolio-card__client):not(.hero-hud__line):not(.hero-body__text):not(.narrative-body),
.wp-block-paragraph:not(.portfolio-card__client):not(.hero-hud__line):not(.hero-body__text):not(.narrative-body) {
    margin-bottom: 1rem;
}

/* Gutenberg Lists (ul/ol) */
.page .entry-content ul,
.page .entry-content ol,
.single .entry-content ul,
.single .entry-content ol,
.wp-block-list {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    margin-left: 0;
    /* pl-6 */
}

.page .entry-content ul,
.wp-block-list:not(ol) {
    list-style-type: disc;
}

.page .entry-content ul li,
.page .entry-content ol li,
.wp-block-list li {
    margin-bottom: 0.5rem;
    /* space-y-2 equivalent */
}

.page .entry-content ul li::marker,
.wp-block-list:not(ol) li::marker {
    color: rgba(255, 255, 255, 0.40);
    /* Subdued bullets */
}

/* Gutenberg Links */
.page .entry-content a:not(.wp-block-button__link):not(.hero-btn),
.single .entry-content a:not(.wp-block-button__link):not(.hero-btn) {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-base);
}

.page .entry-content a:not(.wp-block-button__link):not(.hero-btn):hover,
.single .entry-content a:not(.wp-block-button__link):not(.hero-btn):hover {
    color: #ffffff;
    text-decoration: underline;
}

/* =============================================================================
   CUSTOM GUTENBERG BLOCK STYLES
   Registering utility classes that can be applied to blocks via the editor "Advanced" tab
   or registered as formal Block Styles in JS.
   ============================================================================= */

/* The "Legal Document" pill badge used at the top of the Privacy Policy */
.is-style-agency-badge {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    /* text-sm */
    color: var(--color-accent);
    letter-spacing: 0.2em;
    /* tracking-[0.2em] */
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    /* py-2 px-4 */
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 78, 0, 0.30);
    /* border-[#FF4E00]/30 */
    background-color: rgba(255, 78, 0, 0.05);
    /* bg-[#FF4E00]/5 */
    backdrop-filter: blur(4px);
    /* backdrop-blur-sm */
    display: inline-block;
    margin-bottom: 2rem;
    /* mb-8 */
    margin-top: 0 !important;
}

@media (max-width: 48rem) {
    .is-style-agency-badge {
        font-size: 10px;
        padding: 0.375rem 0.75rem;
        /* py-1.5 px-3 */
    }
}

code,
pre,
kbd,
samp,
.font-mono {
    font-family: var(--font-mono);
}

/* Strip default margins from headings ONLY inside custom agency blocks,
   but allow them in the raw entry-content for standard pages */
.wp-block-group.agency-block h1,
.wp-block-group.agency-block h2,
.wp-block-group.agency-block h3,
.wp-block-group.agency-block h4 {
    margin-top: 0;
}

/* Prevent GeneratePress from padding the page wrapper on our full-bleed pages */
.entry-content>div:first-child {
    margin-top: 0 !important;
}

.entry-content>div:last-child {
    margin-bottom: 0 !important;
}

/* --------------------------------------------------------------------------
   Default Page Template Structure (e.g. for Privacy Policy)
   Adding the subtle technical grid background and formatting the container.
   -------------------------------------------------------------------------- */
body.page:not(.home) .inside-article {
    /* Base padding matches the pt-32 pb-20 */
    padding-top: 8rem;
    padding-bottom: 5rem;
    position: relative;
    max-width: 48rem;
    /* max-w-3xl */
    margin-left: auto;
    margin-right: auto;

}

@media (min-width: 48rem) {
    body.page:not(.home) .inside-article {
        padding-top: 10rem;
        padding-bottom: 8rem;
    }
}

/* The subtle technical grid background inserted pseudo-element on the page itself */
body.page::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 4rem 4rem;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 20%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 20%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}


/* =============================================================================
   GLOBAL UTILITY CLASSES
   From index.css @layer utilities — available everywhere.
   ============================================================================= */

/* Grain noise texture — used in CTA section and portfolio cards */
.u-grain,
.bg-grain {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Outlined text — used in hero display text */
.u-text-stroke,
.text-stroke {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.20);
    color: transparent;
}

.u-text-stroke-hover:hover,
.text-stroke-hover:hover {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 1);
    color: #ffffff;
}

/* Accent colour helpers */
.u-text-accent {
    color: var(--color-accent);
}

.u-bg-accent {
    background-color: var(--color-accent);
}

.u-border-accent {
    border-color: var(--color-accent);
}


/* =============================================================================
   SHARED LAYOUT HELPERS
   Repeated container/grid patterns used across multiple blocks.
   ============================================================================= */

/* Site-width container (max-w-7xl mx-auto px-6) */
.u-container {
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-px);
    padding-right: var(--container-px);
    box-sizing: border-box;
}

/* Narrow container (max-w-4xl — used in LeadMagnet) */
.u-container--narrow {
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-px);
    padding-right: var(--container-px);
    box-sizing: border-box;
}

/* Common section spacing (py-20 md:py-32) */
.u-section {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
}

@media (min-width: 48rem) {
    .u-section {
        padding-top: var(--space-2xl);
        padding-bottom: var(--space-2xl);
    }
}


/* =============================================================================
   GENERATEPRESS OVERRIDES
   Keeps agency page templates clean from GP's default chrome.
   ============================================================================= */

/* Hide default entry title on pages (we use block headings instead) */
.page .entry-header {
    display: none;
}

/* Remove focus box-shadow that browsers + GP add on inputs */
input:focus,
input:active,
textarea:focus,
textarea:active {
    box-shadow: none !important;
    outline: none !important;
}

/* Last p/ul margin removal — avoids spacing gaps inside containers */
p:last-child,
ul:last-child,
ul li:last-child,
ol li:last-child {
    margin-bottom: 0;
}


/* =============================================================================
   BLOCK FONT INHERITANCE SHORTHAND
   Since every block already has its own scoped CSS, these ensure elements
   that don't have an explicit font-family set still get the right one.
   ============================================================================= */

/* Any element with these Tailwind-inspired class patterns inherits correctly */
[class*="__heading"],
[class*="__title"],
[class*="-heading"] {
    font-family: var(--font-display);
}

[class*="__badge"],
[class*="__mono"],
[class*="__date"],
[class*="__classified"],
[class*="__label"] {
    font-family: var(--font-mono);
}

/* =============================================================================
   404 ERROR PAGE STYLES
   ============================================================================= */
.agency-404-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--color-page-bg, #050505);
    overflow: hidden;
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.agency-404-bg-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 4rem 4rem;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 20%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 20%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.agency-404-glow-wrap {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.agency-404-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40vw;
    height: 40vw;
    border-radius: 50%;
    background-color: rgba(255, 78, 0, 0.20);
    filter: blur(120px);
    animation: agency-404-pulse 8s ease-in-out infinite;
}

@keyframes agency-404-pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

.agency-404-content {
    position: relative;
    z-index: 20;
    max-width: 48rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: agency-404-fade-up 0.6s ease-out forwards;
}

@keyframes agency-404-fade-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.agency-404-badge {
    font-family: var(--font-mono, monospace);
    font-size: 0.875rem;
    color: var(--color-accent, #FF4E00);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 78, 0, 0.30);
    background-color: rgba(255, 78, 0, 0.05);
    backdrop-filter: blur(4px);
    margin-bottom: 2rem;
    display: inline-block;
}

.agency-404-bigtext {
    font-family: var(--font-display, sans-serif);
    font-size: clamp(6rem, 20vw, 15rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -0.05em;
    margin-bottom: 1rem;
}

.agency-404-title {
    font-family: var(--font-display, sans-serif);
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.agency-404-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.125rem;
    max-width: 32rem;
    line-height: 1.6;
    margin: 0 auto 2.5rem auto;
}

.agency-404-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #ffffff;
    color: #000000;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background-color var(--transition-base, 0.3s), color var(--transition-base, 0.3s);
    text-decoration: none !important;
}

.agency-404-btn:hover {
    background-color: var(--color-accent, #FF4E00);
    color: #ffffff;
}

.agency-404-btn svg {
    width: 1rem;
    height: 1rem;
}

/* =============================================================================
   GeneratePress Header & Navigation Overrides
   Match original Header.tsx design.
   ============================================================================= */

/* Full width for sticky header inside-navigation & normal inside-header */
.inside-header,
.is_stuck .main-navigation .inside-navigation {
    max-width: 100% !important;
    padding: 20px 40px !important;
    box-sizing: border-box;
}

@media (max-width: 768px) {

    .inside-header,
    .is_stuck .main-navigation .inside-navigation {
        padding: 20px 24px !important;
    }
}

/* Glassmorphism / Blur for the sticky wrapper */
.sticky-enabled .main-navigation.is_stuck {
    background-color: rgba(5, 5, 5, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 99999 !important;
}

.inside-article {
    position: relative;
    z-index: 9;
}

.main-navigation.navigation-stick.has-sticky-branding .inside-navigation.grid-container {

    padding-top: 10px;
    padding-bottom: 10px;
}

/* Match Header.tsx text logo styling */
.main-title a,
.site-branding .main-title {
    font-family: var(--font-display, "Syne", sans-serif);
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--color-text, #ffffff) !important;
    text-decoration: none !important;
    line-height: 1;
}

.main-title a:hover {
    color: var(--color-text-muted, rgba(255, 255, 255, 0.8)) !important;
}

/* =============================================================================
   NAV CTA BUTTON — menu item #72
   Styled as a solid orange pill to stand out from regular nav links.
   Works in desktop header nav and GeneratePress slide-out mobile nav.
   ============================================================================= */
body .menu-item-72>a {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem !important;
    background-color: var(--color-accent, #FF4E00) !important;
    color: #ffffff !important;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none !important;
    border: 2px solid var(--color-accent, #FF4E00);
    transition: background-color 0.2s ease, color 0.2s ease !important;
    line-height: 1 !important;
}

body .menu-item-72>a:hover,
body .menu-item-72>a:focus-visible {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #ffffff !important;
}

/* Slide-out / mobile menu — add a little breathing room */
.slide-out-container .menu-item-72>a {
    margin-top: 0.5rem;
}

.forminator-response-message.forminator-error.forminator-accessible {
    display: none;
}