/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/
:root {
  --body-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--bgs-ink);
    -webkit-font-smoothing: antialiased;
    line-height: 1.62;
    overflow-x: hidden;
    min-height: var(--body-height);
}

p {
    max-width: 48ch;
}

@media (max-width: 478px) {
    p {
        max-width: 100%;
    }
}

#brx-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  min-height: 100%;
}

#brx-content .brxe-section:only-child {
    height: 100%;
    align-self: stretch;
    flex: 1;
}




/* ── SAL — match .reveal timing ─────────────────────────────────────────────── */
[data-sal] {
    --sal-duration: 0.9s;
    --sal-easing: cubic-bezier(.2, .6, .2, 1);
}


/* ── Header sticky (_header.js) ─────────────────────────────────────────────── */
:root {
    --header-height: auto;
}



header#brx-header {
    transition: opacity ease-in .5s;
    top: var(--wp-admin--admin-bar--height);
}


header#brx-header.is-sticky {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--wp-admin--admin-bar--height);
    z-index: 900;
    width: 100%;
    height: var(--header-height);
    transition: opacity ease-in .5s;
    opacity: 1;
}
.bricks-builder header#brx-header.is-sticky {
    position: absolute;
} 
header#brx-header.is-sticky.scrolling-down {
    opacity: 0;
    visibility: hidden;
    transition: opacity ease-out .5s;
}

header#brx-header.is-sticky.scrolling-up {
    opacity: 1;
    visibility: visible;
    transition: opacity ease-in .5s;
}


/* ── Media Frame ────────────────────────────────────────────────────────────── */
/*
  Layer order (bottom → top):
  0  .media background     — stripes (decorative; hidden by img when present)
  1  img.media__img        — photo
  2  ::after               — gradient shadow (always)
  3  ::before              — grain texture (only when .grain class present)
  4  .media__cap / __play  — caption and play button (only when enabled)
*/
.media {
    position: relative;
    overflow: hidden;
    width: 100%;
    background: repeating-linear-gradient(90deg, #13234f 0 22px, #16285a 22px 44px);
}

/* Any img/video/iframe inside fills the frame — works for Bricks Image & Video elements */
.media img,
.media video,
.media iframe,
.media__img,
.media__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
    border: 0;
}

/* Bricks element wrappers inside .media must also stretch */
.media > [class*="brxe-"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* gradient shadow — above img */
.media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15,29,81,0) 50%, rgba(10,19,48,.55) 100%);
    pointer-events: none;
    z-index: 2;
    box-shadow: inset 0 0 0 4px rgba(50, 56, 243, 0.1);
}

/* grain — above gradient, below caption; only when .grain class present */
.media.grain::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.05;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 3;
}

.media__cap {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 4;
    padding: 0.8rem 0.5rem;
    color: var(--bgs-stone);
    font-size: .75rem;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.media__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    opacity: 1;
    transition: opacity 0.3s ease;
    cursor: pointer;
}
.media.is-playing .media__play {
    opacity: 0;
    pointer-events: none;
}
.media__play-btn {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.7);
    display: flex;
    align-items: center;
    justify-content: center;
}
.media__play-btn::after {
    content: '';
    border-style: solid;
    border-width: 8px 0 8px 14px;
    border-color: transparent transparent transparent rgba(255,255,255,.9);
    margin-left: 3px;
}

