/*
Theme Name: Fabelli
Theme URI: https://www.fabelli.com/
Author: Fabelli Italia Inc
Description: Lightweight custom theme for Fabelli.com. No page builder, no shop. Requires Advanced Custom Fields (free).
Version: 1.6.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: fabelli
*/

/* ============ Fonts: Poppins, self hosted (SIL Open Font License) ============ */
@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("assets/fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("assets/fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/poppins-latin-700-normal.woff2") format("woff2"); }

/* ============ Design tokens, sampled from the current Fabelli.com ============ */
:root {
  --c-ink: #333333;          /* menu, feature titles */
  --c-brown: #3c342c;        /* buttons, strong headings */
  --c-taupe: #7e6e5f;        /* home headline */
  --c-text: #6f665d;         /* body text, warm gray */
  --c-paper: #ffffff;
  --c-band: #ececec;         /* gray section bands, footer */
  --c-beige: #d1c1a7;        /* top bar, story card, light card */
  --c-taupe-card: #948472;   /* dealer card */
  --c-bar: #5d5141;          /* copyright bar */
  --c-line: #e9e9e9;
  --c-link-hover: #13aff0;   /* current link hover, see notes */
  --f-body: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --w-page: 1400px;
  --w-narrow: 900px;
  --gap: clamp(1rem, 3vw, 2.5rem);
  --space: clamp(3rem, 7vw, 5.5rem);
  --radius: 12px;
  --shadow: 0 18px 40px rgba(60, 52, 44, .18);
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1rem/1.7 var(--f-body); color: var(--c-text); background: var(--c-paper); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-ink); }
a:hover { color: var(--c-link-hover); }
:focus-visible { outline: 2px solid var(--c-brown); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--f-body); font-weight: 600; line-height: 1.25; color: var(--c-ink); margin: 0 0 .6em; }
h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 2 * var(--gap), var(--w-page)); margin-inline: auto; }
.narrow { width: min(100% - 2 * var(--gap), var(--w-narrow)); margin-inline: auto; }
.center { text-align: center; }
.section { padding-block: var(--space); }
.section--band { background: var(--c-band); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: .5rem; left: .5rem; z-index: 100; width: auto; height: auto; clip: auto; padding: .6rem 1rem; background: var(--c-paper); }

.btn { display: inline-block; padding: .75rem 1.3rem; border-radius: 4px; background: var(--c-brown); color: #fff; text-decoration: none; font-weight: 500; font-size: 1.05rem; line-height: 1.3; transition: background .15s; }
.btn:hover { background: var(--c-taupe-card); color: #fff; }

/* ============ Top bar and header ============ */
.topbar { background: var(--c-beige); color: var(--c-brown); text-align: center; font-size: .875rem; font-weight: 500; letter-spacing: .02em; padding: .35rem var(--gap); }
.topbar a { color: inherit; text-decoration: none; }
.brand { display: flex; justify-content: center; padding: 1.1rem var(--gap) .4rem; }
.brand img { max-height: 72px; width: auto; }
.brand .site-logo { text-decoration: none; font-size: 1.6rem; font-weight: 600; }
.navbar { position: sticky; top: 0; z-index: 50; background: var(--c-paper); }
.navbar .wrap { display: flex; justify-content: center; }
.nav-toggle { display: none; margin: .5rem auto; background: none; border: 1px solid var(--c-line); padding: .45rem 1rem; font: 500 .9rem var(--f-body); letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink); cursor: pointer; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 2.4rem; }
.main-nav li { position: relative; }
.main-nav a { display: block; padding: .9rem 0; text-decoration: none; text-transform: uppercase; letter-spacing: .06em; font-size: .9rem; color: var(--c-ink); }
.main-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: .4em; height: .4em; margin-left: .5em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-.2em) rotate(45deg); }
.main-nav .sub-menu { position: absolute; left: -1.2rem; top: 100%; min-width: 230px; padding: .4rem 1.2rem; background: var(--c-paper); box-shadow: var(--shadow); visibility: hidden; opacity: 0; transition: opacity .15s; }
.main-nav .sub-menu a { padding: .55rem 0; text-transform: none; letter-spacing: 0; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { visibility: visible; opacity: 1; }
.main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a { color: var(--c-taupe); }

@media (max-width: 960px) {
  .navbar .wrap { flex-direction: column; }
  .nav-toggle { display: block; }
  .main-nav { display: none; padding-bottom: 1rem; }
  .main-nav.is-open { display: block; }
  .main-nav > ul { flex-direction: column; align-items: center; }
  .main-nav a { padding: .6rem 0; text-align: center; }
  .main-nav .sub-menu { position: static; visibility: visible; opacity: 1; box-shadow: none; padding: 0 0 .5rem; min-width: 0; }
}

/* ============ Home: hero ============ */
.hero { position: relative; aspect-ratio: 16 / 7; max-height: 78vh; width: 100%; overflow: hidden; background: var(--c-band); }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.07); transition: opacity 1.6s ease, transform 9s cubic-bezier(.25,.5,.3,1); }
.hero img.is-active { opacity: 1; transform: scale(1); }
@media (max-width: 760px) { .hero { aspect-ratio: 4 / 3; } }

/* ============ Home: headline and intro ============ */
.headline { color: var(--c-taupe); font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 600; margin-bottom: 1.2rem; }
.headline .rotator { color: var(--c-brown); display: inline-grid; vertical-align: bottom; overflow: hidden; }
.rotator__word { grid-area: 1 / 1; opacity: 0; transform: translateY(.6em); transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1); }
.rotator__word.is-current { opacity: 1; transform: none; }
.rotator__word.is-leaving { opacity: 0; transform: translateY(-.6em); }
.intro { font-size: clamp(1rem, 1.4vw, 1.15rem); color: var(--c-text); }

/* ============ Home: highlights ============ */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); max-width: 1060px; margin-inline: auto; }
.feature { margin: 0; text-align: center; }
.feature .zoom { border-radius: var(--radius); }
.feature img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.feature figcaption { margin-top: .9rem; font-size: 1.35rem; font-weight: 600; line-height: 1.25; color: var(--c-ink); }

/* ============ Home: collection and story ============ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: center; max-width: 1060px; margin-inline: auto; }
.split + .split { margin-top: var(--space); }
.split__media .zoom { border-radius: var(--radius); }
.split__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.split .panel { position: relative; z-index: 1; margin-left: -4rem; }
.split--flip .panel { margin-left: 0; margin-right: -4rem; }
.split--flip .split__media { order: 2; }
.panel { padding: clamp(2rem, 4vw, 3.5rem); text-align: center; box-shadow: var(--shadow); background: var(--c-paper); border-radius: 4px; }
.panel--beige { background: var(--c-beige); }
.panel h2 { color: var(--c-brown); font-weight: 700; }
.panel p { color: var(--c-brown); }

/* ============ Home: dealer card ============ */
.dealer { max-width: 640px; margin-inline: auto; padding: clamp(2rem, 4vw, 3rem); background: var(--c-taupe-card); box-shadow: var(--shadow); text-align: center; border-radius: 4px; }
.dealer svg { width: 64px; height: 64px; margin: 0 auto .6rem; display: block; color: var(--c-brown); }
.dealer h2 { font-size: 1.35rem; color: var(--c-brown); }
.dealer p { color: var(--c-brown); }

@media (max-width: 760px) {
  .features, .split { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
  .split__media img { aspect-ratio: 4 / 3; }
}

/* ============ Collections ============ */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem var(--gap); max-width: 1200px; }
.card { text-decoration: none; display: block; text-align: center; color: var(--c-text); }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #e2e2e2; }
.card__empty { display: grid; place-items: center; aspect-ratio: 3 / 2; background: #e2e2e2; font-size: .8rem; padding: 1rem; color: var(--c-text); }
.card__title { display: block; margin-top: .8rem; font-size: 1rem; letter-spacing: .04em; transition: color .3s; }
.card:hover .card__empty { display: grid; place-items: center; aspect-ratio: 3 / 2; background: #e2e2e2; font-size: .8rem; padding: 1rem; color: var(--c-text); }
.card__title { color: var(--c-brown); }
.badge { display: inline-block; font-size: .8rem; padding: .15rem .6rem; background: var(--c-beige); color: var(--c-brown); border-radius: 3px; margin-top: .5rem; }
.collection-intro { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: center; max-width: 1240px; }
.collection-intro__media img { width: 100%; border-radius: 4px; }
.collection-intro__text { font-size: 1.1rem; line-height: 1.75; letter-spacing: .06em; color: var(--c-brown); }
.collection-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); max-width: 1240px; margin-top: var(--space); }
.collection-gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.collection-cta { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: var(--space); }
.btn--light { background: transparent; color: var(--c-brown); box-shadow: inset 0 0 0 1px var(--c-brown); }
.btn--light:hover { background: var(--c-brown); color: #fff; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .grid { grid-template-columns: repeat(2, 1fr); } .collection-intro, .collection-gallery { grid-template-columns: 1fr; } }

/* ============ Footer ============ */
.site-footer { background: var(--c-band); color: var(--c-ink); }
.footer-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--gap); align-items: center; padding-block: 2.2rem; max-width: 1100px; }
.footer-logo img { max-height: 90px; width: auto; }
.footer-office h2 { font-size: 1.1rem; margin: 0; text-decoration: underline; text-underline-offset: 3px; }
.footer-office address { font-style: normal; font-weight: 600; font-size: 1.05rem; line-height: 1.5; text-transform: uppercase; }
.footer-office a { color: inherit; text-decoration: none; }
.footer-menu { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; }
.copyright { background: var(--c-bar); color: #fff; text-align: center; font-size: .8rem; padding: .7rem var(--gap); margin: 0; }
@media (max-width: 760px) { .footer-cols { grid-template-columns: 1fr; text-align: center; } .footer-logo img { margin-inline: auto; } }

/* ============ Inner pages ============ */
.page-title { text-align: center; font-weight: 400; text-transform: uppercase; letter-spacing: .22em; font-size: clamp(1.8rem, 4vw, 3rem); color: var(--c-brown); margin: 0 0 clamp(1.5rem, 4vw, 3rem); padding-inline: var(--gap); }
.page-title--mixed { text-transform: none; letter-spacing: .12em; line-height: 1.6; }
.page-title--mixed span { display: block; }
.band-page { background: var(--c-band); padding-block: calc(var(--space) * .6) var(--space); }
.soft-title { font-weight: 400; color: var(--c-ink); }
.section--sand { background: #dfd5c4; }
.section--beige { background: var(--c-beige); }
.section--mist { background: #f5f6f8; }
.two-col { display: grid; grid-template-columns: 2fr 3fr; gap: calc(var(--gap) * 1.5); align-items: center; max-width: 1180px; }
.two-col--flip { grid-template-columns: 3fr 2fr; }
.two-col--flip .two-col__media { order: 2; }
.prose-block { max-width: 68ch; font-size: 1.05rem; }
.wide-photo { margin-top: var(--space); max-width: 1000px; text-align: center; }
.wide-photo img { width: 100%; border-radius: var(--radius); }
.wide-photo figcaption { margin-top: .8rem; color: var(--c-ink); }
.people { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); max-width: 1000px; margin: 2.5rem auto 0; text-align: center; }
.person { margin: 0; }
.person img { width: 100%; max-width: 180px; aspect-ratio: 1; object-fit: cover; margin-inline: auto; }
.person figcaption { margin-top: .8rem; }
.person strong { display: block; color: var(--c-ink); font-weight: 600; font-size: 1.05rem; }
.person span { font-size: .9rem; font-weight: 500; color: var(--c-ink); }
.reps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem var(--gap); max-width: 1100px; text-align: center; }
.rep svg, .rep img { width: 90px; height: 90px; margin: 0 auto 1rem; object-fit: cover; }
.rep h2 { font-size: 1.25rem; margin-bottom: .4rem; }
.rep__area { font-weight: 600; color: var(--c-ink); }
.rep a { color: var(--c-text); text-decoration: none; }
.rep a:hover { color: var(--c-ink); text-decoration: underline; }
.contact-intro { text-align: center; font-weight: 600; font-size: 1.15rem; color: var(--c-ink); max-width: 1200px; }
.contact-form input:not([type=checkbox]):not([type=submit]), .contact-form textarea { width: 100%; padding: .6rem .8rem; border: 1px solid #d5d5d5; border-radius: 3px; font: inherit; background: #fff; }
.contact-form label { font-weight: 600; color: var(--c-ink); }
.contact-form input[type=submit] { background: var(--c-taupe-card); color: #fff; border: 0; padding: .7rem 1.4rem; font: 600 .9rem var(--f-body); text-transform: uppercase; cursor: pointer; }
.offices { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); text-align: center; font-weight: 600; color: var(--c-brown); }
.offices p { margin: 0 0 1.2em; }
.offices-note { font-weight: 600; color: var(--c-ink); }
.flyer { margin-inline: auto; max-width: 420px; width: 100%; }
@media (max-width: 860px) {
  .two-col, .two-col--flip, .offices { grid-template-columns: 1fr; }
  .two-col--flip .two-col__media { order: 0; }
  .people { grid-template-columns: repeat(2, 1fr); }
  .reps { grid-template-columns: 1fr; }
}
@media (min-width: 861px) and (max-width: 1100px) { .reps { grid-template-columns: repeat(2, 1fr); } }

/* ============ Old builder pages (temporary, until each page is rebuilt) ============ */
.builder-page { padding-block: 0 var(--space); }
.builder-page--wpbakery { padding-top: calc(var(--space) * .6); }
.builder-page h1, .builder-page h2, .builder-page h3 { color: inherit; }
.builder-page .elementor-heading-title { margin: 0; }

/* ============ Editor content ============ */
.entry > * + * { margin-top: 1em; }
.entry .alignwide { width: min(100vw - 2 * var(--gap), var(--w-page)); }
.wp-block-image figcaption { font-size: .9rem; }

/* Plugin pages */
.tool-intro { max-width: 900px; text-align: center; margin-bottom: var(--space); }
.tool-body { max-width: 1200px; }
.tool-body input:not([type=checkbox]):not([type=submit]):not([type=radio]), .tool-body textarea, .tool-body select { max-width: 100%; padding: .55rem .8rem; border: 1px solid #d5d5d5; border-radius: 3px; font: inherit; background: #fff; }
.tool-body input[type=submit], .tool-body button[type=submit], .tool-body .wpsl-search-btn-wrap input { background: var(--c-taupe-card); color: #fff; border: 0; padding: .7rem 1.4rem; font: 600 .9rem var(--f-body); text-transform: uppercase; cursor: pointer; border-radius: 3px; }
.tool-body #wpsl-wrap { margin-top: 1rem; }
.tool-body .wpdm-link-tpl, .tool-body .w3eden .card { font-family: var(--f-body); }

/* Logo sizes and logged in admin bar */
.brand .custom-logo { max-height: 72px !important; width: auto !important; height: auto; }
.site-footer .custom-logo { max-height: 80px !important; width: auto !important; height: auto; }
.admin-bar .navbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .navbar { top: 46px; } }
@media (max-width: 600px) { .admin-bar .navbar { top: 0; } }

/* ============ Welcome popup ============ */
.popup { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: var(--gap); background: rgba(40, 34, 28, .55); opacity: 0; transition: opacity .4s ease; }
.popup.is-open { opacity: 1; }
.popup[hidden] { display: none; }
.popup__card { position: relative; width: min(100%, 560px); background: var(--c-paper); border-radius: 6px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.35); transform: translateY(24px) scale(.97); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.popup.is-open .popup__card { transform: none; }
.popup__img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.popup__body { padding: 1.6rem 2rem 2rem; text-align: center; }
.popup__body h2 { color: var(--c-brown); font-size: 1.4rem; margin-bottom: .5rem; }
.popup__body p { color: var(--c-text); margin-bottom: 1.2rem; }
.popup__close { position: absolute; top: .5rem; right: .5rem; width: 2.2rem; height: 2.2rem; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--c-brown); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.popup__close:hover { background: #fff; }

/* ============ Motion ============ */
.zoom { display: block; overflow: hidden; }
.zoom img { transition: transform .9s cubic-bezier(.2,.7,.2,1); }
a:hover .zoom img, .zoom:hover img { transform: scale(1.045); }
.navbar { transition: box-shadow .3s ease; }
.navbar.is-stuck { box-shadow: 0 6px 18px rgba(60, 52, 44, .08); }
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
.js .reveal--left { transform: translateX(-36px); }
.js .reveal--right { transform: translateX(36px); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (max-width: 760px) {
  .split .panel, .split--flip .panel { margin: -3rem 1rem 0; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } .js .reveal { opacity: 1; transform: none; } .hero img { transform: none; } }
