/*
Theme Name: Jennifer Barron Interiors
Theme URI: https://blogcto.com/projects/jennifer-barron-interiors
Author: Richard Seabrook (BlogCTO)
Author URI: https://blogcto.com
Description: A custom-built theme for Jennifer Barron Interiors
Requires at least: 6.1
Tested up to: 6.2
Requires PHP: 5.6
Version: 1.0
Text Domain: jennifer_barron_interiors
*/

/*----------------------------------------------------------------------------
	
	Fonts
	
----------------------------------------------------------------------------*/
@font-face {
    font-family: 'Bembo';
    src: url('assets/fonts/bembo-mt-pro-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Engravers Gothic';
    src: url('assets/fonts/engravers-gothic-bt-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Montage Serif';
    src: url('assets/fonts/montage-serif-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Sweet Sans';
    src: url('assets/fonts/sweet-sans-regular.woff2') format('woff2');
}
/* TODO: Add theme fonts here */
@font-face {
    font-family: 'gadabout-icons';
    src: url('assets/fonts/gadabout-icons.woff2?73546164') format('woff2');
}

/*----------------------------------------------------------------------------
	
	Variables
	
----------------------------------------------------------------------------*/
:root {

    --font-bembo: 'Bembo';
    --font-engravers-gothic: 'Engravers Gothic';
    --font-montage-serif: 'Montage Serif';
    --font-sweet-sans: 'Sweet Sans';
    /* TODO: Add theme font variables here */
    --font-icons: 'gadabout-icons';

    --theme-color-sage: #A5B2B0;
    --theme-color-cream: #F4ECE6;
    --theme-color-dark-grey: #2E2C2D;
    --theme-color-gold: #BC955F;
    --theme-color-olive: #4B4530;
    --theme-color-slate-blue: #2F4F63;
    /* TODO: Add theme colors here */
}

/*----------------------------------------------------------------------------
	
	General
	
----------------------------------------------------------------------------*/
body {
    background-color: var(--theme-color-cream);
    color: var(--theme-color-gold);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.active {
    overflow: hidden;
}
/* Shop Page template gets its own palette: sage ground, slate-blue text.
   Elements that inherit their color flip via the body rule; the header/footer
   chrome (wordmark, monogram, toggler, drawer) is hardcoded gold, so it gets
   explicit slate-blue overrides — same approach as the Olive Background page. */
body.page-template-page-shop {
    background-color: var(--theme-color-sage);
    color: var(--theme-color-slate-blue);
}
body.page-template-page-shop .header__wordmark,
body.page-template-page-shop .header__toggler,
body.page-template-page-shop .drawer__close,
body.page-template-page-shop .drawer__monogram,
body.page-template-page-shop .footer__wordmark,
body.page-template-page-shop .footer__monogram {
    color: var(--theme-color-slate-blue);
}
body.page-template-page-shop .drawer {
    background-color: var(--theme-color-sage);
    color: var(--theme-color-slate-blue);
}
.aligncenter {
    margin-left: auto;
    margin-right: auto;
}

/*
	Constrained content layout. Now that page.php no longer wraps the content in
	a Bootstrap container, this gives the front-end the same width control as the
	block editor: top-level blocks default to the theme.json contentSize,
	.alignwide widens to wideSize, and .alignfull runs edge-to-edge. The side
	padding keeps constrained content off the screen edges on small viewports;
	full-width sections break out of it.
*/
.entry-content > * {
    max-width: var(--wp--style--global--content-size);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}
.entry-content > .alignwide {
    max-width: var(--wp--style--global--wide-size);
}
.entry-content > .alignfull {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}



/*----------------------------------------------------------------------------
	
	Animations
	
----------------------------------------------------------------------------*/
.page-transition-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    background: var(--theme-color-cream);
}
.page-transition-overlay__inner {
    pointer-events: none;
}


/*----------------------------------------------------------------------------

	Template Parts

----------------------------------------------------------------------------*/

/*----------------------------------------------------------------------------

	Loading screen (home page only)

	Cream full-viewport cover shown on the initial homepage load. The gold icon
	fades in, then the whole screen fades out, revealing the slideshow. Pure CSS
	keyframes; scripts.js removes the node once it has faded out. Sits outside the
	Barba container so it only appears on the first server render, not on
	subsequent in-site navigations.

----------------------------------------------------------------------------*/
.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--theme-color-cream);
    color: var(--theme-color-gold);
    animation: loadingScreenFadeOut 1.5s ease 2.5s forwards;
}
.loading-screen__icon {
    width: 96px;
    opacity: 0;
    animation: loadingIconFadeIn 1.5s ease 0.5s forwards;
}
.loading-screen__icon svg {
    display: block;
    width: 100%;
    height: auto;
}
@media screen and (min-width: 992px) {
    /* Match the footer monogram's desktop size (height-based, width auto) */
    .loading-screen__icon {
        width: auto;
    }
    .loading-screen__icon svg {
        width: auto;
        height: 100px;
    }
}
@keyframes loadingIconFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes loadingScreenFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; visibility: hidden; pointer-events: none; }
}

/*----------------------------------------------------------------------------

	Slideshow (home page)

----------------------------------------------------------------------------*/
.slideshow__slide {
    height: 100vh;
    /* svh (not dvh) so the height stays fixed as mobile browser chrome expands
       and collapses on scroll — dvh tracks the chrome and made the slide zoom. */
    height: 100svh;
}
.slideshow__slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/*----------------------------------------------------------------------------

	Header

----------------------------------------------------------------------------*/
.header {
    position: relative;
    z-index: 10;
    text-align: center;
}
/* Pages with the `floating_header` ACF field set get a header that overlays
   the page content (e.g. a full-bleed hero) instead of sitting above it. */
.floating-header .header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}
/* Dark scrim behind the header (between the content and the header) so the
   white header reads over a light hero. */
.floating-header #page {
    position: relative;
}
.floating-header #page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 400px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));
    z-index: 5;
    pointer-events: none;
}
.floating-header .header__wordmark,
.floating-header .header__menu a,
.floating-header .header__toggler {
    color: #fff;
}
/* The default nav hover fades items to 65% opacity, which looks muddy against
   the hero on the floating header — keep them fully white instead. */
.floating-header .header__menu a:hover {
    opacity: 1;
}
/* On mobile (hamburger layout) the floating header shows only the menu toggle —
   hide the wordmark so it doesn't sit over the hero. The desktop nav layout
   (>=992px) keeps the wordmark. */
@media screen and (max-width: 991.98px) {
    .floating-header .header__wordmark {
        display: none;
    }
    /* ...except the front page, which shows the header wordmark under the
       hamburger as its mobile logo (like non-floating pages) instead of one
       centered over the slideshow. Sized to match that former slideshow
       wordmark (up to 640px) rather than the narrower default header logo. */
    .home.floating-header .header__wordmark {
        display: block;
        width: 100%;
        max-width: 640px;
    }
}
.header__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 40px 24px;
}
.header__wordmark {
    display: block;
    width: 300px;
    max-width: 80vw;
    color: var(--theme-color-gold);
}
.header__wordmark svg {
    display: block;
    width: 100%;
    height: auto;
}

/* Hamburger toggler — mobile only, morphs into the drawer close (X) */
.header__toggler {
    position: relative;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    padding: 6px 0;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--theme-color-gold);
}
.header__toggler span {
    display: block;
    width: 34px;
    height: 1px;
    background-color: currentColor;
    transition: transform 0.3s ease;
}
.header__toggler.active span:first-child {
    transform: translateY(4px) rotate(45deg);
}
.header__toggler.active span:last-child {
    transform: translateY(-4px) rotate(-45deg);
}

/* Primary nav — desktop only */
.header__nav {
    display: none;
}
.header__menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: var(--font-montage-serif);
    font-size: 14px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}
.header__menu a {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}
.header__menu a:hover {
    opacity: 0.65;
}

/* Mobile menu drawer */
.drawer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    overflow-y: auto;
    background-color: var(--theme-color-cream);
    color: var(--theme-color-gold);
}
.drawer__close {
    position: fixed;
    top: 34px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    padding: 6px;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--theme-color-gold);
    transition: opacity 0.3s ease;
}
.drawer__close:hover {
    opacity: 0.65;
}
.drawer__close svg {
    display: block;
}
.drawer__inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 110px 32px 48px;
    text-align: center;
}
.drawer__nav {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.drawer__menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: var(--font-montage-serif);
    font-size: 20px;
    line-height: 50px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.drawer__menu a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}
.drawer__menu a:hover {
    opacity: 0.65;
}
.drawer__footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    padding-top: 48px;
}
.drawer__monogram {
    display: block;
    color: var(--theme-color-gold);
}
.drawer__monogram svg {
    display: block;
    width: 65px;
    height: auto;
}
.drawer__credits {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    font-family: var(--font-engravers-gothic);
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.drawer__credits a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}
.drawer__credits a:hover {
    opacity: 0.65;
}

@media screen and (min-width: 576px) {
    .header__inner {
        padding: 56px 24px;
        gap: 28px;
    }
    .header__wordmark {
        width: 540px;
    }
}

@media screen and (min-width: 992px) {
    .header__nav {
        display: block;
    }
    .header__toggler {
        display: none;
    }
}

/*----------------------------------------------------------------------------

	Single Project — header (eyebrow + title) above the full-bleed gallery

----------------------------------------------------------------------------*/
.project-single__header {
    text-align: center;
    padding: 40px 24px 36px;
}
.project-single__eyebrow {
    margin: 0;
    font-family: var(--font-montage-serif);
    font-size: 24px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--theme-color-gold);
}
.project-single__title {
    margin: 0;
    font-family: var(--font-montage-serif);
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--theme-color-gold);
}

/*----------------------------------------------------------------------------

	Footer

----------------------------------------------------------------------------*/
.footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    padding: 48px 32px;
    text-align: center;
}
/* Wordmark — desktop only (mobile footer mirrors the drawer's bottom) */
.footer__wordmark {
    display: none;
}
.footer__monogram {
    display: block;
    color: var(--theme-color-gold);
}
.footer__monogram svg {
    display: block;
    width: 65px;
    height: auto;
}
.footer__credits {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin: 0;
    font-family: var(--font-engravers-gothic);
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.footer__credits a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}
.footer__credits a:hover {
    opacity: 0.65;
}

@media screen and (min-width: 992px) {
    .footer__inner {
        flex-direction: row;
        gap: 32px;
        padding: 60px 48px;
        text-align: left;
    }
    .footer__wordmark {
        display: block;
        flex: 1 1 0;
        color: var(--theme-color-gold);
    }
    .footer__wordmark svg {
        display: block;
        width: 100%;
        max-width: 400px;
        height: auto;
    }
    .footer__monogram svg {
        width: auto;
        height: 100px;
    }
    .footer__credits {
        flex: 1 1 0;
        flex-direction: row;
        justify-content: flex-end;
        gap: 28px;
        font-size: 10px;
    }
}

/*----------------------------------------------------------------------------

	Page Template - Olive Background

	Swaps the cream/gold palette for olive/sage everywhere the default combo
	appears (body, header, footer, mobile drawer, content links). Elements
	that inherit their color flip automatically via the body rule; the rest
	are hardcoded to gold, so they get explicit overrides below.

----------------------------------------------------------------------------*/
body.page-template-page-olive-background {
    background-color: var(--theme-color-olive);
    color: var(--theme-color-sage);
}
body.page-template-page-olive-background .header__wordmark,
body.page-template-page-olive-background .header__toggler,
body.page-template-page-olive-background .drawer__close,
body.page-template-page-olive-background .drawer__monogram,
body.page-template-page-olive-background .footer__wordmark,
body.page-template-page-olive-background .footer__monogram {
    color: var(--theme-color-sage);
}
body.page-template-page-olive-background .drawer {
    background-color: var(--theme-color-olive);
    color: var(--theme-color-sage);
}
body.page-template-page-olive-background .entry-content a {
    color: var(--theme-color-sage);
    transition: opacity 0.3s ease;
}
body.page-template-page-olive-background .entry-content a:hover {
    opacity: 0.65;
}
/* Inquire page: drop the default underline on content links. */
body.page-inquire .entry-content a {
    text-decoration: none;
}

/*----------------------------------------------------------------------------

	Inquiry Form (Contact Form 7)

	Strips Bootstrap's filled .form-control look down to minimal underline
	fields in the page's foreground color (inherited / currentColor, so it
	tracks the Olive Background template's sage). Fields use Bootstrap floating
	labels (uppercase Engravers Gothic); fields not yet converted fall back to a
	plain visible placeholder until their markup is updated.

----------------------------------------------------------------------------*/
.wpcf7-form .row > [class*="col-"] {
    margin-bottom: 32px;
}
.wpcf7-form .form-control {
    background-color: transparent;
    border: 0;
    border-bottom: 1px solid currentColor;
    border-radius: 0;
    padding: 10px 0;
    color: inherit;
    font-family: var(--font-bembo);
    font-size: 16px;
    line-height: 1.5;
    box-shadow: none;
    transition: box-shadow 0.3s ease;
}
.wpcf7-form .form-control:focus {
    background-color: transparent;
    color: inherit;
    outline: none;
    box-shadow: 0 1px 0 0 currentColor;
}
.wpcf7-form .form-control::placeholder {
    color: inherit;
    opacity: 0.7;
}
/* Floating labels (Bootstrap .form-floating). Convert a field by wrapping its
   input + a trailing <label> in <div class="form-input-wrapper form-floating">.
   The placeholder must stay set on the input (Bootstrap keys :placeholder-shown
   off it) but render transparent so only the <label> shows — the generic
   ::placeholder rule above would otherwise reveal the placeholder AND the label
   at the same time. */
/* Large top padding (reserves room up top for the floated label) + small
   bottom padding so the resting label and typed text both sit just above the
   underline. Same padding in every state so nothing jumps on focus/fill. */
.wpcf7-form .form-floating > .form-control,
.wpcf7-form .form-floating > .form-control:focus,
.wpcf7-form .form-floating > .form-control:not(:placeholder-shown) {
    padding: 1.75rem 0 0.5rem;
}
.wpcf7-form .form-floating > .form-control::placeholder {
    color: transparent;
}
.wpcf7-form .form-floating > label {
    padding: 1.75rem 0 0;       /* match the input's top padding so the resting
                                   label lines up with where typed text appears */
    color: inherit;
    font-family: var(--font-engravers-gothic);
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
/* Longer prompt fields: add .form-floating--prompt to the wrapper for a
   sentence-case Sweet Sans label (matches the proof's question styling)
   instead of the short fields' uppercase Engravers label. */
.wpcf7-form .form-floating--prompt > label {
    font-family: var(--font-sweet-sans);
    font-size: 14px;
    letter-spacing: normal;
    text-transform: none;
}
/* Bootstrap paints an opaque ::after behind the floated label to mask the
   border; transparent so the olive background shows through (not white). Must
   match Bootstrap's own focus/filled selectors to win on specificity. */
.wpcf7-form .form-floating > .form-control:focus ~ label::after,
.wpcf7-form .form-floating > .form-control:not(:placeholder-shown) ~ label::after {
    background-color: transparent;
}
.wpcf7-form .form-floating > .form-control:focus ~ label,
.wpcf7-form .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: inherit;
    transform: scale(0.85) translateY(-1.5rem);
}
/* Textarea -> full bordered box with its own label above */
.wpcf7-form .form-label {
    display: block;
    margin-bottom: 12px;
    color: inherit;
    font-family: var(--font-sweet-sans);
    font-size: 14px;
}
.wpcf7-form textarea.form-control {
    border: 1px solid currentColor;
    padding: 14px;
    height: 100px;
}
.wpcf7-form textarea.form-control:focus {
    box-shadow: inset 0 0 0 1px currentColor;
}
/* Submit -> minimal underlined link, uppercase. Centered on mobile (Bootstrap's
   own .text-center on the wrapper handles that); right-aligned on md+ screens. */
@media (min-width: 768px) {
    .wpcf7-form .col-12.my-5.text-center {
        text-align: right !important;
    }
}
.wpcf7-form .wpcf7-submit {
    display: inline-block;
    width: auto;
    background: none;
    border: 0;
    border-bottom: 1px solid currentColor;
    border-radius: 0;
    padding: 0 2px 5px;
    color: inherit;
    font-family: var(--font-engravers-gothic);
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.wpcf7-form .wpcf7-submit:hover {
    opacity: 0.65;
}
.wpcf7-form .wpcf7-submit:focus {
    outline: none;
    box-shadow: none;
}
.wpcf7-form .wpcf7-submit:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 4px;
}
