/* ==========================================================================
   29 December — Smart Vending Solution
   Colors, type sizes and section proportions are sampled directly from the
   source website.ai (1440px artboard) — see fonts/colors extraction notes.
   ========================================================================== */

@font-face {
  font-family: "Avenir Light";
  src: url("../assets/fonts/Avenir-Light.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Avenir Roman";
  src: url("../assets/fonts/Avenir-Roman.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Avenir Medium";
  src: url("../assets/fonts/Avenir-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "LINE Seed Sans TH";
  src: url("../assets/fonts/LINESeedSansTH-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Sederahana";
  src: url("../assets/fonts/Sederahana-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --maroon: #8e1b29;
  --maroon-dark: #711522;
  --gray-light: #f1f1f2;
  --gray-mid: #6e7071;
  --gray-dark: #2e2f2e;
  --placeholder: #d1d3d4;
  --white: #ffffff;

  --font-th: "LINE Seed Sans TH", sans-serif;
  --font-en-light: "Avenir Light", "Avenir Roman", sans-serif;
  --font-en: "Avenir Roman", sans-serif;
  --font-en-medium: "Avenir Medium", sans-serif;
  --font-script: "Sederahana", cursive;

  --container: 1440px;
  --pad-inline: clamp(24px, 5.5vw, 100px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-th);
  color: var(--gray-dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad-inline);
}

.eyebrow {
  font-size: clamp(12px, 1.1vw, 14.8px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--maroon);
  font-weight: 400;
  margin: 0 0 14px;
}
section.on-dark .eyebrow,
.on-dark .eyebrow { color: rgba(255, 255, 255, 0.85); }

h2.section-heading {
  font-size: clamp(30px, 4.1vw, 57.8px);
  line-height: 1.15;
  margin: 0 0 20px;
  font-weight: 400;
  color: var(--maroon);
}
.on-dark h2.section-heading { color: var(--white); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 34px;
  border-radius: 999px;
  font-family: var(--font-th);
  font-size: clamp(14px, 1.3vw, 18.3px);
  border: 1.5px solid transparent;
  transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { opacity: 0.85; }
.btn-solid {
  background: var(--maroon);
  color: var(--white);
}
.btn-outline {
  background: transparent;
  border-color: var(--maroon);
  color: var(--maroon);
}
.on-dark .btn-outline {
  border-color: var(--white);
  color: var(--white);
}
.btn-white {
  background: var(--white);
  color: var(--maroon);
}

/* ---------- Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 18px;
}
.nav > nav { margin-left: auto; }
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-mark {
  width: 64px;
  height: auto;
}
.logo-text {
  font-family: var(--font-en-medium);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--gray-dark);
}
.logo-text .accent { color: var(--maroon); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 34px);
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-en-medium);
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-dark);
}
.nav-links a { padding-block: 6px; }
.nav-links a:hover { color: var(--maroon); }

.nav-cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--gray-dark);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(80vh, 810px);
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}
.hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(241, 241, 242, 0.97) 0%,
    rgba(241, 241, 242, 0.9) 30%,
    rgba(241, 241, 242, 0.35) 55%,
    rgba(241, 241, 242, 0) 72%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  min-height: min(80vh, 810px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-block: 60px;
}
.hero h1 {
  font-family: var(--font-en-medium);
  font-weight: 500;
  color: var(--maroon);
  font-size: clamp(44px, 6.2vw, 87.7px);
  line-height: 1.02;
  margin: 0;
}
.hero-byline {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.hero-byline .by {
  font-family: var(--font-en);
  font-size: clamp(20px, 2.8vw, 38.7px);
  color: var(--maroon);
}
.hero-byline .script {
  font-family: var(--font-script);
  font-size: clamp(20px, 2.3vw, 32px);
  color: var(--maroon);
}
.hero-tagline {
  font-family: var(--font-en);
  font-size: clamp(18px, 2.8vw, 38.7px);
  color: var(--maroon);
  margin: 6px 0 34px;
}
.hero-content .btn { margin-top: 8px; }

/* ---------- Generic section paddings ---------- */
.section { padding-block: clamp(56px, 8vw, 110px); }
#ecosystem { padding-bottom: 36px; }
.on-maroon { background: var(--maroon); color: var(--white); }
.on-light { background: var(--gray-light); }
.on-gray { background: var(--gray-mid); color: var(--white); }
.on-dark-footer { background: var(--gray-dark); color: var(--white); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(280px, 640px) 1fr;
  gap: clamp(32px, 5vw, 90px);
  align-items: center;
}
.about-photo img { border-radius: 20px; width: 100%; }
.about-copy p:not(.eyebrow) {
  font-family: var(--font-th);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}
.about-copy .lead {
  font-size: clamp(17px, 2vw, 27.8px);
  margin: 20px 0 18px;
}
.about-copy .fine {
  font-size: clamp(13px, 1.3vw, 17.9px);
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 36px;
}
.needs {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: clamp(24px, 4vw, 56px);
  flex-wrap: wrap;
}
.needs-item { text-align: left; }
.needs-item img {
  width: auto;
  height: 61.2px;
  margin-bottom: 14px;
  margin-left: 0;
  display: block;
}
.needs-item .verb {
  display: block;
  font-family: var(--font-script);
  font-size: clamp(15px, 1.35vw, 18.7px);
  line-height: 1;
}
.needs-item .noun {
  display: block;
  font-family: var(--font-th);
  font-size: clamp(13px, 1.35vw, 18.7px);
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4px;
}

/* ---------- Our Solutions ---------- */
.solutions-head {
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: clamp(32px, 5vw, 60px);
  text-align: center;
}
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.solution-card {
  background: var(--maroon);
  color: var(--white);
  border-radius: 10px;
  padding: 32px 26px 40px;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.solution-card.is-gray { background: var(--gray-mid); }
.solution-card h3 {
  font-family: var(--font-th);
  font-weight: 400;
  font-size: clamp(18px, 2.1vw, 29px);
  line-height: 1.25;
  margin: 0 0 16px;
}
.solution-card p {
  font-size: clamp(12px, 0.95vw, 13.4px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

/* ---------- Ecosystem ---------- */
.eco-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 570px) 1fr;
  gap: clamp(32px, 6vw, 93px);
  align-items: start;
}
.eco-photo {
  grid-column: 1;
  grid-row: 1;
  position: absolute;
  top: 30px;
  left: 0;
  width: min(570px, 100%);
  z-index: 2;
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.eco-photo.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.eco-copy { grid-column: 2; grid-row: 1; }
.eco-photo img {
  border-radius: 20px;
  width: 100%;
  display: block;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.28);
}
.eco-head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 46px); }
.eco-list { list-style: none; margin: 0; padding: 0; }
.eco-list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 18px;
  padding-block: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}
.eco-num {
  font-family: var(--font-en);
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  padding-top: 4px;
}
.eco-list h3 {
  font-family: var(--font-th);
  font-weight: 400;
  font-size: clamp(18px, 2.1vw, 29px);
  margin: 0 0 6px;
}
.eco-list p {
  font-family: var(--font-th);
  font-size: clamp(10px, 0.8vw, 11px);
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Proof of operation + gallery (single section, gradient split bg) ---------- */
.proof-section {
  background: linear-gradient(
    to bottom,
    var(--gray-light) 0%,
    var(--gray-light) 55.5%,
    var(--maroon) 55.5%,
    var(--maroon) 100%
  );
}
.proof-top {
  display: grid;
  grid-template-columns: minmax(260px, 620px) 1fr;
  gap: clamp(28px, 5vw, 70px);
  align-items: start;
}
.proof-copy p.lead {
  font-family: var(--font-th);
  font-size: clamp(17px, 2vw, 27.8px);
  line-height: 1.5;
  color: var(--gray-dark);
  max-width: 480px;
  margin: 0 0 34px;
}
.stats {
  display: flex;
  gap: clamp(20px, 3vw, 44px);
  flex-wrap: wrap;
}
.stat { display: flex; align-items: flex-start; gap: 12px; }
.stat svg { width: 30px; height: 30px; stroke: var(--maroon); flex-shrink: 0; margin-top: 2px; }
.stat .num {
  font-family: var(--font-th);
  font-size: clamp(20px, 2.3vw, 31.6px);
  color: var(--maroon);
  line-height: 1.1;
  display: block;
}
.stat .num.is-text {
  font-size: clamp(18px, 2vw, 28.1px);
}
.stat .label {
  font-family: var(--font-th);
  font-size: clamp(12px, 1.1vw, 15.3px);
  color: var(--gray-mid);
}
.client-logos { width: 100%; max-width: 728px; margin-left: auto; }
.client-logos img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center bottom;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.gallery-grid {
  margin-top: clamp(48px, 6vw, 80px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.gallery-grid .ph {
  aspect-ratio: 404 / 286;
  background: var(--placeholder);
  border-radius: 20px;
  overflow: hidden;
}
.gallery-grid .ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- FAQ ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(240px, 420px) 1fr;
  gap: clamp(28px, 6vw, 90px);
}
.faq-head { max-width: 420px; }
.faq-list { margin: 0; padding: 0; }
.faq-item {
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  padding-block: 22px;
}
.faq-item:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.35); }
.faq-q {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: start;
  gap: 14px;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  color: var(--white);
}
.faq-num {
  font-family: var(--font-en);
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
  padding-top: 3px;
}
.faq-q h3 {
  font-family: var(--font-th);
  font-weight: 400;
  font-size: clamp(18px, 2.1vw, 29px);
  margin: 0;
}
.faq-chevron {
  width: 16px;
  height: 16px;
  stroke: var(--white);
  transition: transform 0.25s ease;
  margin-top: 6px;
}
.faq-item[open] .faq-chevron { transform: rotate(180deg); }
.faq-a {
  font-family: var(--font-th);
  font-size: clamp(10px, 0.8vw, 11px);
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  margin: 10px 0 0 48px;
  max-width: 640px;
}
.faq-item summary { list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }

/* ---------- Start CTA ---------- */
.start-grid {
  display: grid;
  grid-template-columns: minmax(280px, 700px) 1fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: start;
}
.start-copy p:not(.eyebrow) {
  font-family: var(--font-th);
  font-size: clamp(17px, 2vw, 27.8px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin: 0;
}
.start-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.start-actions .btn { width: 100%; }
.start-actions .email {
  font-family: var(--font-en-light);
  font-size: 18.6px;
  text-decoration: underline;
  color: var(--white);
  padding-left: 4px;
}

/* ---------- Floating widgets ---------- */
.floating-widgets {
  position: fixed;
  right: clamp(16px, 3vw, 40px);
  bottom: clamp(16px, 3vw, 40px);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.to-top {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gray-dark);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top svg { width: 18px; height: 18px; stroke: var(--white); }

.floating-logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.floating-logo .logo-mark { width: 34px; height: auto; }

/* ---------- Footer ---------- */
.footer { padding-block: clamp(44px, 6vw, 70px) 30px; }
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand { display: flex; gap: 30px; align-items: stretch; }
.footer-brand .logo-mark,
.footer-brand .footer-wordmark {
  width: auto;
  height: 65.5px;
  flex-shrink: 0;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 2vw, 30px);
  list-style: none;
  margin: 0;
  padding: 0;
  align-self: center;
  font-family: var(--font-en-medium);
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer-nav a:hover { color: var(--maroon); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.footer-address {
  font-family: var(--font-en-light);
  font-size: 10.6px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
}
.footer-address strong {
  display: block;
  font-family: var(--font-en-medium);
  font-size: 10.6px;
  letter-spacing: 0.06em;
  color: var(--white);
  margin-bottom: 6px;
}
.footer-social { display: flex; gap: 12px; align-items: flex-start; }
.footer-social a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer-social svg { width: 16px; height: 16px; stroke: var(--white); fill: none; }
.footer-copy {
  font-family: var(--font-en);
  font-size: 16.4px;
  color: rgba(255, 255, 255, 0.6);
  margin: 32px 0 0;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .site-header.is-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 16px var(--pad-inline) 24px;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
  }
  .site-header.is-open .nav-cta {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 190px;
    padding: 0 var(--pad-inline) 20px;
    background: var(--white);
  }
  .site-header.is-open .nav-cta .btn { width: 100%; }

  .about-grid, .eco-grid, .proof-top, .faq-grid, .start-grid, .footer-top {
    grid-template-columns: 1fr;
  }
  .eco-photo {
    grid-column: 1;
    position: static;
    width: 100%;
    z-index: auto;
    margin-bottom: clamp(28px, 4vw, 46px);
  }
  .eco-copy { grid-column: 1; }
  #ecosystem { padding-bottom: clamp(56px, 8vw, 110px); }
  .client-logos { margin-left: 0; max-width: 546px; }
  .solutions-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .hero { min-height: auto; }
  .hero-media::before {
    background: linear-gradient(
      180deg,
      rgba(241, 241, 242, 0.55) 0%,
      rgba(241, 241, 242, 0.97) 65%,
      rgba(241, 241, 242, 0.99) 100%
    );
  }
  .hero-content { padding-block: 320px 48px; }
  .solutions-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

/* ---------- Brochure page ---------- */
.brochure-intro { max-width: 720px; text-align: center; margin-inline: auto; }
.brochure-desc {
  font-family: var(--font-th);
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.6;
  color: var(--gray-mid);
  margin: 0 0 28px;
}
.brochure-gallery-section { padding-top: 0; }
.brochure-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 3vw, 40px);
  margin-bottom: clamp(32px, 4vw, 48px);
}
.brochure-gallery img {
  width: 100%;
  max-width: 640px;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}
.brochure-download-bottom { display: flex; width: fit-content; margin-inline: auto; }
