/*
Theme Name: Pinbly Theme
Theme URI: https://pinbly.com
Author: Blue Beacon Creative
Author URI: https://bluebeaconcreative.com
Description: Tailwind-to-WordPress conversion theme for Pinbly. Uses ACF Pro blocks with Tailwind CSS (Option C: Tailwind base + optional per-block CSS overrides).
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: pinbly-theme
Tags: tailwind, acf, custom-blocks, landing-page

License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ==========================================================================
   THEME STYLES
   
   This theme uses Tailwind CSS as the primary styling framework.
   The compiled Tailwind output is loaded from assets/css/tailwind-output.css
   
   This file contains:
   1. Custom @font-face declarations (Helvena)
   2. Custom utility classes that extend Tailwind
   3. Component-specific styles that can't be done with utilities alone
   4. Editor/admin overrides are in assets/css/editor-overrides.css
   
   Per-block CSS overrides (optional) go in assets/css/blocks/[block-name].css
   ========================================================================== */

/* ==========================================================================
   1. CUSTOM FONTS - Helvena
   ========================================================================== */

@font-face {
    font-family: 'Helvena';
    src: url('assets/fonts/Helvena-Extralight.woff2') format('woff2'),
        url('assets/fonts/Helvena-Extralight.woff') format('woff');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Helvena';
    src: url('assets/fonts/Helvena-Light.woff2') format('woff2'),
        url('assets/fonts/Helvena-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Helvena';
    src: url('assets/fonts/Helvena-Regular.woff2') format('woff2'),
        url('assets/fonts/Helvena-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Helvena';
    src: url('assets/fonts/Helvena-Medium.woff2') format('woff2'),
        url('assets/fonts/Helvena-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Helvena';
    src: url('assets/fonts/Helvena-Semibold.woff2') format('woff2'),
        url('assets/fonts/Helvena-Semibold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Helvena';
    src: url('assets/fonts/Helvena-Bold.woff2') format('woff2'),
        url('assets/fonts/Helvena-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Helvena';
    src: url('assets/fonts/Helvena-Extrabold.woff2') format('woff2'),
        url('assets/fonts/Helvena-Extrabold.woff') format('woff');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Helvena';
    src: url('assets/fonts/Helvena-Black.woff2') format('woff2'),
        url('assets/fonts/Helvena-Black.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   2. CUSTOM UTILITY CLASSES
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }

/* Helvena for headlines */
.font-display {
    font-family: 'Helvena', system-ui, sans-serif;
}

/* Hero headline — italic text becomes accent-colored (blue)
   (WYSIWYG field: select text → italic → renders as <em>) */
.hero-headline em,
h1.hero-headline em {
    font-family: 'Helvena', system-ui, sans-serif;
    font-style: italic;
    color: #0623DA;
}

/* Testimonial quote — italic text becomes amber accent
   (WYSIWYG field: select text → italic → renders as <em>) */
.testimonial-quote em,
blockquote.testimonial-quote em {
    font-family: 'Helvena', system-ui, sans-serif;
    font-style: italic;
    color: #fbbf24; /* amber-400 */
}

/* Problem/Solution — Old Way headline italic = blue accent */
.old-way-headline em {
    font-family: 'Helvena', system-ui, sans-serif;
    font-style: italic;
    color: #0623DA;
}

/* Problem/Solution — New Way headline italic = amber accent */
.new-way-headline em {
    font-family: 'Helvena', system-ui, sans-serif;
    font-style: italic;
    color: #fbbf24; /* amber-400 */
}

/* Video Demo — "See Pinbly in action" headline italic = blue accent */
.video-section-headline em {
    font-family: 'Helvena', system-ui, sans-serif;
    font-style: italic;
    color: #0623DA;
}

/* How It Works — "Live in minutes, not weeks" headline italic = blue accent */
.hiw-headline em {
    font-family: 'Helvena', system-ui, sans-serif;
    font-style: italic;
    color: #0623DA;
}

/* Feature Bucket — headline italic = blue accent */
.feature-headline em {
    font-family: 'Helvena', system-ui, sans-serif;
    font-style: italic;
    color: #0623DA;
}

/* Feature Grid — headline italic = amber accent (dark section) */
.grid-headline em {
    font-family: 'Helvena', system-ui, sans-serif;
    font-style: italic;
    color: #fbbf24; /* amber-400 */
}

/* Brand accent color */
.text-accent {
    color: #0623DA;
}

.bg-accent {
    background-color: #0623DA;
}

.border-accent {
    border-color: #0623DA;
}

/* ==========================================================================
   3. COMPONENT-SPECIFIC STYLES
   ========================================================================== */

/* FAQ Accordion */
details summary::-webkit-details-marker {
    display: none;
}

details[open] summary .icon-plus {
    display: none;
}

details:not([open]) summary .icon-minus {
    display: none;
}

/* Pricing toggle */
.toggle-checkbox:checked + .toggle-label {
    background-color: #0623DA;
}

.toggle-checkbox:checked + .toggle-label .toggle-dot {
    transform: translateX(28px);
}

/* Dark section with blue glow */
.dark-glow {
    background: #0B0D12;
    position: relative;
}

.dark-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(800px circle at 50% 30%,
        rgba(37, 99, 235, 0.15) 0%,
        rgba(37, 99, 235, 0.05) 35%,
        rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
}

/* Dark card with subtle blue glow */
.dark-card-glow {
    background: #0B0D12;
    position: relative;
}

.dark-card-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(400px circle at 50% 0%,
        rgba(37, 99, 235, 0.12) 0%,
        rgba(37, 99, 235, 0.03) 50%,
        rgba(0, 0, 0, 0) 80%);
    pointer-events: none;
}

/* Button with dark glow effect */
.btn-dark-glow {
    background: linear-gradient(135deg, #0B0D12 0%, #131620 50%, #0B0D12 100%);
    position: relative;
    overflow: hidden;
}

.btn-dark-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(80px circle at 50% 0%,
        rgba(37, 99, 235, 0.4) 0%,
        rgba(37, 99, 235, 0.1) 50%,
        rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.btn-dark-glow:hover::before {
    background: radial-gradient(100px circle at 50% 0%,
        rgba(37, 99, 235, 0.5) 0%,
        rgba(37, 99, 235, 0.15) 50%,
        rgba(0, 0, 0, 0) 100%);
}

/* ==========================================================================
   4. VIDEO PLAYER STYLES
   ========================================================================== */

#videoContainer.has-played:hover #videoControls,
#videoContainer.has-played.paused #videoControls {
    opacity: 1 !important;
    pointer-events: auto !important;
}

#videoOverlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#playButtonLarge:hover {
    transform: scale(1.06);
    background: rgba(6, 35, 218, 1) !important;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.control-btn:hover svg {
    fill: #0623DA !important;
}

#progressContainer:hover {
    height: 12px !important;
}

#progressContainer:hover #progressTooltip {
    opacity: 1 !important;
}

#progressBar::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 14px;
    height: 14px;
    background: #0623DA;
    border-radius: 50%;
    transition: transform 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#progressContainer:hover #progressBar::after {
    transform: translateY(-50%) scale(1);
}

.volume-container:hover #volumeSlider {
    width: 80px !important;
    opacity: 1 !important;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #0623DA;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

#volumeSlider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #0623DA;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

#speedBtn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #0623DA !important;
}

/* CTA — headline italic = amber accent (dark section) */
.cta-headline em {
    font-family: 'Helvena', system-ui, sans-serif;
    font-style: italic;
    color: #fbbf24; /* amber-400 */
}

/* FAQ — headline italic = blue accent */
.faq-headline em {
    font-family: 'Helvena', system-ui, sans-serif;
    font-style: italic;
    color: #0623DA;
}

/* Pricing — headline italic = blue accent */
.pricing-headline em {
    font-family: 'Helvena', system-ui, sans-serif;
    font-style: italic;
    color: #0623DA;
}

/* Integrations — headline italic = blue accent */
.integrations-headline em {
    font-family: 'Helvena', system-ui, sans-serif;
    font-style: italic;
    color: #0623DA;
}


/* ==========================================================================
   5. BLOG STYLES — Archive, Cards, Single Post
   ========================================================================== */

/* ── Category Filter Pills ── */
.blog-filter-pill {
    background: white;
    color: #525252;
    border-color: #e5e5e5;
    cursor: pointer;
}

.blog-filter-pill:hover {
    border-color: #0623DA;
    color: #0623DA;
}

.blog-filter-pill.active {
    background: #0623DA;
    color: white;
    border-color: #0623DA;
}

/* ── Blog Card hover lift ── */
.blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
}

/* ── Blog Pagination ── */
.blog-pagination a,
.blog-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.blog-pagination a {
    color: #525252;
    border: 1px solid #e5e5e5;
    background: white;
}

.blog-pagination a:hover {
    border-color: #0623DA;
    color: #0623DA;
}

.blog-pagination span.current {
    background: #0623DA;
    color: white;
    border: 1px solid #0623DA;
}

.blog-pagination .dots {
    border: none;
    background: transparent;
    color: #a3a3a3;
}

/* ── Table of Contents (single post sidebar) ── */

/* ScrollTrigger pin adds inline transforms — keep width stable */
#blogTOC {
    width: 200px;
}

/* Prevent ScrollTrigger pin-spacer from breaking grid layout */
#blogTOCAside > .pin-spacer {
    width: 200px !important;
    min-width: 0 !important;
}

.blog-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

/* Continuous left rail */
.blog-toc-list::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e5e5;
    border-radius: 1px;
}

/* Each TOC item */
.blog-toc-list li {
    position: relative;
    padding-left: 16px;
}

/* Active blue indicator overlays the rail */
.blog-toc-list li.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 2px;
    background: #0623DA;
    border-radius: 1px;
    z-index: 1;
}

/* TOC links */
.blog-toc-list a {
    display: block;
    padding: 6px 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.5;
    color: #a3a3a3;
    text-decoration: none;
    transition: color 0.15s ease;
}

.blog-toc-list a:hover {
    color: #404040;
}

.blog-toc-list li.active a,
.blog-toc-list a.active {
    color: #171717;
    font-weight: 600;
}

/* ── Blog Prose — Article typography for single posts ──
   These rules style the post content. They work as fallback if
   the Tailwind Typography plugin isn't loaded and as enhancements
   when it is.
   ─────────────────────────────────────────────────────────────── */

/* Base spacing & font */
.blog-prose {
    font-size: 1.125rem;   /* 18px */
    line-height: 1.8;
    color: #525252;         /* neutral-600 */
}

/* Paragraphs */
.blog-prose p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    line-height: 1.8;
}

.blog-prose > p:first-child {
    margin-top: 0;
}

/* Headings */
.blog-prose h2 {
    font-family: 'Helvena', system-ui, sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 1.3;
    color: #171717;         /* neutral-900 */
    margin-top: 2.5em;
    margin-bottom: 0.75em;
    letter-spacing: -0.01em;
}

@media (min-width: 768px) {
    .blog-prose h2 {
        font-size: 1.875rem; /* 30px */
    }
}

.blog-prose h3 {
    font-family: 'Helvena', system-ui, sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1.4;
    color: #171717;
    margin-top: 2em;
    margin-bottom: 0.6em;
    letter-spacing: -0.005em;
}

@media (min-width: 768px) {
    .blog-prose h3 {
        font-size: 1.5rem;
    }
}

.blog-prose h4 {
    font-weight: 600;
    font-size: 1.125rem;
    color: #171717;
    margin-top: 1.75em;
    margin-bottom: 0.5em;
}

/* Links */
.blog-prose a {
    color: #0623DA;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.blog-prose a:hover {
    color: #041da0;
}

/* Bold */
.blog-prose strong {
    color: #171717;
    font-weight: 600;
}

/* Lists */
.blog-prose ul {
    list-style-type: disc;
    padding-left: 1.625em;
    margin-top: 1.25em;
    margin-bottom: 1.25em;
}

.blog-prose ol {
    list-style-type: decimal;
    padding-left: 1.625em;
    margin-top: 1.25em;
    margin-bottom: 1.25em;
}

.blog-prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    padding-left: 0.375em;
    color: #525252;
}

.blog-prose li::marker {
    color: #a3a3a3;
}

.blog-prose ul ul,
.blog-prose ol ol,
.blog-prose ul ol,
.blog-prose ol ul {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* Blockquotes */
.blog-prose blockquote {
    border-left: 3px solid #0623DA;
    background: #fafafa;
    border-radius: 0.75rem;
    padding: 1.5rem 1.5rem 1.5rem 1.75rem;
    margin: 2em 0;
    font-style: normal;
    color: #404040;
}

.blog-prose blockquote p {
    margin-top: 0.75em;
    margin-bottom: 0.75em;
}

.blog-prose blockquote p:first-child {
    margin-top: 0;
}

.blog-prose blockquote p:last-child {
    margin-bottom: 0;
}

/* Code (inline) */
.blog-prose code {
    font-size: 0.875em;
    background: #f5f5f5;
    color: #171717;
    padding: 0.2em 0.4em;
    border-radius: 0.375rem;
    font-weight: 500;
}

/* Code blocks */
.blog-prose pre {
    background: #171717;
    color: #e5e5e5;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 2em 0;
    font-size: 0.875rem;
    line-height: 1.7;
}

.blog-prose pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-weight: 400;
}

/* Horizontal rule */
.blog-prose hr {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin: 2.5rem 0;
}

/* Images */
.blog-prose img {
    border-radius: 0.75rem;
    margin-top: 2em;
    margin-bottom: 2em;
}

/* Figures / captions */
.blog-prose figure {
    margin: 2em 0;
}

.blog-prose figcaption {
    font-size: 0.875rem;
    color: #a3a3a3;
    text-align: center;
    margin-top: 0.75em;
}

/* Tables */
.blog-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    font-size: 0.9375rem;
}

.blog-prose thead th {
    font-weight: 600;
    color: #171717;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #e5e5e5;
}

.blog-prose tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f5f5f5;
    color: #525252;
}

.blog-prose tbody tr:last-child td {
    border-bottom: none;
}

/* First paragraph styling — slightly larger lead text */
.blog-prose > p:first-of-type {
    font-size: 1.2rem;
    line-height: 1.75;
    color: #404040;
}

/* Hide when category filter is active */
.blog-card.filter-hidden {
    display: none !important;
}

#blogHeroPost.filter-hidden {
    display: none !important;
}

/* ── Legal Page Block — prose overrides ── */

/* Legal body inherits .blog-prose but with slightly tighter spacing for dense legal text */
.legal-prose p {
    font-size: 1rem;
    line-height: 1.75;
}

.legal-prose h2 {
    font-size: 1.375rem;
    margin-top: 2em;
}

@media (min-width: 768px) {
    .legal-prose h2 {
        font-size: 1.625rem;
    }
}

.legal-prose h3 {
    font-size: 1.125rem;
    margin-top: 1.5em;
}

@media (min-width: 768px) {
    .legal-prose h3 {
        font-size: 1.25rem;
    }
}

/* Legal TOC uses the same rail styling as blog TOC */
.legal-toc-list a {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    line-height: 1.5;
}
