/*======================================================
Large Desktop (1600px and up)
======================================================*/

@media (min-width: 1600px) {
    .menu ul li a {
        padding: 0 28px;
    }

    .menu ul li:hover::after,
    .menu ul li:focus-within::after,
    .menu ul li.home::after {
        width: calc(100% - 56px);
    }

    .hero-logo {
        max-width: 380px;
    }

    .hero-title-line {
        font-size: 27px;
    }

    .hero-title-script {
        font-size: 54px;
    }
}


/*======================================================
Desktop (up to 1440px)
======================================================*/

@media (max-width: 1440px) {
    :root {
        --header-h: 94px;
    }

    .header .container {
        max-width: 1280px;
    }

    /*.logo img {*/
    /*    height: 72px;*/
    /*}*/

    .menu ul li a {
        padding: 0 18px;
        font-size: 20px;
    }

    .menu .nav-item {
        margin: 0 10px 0 0;
    }

    .menu ul li:hover::after,
    .menu ul li:focus-within::after,
    .menu ul li.home::after {
        width: calc(100% - 36px);
    }

    .by-appoint-txt {
        font-size: 18px;
    }

    /* Shorter viewports: the banner's height budget shrinks, so the content has to too */
    .hero-section {
        padding: 16px 0;
    }

    .hero-logo {
        max-width: 265px;
        margin-top: -20px;
        margin-bottom: -12px;
    }

    .hero-title {
        margin-bottom: 20px;
    }

    .hero-title-line {
        font-size: 21px;
        letter-spacing: 0.18em;
    }

    .hero-title-script {
        font-size: 42px;
    }

    .common-btn {
        padding: 13px 28px;
        font-size: 16px;
    }
}


/*======================================================
Laptop (up to 1280px)
======================================================*/

@media (max-width: 1280px) {
    :root {
        --header-h: 89px;
    }

    .header .container {
        max-width: 1140px;
    }

    /*.logo img {*/
    /*    height: 68px;*/
    /*}*/

    /*.header.is-scrolled .logo img {*/
    /*    height: 56px;*/
    /*}*/

    .menu ul li a {
        padding: 0 12px;
        font-size: 18px;
        letter-spacing: 0.12em;
    }

    .menu .nav-item {
        margin: 0 8px 0 0;
    }

    .menu ul li:hover::after,
    .menu ul li:focus-within::after,
    .menu ul li.home::after {
        width: calc(100% - 24px);
    }

    .by-appoint-txt {
        font-size: 17px;
        margin-bottom: 8px;
    }

    .common-btn-sm {
        padding: 9px 18px;
        font-size: 14px;
    }

    .hero-section {
        padding: 12px 0;
    }

    .hero-logo {
        max-width: 240px;
        margin-top: -18px;
        margin-bottom: -10px;
    }

    .hero-title {
        margin-bottom: 18px;
    }

    .hero-title-line {
        font-size: 19px;
    }

    .hero-title-script {
        font-size: 38px;
    }
}


/*======================================================
Collapsed header – navbar-expand-xl breaks here (up to 1199px)
======================================================*/

@media (max-width: 1199px) {
    :root {
        --header-h: 84px;
    }

    .logo img {
        height: 62px;
    }

    /*.header.is-scrolled .logo img {*/
    /*    height: 52px;*/
    /*}*/

    /* The columns stay on one row down to 767px, so the toggler is a compact button and
       the menu drops out of flow as a panel instead of growing the header */
    .menu nav {
        display: flex;
        justify-content: flex-end;
        width: 100%;
    }

    .menu .navbar-toggler {
        width: auto;
        background-color: #c9a46b;
    }

    .menu .navbar-collapse {
        position: absolute;
        top: 100%;
        right: 0;
        z-index: 60;
        width: 300px;
        background-color: #000000;
        border: 1px solid rgba(212, 168, 90, 0.45);
        border-top: 0;
    }

    .menu ul {
        align-items: flex-start;
        width: 100%;
    }

    .menu .nav-item,
    .menu .nav-item:last-child {
        display: block;
        width: 100%;
        margin: 0;
    }

    .menu ul li a {
        display: block;
        width: 100%;
        padding: 12px 16px;
        border-bottom: 1px solid rgba(212, 168, 90, 0.18);
        font-size: 18px;
        text-align: left;
    }

    .menu ul li:last-child a {
        border-bottom: 0;
    }

    .menu ul li::after,
    .menu ul li:hover::after,
    .menu ul li:focus-within::after,
    .menu ul li.home::after {
        display: none;
    }

    .by-appoint-txt {
        margin-bottom: 8px;
        font-size: 17px;
    }

    .hero-section {
        min-height: 360px;
    }

    /* Auto-width makes the portrait proportionally wider as the hero gets shorter, so the
       feather has to run further before it reaches full opacity */
    .hero-bg-image {
        -webkit-mask-image:
            linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.15) 26%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 1) 74%),
            linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 72%, rgba(0, 0, 0, 0) 100%);
        mask-image:
            linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.15) 26%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 1) 74%),
            linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 72%, rgba(0, 0, 0, 0) 100%);
    }

    .hero-logo {
        max-width: 300px;
    }

    .hero-title-line {
        font-size: 20px;
    }

    .hero-title-script {
        font-size: 42px;
    }
}


/*======================================================
Tablet / iPad (up to 991px)
======================================================*/

@media (max-width: 991px) {
    .header .container {
        max-width: 720px;
    }

    .logo img {
        height: 62px;
    }

    /*.header.is-scrolled .logo img {*/
    /*    height: 52px;*/
    /*}*/

    /* Portrait moves to a full-width band under the content, feathered at the top */
    .hero-section {
        display: block;
        height: auto;
        min-height: 0;
        max-height: none;
        padding: 32px 0 300px;
        background-image:
            radial-gradient(ellipse 78% 34% at 50% 24%, rgba(72, 54, 30, 0.8) 0%, rgba(72, 54, 30, 0.25) 45%, rgba(72, 54, 30, 0) 75%),
            radial-gradient(ellipse 90% 40% at 50% 78%, rgba(46, 33, 17, 0.5) 0%, rgba(46, 33, 17, 0) 70%);
    }

    .hero-bg-image {
        top: auto;
        bottom: 0;
        width: 100%;
        height: 420px;
        object-fit: cover;
        object-position: 58% 22%;
        -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.45) 22%, rgba(0, 0, 0, 1) 48%);
        mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.45) 22%, rgba(0, 0, 0, 1) 48%);
        -webkit-mask-composite: source-over;
        mask-composite: add;
    }

    .hero-left {
        margin: 0 auto;
    }

    .hero-content {
        max-width: 520px;
    }

    .hero-logo {
        max-width: 300px;
        margin-top: -22px;
        margin-bottom: -12px;
    }
}


/*======================================================
Mobile (up to 767px)
======================================================*/

@media (max-width: 767px) {
    body {
        font-size: 17px;
    }

    /* col-12 kicks in here, so the header genuinely stacks and its height goes back to
       being content-driven */
    .header {
        display: block;
        height: auto;
        padding: 16px 0 14px;
    }

    .header.is-scrolled {
        height: auto;
    }

    .logo a {
        display: block;
        margin: auto;
        text-align: center;
    }

    .logo img {
        height: 56px;
        margin: 0 auto;
    }

    /*.header.is-scrolled .logo img {*/
    /*    height: 50px;*/
    /*}*/

    /* Stack order: logo, appointment block, then the collapsed menu */
    .header-btn {
        order: 2;
        padding: 16px 12px 0;
    }

    .menu {
        order: 3;
    }

    .menu nav {
        display: block;
    }

    .menu .navbar-toggler {
        width: 100%;
        margin-top: 14px;
        text-align: right;
    }

    .menu .navbar-collapse {
        position: static;
        width: 100%;
    }

    .by-appoint-txt {
        margin-bottom: 10px;
        font-size: 16px;
    }

    .hero-section {
        padding: 26px 0 250px;
    }

    .hero-bg-image {
        height: 330px;
    }

    .hero-logo {
        max-width: 270px;
        margin-top: -18px;
        margin-bottom: -8px;
    }

    .hero-title {
        margin-bottom: 24px;
    }

    .hero-title-line {
        font-size: 20px;
        letter-spacing: 0.2em;
    }

    .hero-title-script {
        font-size: 42px;
    }
}


/*======================================================
Small Mobile (up to 575px)
======================================================*/

@media (max-width: 575px) {
    .logo img {
        height: 54px;
    }

    .hero-section {
        padding-bottom: 220px;
    }

    .hero-bg-image {
        height: 300px;
    }

    .hero-logo {
        max-width: 260px;
    }

    .hero-title-line {
        font-size: 18px;
        letter-spacing: 0.16em;
    }

    .hero-title-script {
        font-size: 38px;
    }

    .common-btn {
        padding: 12px 24px;
        font-size: 15px;
        letter-spacing: 0.08em;
    }
}


/*======================================================
Extra Small Mobile (up to 400px)
======================================================*/

@media (max-width: 400px) {
    .hero-section {
        padding-bottom: 190px;
    }

    .hero-bg-image {
        height: 260px;
    }

    .hero-logo {
        max-width: 220px;
    }

    .hero-title-line {
        font-size: 16px;
        letter-spacing: 0.14em;
    }

    .hero-title-script {
        font-size: 38px;
    }

    .common-btn {
        padding-left: 22px;
        padding-right: 22px;
    }
}


/*======================================================
About / Services Split Section
======================================================*/

@media (max-width: 1440px) {
    .about-col,
    .services-col {
        padding: 64px 36px;
    }

    .about-title,
    .section-heading {
        font-size: 30px;
    }

    .about-content p {
        font-size: 17px;
    }
}

@media (max-width: 1199px) {
    .about-col,
    .services-col {
        padding: 56px 28px;
    }

    .section-eyebrow {
        font-size: 20px;
        letter-spacing: 0.24em;
    }

    .about-title,
    .section-heading {
        font-size: 26px;
    }

    .service-list {
        gap: 12px;
    }

    .service-icon {
        max-width: 82px;
        height: 82px;
        margin-bottom: 14px;
    }

    .service-label {
        font-size: 13px;
        letter-spacing: 0.06em;
    }
}

/* Columns stack here (col-md-12), so the divider moves from the side to the bottom */
@media (max-width: 991px) {
    .about-col {
        border-right: 0;
        border-bottom: 1px solid rgba(184, 137, 63, 0.55);
    }

    .about-content,
    .services-content {
        max-width: 640px;
    }

    .service-icon {
        max-width: 92px;
        height: 92px;
    }

    .service-label {
        font-size: 15px;
        letter-spacing: 0.08em;
    }
}

/* Five across stops fitting – wrap to 3 + 2 */
@media (max-width: 767px) {
    .about-col,
    .services-col {
        padding: 44px 16px;
    }

    .about-title,
    .section-heading {
        font-size: 24px;
    }

    .about-content p {
        font-size: 16px;
    }

    .service-list {
        gap: 26px 10px;
    }

    .service-item {
        flex: 0 0 calc(33.333% - 7px);
    }

    .service-icon {
        max-width: 74px;
        height: 74px;
        margin-bottom: 12px;
    }

    .service-label {
        font-size: 12px;
        letter-spacing: 0.05em;
    }
}

/* Labels are nowrap, so they set the floor for a three-across row */
@media (max-width: 575px) {
    .service-icon {
        max-width: 62px;
        height: 62px;
        margin-bottom: 10px;
    }

    .service-label {
        font-size: 11px;
        letter-spacing: 0.03em;
    }
}

@media (max-width: 359px) {
    .service-item {
        flex: 0 0 calc(50% - 5px);
    }

    .service-label {
        font-size: 12px;
    }
}


/*======================================================
Reduced Motion
======================================================*/

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .common-btn,
    .header,
    .logo img,
    .menu ul li a,
    .menu ul li::after {
        transition: none;
    }
}
