:root {
    --color-primary: #3B3A2E;
    --color-secondary: #6B6A57;
    --color-tertiary: #8A8C78;
    --color-tint: #E6E6E0;
    --color-body: #3B3A2E;
    --color-wood: #BFC2B1;
    --color-paper: #F5F5F2;
    --font-heading: "carta-marina", serif; 
    --font-body: "brother-1816", Arial, sans-serif;

    /* Torn paper edge height */
    --tear-height: 22px;

    /* How far the 2 x 2 feature grid rises into the quote section */
    --feature-overlap: 170px;

    /* Global typography scale factor (1 = 100%, 0.9 = 90%, 0.85 = 85%, etc.) */
    --fs-scale: 1;

    --fs-sm: calc(clamp(0.85rem, 0.12vi + 0.82rem, 0.95rem) * var(--fs-scale));
    --fs-base: calc(clamp(1.05rem, 0.15vi + 0.98rem, 1.15rem) * var(--fs-scale));
    --fs-md: calc(clamp(1.17rem, 0.29vi + 1.1rem, 1.33rem) * var(--fs-scale));
    --fs-lg: calc(clamp(1.46rem, 0.57vi + 1.32rem, 1.78rem) * var(--fs-scale));
    --fs-xl: calc(clamp(1.60rem, 0.98vi + 1.40rem, 2.37rem) * var(--fs-scale));
    --fs-xxl: calc(clamp(1.90rem, 1.80vi + 1.50rem, 3.20rem) * var(--fs-scale));
    --fs-xxxl: calc(clamp(2.10rem, 2.30vi + 1.55rem, 3.70rem) * var(--fs-scale));

    /* Line height scale factor (1 = 100%, 0.9 = 90%, 0.85 = 85%, etc.) */
    --lh-scale: 1;

    --lh-sm: calc(1.5 * var(--lh-scale));
    --lh-base: calc(1.65 * var(--lh-scale));
    --lh-md: calc(1.4 * var(--lh-scale));
    --lh-lg: calc(1.3 * var(--lh-scale));
    --lh-xl: calc(1.2 * var(--lh-scale));
    --lh-xxl: calc(1.1 * var(--lh-scale));
    --lh-xxxl: calc(1.05 * var(--lh-scale));
}

h1,
h2,
h3,
h4,
h5,
h6,
.fs-h1,
.fs-h2,
.fs-h3,
.fs-h4,
.fs-h5,
.fs-h6 {
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-weight: 400;
}

h1,
.fs-h1 {
    font-size: var(--fs-xxxl);
    line-height: var(--lh-xxxl);
    text-transform: uppercase;
}

h2,
.fs-h2 {
    font-size: var(--fs-xxl);
    line-height: var(--lh-xxl);
}

h3,
.fs-h3 {
    font-size: var(--fs-xl);
    line-height: var(--lh-xl);
}

h4,
.fs-h4 {
    font-size: var(--fs-lg);
    line-height: var(--lh-lg);
}

h5,
.fs-h5 {
    font-size: var(--fs-md);
    line-height: var(--lh-md);
}

h6,
.fs-h6 {
    font-size: var(--fs-sm);
    line-height: var(--lh-sm);
}

p,
.fs-p {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    font-weight: 300;
}

p, .fs-p {
    font-size: var(--fs-base);
}

.fs-sm {
    font-size: var(--fs-sm);
}

.fs-md {
    font-size: var(--fs-md);
}

.fs-lg {
    font-size: var(--fs-lg);
}

.fs-xl {
    font-size: var(--fs-xl);
}


body {
    background-color: white;
    font-size: var(--fs-base);
    font-family: var(--font-body);
    color: var(--color-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    font-size: min(max(16px, 4vw), 18px);
}


a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}

p {
    margin-top: 20px;
    margin-bottom: 20px;
    font-family: var(--font-body);
}

p.lead {
    font-family: var(--font-lead);
}

.btn-primary {
    color: #fff;
    background-color: var(--color-primary);
    border: 0;
    text-decoration: none;
}

.btn-primary:hover {
    color: #fff;
    background-color: var(--color-secondary);
    border: 0;
    text-decoration: none;
}

.btn-secondary {
    color: #fff;
    background-color: var(--color-secondary);
    border: 0;
    text-decoration: none;
}

.btn-secondary:hover {
    color: #fff;
    background-color: var(--color-primary);
    border: 0;
    text-decoration: none;
}

/* LAYOUT */

header {
    background-color: var(--color-wood);
    background-image: url('images/bg-wood.jpg');
    color: var(--color-primary);
    margin-bottom: 0;
    z-index: 10;
    padding-top: 10px;
    padding-bottom: 10px;
}

.site-header .navbar {
    padding: 14px 0 10px;
}

.site-header .navbar-brand img {
    height: 45px;
    width: auto;
}

.site-header .navbar-nav .nav-link,
.site-footer .nav-link {
    font-family: var(--font-heading);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.site-header .navbar-nav .nav-link {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
}

.site-header .navbar-nav .nav-link:hover,
.site-header .navbar-nav .nav-link.active,
.site-footer .nav-link:hover {
    color: var(--color-secondary);
    text-decoration: none;
}

.site-header .navbar-toggler {
    border: 0;
    font-size: 1.4rem;
    box-shadow: none;
}

.navbar-nav .nav-link {
    color: var(--color-primary);
}

.tint {
    background-color: var(--color-tint);
    color: var(--color-body);
}

.swiper {
    width: 100%;
    height: auto;

    & .swiper-slide {
        width: auto;
    }

    & .swiper-pagination-bullet-active {
        background: #ffffff;
    }

    & .swiper-pagination-bullet {
        background: #ffffff;
    }

    & .swiper-button-next,
    .swiper-button-prev {
        color: #ffffff;
    }
}

#map {
    height: 650px;
}

footer {
    background-color: var(--color-wood);
    background-image: url('images/bg-wood.jpg');
    color: var(--color-primary);
    margin-top: 0;
    padding: 30px 0;
}

footer a {
    color: var(--color-primary);
}

/* POPUP BOX */

.popUpBoxBar {
    min-height: 700px;
}

.popUpBox {
    position: relative;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    flex-direction: column;
    text-align: center;
}

.popUpBox > div {
    z-index: 2;
    position: relative;
    top: 10%;
    -webkit-transition: all 0.4s ease-in-out 0s;
    -moz-transition: all 0.4s ease-in-out 0s;
    transition: all 0.4s ease-in-out 0s;
}

.popUpBox .infoBox {
    text-align: center;
    display: flex;
    flex-direction: column;
    position: relative;
    -webkit-transition: all 0.4s ease-in-out 0s;
    -moz-transition: all 0.4s ease-in-out 0s;
    transition: all 0.4s ease-in-out 0s;
    top: 50%;
    left: 50%;
    opacity: 0;
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

.popUpBox:hover > div {
    top: 0%;
}

.popUpBox:hover .infoBox {
    top: 40%;
    opacity: 1;
}

.popUpBox p {
    font-size: 1.3rem;
    font-weight: 100;
    max-width: 34ch;
    margin: 0 auto 30px auto;
}

.popUpBox .infoBox .btn {
    width: 50%;
    margin: 0 auto;

}

.popUpBox h3 {
    text-transform: uppercase;
    font-size: 3.5rem;
    font-weight: 100;
    margin-bottom: 20px;
    line-height: 4rem;
}


.popUpBox::before {
    content: "";
    position: absolute;
    top: 0px;
    right: 0px;
    bottom: 0px;
    left: 0px;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1;
}


/* ZOOM BOX */

.zoomBoxBar {
    min-height: 450px;
}

.zoomBox {
    position: relative;
    color: white;
    text-align: center;
    overflow: hidden;
    background-color: black;
    background-clip: content-box;
}

.zoomBox a {
    height: 100%;
    width: 100%;
    overflow: hidden;
    display: block;
}

.zoomBox img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    opacity: 1;
    transition: all .5s;
}

.zoomBox div h3 {
    z-index: 2;
    position: absolute;
    color: white;
    text-transform: uppercase;
    font-size: 0.9rem;
    -webkit-transition: all 0.4s ease-in-out 0s;
    -moz-transition: all 0.4s ease-in-out 0s;
    transition: all 0.4s ease-in-out 0s;
    top: 50%;
    left: 50%;
    opacity: 0;
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

.zoomBox:hover div h3 {
    top: 50%;
    opacity: 1;
}

.zoomBox:hover img {
    transform: scale(105%);
    opacity: 0.6;
}



/* UTILITIES */

.centered {
    display: flex;
    justify-content: center;
    align-items: center;
}

.objectFit {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.clamp {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.picScale {
    overflow: hidden;
}

.picScale a img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    -webkit-transition-property: all;
    -webkit-transition-duration: 0.5s;
    -webkit-transition-timing-function: ease;
}

.picScale a:hover img {
    transform: scale(1.03);
}

.btn-text:hover {
    text-decoration: none;
}

.btn-text span {
    display: inline-block;
    transition: 0.2s ease-in;
}

.btn-text:hover span {
    transform: translateX(50%);
}

.bg-primary {
    background-color: var(--color-primary) !important;
}

.bg-secondary {
    background-color: var(--color-secondary) !important;
}

.text-primary {
    color: var(--color-primary) !important;
}

.text-secondary {
    color: var(--color-secondary) !important;
}

.text-shadow {
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}


/* Textured backgrounds */

.crackle {
    background-color: var(--color-paper);
    background-image: url('images/bg-crackle.jpg');
}

/* Torn paper edges: the edge copies its section's background and is cut with a mask */

.torn-top,
.torn-bottom {
    position: relative;
}

.torn-top::before,
.torn-bottom::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: var(--tear-height);
    background: inherit;
    -webkit-mask: url('images/edge-torn.svg') 0 0 / 100% 100% no-repeat;
    mask: url('images/edge-torn.svg') 0 0 / 100% 100% no-repeat;
    pointer-events: none;
    z-index: 5;
}

.torn-bottom::after {
    top: calc(100% - 1px);
}

.torn-top::before {
    bottom: calc(100% - 1px);
    transform: scaleY(-1);
}

/* Header */



/* Hero carousel */

.home-carousel .carousel-item img {
    height: clamp(300px, 54vw, 820px);
    object-fit: cover;
}

.home-carousel .carousel-control-prev,
.home-carousel .carousel-control-next {
    width: auto;
    padding: 0 3%;
    opacity: 1;
}

.carousel-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-primary);
    font-size: 1.4rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}

.home-carousel button:hover .carousel-arrow {
    transform: scale(1.08);
}

.home-carousel .carousel-indicators {
    bottom: 4%;
}

.home-carousel .carousel-indicators [data-bs-target] {
    width: 14px;
    height: 14px;
    margin: 0 5px;
    border: 2px solid var(--color-tint);
    border-radius: 50%;
    background-color: transparent;
    opacity: 1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.home-carousel .carousel-indicators .active {
    background-color: var(--color-tint);
}

.home-carousel .carousel-control-prev-icon,
.home-carousel .carousel-control-next-icon {
    width: 80px;
    height: 80px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s ease;
}

.home-carousel .carousel-control-prev-icon {
    background-image: url('images/btn-carousel-left.svg');
}

.home-carousel .carousel-control-next-icon {
    background-image: url('images/btn-carousel-right.svg');
}

.home-carousel button:hover span[class$="-icon"] {
    transform: scale(1.08);
}

.grad {
    width: 100%;
    height: 200px;
    position: absolute;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0) 100%);
}

/* Quote */

.home-quote {
    padding: 2rem 0 calc(var(--feature-overlap) + 2.5rem);
}

.home-quote blockquote {
    font-family: var(--font-heading);
    color: var(--color-primary);
    max-width: 34ch;
    margin: 0 auto;
    line-height: var(--lh-xl);
}

.home-quote .quote-credit {
    font-size: var(--fs-sm);
    font-family: var(--font-heading);
}

/* Feature grid, opening times, instagram */

.home-features {
    display: flow-root; /* stops the grid's negative margin collapsing through the section */
    padding-bottom: 4rem;
}

.feature-grid {
    position: relative;
    z-index: 6;
    max-width: 640px;
    margin-top: calc(-1 * var(--feature-overlap));
}

.feature-grid .picScale a,
.insta-grid .picScale a {
    display: block;
}

/* Feature box hover (extends the template's .zoomBox) */

.feature-box {
    background-clip: border-box;
}

.feature-box:hover img,
.feature-box a:focus-visible img {
    opacity: 0.35;
}

.feature-box div h3 {
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    font-variant: small-caps;
    text-transform: none;
    letter-spacing: 0.02em;
    white-space: nowrap;
    margin: 0;
}

.feature-box a:focus-visible div h3 {
    opacity: 1;
}

.feature-box h3 i {
    font-size: 0.8em;
    margin: 0 0.15em;
    vertical-align: 0.05em;
}


.opening-times {
    font-size: var(--fs-xl);
    margin: 3rem 0 2.5rem;
}

.opening-times a:hover,
.insta-word:hover {
    text-decoration: none;
    color: var(--color-secondary);
}

.home-instagram h2 {
    font-size: var(--fs-xl);
    margin-bottom: 1.5rem;
}

.insta-word {
    white-space: nowrap;
}

.insta-grid {
    max-width: 650px;
}

/* Mailing list */

.mailing-list {
    padding: calc(var(--tear-height) + 2rem) 0 calc(var(--tear-height) + 3rem);
}

.mailing-list h2 {
    font-size: var(--fs-xl);
    margin-bottom: 0;
}

.mailing-list p {
    margin: 0.75rem 0 1.25rem;
}

.mailing-form {
    max-width: 640px;
}

.mailing-form .form-control {
    border: 0;
    border-radius: 4px 0 0 4px;
    font-size: var(--fs-base);
    padding: 0.55rem 1rem;
}

.mailing-form .form-control:focus {
    box-shadow: 0 0 0 2px var(--color-tertiary);
}

.mailing-form .btn {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.5rem 2.25rem;
    border-radius: 0 4px 4px 0;
}

/* Inner page banner and intro (About etc.) */

.page-banner img {
    display: block;
    width: 100%;
    height: clamp(180px, 21vw, 340px);
    object-fit: cover;
}

.page-intro {
    padding: 2.5rem 0 calc(var(--tear-height) + 3rem);
}

.page-intro h1 {
    color: var(--color-primary);
    max-width: 38ch;
    margin: 0 auto;
}

.page-intro-sub {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    line-height: var(--lh-lg);
    font-variant: small-caps;
    color: var(--color-primary);
    margin: 1rem 0 0;
}

/* About story */

.about-story {
    display: flow-root;
    padding: 2.5rem 0 5rem;
}

.about-portrait {
    width: 100%;
    max-width: 330px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.about-copy {
    margin-bottom: 2rem;
}

.about-copy p {
    font-size: var(--fs-md);
    margin: 1.5rem 0 0;
}

/* Full width image strip */


.image-swiper .swiper-slide img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

/* Footer */

.site-footer {
    padding: 1.5rem 0 1rem;
}

.site-footer .nav {
    margin-bottom: 1.5rem;
}

.site-footer .nav-link {
    color: var(--color-primary);
}

.site-footer p {
    font-family: var(--font-heading);
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.site-footer .footer-logo {
    margin: 0 0 0.75rem;
}

.site-footer .footer-logo img {
    height: 48px;
    width: auto;
}

.site-footer .footer-social {
    font-size: 1.8rem;
    margin: 0.75rem 0 1.5rem;
}

.site-footer .subFooter {
    font-family: var(--font-heading);
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* RESPONSIVE */

.navbar-toggler {
    color: var(--color-primary);
}

@media (max-width: 992px) {
    
    .site-header .navbar-nav .nav-link {
        text-align: center;
    }
    
    
}

@media (max-width: 768px) {

    :root {
        --feature-overlap: 90px;
        --tear-height: 14px;
    }

    .carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .home-carousel .carousel-indicators [data-bs-target] {
        width: 10px;
        height: 10px;
    }

    footer .nav {
        flex-direction: column;
        justify-content: center !important;
        text-align: center;
    }
    
    .home-carousel .carousel-control-prev-icon,
.home-carousel .carousel-control-next-icon {
    width: 40px;
    height: 40px;
    }

}

@media (max-width: 576px) {
    
    .grad {
        height: 60px;
    }
    
}
