/*
Theme Name: TFC Luxe
Theme URI: https://www.thefergusonclinic.com
Description: High-contrast editorial luxury child theme for The Ferguson Clinic & Beauty Defined Hawaii. Built on Kadence.
Author: Dr. John Ferguson
Author URI: https://www.thefergusonclinic.com/dr-john-ferguson/
Template: kadence
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: tfc-luxe
*/

/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */

:root {
    /* Core palette — surgical precision */
    --tfc-black: #0D0D0D;
    --tfc-near-black: #1A1A1A;
    --tfc-charcoal: #2C2C2C;
    --tfc-graphite: #3D3D3D;
    --tfc-steel: #6B6B6B;
    --tfc-silver: #9A9A9A;
    --tfc-silver-bright: #C8C8C8;
    --tfc-fog: #E8E6E2;
    --tfc-ivory: #F3F1ED;
    --tfc-paper: #F8F6F3;
    --tfc-white: #FDFCFB;

    /* Accent — one metallic thread */
    --tfc-accent: #9A9A9A;
    --tfc-accent-hover: #C8C8C8;
    --tfc-accent-subtle: rgba(154, 154, 154, 0.15);

    /* Typography scale — modular, editorial */
    --font-display: 'Cormorant Garamond', 'Georgia', serif;
    --font-body: 'Outfit', 'Helvetica Neue', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1.0625rem;
    --text-lg: 1.1875rem;
    --text-xl: 1.375rem;
    --text-2xl: 1.75rem;
    --text-3xl: 2.25rem;
    --text-4xl: 3rem;
    --text-5xl: 3.75rem;
    --text-6xl: 5rem;

    /* Leading */
    --leading-tight: 1.1;
    --leading-snug: 1.25;
    --leading-normal: 1.65;
    --leading-relaxed: 1.8;

    /* Spacing — generous, luxury rhythm */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    --space-3xl: 8rem;
    --space-4xl: 12rem;

    /* Layout */
    --content-width: 740px;
    --wide-width: 1100px;
    --full-width: 1400px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --duration-fast: 200ms;
    --duration-normal: 400ms;
    --duration-slow: 700ms;
}


/* ==========================================================================
   RESET / BASE — override Kadence defaults
   ========================================================================== */

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 300;
    line-height: var(--leading-normal);
    color: var(--tfc-near-black);
    background-color: var(--tfc-paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0.005em;
}

::selection {
    background: var(--tfc-black);
    color: var(--tfc-paper);
}

a {
    color: var(--tfc-near-black);
    text-decoration: none;
    border-bottom: 1px solid var(--tfc-accent-subtle);
    transition: border-color var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out);
}

a:hover {
    color: var(--tfc-black);
    border-bottom-color: var(--tfc-accent-hover);
}


/* ==========================================================================
   TYPOGRAPHY — editorial hierarchy
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    color: var(--tfc-black);
    letter-spacing: -0.02em;
    line-height: var(--leading-tight);
}

h1 {
    font-size: var(--text-5xl);
    font-weight: 300;
    margin-bottom: var(--space-lg);
    line-height: 1.05;
}

h2 {
    font-size: var(--text-3xl);
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
    padding-top: var(--space-lg);
    position: relative;
}

/* Subtle rule above H2s — editorial section break */
.entry-content h2::before {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: var(--tfc-silver);
    margin-bottom: var(--space-md);
}

h3 {
    font-size: var(--text-2xl);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
    font-style: italic;
}

h4 {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--tfc-steel);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-xs);
}

p {
    margin-bottom: var(--space-md);
    max-width: 68ch;
}

strong {
    font-weight: 500;
    color: var(--tfc-black);
}

/* FAQ question styling — make bold questions stand out */
.entry-content p > strong:first-child:last-child,
.entry-content p > strong:only-child {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 500;
    font-style: italic;
    letter-spacing: -0.01em;
    color: var(--tfc-black);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-xs);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--tfc-fog);
}


/* ==========================================================================
   HEADER — minimal, authoritative
   ========================================================================== */

.site-header {
    background: var(--tfc-black) !important;
    border-bottom: 1px solid var(--tfc-charcoal);
}

/* Top bar — phone number */
.tfc-top-bar {
    background: var(--tfc-near-black);
    border-bottom: 1px solid var(--tfc-charcoal);
    padding: 0.4rem 0;
    font-size: var(--text-xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tfc-silver);
}

.tfc-top-bar a {
    color: var(--tfc-silver-bright);
    border-bottom: none;
    transition: color var(--duration-fast) var(--ease-out);
}

.tfc-top-bar a:hover {
    color: var(--tfc-white);
}

.tfc-top-bar-inner {
    max-width: var(--full-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Main header row */
.tfc-header-main {
    max-width: var(--full-width);
    margin: 0 auto;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo / site title in header */
.site-header .site-title,
.site-header .site-branding .site-title {
    font-family: var(--font-display) !important;
    font-size: var(--text-xl) !important;
    font-weight: 300 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: var(--tfc-white) !important;
}

.site-header .site-title a,
.site-header .site-branding a {
    color: var(--tfc-white) !important;
    border-bottom: none !important;
}

/* Navigation */
.site-header .navigation a,
.header-navigation a,
.site-header nav a {
    font-family: var(--font-body) !important;
    font-size: var(--text-xs) !important;
    font-weight: 400 !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
    color: var(--tfc-silver) !important;
    border-bottom: none !important;
    padding: 0.5rem 0 !important;
    position: relative;
    transition: color var(--duration-normal) var(--ease-out) !important;
}

.site-header .navigation a:hover,
.header-navigation a:hover,
.site-header nav a:hover {
    color: var(--tfc-white) !important;
}

/* Active nav underline */
.site-header .navigation a::after,
.header-navigation a::after,
.site-header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--tfc-silver-bright);
    transition: width var(--duration-normal) var(--ease-out);
}

.site-header .navigation a:hover::after,
.header-navigation a:hover::after,
.site-header nav a:hover::after {
    width: 100%;
}

.site-header .current-menu-item > a::after {
    width: 100% !important;
    background: var(--tfc-white) !important;
}

/* Book Now button in header */
.tfc-btn-book {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--tfc-white);
    border: 1px solid var(--tfc-silver) !important;
    border-bottom: 1px solid var(--tfc-silver) !important;
    padding: 0.65rem 1.8rem;
    transition: all var(--duration-normal) var(--ease-out);
    cursor: pointer;
}

.tfc-btn-book:hover {
    background: var(--tfc-white);
    color: var(--tfc-black);
    border-color: var(--tfc-white) !important;
}

/* Sticky header */
.site-header.item-is-fixed,
.site-header[data-shrink="true"] {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(13, 13, 13, 0.95) !important;
}


/* ==========================================================================
   PAGE HERO — typographic, no images needed
   ========================================================================== */

.entry-hero,
.page .entry-header {
    background: var(--tfc-black);
    color: var(--tfc-paper);
    padding: var(--space-3xl) var(--space-lg) var(--space-2xl);
    text-align: left;
    position: relative;
    overflow: hidden;
}

/* Subtle grain overlay on hero */
.entry-hero::after,
.page .entry-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
}

.entry-hero .entry-title,
.page .entry-header .entry-title {
    font-size: var(--text-5xl);
    font-weight: 300;
    color: var(--tfc-white);
    max-width: var(--wide-width);
    margin: 0 auto;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

/* Subtitle / tagline under hero title */
.entry-hero .entry-meta,
.page .entry-header .entry-meta {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tfc-silver);
    max-width: var(--wide-width);
    margin: var(--space-md) auto 0;
}


/* ==========================================================================
   CONTENT AREA — the reading experience
   ========================================================================== */

.site-main,
.content-area {
    background: var(--tfc-paper);
}

.entry-content-wrap,
.entry-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
}

/* First paragraph — slightly larger, acts as lede */
.entry-content > p:first-of-type {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--tfc-charcoal);
}

/* Increase specificity for Kadence page content */
.single-post .entry-content,
.page .entry-content {
    font-size: var(--text-base);
    line-height: var(--leading-normal);
}


/* ==========================================================================
   BUTTONS — across the site
   ========================================================================== */

.entry-content a[href*="tel:"],
.wp-block-button__link,
a.button,
button.button,
input[type="submit"] {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: transparent;
    color: var(--tfc-black);
    border: 1px solid var(--tfc-black) !important;
    border-bottom: 1px solid var(--tfc-black) !important;
    padding: 0.85rem 2.5rem;
    transition: all var(--duration-normal) var(--ease-out);
    cursor: pointer;
}

.wp-block-button__link:hover,
a.button:hover,
button.button:hover,
input[type="submit"]:hover {
    background: var(--tfc-black);
    color: var(--tfc-paper);
}

/* Primary / filled variant */
.is-style-fill .wp-block-button__link,
.tfc-btn-primary {
    background: var(--tfc-black);
    color: var(--tfc-paper) !important;
}

.is-style-fill .wp-block-button__link:hover,
.tfc-btn-primary:hover {
    background: var(--tfc-charcoal);
}


/* ==========================================================================
   CTA BANNER — appears at bottom of procedure pages
   ========================================================================== */

.tfc-cta-banner {
    background: var(--tfc-black);
    color: var(--tfc-paper);
    padding: var(--space-3xl) var(--space-lg);
    text-align: center;
    margin-top: var(--space-3xl);
    position: relative;
}

.tfc-cta-banner h2 {
    font-size: var(--text-4xl);
    color: var(--tfc-white);
    margin: 0 0 var(--space-sm);
}

.tfc-cta-banner h2::before {
    display: none;
}

.tfc-cta-banner p {
    color: var(--tfc-silver);
    font-size: var(--text-lg);
    max-width: 50ch;
    margin: 0 auto var(--space-lg);
}

.tfc-cta-banner .tfc-btn-book {
    font-size: var(--text-sm);
    padding: 1rem 3rem;
}


/* ==========================================================================
   FOOTER — dark, minimal
   ========================================================================== */

.site-footer {
    background: var(--tfc-black) !important;
    color: var(--tfc-silver) !important;
    border-top: 1px solid var(--tfc-charcoal);
}

.site-footer a {
    color: var(--tfc-silver-bright) !important;
    border-bottom: none;
}

.site-footer a:hover {
    color: var(--tfc-white) !important;
}

.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer .widget-title {
    font-family: var(--font-body) !important;
    font-size: var(--text-xs) !important;
    font-weight: 400 !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
    color: var(--tfc-silver) !important;
    margin-bottom: var(--space-sm) !important;
}

.site-footer p,
.site-footer .widget {
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--tfc-steel);
}

/* Footer bottom bar */
.tfc-footer-bottom {
    border-top: 1px solid var(--tfc-charcoal);
    padding: var(--space-md) 0;
    font-size: var(--text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tfc-graphite);
    text-align: center;
}


/* ==========================================================================
   PAGE-SPECIFIC ENHANCEMENTS
   ========================================================================== */

/* Home page — hero gets extra presence */
.home .entry-hero .entry-title,
.home .entry-header .entry-title,
body.page-template-default.home h1 {
    font-size: var(--text-6xl);
    letter-spacing: -0.04em;
}

/* Bio page — credentials section */
.page-template-default .entry-content h3 {
    font-size: var(--text-xl);
    border-left: 2px solid var(--tfc-silver);
    padding-left: var(--space-md);
    margin-left: 0;
}

/* Sidebar (if ever used) */
.widget-area {
    font-size: var(--text-sm);
}


/* ==========================================================================
   ANIMATIONS — subtle, intentional
   ========================================================================== */

/* Fade-in on scroll (JS-driven with .tfc-visible class) */
.tfc-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--duration-slow) var(--ease-out),
                transform var(--duration-slow) var(--ease-out);
}

.tfc-animate.tfc-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.tfc-animate-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity var(--duration-normal) var(--ease-out),
                transform var(--duration-normal) var(--ease-out);
}

.tfc-animate-stagger.tfc-visible > *:nth-child(1) { transition-delay: 0ms; opacity: 1; transform: translateY(0); }
.tfc-animate-stagger.tfc-visible > *:nth-child(2) { transition-delay: 80ms; opacity: 1; transform: translateY(0); }
.tfc-animate-stagger.tfc-visible > *:nth-child(3) { transition-delay: 160ms; opacity: 1; transform: translateY(0); }
.tfc-animate-stagger.tfc-visible > *:nth-child(4) { transition-delay: 240ms; opacity: 1; transform: translateY(0); }
.tfc-animate-stagger.tfc-visible > *:nth-child(5) { transition-delay: 320ms; opacity: 1; transform: translateY(0); }

/* Page load title reveal */
@keyframes tfc-title-reveal {
    from {
        opacity: 0;
        transform: translateY(30px);
        letter-spacing: 0.02em;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        letter-spacing: -0.03em;
    }
}

.entry-hero .entry-title,
.page .entry-header .entry-title {
    animation: tfc-title-reveal var(--duration-slow) var(--ease-out) both;
    animation-delay: 100ms;
}

/* Horizontal rule animation */
@keyframes tfc-rule-grow {
    from { width: 0; }
    to { width: 60px; }
}

.entry-content h2::before {
    animation: tfc-rule-grow var(--duration-slow) var(--ease-out) both;
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
    :root {
        --text-5xl: 2.75rem;
        --text-6xl: 3.5rem;
        --text-4xl: 2.25rem;
        --text-3xl: 1.875rem;
    }

    .entry-hero,
    .page .entry-header {
        padding: var(--space-2xl) var(--space-md) var(--space-xl);
    }
}

@media (max-width: 768px) {
    :root {
        --text-5xl: 2.25rem;
        --text-6xl: 2.75rem;
        --text-4xl: 1.875rem;
        --text-3xl: 1.5rem;
        --text-2xl: 1.375rem;
    }

    body {
        font-size: 1rem;
    }

    .entry-content-wrap,
    .entry-content {
        padding: var(--space-xl) var(--space-md);
    }

    .entry-hero,
    .page .entry-header {
        padding: var(--space-xl) var(--space-md) var(--space-lg);
    }

    h1 { font-size: var(--text-4xl); }

    .tfc-top-bar-inner {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }

    /* Stack header on mobile */
    .tfc-header-main {
        flex-direction: column;
        gap: var(--space-sm);
        padding: var(--space-sm) var(--space-md);
    }

    .tfc-cta-banner {
        padding: var(--space-2xl) var(--space-md);
    }

    .tfc-cta-banner h2 {
        font-size: var(--text-3xl);
    }
}

@media (max-width: 480px) {
    :root {
        --text-5xl: 1.875rem;
        --text-6xl: 2.25rem;
    }

    .tfc-btn-book {
        padding: 0.5rem 1.2rem;
    }
}


/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    .tfc-cta-banner,
    .tfc-top-bar {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
        font-size: 11pt;
    }

    h1 { font-size: 24pt; }
    h2 { font-size: 18pt; }
    h3 { font-size: 14pt; }

    a { color: #000; border: none; }
    a[href]::after { content: ' (' attr(href) ')'; font-size: 9pt; }
}
