/*
 Theme Name:   Persimmon Long / Short Fund
 Theme URI:    https://www.persimmonfunds.com
 Description:  Genesis child theme for the Persimmon Long / Short Fund — a faithful WordPress conversion of the static persimmonfunds.com site. The site's compiled (Foundation-based) CSS is bundled under assets/vendor and enqueued by functions.php; this file holds the theme header plus glue that neutralizes Genesis structural wrappers so the original layout renders unchanged.
 Author:       Lawton Marketing Group
 Author URI:   https://lawtonmg.com
 Template:     genesis
 Version:      1.0.0
 License:      GPL-2.0-or-later
 Text Domain:  persimmon
*/

/* =========================================================================
   Genesis wrapper neutralization
   The original markup (.aw-header, .aw-content, .footer) provides its own
   full-width layout. Genesis injects .site-inner / .content-sidebar-wrap /
   .content containers with max-widths and padding — strip those so the
   bundled CSS controls layout exactly as on the live site.
   ========================================================================= */
.site-inner,
.content-sidebar-wrap,
.site-inner .content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    float: none;
    clear: both;
}

.site-inner {
    margin-top: 0;
}

/* Genesis adds .site-container; let bundled CSS own the page background */
.site-container {
    overflow: visible;
}

/* Home "tier 1" about block: the live site gives this block 60px top / 30px
   bottom padding (via these --block-content-padding vars that the bundled
   enhanced-block rule consumes). Without them it has 0 top / 15px bottom. */
.aw-content__preface .block__content {
    --block-content-padding-top: 60px;
    --block-content-padding-bottom: 30px;
}

/* =========================================================================
   Fixed header — matches the live site exactly.
   Live: .aw-header--sticky is position:fixed, 150px tall, padding 0, bg
   #fefefe, z-index 5, box-shadow 0 1px 4px rgba(0,0,0,.16). position:sticky
   can't be used here because the bundled off-canvas CSS sets body{overflow:
   hidden}, which breaks sticky. So we fix the Genesis .site-header wrapper and
   reserve its 150px height on the hero that follows.
   ========================================================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}
body.admin-bar .site-header {
    top: 32px;
}
div.aw-header--sticky,
div.aw-header--sticky.aw-header__sticky {
    position: static !important; /* the .site-header wrapper is the fixed element */
    top: auto !important;
    width: 100%;
    height: 150px;
    padding: 0;
    background: #fefefe;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
}

/* Reserve the fixed header's height so the hero/content starts below it
   (the live site reserves this via Foundation's sticky placeholder). Every
   page renders the .aw-header hero, so the offset lives there. */
header.aw-header {
    margin-top: 150px;
}

/* Logo — displayed at its natural aspect ratio (the new mark is ~2.45:1),
   capped at 110px tall and centered in the 150px header with whitespace
   above/below. No forced width, so it is never distorted. */
.logo-section img,
.block--logo .image__field--type-image img {
    box-sizing: border-box;
    height: auto;
    width: auto;
    max-height: 110px;
    max-width: 100%;
    padding: 0;
    object-fit: contain;
}

/* Phones (≤640px / 40em — the live site's logo breakpoint): header shrinks to
   120px with a ~80px logo, so the hero offset must match. */
@media screen and (max-width: 39.99875em) {
    div.aw-header--sticky,
    div.aw-header--sticky.aw-header__sticky {
        height: 120px;
        padding-top: 1.5rem;
    }
    header.aw-header {
        margin-top: 120px;
    }
    .logo-section img,
    .block--logo .image__field--type-image img {
        box-sizing: border-box;
        height: auto;
        width: auto;
        max-height: 70px;
        max-width: 100%;
        padding: 0;
        object-fit: contain;
    }
}

/* iPad / tablet (640–1023px): nudge the logo down a touch. */
@media screen and (min-width: 640px) and (max-width: 1023px) {
    .logo-section img,
    .block--logo .image__field--type-image img {
        padding-top: 1em;
    }
}

/* Hamburger (Foundation .menu-icon look) — visible only below large */
.navbar-menu-hamburger { display: none; }
.hamburger { text-align: right; }
.navbar-menu__menu-icon.menu-icon {
    display: inline-block;
    position: relative;
    width: 28px;
    height: 22px;
    background: transparent;
    border: 0;
    cursor: pointer;
    vertical-align: middle;
}
.navbar-menu__menu-icon.menu-icon::after {
    content: "";
    position: absolute;
    left: 0; top: 0;
    width: 28px; height: 3px;
    background: #333;
    box-shadow: 0 8px 0 #333, 0 16px 0 #333;
}

@media (max-width: 1023px) {
    .navbar-menu-hamburger { display: block; }
    #animated-menu {
        display: none;
        width: 100%;
    }
    #animated-menu.is-open { display: block; }
    #animated-menu .menu { width: 100%; }
}

/* -------------------------------------------------------------------------
 * Gravity Forms — match the site's button style (black, gold hover,
 * uppercase Open Sans) instead of the GF Orbital/framework blue default.
 * The GF framework reads these custom properties for the primary button.
 * ---------------------------------------------------------------------- */
/* Only the --gf-ctrl-btn-* variables can be overridden here — the framework's
 * own property rules sit on 5-class selectors that outrank anything sane, so
 * direct text-transform/font-size declarations on the button silently lose. */
body .gform_wrapper.gform-theme {
    --gf-ctrl-btn-bg-color-primary: #000000;
    --gf-ctrl-btn-bg-color-hover-primary: #c9a749;
    --gf-ctrl-btn-bg-color-focus-primary: #c9a749;
    --gf-ctrl-btn-border-color-focus-primary: #c9a749;
    --gf-ctrl-btn-color-primary: #ffffff;
    --gf-ctrl-btn-font-family: "Open Sans", sans-serif;
    --gf-ctrl-btn-font-size-md: 13px;
    --gf-ctrl-btn-text-transform: uppercase;
    --gf-ctrl-btn-letter-spacing: 1px;
}

/* Request Fund Literature (form 2): the default required-fields legend in
 * .gform_heading is suppressed (see functions.php) — the legend is instead
 * part of the intro HTML field, right above the Title field. The heading
 * div would otherwise render an empty <p> with margins. */
#gform_wrapper_2 .gform_heading { display: none; }
