/* ==========================================================================
   Homepage look-and-feel layer.
   Loaded only by /index.html, after stylev1.css, so product and catalog pages
   are unaffected. Pairs with assets/js/home-motion.js (GSAP + ScrollTrigger).

   Everything here renders correctly with scripting off or with
   prefers-reduced-motion: entrance states are only armed while
   <html class="motion-ready"> is present.
   ========================================================================== */

/* ---- Header: clear over the hero, solid once the page has scrolled ------ */
#header {
  background: transparent;
  transition: background-color 0.45s ease, box-shadow 0.45s ease, padding 0.45s ease;
}

#header.header-scrolled {
  background: rgba(52, 26, 61, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(234, 201, 138, 0.35), 0 10px 30px rgba(20, 8, 26, 0.25);
}

/* ---- Hero: the photograph becomes its own layer so it can drift --------- */
#hero {
  background: #341A3D;
  /* grow with the content: at tablet widths the tiles wrap to two rows and a
     fixed 100vh clipped the logo under the header and the tiles at the bottom */
  height: auto;
  min-height: 100vh;
  padding: 36px 0 84px;
}

#hero .hero-logo img {
  max-height: 44vh;
  width: auto;
}

/* One gap for every tile whatever the column count. The per-breakpoint
   margin utilities in the markup left the fourth tile touching the row above
   it while the fifth and sixth sat lower. */
#hero .hero-sacks {
  margin-bottom: -24px;
}

#hero .hero-sacks > [class*="col-"] {
  margin-top: 0 !important;
  margin-bottom: 24px;
}

#hero .hero-bg {
  position: absolute;
  top: -12%;
  bottom: -12%;
  left: -2%;
  right: -2%;
  z-index: 0;
  background: url("../img/hero-bg.jpg") top center / cover no-repeat;
  will-change: transform;
}

#hero:before {
  z-index: 1;
  background: linear-gradient(180deg,
    rgba(52, 26, 61, 0.78) 0%,
    rgba(52, 26, 61, 0.22) 38%,
    rgba(52, 26, 61, 0.30) 62%,
    rgba(52, 26, 61, 0.86) 100%);
}

#hero .container {
  z-index: 2;
}

#hero .icon-box {
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 18px 40px rgba(20, 8, 26, 0.28);
}

#hero .icon-box h3 {
  color: #fff;
  text-shadow: 0 1px 8px rgba(20, 8, 26, 0.6);
}


.motion-ready #hero .hero-logo,
.motion-ready #hero .hero-sacks > div,
.motion-ready #hero .hero-scroll-down {
  opacity: 0;
}

/* ---- Product-family marquee -------------------------------------------- */
.trade-marquee {
  overflow: hidden;
  background: #341A3D;
  border-top: 1px solid rgba(234, 201, 138, 0.35);
  border-bottom: 1px solid rgba(234, 201, 138, 0.35);
  padding: 18px 0;
}

.trade-marquee__track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.trade-marquee__group {
  display: flex;
  flex: none;
  align-items: center;
}

.trade-marquee__item {
  display: inline-flex;
  align-items: center;
  font-family: "Chonburi", serif;
  font-size: clamp(22px, 3.2vw, 44px);
  line-height: 1.1;
  white-space: nowrap;
  color: #EAC98A;
}

/* every other name sits back a step so the strip reads as a rhythm, not a list */
.trade-marquee__item:nth-child(even) {
  color: rgba(234, 201, 138, 0.42);
}

.trade-marquee__item::after {
  content: "";
  flex: none;
  width: 0.5em;
  height: 0.5em;
  margin: 0 0.9em;
  border: 1px solid #EAC98A;
  transform: rotate(45deg);
}

/* ---- Section headings --------------------------------------------------- */
.section-title h2::after {
  transform-origin: left center;
  transform: scaleX(var(--rule, 1));
}

.section-title .st-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

.section-title .st-word > span {
  display: inline-block;
  will-change: transform;
}

/* ---- About -------------------------------------------------------------- */
.about .content h3,
.about .content p {
  text-align: left !important;
  line-height: 1.5;
}

.about .content h3 {
  margin-bottom: 18px;
}

.about .content ul {
  margin: 18px 0;
}

/* ---- Full-bleed photo bands: image on its own layer for parallax -------- */
.testimonials {
  background: #23301f;
}

.downloads {
  position: relative;
  background: #17140f;
  padding: 110px 0;
}

.testimonials .parallax-bg,
.downloads .parallax-bg {
  position: absolute;
  top: -18%;
  bottom: -18%;
  left: 0;
  right: 0;
  z-index: 0;
  will-change: transform;
}

.testimonials .parallax-bg {
  background: url("../img/testimonials-bg.jpg") center center / cover no-repeat;
}

.downloads .parallax-bg {
  background: linear-gradient(rgba(2, 2, 2, 0.5), rgba(0, 0, 0, 0.5)), url("../img/leaf.jpg") center center / cover no-repeat;
}

.testimonials::before {
  z-index: 1;
}

.testimonials .container,
.downloads .container {
  position: relative;
  z-index: 2;
}

/* ---- Products ----------------------------------------------------------- */
.services .icon-box {
  box-shadow: 0 1px 0 rgba(52, 26, 61, 0.04);
}

.services .icon-box:hover {
  box-shadow: 0 22px 44px rgba(52, 26, 61, 0.14);
}

/* ---- Presence map ------------------------------------------------------- */
.cta .row > div:first-child {
  will-change: clip-path;
}

/* ---- Lenis smooth scrolling (desktop pointers only, see home-motion.js) -- */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-down {
    animation: none;
  }
}

/* ---- Products section: card width and phone layout ----------------------
   The cards were a fixed 300px, so on phones they sat left with a gap on the
   right, and on desktop they sat left inside wider columns. */
.services .icon-box {
  width: 100%;
}

.services .download-btn {
  color: #341A3D;
  border-color: #D0AA4B;
}

@media (max-width: 575px) {
  /* sack on the left, name and varieties beside it: six short rows
     instead of six screens of centred cards */
  .services .icon-box {
    display: grid;
    grid-template-columns: 84px 1fr;
    column-gap: 16px;
    align-items: center;
    padding: 16px 16px 16px 12px;
    text-align: left;
  }

  .services .icon-box .icon {
    grid-row: 1 / span 2;
    width: 84px;
    height: auto;
    margin: 0;
  }

  .services .icon-box h4 {
    align-self: end;
    margin: 0 0 4px;
    font-size: 20px;
  }

  .services .icon-box p {
    align-self: start;
    margin: 0;
    line-height: 1.5;
  }

  .services .row > [class*="col-"].mt-4,
  .services .row > [class*="col-"] + [class*="col-"] {
    margin-top: 12px !important;
  }

  .services .section-title {
    padding-bottom: 24px;
  }
}

/* ---- Careers: a purple band with the four roles as a list ----------------
   Was four white shadow cards in other typefaces; now the same purple, gold
   and Chonburi as the rest of the page, and it breaks up three white
   sections in a row. */
.careers {
  /* the Dubai street map from the Contact section, on a lighter plum so its
     dark blocks read against the band */
  background: #4A2757 url("../img/contact/bizmap.svg") right bottom / 150% auto no-repeat;
  padding: 88px 0;
  position: relative;
}

/* zoomed and anchored bottom-right so the streets fill the band and the
   wordmark drawn in the artwork's top-left stays out of frame */
@media (max-width: 991px) {
  .careers {
    background-size: auto 135%;
  }
}

/* solid behind the heading on the left, opening up to the map on the right */
.careers::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(52, 26, 61, 0.97) 0%, rgba(52, 26, 61, 0.9) 38%, rgba(52, 26, 61, 0.78) 100%);
}

.careers .container {
  position: relative;
}

.careers .section-title {
  padding-bottom: 22px;
}

.careers .section-title h2 {
  color: rgba(234, 201, 138, 0.85);
}

.careers .section-title p {
  color: #F5EFE0;
  line-height: 1.15;
}

.careers-lead {
  max-width: 30ch;
  margin: 0 0 18px;
  font-family: "Garamond", "EB Garamond", Georgia, serif;
  font-size: 21px;
  line-height: 1.4;
  color: rgba(245, 239, 224, 0.88);
}

.careers-mail {
  display: inline-block;
  padding: 10px 22px;
  border: 2px solid #EAC98A;
  border-radius: 4px;
  font-family: "Chonburi", serif;
  font-size: 15px;
  color: #EAC98A;
  transition: background-color 0.25s, color 0.25s;
}

.careers-mail:hover {
  background: #EAC98A;
  color: #341A3D;
  text-decoration: none;
}

.careers-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(234, 201, 138, 0.3);
}

.careers-list li {
  border-bottom: 1px solid rgba(234, 201, 138, 0.3);
}

.careers-list a {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 14px 16px 6px;
  color: #F5EFE0;
  text-decoration: none;
  transition: background-color 0.3s, padding-left 0.3s;
}

.careers-list a:hover,
.careers-list a:focus-visible {
  background: rgba(234, 201, 138, 0.09);
  padding-left: 16px;
}

.careers-list a:focus-visible,
.careers-mail:focus-visible {
  outline: 2px solid #EAC98A;
  outline-offset: 2px;
}

.careers-face {
  flex: none;
  width: 68px;
  height: 68px;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px #EAC98A;
}

.careers-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.careers-role {
  flex: 1 1 auto;
  min-width: 0;
}

.careers-role strong {
  display: block;
  font-family: "Chonburi", serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
}

.careers-role span {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  letter-spacing: 0.4px;
  color: #EAC98A;
}

.careers-apply {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #EAC98A;
}

.careers-apply i {
  font-size: 20px;
  transition: transform 0.3s;
}

.careers-list a:hover .careers-apply i {
  transform: translateX(5px);
}

@media (max-width: 991px) {
  .careers {
    padding: 60px 0;
  }

  .careers-intro {
    margin-bottom: 34px;
  }
}

@media (max-width: 575px) {
  .careers-list a {
    gap: 14px;
    padding: 14px 4px;
  }

  .careers-face {
    width: 54px;
    height: 54px;
  }

  .careers-role strong {
    font-size: 19px;
  }

  .careers-apply {
    font-size: 0;
    gap: 0;
  }

  .careers-apply i {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .careers-list a,
  .careers-apply i {
    transition: none;
  }
}

/* the Contact heading sits outside its section; it needs its own top spacing
   now that the band above it is purple */
#main > .section-title {
  padding-top: 64px;
}

/* ---- Did you know: a deck of sample cards ---------------------------------
   Sixteen cream cards in a stack, the way a trader fans sample cards on a
   desk. "Next" slides the top card off and to the back of the pile; the
   fact for the top card is set large beside the deck.

   home-motion.js adds .is-deck. Without it (scripting off) the cards fall
   back to a swipeable row with each fact printed on its own card. */
.facts {
  padding: 84px 0 88px;
}

.facts::before {
  background: linear-gradient(180deg, rgba(40, 18, 48, 0.84) 0%, rgba(40, 18, 48, 0.68) 55%, rgba(40, 18, 48, 0.86) 100%);
}

.facts-layout {
  display: grid;
  grid-template-columns: minmax(0, 410px) minmax(0, 1fr);
  grid-template-areas:
    "deck title"
    "deck body";
  column-gap: 96px;
  align-items: center;
}

.facts .section-title {
  grid-area: title;
  align-self: end;
  padding-bottom: 20px;
}

.facts .section-title h2 {
  color: rgba(234, 201, 138, 0.85);
}

.facts .section-title p {
  color: #F5EFE0;
}

.facts-deck-wrap {
  grid-area: deck;
  min-width: 0;
}

.facts-body {
  grid-area: body;
  align-self: start;
  min-width: 0;
}

.facts-deck {
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0 0 10px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}

.fact-card {
  flex: none;
  width: 260px;
  display: flex;
  flex-direction: column;
  padding: 12px 12px 18px;
  border-radius: 10px;
  background: #F5EFE0;
  color: #2B1433;
  box-shadow: 0 18px 36px rgba(10, 3, 14, 0.5);
  scroll-snap-align: start;
}

.fact-photo {
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
}

.fact-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}

.fact-card h3 {
  order: 2;
  margin: 14px 4px 0;
  font-family: "Chonburi", serif;
  font-size: 23px;
  line-height: 1.15;
  color: #341A3D;
}

.fact-kicker {
  order: 3;
  margin: 2px 4px 0;
  font-family: "Akaya Kanadaka", cursive;
  font-size: 18px;
  line-height: 1.2;
  color: #7A4A86;
}

.fact-text {
  order: 4;
  margin: 8px 4px 0;
  font-family: "Garamond", "EB Garamond", Georgia, serif;
  font-size: 17px;
  line-height: 1.4;
}

.facts-nav,
.facts-current {
  display: none;
}

/* -- stacked mode -- */
.is-deck .facts-deck {
  display: block;
  position: relative;
  aspect-ratio: 4 / 5;
  margin: 0 62px 30px 0;
  padding: 0;
  overflow: visible;
  touch-action: pan-y;
}

.is-deck .fact-card {
  position: absolute;
  inset: 0;
  width: auto;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.45s ease;
  will-change: transform;
}

.is-deck .fact-card.is-top {
  cursor: grab;
}

.is-deck .fact-card.is-dragging {
  transition: none;
  cursor: grabbing;
}

.is-deck .fact-photo {
  aspect-ratio: auto;
}

.is-deck .fact-text {
  display: none;
}

.is-deck .facts-current {
  display: block;
  max-width: 24em;
  min-height: 4.2em;
  margin: 0 0 26px;
  font-family: "Garamond", "EB Garamond", Georgia, serif;
  font-size: clamp(22px, 2.5vw, 30px);
  line-height: 1.32;
  color: #F5EFE0;
}

.facts-current.is-swapping {
  animation: facts-swap 0.55s ease both;
}

@keyframes facts-swap {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.is-deck .facts-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.facts-nav button {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(234, 201, 138, 0.7);
  border-radius: 50%;
  background: transparent;
  color: #EAC98A;
  font-size: 26px;
  transition: background-color 0.25s, color 0.25s;
}

.facts-nav button:hover {
  background: #EAC98A;
  color: #341A3D;
}

.facts-nav button:focus-visible {
  outline: 2px solid #F5EFE0;
  outline-offset: 3px;
}

.facts-count {
  min-width: 62px;
  text-align: center;
  font-family: "Chonburi", serif;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: rgba(245, 239, 224, 0.85);
}

@media (max-width: 991px) {
  .facts-layout {
    column-gap: 56px;
  }
}

@media (max-width: 767px) {
  .facts {
    padding: 56px 0 60px;
  }

  .facts-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "title"
      "deck"
      "body";
  }

  .facts .section-title {
    padding-bottom: 26px;
  }

  .is-deck .facts-deck {
    width: min(100% - 56px, 290px);
    margin: 0 auto 40px;
    left: -22px;
  }

  .is-deck .facts-current {
    min-height: 5.4em;
    margin-bottom: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .is-deck .fact-card {
    transition: none;
  }

  .facts-current.is-swapping {
    animation: none;
  }
}
