/* =====================================================================
   Myrtle & Bloom landing page
   1 Fonts   2 Base   3 Header + promotion strip   4 Banner   5 Introduction
   6 Wide pictures   7 Story   8 Three points   9 Products   10 Badge
   11 Half text / half picture   12 Contact   13 FAQ   14 Footer   15 Motion
   Screen sizes: phones up to 767px, tablets up to 1024px, large screens from 1401px.
   ===================================================================== */

/* ---------- 1 Fonts ---------- */
@font-face { font-family: 'ABC Arizona Flare Compressed'; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/arizona-flare-compressed-300.woff2") format('woff2'); }
@font-face { font-family: 'ABC Arizona Flare'; font-style: normal; font-weight: 200; font-display: swap; src: url("../fonts/arizona-flare-200.woff2") format('woff2'); }
@font-face { font-family: 'ABC Arizona Flare'; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/arizona-flare-400.woff2") format('woff2'); }
@font-face { font-family: 'ABC Arizona Mix'; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/arizona-mix-300.woff2") format('woff2'); }
@font-face { font-family: 'Stratos'; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/stratos-300.woff2") format('woff2'); }
@font-face { font-family: 'Stratos'; font-style: normal; font-weight: 350; font-display: swap; src: url("../fonts/stratos-350.woff2") format('woff2'); }
@font-face { font-family: 'Stratos'; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/stratos-400.woff2") format('woff2'); }
@font-face { font-family: 'Stratos'; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/stratos-500.woff2") format('woff2'); }
@font-face { font-family: 'Stratos'; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/stratos-600.woff2") format('woff2'); }
@font-face { font-family: 'Stratos'; font-style: italic; font-weight: 500; font-display: swap; src: url("../fonts/stratos-500-italic.woff2") format('woff2'); }
@font-face { font-family: 'Stratos'; font-style: italic; font-weight: 600; font-display: swap; src: url("../fonts/stratos-600-italic.woff2") format('woff2'); }

/* ---------- 2 Base ---------- */
:root {
  --cream: #F1EADF;
  --olive: #82891F;
  --olive-deep: #626905;
  --ink: #323A27;
  --text: #6A6A6A;
  --brown: #654321;

  --font-text: 'Stratos', 'Helvetica Neue', Arial, sans-serif;   /* running text */
  --font-ui: 'Stratos', 'Helvetica Neue', Arial, sans-serif;     /* small headings, form, menu */
  --font-title: 'ABC Arizona Flare Compressed', serif;
  --weight-text: 350;
  --weight-strong: 500;

  --container: 1140px;
  --text-size: 16px;
  --title-size: 60px;
}
@media (min-width: 1401px) { :root { --text-size: 18px; --title-size: 70px; } }
@media (max-width: 1024px) { :root { --title-size: 55px; } }
@media (max-width: 767px)  { :root { --text-size: 14px; --title-size: 50px; } }

/* Chinese page: running text in Noto Sans SC; small headings keep Stratos for Latin letters */
.lang-cn {
  --font-text: 'Noto Sans SC', sans-serif;
  --font-ui: 'Stratos', 'Noto Sans SC', sans-serif;
  --weight-text: 400;
  --weight-strong: 700;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto !important; }   /* CSS smooth scroll fights the scroll script */
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-text);
  font-weight: 400;
  font-size: var(--text-size);
  line-height: 1.6;
  letter-spacing: -0.01em;
}
img, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-title); font-weight: 300; line-height: 1; letter-spacing: -0.01em; }
h2 { font-size: var(--title-size); }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; }
@media (max-width: 1180px) { .container { padding-inline: 20px; } }

/* Text from the small editors */
.rich { display: flow-root; font-weight: var(--weight-text); }
.rich p { margin: 1em 0; }
.rich > :last-child { margin: 0; }
.rich strong, .rich b { font-weight: var(--weight-strong); }
.rich a { text-decoration: underline; }

.eyebrow { margin: 0; font-family: var(--font-ui); font-size: 16px; font-weight: 400; line-height: 1.6; color: var(--text); }

.screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--ink); color: var(--cream); text-decoration: none; }
.skip-link:focus { top: 8px; }

.page { position: relative; }
/* Every section sits above the banner, which stays pinned behind them */
main > section { position: relative; z-index: 1; }

/* ---------- 3 Header + promotion strip ---------- */
.promo { position: relative; z-index: 20; padding: 10px 48px; background: var(--ink); color: var(--cream); font-family: var(--font-ui); font-size: 14px; line-height: 1.4; text-align: center; }
.promo[hidden] { display: none; }
.promo__text { margin: 0; }
.promo__link { margin-left: 8px; font-weight: 500; text-decoration: underline; white-space: nowrap; }
.promo__close { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); padding: 4px 8px; border: 0; background: none; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; }

.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 10; }
.site-header__inner { display: flex; align-items: flex-start; justify-content: space-between; padding-top: 20px; padding-bottom: 25px; }
.site-header__logo { display: block; color: #fff; font-family: var(--font-title); font-size: 30px; line-height: 1; text-decoration: none; }
.site-header__logo img { width: auto; height: 33px; }
.lang-switch { display: flex; gap: 36px; font-family: var(--font-ui); }
.lang-switch a { position: relative; padding: 5px 0; border-bottom: 1px solid transparent; color: #fff; font-size: 16px; line-height: 1; text-decoration: none; }
.lang-switch a.is-current { border-bottom-color: #fff; }
.lang-switch a:not(:last-child)::after { content: ''; position: absolute; top: 0; right: -18px; width: 1px; height: 100%; background: #fff; }
@media (max-width: 1024px) { .site-header__inner { padding-bottom: 20px; } }

/* ---------- 4 Banner ---------- */
.hero { position: sticky; top: 0; z-index: 0; height: 100vh; min-height: 600px; overflow: hidden; background: #8c9a9a center / cover no-repeat; }
.hero__media { position: absolute; inset: 0; }
.hero__media video, .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__media--mobile { display: none; }
.hero__veil { position: absolute; inset: 0; z-index: 1; background: #1f2216; opacity: 0; pointer-events: none; }   /* darkens the banner while the next section covers it */
@media (max-width: 767px) {
  .hero { height: 70vh; min-height: 560px; }
  .hero__media--desktop { display: none; }
  .hero__media--mobile { display: block; }
}

/* ---------- 5 Introduction ---------- */
.intro { z-index: 2; background: var(--olive); color: var(--cream); box-shadow: 0 -30px 60px rgba(0, 0, 0, .35); }
.intro__inner { display: flex; flex-direction: column; align-items: center; gap: 20px; padding-block: 100px; text-align: center; }
.intro__eyebrow { margin: 0; font-family: var(--font-ui); font-size: 14px; line-height: 1; }
.intro__logo { width: 349px; }
.intro__text { width: 70%; }
@media (max-width: 767px) {
  .intro__inner { padding-block: 60px; }
  .intro__logo { width: 50%; }
  .intro__text { width: 100%; }
}

/* ---------- 6 Wide pictures ---------- */
.band { background: var(--cream); overflow: hidden; }
.band__inner { position: relative; aspect-ratio: 1130 / 600; min-height: 700px; }
.band__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.band--top .band__img { object-position: 50% 0; }
@media (max-width: 1024px) { .band__inner { min-height: 500px; } }
@media (max-width: 767px) {
  .band__inner { aspect-ratio: auto; min-height: 0; }
  .band__img { position: static; height: auto; }
}

/* ---------- 7 Story ---------- */
.story { background: var(--cream); }
.story__inner { display: flex; flex-direction: column; align-items: center; gap: 20px; padding-block: 100px; text-align: center; }
.story__image { width: 238px; }
.story__text { width: 70%; }
@media (max-width: 1024px) {
  .story__inner { padding-block: 20px; }
  .story__text { width: 100%; }
}
@media (max-width: 767px) { .story__inner { padding-block: 30px 60px; } }

/* ---------- 8 Three points ---------- */
.points { background: var(--cream); border-block: 1px solid var(--ink); }
.points__grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.points__grid--2 { grid-template-columns: repeat(2, 1fr); }
.points__grid--1 { grid-template-columns: 1fr; }
.point { display: flex; flex-direction: column; gap: 20px; padding: 80px 40px; border-right: 1px solid var(--ink); text-align: center; }
.point:last-child { border-right: 0; }
.point__num { margin: 0; font-family: 'ABC Arizona Mix', serif; font-size: 80px; font-weight: 600; line-height: 86px; padding-bottom: 10px; }
.point__title { font-family: var(--font-ui); font-size: 20px; font-weight: 500; line-height: calc(var(--text-size) * 1.6); color: #626262; }
.point__text { margin: 0; font-weight: var(--weight-text); }
@media (max-width: 1024px) { .point { padding: 20px; } }
@media (max-width: 767px) {
  .points__grid { grid-template-columns: 1fr; }
  .point { border-right: 0; border-bottom: 1px solid var(--ink); }
  .point:last-child { border-bottom: 0; }
}

/* ---------- 9 Products ---------- */
.products { background: var(--cream); }
.slide__inner { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; width: 100%; max-width: var(--container); margin-inline: auto; }
.slide__text { position: relative; z-index: 1; grid-column: 1; display: flex; flex-direction: column; gap: 20px; padding-block: 80px; }
.slide--media-left .slide__text { grid-column: 2; }
.slide__name { color: var(--name-color, var(--olive-deep)); }
.slide__body strong { display: block; }
.slide__tagline { margin-bottom: 0 !important; }
.slide__tagline + p { margin-top: 0; }
/* centred with flex, not a transform: the fade animation owns the transform */
.slide__media { position: absolute; top: 0; bottom: 0; right: 0; z-index: 0; display: flex; align-items: center; width: var(--image-width, 60%); }
.slide__media picture { display: block; width: 100%; }
.slide--media-left .slide__media { right: auto; left: 0; }
.slide__media img { width: 100%; }

@media (min-width: 768px) {
  .slide { display: flex; align-items: center; min-height: 100vh; }
  @media (max-width: 1180px) { .slide { padding-inline: 20px; } }
  @media (max-width: 1024px) { .slide__media { width: calc(var(--image-width, 60%) + 10%); } }

  /* Set by main.js: the section stays on screen while the products fade one into the next */
  .products.is-pinned { height: calc(100vh + var(--slides-scroll, 0px)); height: calc(100svh + var(--slides-scroll, 0px)); overflow-x: clip; }
  .products.is-pinned .products__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
  .products.is-pinned .slide { position: absolute; inset: 0; min-height: 0; justify-content: center; }
}
@media (max-width: 767px) {
  .slide { padding: 60px 20px 0; }
  .slide:last-child { padding-bottom: 40px; }
  /* a product with its picture on the left has spare room around that picture */
  .slide--media-left .slide__inner { gap: 10px; }
  .slide--media-left + .slide { padding-top: 20px; }
  .slide__inner { display: flex; flex-direction: column; align-items: stretch; gap: 40px; }
  .slide__text { padding-block: 0; }
  .slide__media { position: static; display: block; width: 100%; }
}

/* Dots at the right edge while the products are on screen */
.slide-dots { position: fixed; top: 50%; right: 28px; z-index: 50; display: flex; flex-direction: column; gap: 16px; transform: translateY(-50%); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .5s ease, visibility .5s; }
.slide-dots.is-visible { opacity: 1; visibility: visible; pointer-events: auto; }
.slide-dot { position: relative; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(70, 66, 56, .28); cursor: pointer; transition: background-color .5s ease, transform .5s ease; }
.slide-dot::after { content: ''; position: absolute; inset: -9px; }
.slide-dot:hover { transform: scale(1.25); }
.slide-dot.is-active { background: rgba(70, 66, 56, .75); transform: scale(1.2); }
.slide-dot:focus-visible { outline: 2px solid rgba(70, 66, 56, .75); outline-offset: 4px; }

/* ---------- 10 Badge ---------- */
.badge { background: var(--olive); }
.badge__inner { display: flex; justify-content: center; padding-block: 100px; }
.badge__image { width: 216px; }
@media (max-width: 767px) {
  .badge__inner { padding: 40px; }
  .badge__image { width: 50%; }
}

/* ---------- 11 Half text / half picture ---------- */
.split { display: flex; align-items: center; aspect-ratio: 1130 / 600; background: var(--cream); overflow-x: clip; }
.split__inner { display: grid; grid-template-columns: 1fr 1fr; }
.split--media-right .split__inner { column-gap: 20px; }
.split__text { display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: 80px 80px 80px 0; }
.split--media-left .split__text { grid-column: 2; padding-left: 40px; }
.split--media-left .eyebrow { font-weight: 600; }
.split__title { color: var(--olive-deep); }
/* the picture reaches 1px past the section's top and bottom so rounding can never leave a hairline gap */
.split__media { position: absolute; top: -1px; bottom: -1px; right: 0; width: 50%; overflow: hidden; }
.split--media-left .split__media { right: auto; left: 0; }
.split__media picture { display: block; height: 100%; }
.split__img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1024px) {
  .split__text { min-height: 500px; padding: 20px 20px 20px 0; }
  .split--media-left .split__text { padding: 20px 0 20px 20px; }
}
@media (max-width: 767px) {
  .split { flex-direction: column; align-items: stretch; aspect-ratio: auto; padding-top: 40px; }
  .split--media-left { padding-top: 60px; }
  .split__inner { display: block; }
  .split__text, .split--media-left .split__text { min-height: 300px; padding: 20px 0; }
  .split--media-right .split__text { padding-bottom: 40px; }
  .split__media, .split--media-left .split__media { position: static; order: 2; width: 100%; margin-bottom: -2px; }
  .split__img { height: auto; }
}

/* ---------- 12 Contact ---------- */
.contact { background: var(--olive); color: var(--cream); }
.contact__inner, .faq__inner { display: flex; align-items: flex-start; gap: 20px; }
.contact__intro, .faq__intro { display: flex; flex-direction: column; gap: 20px; width: calc((100% - 20px) * .4); padding: 80px 80px 80px 0; }
.contact__intro p, .faq__intro p { margin: 0; font-weight: var(--weight-text); }
.contact__title, .faq__title { color: var(--cream); }
.contact__form, .faq__list { width: calc((100% - 20px) * .6); padding: 80px 40px; }

.form { position: relative; font-family: var(--font-ui); }
.form__trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form__row { display: flex; justify-content: space-between; }
.form__field { display: block; width: 100%; }
.form__row--half .form__field { width: 48%; }
.form input, .form textarea { display: block; width: 100%; margin: 0 0 20px; padding: 10px 0; border: 0; border-bottom: 1px solid #fff; border-radius: 0; background: transparent; color: #fff; font-family: var(--font-ui); font-size: 16px; font-weight: 350; line-height: normal; letter-spacing: inherit; }
.form textarea { height: 120px; margin-bottom: calc(20px + var(--text-size) * .5); resize: vertical; }
.form ::placeholder { color: #fff; opacity: .7; }
.form input:focus, .form textarea:focus { outline: none; box-shadow: 0 1px 0 #fff; }
.form input:-webkit-autofill, .form input:-webkit-autofill:hover, .form input:-webkit-autofill:focus { -webkit-text-fill-color: #fff !important; -webkit-box-shadow: 0 0 0 1000px var(--olive) inset !important; box-shadow: 0 0 0 1000px var(--olive) inset !important; }
.form__submit { margin: 0 0 20px; padding: 10px 15px; border: 1px solid var(--cream); border-radius: 6px; background: var(--cream); color: var(--ink); font-family: 'ABC Arizona Flare', 'Noto Sans SC', serif; font-size: 16px; font-weight: 400; line-height: normal; cursor: pointer; }
.form__submit:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.form__submit[disabled] { opacity: .6; cursor: default; }
.form__error, .form__status { color: var(--brown); font-size: 16px; font-weight: 300; }
.form__error { display: block; margin: -12px 0 12px; }
.form__error[hidden] { display: none; }
.form__status { margin: 0; }

@media (max-width: 1024px) {
  .contact__intro, .faq__intro { padding: 20px 20px 20px 0; }
  .contact__form, .faq__list { padding: 20px 0 20px 20px; }
}
@media (max-width: 767px) {
  .contact { padding-block: 60px; }
  .contact__inner, .faq__inner { flex-direction: column; }
  .contact__intro, .contact__form { width: 100%; padding: 0; }
}

/* ---------- 13 FAQ ---------- */
.faq { background: var(--olive); color: var(--cream); }
.faq__question { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 0 15px; font-family: var(--font-ui); font-size: 20px; font-weight: 400; line-height: 1.6; cursor: pointer; list-style: none; }
.faq__question::-webkit-details-marker { display: none; }
.faq__question:focus-visible { outline: 1px solid var(--cream); outline-offset: 4px; }
.faq__icon { position: relative; flex: none; width: 11px; height: 11px; }
.faq__icon::before, .faq__icon::after { content: ''; position: absolute; top: 50%; left: 0; width: 100%; height: 2px; margin-top: -1px; background: currentColor; }
.faq__icon::after { transform: rotate(90deg); transition: transform .3s ease; }
.faq__item[open]:not(.is-closing) .faq__icon::after { transform: rotate(0deg); }
.faq__answer { overflow: hidden; }
.faq__answer .rich { padding: 0 0 15px; }
@media (max-width: 767px) {
  .faq { padding-block: 60px 45px; }
  .faq__intro { width: 100%; padding: 20px 0 0; }
  .faq__list { width: 100%; padding: 0 0 20px; }
  .faq__question { gap: 38px; font-size: 14px; }
}

/* ---------- 14 Footer ---------- */
.site-footer { position: relative; z-index: 1; padding-block: 40px; border-top: 1px solid var(--ink); background: var(--cream); color: #7A7A7A; font-weight: var(--weight-text); }
.site-footer__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: end; }
.site-footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.site-footer__logo { width: 208px; height: auto; }
.site-footer__address { margin: 0; text-align: right; }
@media (max-width: 1024px) { .site-footer { padding-block: 20px; } }
@media (max-width: 767px) {
  .site-footer { padding-block: 60px; }
  .site-footer__inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .site-footer__brand { align-items: center; gap: 40px; }
  .site-footer__address { text-align: center; }
}

/* ---------- Page not found ---------- */
.notfound { padding: 180px 0 120px; background: var(--olive); color: var(--cream); text-align: center; }
.notfound h1 { margin-bottom: 20px; font-size: var(--title-size); }

/* ---------- 15 Motion (start states are only applied once main.js is running) ---------- */
.px-move { will-change: transform; backface-visibility: hidden; }
.px-curtain { z-index: 0; }          /* a wide picture drifts down slowly ... */
main > .px-cover { z-index: 2; }     /* ... while the next section slides over it */
main > .px-above { z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  .hero__veil { display: none; }
  .faq__icon::after { transition: none; }
}
