/* Seattle Trading Sdn Bhd: one-page site, hand-written.
   Values come from the old site's generated styles (kit 65, home 76, header 74, footer 72, pop-up 69).
   Breakpoints as in the old builder: mobile up to 767px, tablet 768-1024px, desktop 1025px and up. */

:root {
  /* kit colours (the page itself mostly uses black and white) */
  --color-primary: #6EC1E4;
  --color-secondary: #54595F;
  --color-text: #7A7A7A;
  --color-accent: #61CE70;
  --color-ink: #000000;
  --color-paper: #FFFFFF;
  --color-pill: #D9D9D9;
  --color-overlay: rgba(0, 0, 0, .8);

  /* kit typography: Roboto; desktop/tablet sizes, mobile sizes set below */
  --font: Roboto, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --fs-primary: 56px;    /* 700 */
  --fs-secondary: 20px;  /* 700 */
  --fs-text: 18px;       /* 400 */
  --fs-accent: 16px;     /* 500 */

  --width-boxed: 1440px;
  --gap-text: 30px;
  --gap-cols: 50px;
  --pad-band-x: 50px;
  --pad-band-y: 50px;
  --pad-container: 10px; /* flex container default */
}
@media (max-width: 767px) {
  :root {
    --fs-primary: 28px;
    --fs-secondary: 18px;
    --fs-text: 16px;
    --gap-text: 20px;
    --gap-cols: 20px;
    --pad-band-x: 20px;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font);
  font-size: var(--fs-text);
  font-weight: 400;
  line-height: 1.5;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--color-ink); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important; 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: 10px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--color-ink); color: var(--color-paper); }
.skip-link:focus { top: 10px; }

/* ---------- type ---------- */
.h-primary   { font-size: var(--fs-primary);   font-weight: 700; line-height: 1; color: var(--color-ink); }
.h-secondary { font-size: var(--fs-secondary); font-weight: 700; line-height: 1; color: var(--color-ink); }
.h-primary, .h-secondary, .image-box__title { overflow-wrap: anywhere; } /* a very long word breaks instead of running out of a narrow column */
.eyebrow     { font-size: var(--fs-accent);    font-weight: 500; line-height: 1; color: var(--color-ink); }
.text        { font-size: var(--fs-text);      font-weight: 400; color: var(--color-ink); }

/* ---------- bands (full-width rows with a boxed inner) ---------- */
.band { padding: var(--pad-band-y) var(--pad-band-x); }
.band__inner { width: 100%; max-width: var(--width-boxed); margin: 0 auto; display: flex; }

.band--split > .band__inner { flex-direction: row; gap: var(--gap-cols); }
.band--reverse > .band__inner { flex-direction: row-reverse; }
.col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; padding: var(--pad-container); }
.col--text { justify-content: center; gap: var(--gap-text); }
.col--media { gap: 40px; justify-content: flex-start; }
.col--media.col--center { justify-content: center; }
.col--media img { width: 100%; }

/* per-band spacing from the old data */
#materials { padding-top: 100px; }
#wholesale { padding-bottom: 25px; }
#advantages { padding-top: 0; }
#contact-cta { padding-bottom: 100px; }

/* inner rows: two small blocks side by side */
.subrow { display: flex; gap: 20px; padding: 0; }
.subrow--flush { padding: 0; }
.subcol { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 20px; padding: 0; }
.subcol__img { width: 100%; }
.text--cols { columns: 2; margin-left: -20px; padding-left: 40px; list-style: disc; }
.text--cols li { break-inside: avoid; }

/* three picture boxes */
.grid3 { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px; padding: var(--pad-container); }
.image-box { text-align: left; }
.image-box__img { width: 100%; margin-bottom: 5px; }
.image-box__title { margin-bottom: 10px; font-size: var(--fs-secondary); font-weight: 700; line-height: 1; color: var(--color-ink); }
.image-box__text { font-size: var(--fs-text); font-weight: 400; color: var(--color-ink); }

/* hidden section's list */
.icon-list { display: flex; flex-direction: column; gap: 7.5px; list-style: disc; padding-left: 24px; font-size: var(--fs-accent); font-weight: 500; }

/* thin rules between sections (shown on mobile only, as in the old site) */
.divider-band { display: none; }
.divider { width: 100%; margin: 0; border: 0; border-top: 1px solid var(--color-ink); }

/* ---------- hero ---------- */
.hero {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  min-height: 80vh; padding: var(--pad-container);
  background-color: var(--color-secondary); /* shows only until the first picture has loaded */
  color: var(--color-paper);
  isolation: isolate;
}
.hero__slides { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__slide {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center center;
  opacity: 0; animation: hero-slide 9s linear infinite both; /* 3 pictures x 3 s, 0.5 s fade between */
}
.hero__slide:nth-child(2) { animation-delay: 3s; }
.hero__slide:nth-child(3) { animation-delay: 6s; }
/* the next picture is fully in before the one above it fades out, so a cross-fade never shows the grey behind */
@keyframes hero-slide { 0% { opacity: 0; } 5.6% { opacity: 1; } 38.9% { opacity: 1; } 44.4% { opacity: 0; } 100% { opacity: 0; } }
/* the first picture is there from the first frame (no fade from grey); from the second round it fades in under the third */
.hero__slide:first-child { animation-name: hero-slide-first; }
@keyframes hero-slide-first { 0% { opacity: 1; } 38.9% { opacity: 1; } 44.4% { opacity: 0; } 94.4% { opacity: 0; } 100% { opacity: 1; } }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #000; opacity: .4; }
.hero--alt::before { opacity: .2; }
.hero__inner { position: relative; }
.hero__box { width: 60%; display: flex; flex-direction: column; gap: 20px; padding: var(--pad-container); }
.hero__box--half { width: 50%; }
.hero .h-primary, .hero .text { color: var(--color-paper); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 12px 24px; border: 0; border-radius: 0;
  background: var(--color-ink); color: var(--color-paper);
  font-family: var(--font); font-size: var(--fs-text); font-weight: 400; line-height: 1; text-align: center; text-decoration: none; cursor: pointer;
}
.btn:hover { background: #222; }
.btn--pill { background: var(--color-pill); color: var(--color-ink); border-radius: 20px; font-size: var(--fs-accent); font-weight: 500; }
.btn--pill:hover { background: #c9c9c9; }
.btn--block { display: block; width: 100%; }

/* ---------- header ---------- */
.site-header__inner { align-items: center; }
.site-header__brand { flex: 1 1 50%; display: flex; align-items: center; gap: 20px; padding: var(--pad-container); }
.site-header__action { flex: 1 1 50%; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; padding: var(--pad-container); }
.site-logo { display: inline-flex; align-items: center; gap: 12px; color: var(--color-ink); text-decoration: none; }
.site-logo__img { height: 48px; width: auto; }
.site-logo__text { font-size: var(--fs-secondary); font-weight: 700; line-height: 1; letter-spacing: .01em; }

/* ---------- closing call to action ---------- */
.cta-wide .btn { flex: 0 0 auto; }
.cta-wide__row { width: 100%; display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 0; }
.cta-wide__copy { flex: 0 0 91.865%; min-width: 0; display: flex; flex-direction: column; gap: 20px; padding: var(--pad-container); }
/* the old row never let the copy shrink; below about 1400px that would push the button off the page (card 609: no sideways scroll), so there it may shrink */
@media (max-width: 1399px) { .cta-wide__copy { flex-shrink: 1; } }
.cta-narrow { display: none; }
.cta-narrow__col { width: 100%; display: flex; flex-direction: column; gap: 10px; padding: var(--pad-container); text-align: center; }
.cta-narrow .btn { margin-top: 25px; }

/* ---------- footer ---------- */
.site-footer__row { padding: 50px var(--pad-band-x); justify-content: space-between; gap: 20px; }
.site-footer__rule { padding: 0 var(--pad-band-x); }
.divider--footer { margin: 15px 0; }
.inline-list { display: flex; flex-wrap: wrap; margin: 0 -15px; font-size: 14px; font-weight: 400; color: var(--color-ink); }
.inline-list li { margin: 0 15px; }
.site-footer a { text-decoration: underline; text-underline-offset: 2px; }
.site-footer a:hover { text-decoration-thickness: 2px; }

/* ---------- contact pop-up ---------- */
.popup {
  width: 640px; max-width: calc(100vw - 20px); max-height: calc(100vh - 20px); overflow: auto;
  margin: auto; padding: 0; border: 0; background: var(--color-paper); color: var(--color-ink);
  box-shadow: 2px 8px 23px 3px rgba(0, 0, 0, .2);
}
.popup::backdrop { background: var(--color-overlay); }
.popup[open], .popup[open]::backdrop { animation: fade-in 1s both; }
.popup__close {
  position: absolute; top: 15px; right: 15px; z-index: 1; display: flex; padding: 4px;
  background: none; border: 0; color: var(--color-ink); cursor: pointer;
}
.popup__body { display: flex; flex-direction: column; gap: 40px; padding: 50px; }
.popup__head { display: flex; flex-direction: column; gap: 10px; text-align: center; }
.form { display: flex; flex-direction: column; gap: 20px; }
.field__control {
  display: block; width: 100%; min-height: 40px; padding: 5px 14px;
  background: var(--color-paper); color: var(--color-ink);
  border: 1px solid var(--color-ink); border-radius: 0;
  font-family: var(--font); font-size: var(--fs-accent); font-weight: 500; line-height: 1.5;
}
textarea.field__control { min-height: 120px; resize: vertical; }
.field__control::placeholder { color: #757575; opacity: 1; }
body.popup-open { overflow: hidden; }
/* success message after Send (the old form said "Your submission was successful.") */
.toast {
  position: fixed; left: 50%; bottom: 30px; z-index: 200; max-width: calc(100vw - 40px); transform: translateX(-50%);
  padding: 14px 24px; background: var(--color-ink); color: var(--color-paper);
  font-size: var(--fs-accent); font-weight: 500; line-height: 1.5; text-align: center;
  box-shadow: 2px 8px 23px 3px rgba(0, 0, 0, .2); animation: fade-in .5s both;
}

/* ---------- motion (as the old page: hero fades in, header slides down, footer slides up) ---------- */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-down { from { opacity: 0; transform: translateY(-40px); } to { opacity: 1; transform: none; } }
@keyframes slide-up { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.fade-in { animation: fade-in 2s both; animation-delay: var(--delay, 0s); }
.site-header { animation: slide-down 1s both; }
/* scroll-in fade-in as the old page: fade-in 2 s ("slow") on text, pictures and rows, fade-in-up on the three boxes; the delay is set per element */
.js-anim .reveal, .js-anim .reveal-up, .js-anim .fade-up { opacity: 0; }
.js-anim .reveal.is-visible { animation: fade-in 2s both; animation-delay: var(--delay, 0s); }
.js-anim .reveal-up.is-visible { animation: reveal-up 1.25s both; animation-delay: var(--delay, 0s); }
@keyframes reveal-up { from { opacity: 0; transform: translate3d(0, 100%, 0); } to { opacity: 1; transform: none; } }
.js-anim .fade-up.is-visible { animation: slide-up 1s both; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__slide { animation: none; }
  .hero__slide:first-child { opacity: 1; }
  .fade-in, .site-header, .js-anim .fade-up.is-visible, .js-anim .reveal.is-visible, .js-anim .reveal-up.is-visible, .popup[open], .popup[open]::backdrop, .toast { animation: none; }
  .js-anim .fade-up, .js-anim .reveal, .js-anim .reveal-up { opacity: 1; }
}
@media print { .fade-up, .reveal, .reveal-up { opacity: 1 !important; } }

/* ---------- tablet and mobile: columns stack ---------- */
@media (max-width: 1024px) {
  .band--split > .band__inner { flex-direction: column; }
  .band--tablet-colrev > .band__inner { flex-direction: column-reverse; }
  .site-footer__row { flex-direction: column; align-items: center; }
  .inline-list { justify-content: center; text-align: center; } /* both footer lists, also when they wrap */
}
@media (max-width: 1024px) and (min-width: 768px) {
  .col { flex: 0 0 auto; width: 100%; }
}
@media (max-width: 767px) {
  .band--tablet-colrev > .band__inner { flex-direction: column; }
  .band--mobile-colrev > .band__inner { flex-direction: column-reverse; }
  .col { flex: 0 0 auto; width: 100%; }
  .hero__box, .hero__box--half { width: 100%; }
  .subrow { flex-direction: column; gap: 20px; }
  .subcol { gap: 10px; }
  .text--cols { columns: 1; }
  .grid3 { grid-template-columns: 1fr; gap: 30px; }
  .image-box__img { margin-bottom: 5px; }
  /* section rules, no spacing */
  .divider-band { display: block; }
  .site-header__action { display: none; }
  .cta-wide { display: none; }
  .cta-narrow { display: block; }
  .inline-list { margin: 0 -10px; font-size: 12px; }
  .inline-list li { margin: 0 10px; }
  .popup { width: 80vw; }
  .popup__body { gap: 30px; padding: 25px; }
}
