.fonts-pending body {
    visibility: hidden;
}

:root {
    --content-margin: 12%;
    
    --cream: #F8F6F1;
    --bottle-green: #4F6F58;
    --text-color: #35553e;
    --overlay: color-mix(in srgb, var(--text-color) 80%, transparent);
    --section-color: #d4e7d8;
    
    --icon-size: 20px;

    --nav-height: 42px;
    --nav-links-gap: 3.0em;
    --nav-font-weight: 600;
    --nav-font-weight-stuck: 600;

    --text-size: 1.0rem;
    --text-nav-size: 1.0rem;
    --text-header-size: 3rem;
    --text-header-subtitle-size: 1.2rem;
    --text-hero-size: 1.3rem;
    --text-content-header-size: 1.8rem;
    --text-content-size: 1.1rem;
    --text-content-bigsection-size: 1.1rem;
    --text-content-service-header-size: 1.2rem;
    
    --transition-nav-duration: 0.35s;
}

* {
    box-sizing: border-box;
}

a {
    /* color: var(--bottle-green); */
    text-decoration: none;
}

.fraunces-arborea {
    font-family: "Fraunces", serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    font-variation-settings:
        "SOFT" 50,
        "WONK" 0;
}

.source-sans-3-arborea {
    font-family: "Source Sans 3", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
}

span.maticon {
    /* font-family: 'Material Symbols Outlined'; */
    font-family: 'Material Icons', Arial;
    font-weight: normal;
    font-style: normal;
    font-size: var(--icon-size);
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings:
        'FILL' 0,
        'wght' 200,
        'GRAD' 0,
        'opsz' 24;
}

.scaling {
    transform: scale(1) translateZ(0);
    transform-origin: center;
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.scaling:hover {
    transform: scale(1.05) translateZ(0);
}

body {
    margin: 0;
    color: var(--text-color);
    background: var(--section-color);
    font-size: var(--text-size);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 86px;
}

/*** HEADER ********************/

.site-header {
    width: 100%;
    background-color: var(--bottle-green);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-header .logo {
    width: 112px;
    padding-top: 16px;
    padding-bottom: 16px;
    height: auto;
}   
.header-inner {
    padding: 1rem var(--content-margin);
    text-align: center;
}

.header-inner h1 {
    margin: 0;
    color: var(--cream);
    font-size: var(--text-header-size);
    font-weight: 600;
    letter-spacing: 0.03em;
}

.site-header .header-inner .subtitle {
    margin: 0.35rem 0 0;
    color: var(--cream);
    font-size: var(--text-header-subtitle-size);
}

/*** menu toggle ***/

.menu-toggle {
    display: none;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid rgba(79, 111, 88, 0.35);
    background: var(--cream);
    color: var(--bottle-green);
    border-radius: 6px;
    padding: 0.45rem 0.7rem;
    font: inherit;
    font-size: 0.95rem;
    cursor: pointer;
}

.menu-toggle-icon {
    font-size: 1.05rem;
    line-height: 1;
}

/*** navigation ***/

.section-nav {
    font-size: var(--text-nav-size);
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 950;
    width: 100%;
    background-color: var(--cream);
    transform: translateZ(0);
    backface-visibility: hidden;
    transition: box-shadow var(--transition-nav-duration) ease, background-color var(--transition-nav-duration) ease, color var(--transition-nav-duration) ease;
}

.section-nav a {
    color: var(--bottle-green);
}

.section-nav.is-stuck {
    background-color: var(--text-color);
    color: var(--cream);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}
.section-nav.is-stuck a {
    color: var(--cream);
}

.section-nav-inner {
    position: relative;
    width: 100%;
    padding: 0 var(--content-margin);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-nav-inner div.container {
    display: inline-flex;
    flex-direction: row;
}

.section-nav-brand {
    position: absolute;
    left: 16px;
    top: 0;
    height: var(--nav-height);
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.section-nav-brand-logo {
    display: inline-block;
    width: 30px;
    height: 30px;
    background-color: currentColor;
    -webkit-mask-image: url("images/logo_arborea_20260508_square.svg");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-image: url("images/logo_arborea_20260508_square.svg");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    flex: 0 0 auto;
}

.section-nav-brand-title {
    font-family: "Fraunces", serif;
    font-size: 0.8rem;
    font-weight: 200;
    line-height: 1;
    color: var(--cream);
    white-space: nowrap;
}

.section-nav.is-stuck .section-nav-brand {
    color: var(--cream);
    display: inline-flex;
    opacity: 1;
}

.section-nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: var(--nav-links-gap);
    animation: nav-fade-in 0.45s ease both;
}

.section-nav-links a {
    text-align: left;
    display: inline-flex;
    font-weight: var(--nav-font-weight);
    letter-spacing: 0.02em;
    padding: 0.35rem 0.6rem;
    border-radius: 16px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.section-nav.is-stuck .section-nav-links a {
    font-weight: var(--nav-font-weight-stuck);
}

.section-nav-links a:hover,
.section-nav-links a:focus-visible {
    background: color-mix(in srgb, var(--bottle-green) 30%, white);
    color: var(--bottle-green);
    /* transform: translateY(-1px); */
}

.section-nav.is-stuck .section-nav-links a:hover,
.section-nav.is-stuck .section-nav-links a:focus-visible {
    background: color-mix(in srgb, var(--text-color) 90%, white);
    color: var(--cream);
    /* transform: translateY(-1px); */
}

@keyframes nav-fade-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*** MAIN BODY ********************/

main {
    padding-top: 0;
    text-align: justify;
}

/*** hero ***/

.hero {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.hero img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.6rem;
    padding: 0 var(--content-margin);
    background: var(--overlay);
    color: var(--bottle-green);
}

.hero-overlay p {
    color: var(--cream);
    margin: 0;
    max-width: 100%;
    font-size: var(--text-hero-size);
    line-height: 1.6;
    text-shadow: #111111 0px 2px 4px;
    text-align: center;
}

/*** general ***/

.inline {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
}

/*** content ***/

/* header */
.content-header {
    margin: 5.0rem var(--content-margin) 2.5rem var(--content-margin);
    background: var(--bottle-green);
    color: var(--cream);
    display: flex;
    justify-content: flex-start;
}
.content-header h2 {
    font-size: var(--text-content-header-size);
    margin: 0.25em;
    padding-left: 1.5em;
}

/* section */
.content-section {
    margin: 2.5rem var(--content-margin) 3rem;
    padding: 0 1.5em;
}

.content-section p {
    font-size: var(--text-content-size);
}

.content-section .profile-image {
    width: 112px;
    height: 112px;
    object-fit: cover;
    align-self: center;
}

.content-section h2 {
    /* subheaders */
    margin-top: 2.5rem;
    font-variant: small-caps;
    font-weight: 750;
    font-size: var(--text-content-header-size);
    letter-spacing: 0.04em;
    border-bottom: 2px solid color-mix(in srgb, var(--bottle-green) 50%, transparent);
}

.content-section img:not(.appointment img):not(.profile-image) {
    width: auto;
    height: 220px;
}

.content-section.bigsection p {
    margin: 0;
    font-size: var(--text-content-bigsection-size);
    line-height: 1.8;
}

/* services section */
.content-section .service {
    padding: 0 4vw;
    display: flex;
    flex-direction: row;
    width: fit-content;
}

.content-section .service div {
    padding-left: 64px;
    width: auto;
}

.content-section .service h3 {
    display: block;
    font-size: var(--text-content-service-header-size);
    font-weight: 750;
    margin: 8px auto;
}

/* appointment section */
.content-section.appointment > p {
    /* first paragraph in appointment section, with general info */
    margin: 0 0 1.5em 0;
    font-size: var(--text-content-size);
}

.content-section.appointment .practitioner-info {
    display: flex;
    height: 52px;
    flex-direction: row;
}
.content-section.appointment .practitioner-info p {
    /* name of practitioner */
    width: 200px;
    font-weight: 900;
}

.content-section.appointment .practitioner-info .buttons {
    /* link buttons for phone, email, online appointment */
    align-items: flex-start;
    margin: auto 0;
    padding: 0 0 0 50px;
}

.content-section.appointment .practitioner-info .buttons .button {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    vertical-align: middle;
    justify-content: center;
    background-color: var(--bottle-green);
    border-radius: 12px;
    padding: 2px 12px;
    height: 36px;
    width: 8.0rem;
    margin-right: 1.5rem;
    font-weight: normal;
    font-style: normal;
}

.content-section.appointment .practitioner-info .buttons .button span:first-of-type {
    margin-right: 0.55rem;
    justify-content: flex-start;
}
.content-section.appointment .practitioner-info .buttons .button span:not(:first-of-type) {
    justify-content: center;
    white-space: nowrap;
}

.content-section.appointment .practitioner-info .buttons .button a {
    display: inline-flex;
    text-decoration: none;
    color: var(--cream);
    align-items: center;
    width: 100%;
    justify-content: center;
}

.content-section.appointment .practitioner-info .buttons .button img {
    display: block;
    width: var(--icon-size);
    margin-right: 0.55rem;
    justify-content: flex-start;
    height: auto;
    backface-visibility: hidden;
}

/*** map ***/
.content-section .map-paragraph p {
    width: 80%;
    text-align: left;
    font-size: 1.1rem;
    margin: 0 auto;
}

.content-section .map-placeholder {
    width: 80%;
    height: 450px;
    margin: 0 auto;
    background-color: var(--cream);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.content-section .map-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.25) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: map-shimmer 1.6s infinite;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.4s;
}

.content-section .map-placeholder.loaded::before {
    opacity: 0;
}

@keyframes map-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

/*** FOOTER ********************/

.site-footer {
    background-color: var(--bottle-green);
    color: var(--cream);
    text-align: center;
    padding: 1rem 0;
    width: 100%;
    margin-top: 2rem;
}


/*** MOBILE THEME ********************/

@media (max-width: 768px) {
    :root {
        --content-margin: 6%;
        --text-header-size: 1.3rem;
        --text-header-subtitle-size: 0.8rem;
        --text-hero-size: 1.0rem;
        --text-content-service-header-size: 1.4rem;
        --text-content-size: 1.2rem;
        --nav-height: 56px;
        --transition-nav-duration: 0s;
    }

    html {
        scroll-padding-top: 74px;
    }

    .header-inner {
        padding: 1rem var(--content-margin);
    }

    .site-header {
        padding: 12px 0 12px var(--content-margin);
    }

    .site-header .logo {
        width: 96px;
        height: auto;
    }

    .section-nav {
        top: 0;
        border-top: 0;
        width: 100%;
        background-color: var(--cream);
        border-top: 1px solid rgba(79, 111, 88, 0.2);
        border-bottom: 1px solid rgba(79, 111, 88, 0.2);
        overflow: visible;
        transition: background-color 0.2s ease;
    }

    .section-nav.is-stuck {
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
        background: var(--text-color);
    }

    .section-nav.is-stuck a {
        background: var(--bottle-green);
        color: var(--cream);
    }

    .section-nav-inner {
        margin: 0;
        padding: 0;
        min-height: 0;
        flex-direction: row;
        align-items: stretch;
        justify-content: center;
    }

    .section-nav-inner div.container {
        position: relative;
        width: 100%;
        margin: 0 3%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .section-nav-brand {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        gap: 0.4rem;
        display: inline-flex;
        justify-content: flex-end;
        opacity: 0;
        pointer-events: none;
    }

    .section-nav-brand-logo {
        width: 20px;
        height: 20px;
    }

    .section-nav-brand-title {
        font-size: 0.82rem;
    }

    .menu-toggle {
        display: inline-flex;
        width: fit-content;
        height: 40px;
        margin: auto 0;
    }

    .section-nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0.3rem;
        opacity: 0;
        padding: 2%;
        margin-top: 0;
        background-color: var(--cream);
        transform: translateY(-0.35rem) scaleY(0.96);
        transform-origin: top;
        clip-path: inset(0 0 100% 0 round 0 0 12px 12px);
        visibility: hidden;
        transition: clip-path 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.3s, background-color 0.2s ease;
        animation: none;
        pointer-events: none;
        overflow: hidden;
        z-index: 1;
        box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
    }

    .section-nav.menu-open .section-nav-links {
        opacity: 1;
        transform: translateY(0) scaleY(1);
        clip-path: inset(0 0 0 0 round 0 0 12px 12px);
        visibility: visible;
        transition-delay: 0s;
        pointer-events: all;
    }

    .section-nav.is-stuck .section-nav-links {
        background-color: var(--text-color);
    }

    .section-nav-links li {
        width: 100%;
    }

    .section-nav-links a {
        display: block;
        width: 100%;
        padding: 0.65rem 0.85rem;
        border: 1px solid rgba(79, 111, 88, 0.2);
        background: rgba(255, 255, 255, 0.65);
    }

    .hero,
    .hero img {
        height: 220px;
    }
    .hero-overlay {
        padding: 0 3%;
    }
    .hero-overlay {
        margin: 0;
    }

    .content-section {
        padding: 0;
        margin-left: var(--content-margin);
        margin-right: var(--content-margin);
    }
    
    .inline {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        text-align: justify;
    }

    .full-width {
        width: calc(100vw + (2 * var(--content-margin)));
        margin-left: calc(-1 * var(--content-margin));
        margin-right: calc(-1 * var(--content-margin));
        max-width: none;
    }

    .content-section img:not(.appointment img):not(.profile-image) {
        width: 100vw;
        height: auto;
        border-radius: 0px;
        border-width: 0;
    }

    .content-section .service {
        margin-left: 0;
        flex-direction: column;
    }
    .content-section .service div {
        margin-left: 0;
        padding-left: 0;
    }
    .content-section .service p {
        width: 100%;
    }
    .content-section .service h3 {
        font-weight: 900;
        text-align: center;
    }
    .content-section p {
        width: 100%;
    }

    .content-section .profile-image {
        width: 33vw;
        height: 33vw;
        margin-top: 16px;
        object-fit: cover;
    }

    .content-header {
        margin: 0;
        background: var(--bottle-green);
        color: var(--cream);
        display: flex;
        justify-content: flex-start;
    }

    .content-header h2 {
        padding-left: var(--content-margin);
    }

    /* appointment section */
    .content-section.appointment > p {
        margin: 0;
    }

    .content-section.appointment .practitioner-info {
        flex-direction: column;
        width: 100%;
        align-items: center;
        height: auto;
    }
    .content-section.appointment .practitioner-info p {
        font-size: 1.4rem;
        width: fit-content;
        margin-right: auto;
        margin-bottom: 8px;
        margin-left: auto;
        font-weight: 900;
    }

    .content-section.appointment .practitioner-info .buttons {
        align-items: flex-start;
        margin: auto 0;
        padding: 0;
        flex-direction: column;
        display: flex;
    }

    .content-section.appointment .practitioner-info .buttons .button {
        margin: 0 0 8px 0;
        width: 50vw;
        height: 3rem;
    }

    .content-section.appointment .practitioner-info .buttons .button a {
        width: 100%;
        justify-content: center;
    }
    /* map section */
    .content-section .map-placeholder {
        height: 250px;
        width: calc(100% + (2 * var(--content-margin)));
        margin-left: calc(-1 * var(--content-margin));
        margin-right: calc(-1 * var(--content-margin));
        max-width: none;
    }

    .site-footer {
        margin: 0;        
    }
    .site-footer p {
        background-color: var(--bottle-green);
        color: var(--cream);
        text-align: center;
        font-size: 0.9rem;
        padding: 0;
    }
}
