/* ============================================================
   ULaundry — pure CSS (no framework)
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --blue:        #4378bc;
  --blue-dark:   #35619b;
  --blue-deep:   #1f4f8f;
  --ink:         #000000;
  --ink-soft:    #2b2b2b;
  --muted:       #5a5a5a;
  --paper:       #ffffff;
  --grey-bg:     #f4f4f4;
  --frame:       #2f2e2e;
  --line:        rgba(0, 0, 0, .08);

  --font-body:    'Kanit', 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Plus Jakarta Sans', Helvetica, Arial, 'Kanit', sans-serif;

  --header-h:   115px;
  --wrap:       1200px;
  --gutter:     clamp(20px, 5vw, 64px);
  --section-y:  clamp(56px, 7vw, 100px);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: 50%; top: -100px; transform: translateX(-50%);
  z-index: 200; background: var(--blue); color: #fff;
  padding: 10px 22px; border-radius: 0 0 8px 8px; font-size: 15px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.site-header.is-stuck {
  box-shadow: 0 2px 18px rgba(0, 0, 0, .07);
  border-bottom-color: var(--line);
}

.header-inner {
  padding-inline: var(--gutter);
  min-height: var(--header-h);
  display: flex; align-items: center; gap: 24px;
}

.brand { flex: 0 0 auto; display: block; }
.brand img { width: 160px; height: auto; }

.primary-nav { margin-inline: auto; }
.primary-nav ul { display: flex; align-items: center; gap: clamp(18px, 3.6vw, 62px); }
.primary-nav a {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700; font-size: 16px; letter-spacing: .01em;
  color: var(--ink);
  padding: 6px 2px; display: block;
  transition: color .25s var(--ease);
}
.primary-nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--blue);
  transform: scaleX(0); transform-origin: right;
  transition: transform .32s var(--ease);
}
.primary-nav a:hover { color: var(--blue); }
.primary-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* burger */
.nav-toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px;
  flex-direction: column; justify-content: center; align-items: center; gap: 6px;
}
.nav-toggle span {
  display: block; width: 26px; height: 2px; background: var(--ink);
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================================
   SLIDESHOW (shared)
   ============================================================ */
.slideshow { position: relative; overflow: hidden; }

.slides { position: relative; width: 100%; height: 100%; }

.slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .8s var(--ease), visibility .8s;
}
.slide:first-child { position: relative; }
.slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }

.ss-arrow {
  position: absolute; top: 50%; z-index: 5;
  width: 46px; height: 46px; margin-top: -23px;
  display: grid; place-items: center;
  border-radius: 50%;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.ss-arrow::before {
  content: ''; width: 15px; height: 15px;
  border-top: 2.5px solid #fff; border-right: 2.5px solid #fff;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .45));
}
.ss-prev { left: clamp(10px, 2vw, 28px); }
.ss-prev::before { transform: rotate(-135deg) translate(-2px, -2px); }
.ss-next { right: clamp(10px, 2vw, 28px); }
.ss-next::before { transform: rotate(45deg) translate(-2px, -2px); }
.ss-arrow:hover { background: rgba(0, 0, 0, .28); transform: scale(1.08); }

.ss-dots {
  position: absolute; left: 0; right: 0; bottom: 16px; z-index: 5;
  display: flex; justify-content: center; gap: 12px;
}
.ss-dots button {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(0, 0, 0, .28);
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.ss-dots button[aria-selected="true"] { background: var(--blue); transform: scale(1.25); }

.ss-counter {
  position: absolute; right: 12px; bottom: 10px; z-index: 5;
  font-size: 12px; line-height: 1; color: #fff;
  background: rgba(0, 0, 0, .35);
  padding: 5px 9px; border-radius: 20px;
  font-family: var(--font-display);
}

.slideshow--nocrop .slide { height: 100%; overflow: hidden; }
.slideshow--nocrop .slide-fg {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  object-fit: contain;
}
.slideshow--nocrop .slide-bg {
  position: absolute; inset: -5%;
  width: 110%; height: 110%;
  object-fit: cover;
  filter: blur(34px) saturate(1.1);
  z-index: 0; pointer-events: none;
}

/* ต่ำกว่า 1425px ให้ aspect-ratio คุมความสูง (อิงความกว้างจริง ไม่โดน scrollbar
   กวนเหมือน vw) — เต็มขอบพอดี ไม่มีแถบเบลอโผล่
   ตั้งแต่ 1425px ขึ้นไป ตรึงความสูงไว้ แล้วปล่อยให้กว้างเต็มจอ */
.promo .slideshow { width: 100%; aspect-ratio: 1425 / 852; }
@media (min-width: 1425px) {
  .promo .slideshow { aspect-ratio: auto; height: 852px; }
}

/* ============================================================
   HERO
   ============================================================ */
/* เต็มความกว้างเสมอ ใช้ cover — ยอมให้ครอปบน-ล่างบนจอกว้างเพื่อให้ภาพยาวสุดขอบ */
.hero .slideshow { height: clamp(320px, 50vw, 715px); }

/* ============================================================
   INTRO
   ============================================================ */
.intro { padding-block: clamp(48px, 6vw, 84px) clamp(48px, 6vw, 86px); text-align: center; }

.intro-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 3.2vw, 39px);
  line-height: 1.2; letter-spacing: .01em;
}
.intro-jp {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(16px, 1.6vw, 20px);
  letter-spacing: .34em;
  margin-top: 10px;
}
.intro-lead, .intro-body {
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.95;
  margin-top: clamp(24px, 3vw, 38px);
}
.intro-lead { margin-top: clamp(26px, 3.4vw, 42px); }

/* ============================================================
   PROMO / NEWS
   ============================================================ */
.promo { background: #fff; }
.promo .slides { height: 100%; }

/* ============================================================
   SECTION HEADINGS (shared)
   ============================================================ */
.section-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.25;
  text-align: center;
  letter-spacing: -.005em;
}
.section-lead {
  text-align: center;
  font-size: clamp(16px, 1.5vw, 19px);
  font-weight: 400;
  margin-top: clamp(18px, 2.4vw, 30px);
}
.section-sub {
  text-align: center;
  font-size: clamp(15px, 1.45vw, 19px);
  line-height: 1.75;
  margin-top: 6px;
}

/* ============================================================
   SERVICE
   ============================================================ */
.service { padding-block: var(--section-y); background: var(--paper); }

.feature-grid {
  margin-top: clamp(44px, 5.5vw, 78px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(38px, 5vw, 78px) clamp(24px, 3vw, 46px);
  max-width: 1020px; margin-inline: auto;
}

.feature { text-align: center; }

.feature-icon {
  height: 130px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
/* each icon keeps the display size it had on the source site */
.feature-icon img {
  width: auto;
  max-height: var(--ih, 86px);
  transition: transform .4s var(--ease);
}
.icon-wash      { --ih:  86px; }
.icon-drum      { --ih:  86px; }
.icon-detergent { --ih:  49px; }
.icon-app       { --ih: 126px; }
.icon-qr        { --ih: 117px; }
.icon-gift      { --ih:  71px; }
.feature:hover .feature-icon img { transform: translateY(-6px) scale(1.06); }

.feature h3 {
  font-size: clamp(16px, 1.5vw, 18px);
  font-weight: 600;
  line-height: 1.45;
}
.feature p {
  margin-top: 12px;
  font-size: clamp(13px, 1.2vw, 14px);
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ============================================================
   BAND
   ============================================================ */
.band { line-height: 0; }
.band img { width: 100%; height: clamp(200px, 35vw, 500px); object-fit: cover; }

/* ============================================================
   FABRIC CARE
   ============================================================ */
.fabric { background: var(--grey-bg); padding-block: var(--section-y); }

.gallery { margin-top: clamp(36px, 4.5vw, 60px); }
.gallery .slideshow {
  max-width: 980px; margin-inline: auto;
  background: #fff;
}
.gallery .slides { aspect-ratio: 980 / 552; }
.gallery + .gallery .slides { aspect-ratio: 980 / 490; }
.gallery .slide img { object-fit: cover; }

/* ============================================================
   ULAUNDRY APP
   ============================================================ */
.app-section { background: var(--blue); padding-block: clamp(40px, 5vw, 58px) clamp(46px, 6vw, 72px); }
.app-section .wrap { max-width: 1280px; }

.app-title {
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(34px, 5.2vw, 73px);
  line-height: 1.15;
  letter-spacing: .005em;
}

.app-gallery { margin-top: clamp(22px, 3vw, 34px); }
.app-gallery .slideshow {
  background: var(--frame);
  aspect-ratio: 1231 / 693;
}
.app-gallery .slides { height: 100%; }
.app-gallery .slide img { object-fit: contain; }

/* ============================================================
   HOW TO USE
   ============================================================ */
.howto { background: var(--blue); padding-block: 0 clamp(48px, 6vw, 84px); }
.howto-inner {
  max-width: 1280px;
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
}

.howto-title {
  display: flex; flex-direction: column;
  color: #fff;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(46px, 7vw, 99px);
  line-height: .98;
  letter-spacing: -.01em;
}

.howto-video {
  position: relative;
  border-radius: 4px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
  background: #000;
}
.howto-video video { width: 100%; aspect-ratio: 911 / 498; object-fit: cover; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--paper); padding-block: clamp(56px, 7vw, 92px) clamp(40px, 5vw, 64px); }

.footer-title {
  text-align: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(30px, 3.6vw, 45px);
  line-height: 1.3;
}

.contact-list {
  margin-top: clamp(32px, 4vw, 52px);
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: clamp(24px, 5vw, 74px);
}
.contact-list a {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: clamp(19px, 2vw, 26px);
  font-weight: 400;
  transition: color .25s var(--ease), transform .25s var(--ease);
}
.contact-list img { width: 37px; height: 37px; }
.contact-list a:hover { color: var(--blue); transform: translateY(-2px); }

.copyright {
  margin-top: clamp(36px, 4.5vw, 60px);
  text-align: center;
  font-size: 13px; font-weight: 300;
  color: var(--muted);
}

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.feature.reveal:nth-child(2), .feature.reveal:nth-child(5) { transition-delay: .09s; }
.feature.reveal:nth-child(3), .feature.reveal:nth-child(6) { transition-delay: .18s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  :root { --header-h: 92px; }
  .brand img { width: 132px; }
  .primary-nav ul { gap: 20px; }
  .primary-nav a { font-size: 15px; }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  .primary-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper);
    border-top: 1px solid var(--line);
    box-shadow: 0 16px 30px rgba(0, 0, 0, .1);
    display: grid; grid-template-rows: 0fr;
    transition: grid-template-rows .35s var(--ease);
  }
  .primary-nav > ul { overflow: hidden; }
  .primary-nav.is-open { grid-template-rows: 1fr; }

  .primary-nav ul {
    flex-direction: column; align-items: stretch; gap: 0;
    padding-inline: var(--gutter);
  }
  .primary-nav li + li { border-top: 1px solid var(--line); }
  .primary-nav a { padding: 15px 0; font-size: 17px; }
  .primary-nav a::after { display: none; }

  .site-header { position: sticky; }
  .header-inner { position: relative; }

  .howto-inner { grid-template-columns: 1fr; }
  .howto-title { flex-direction: row; gap: .28em; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }

  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-icon { height: 108px; }
  .feature-icon img { max-height: calc(var(--ih, 86px) * .84); }

  .ss-arrow { width: 38px; height: 38px; margin-top: -19px; }
  .ss-arrow::before { width: 12px; height: 12px; }

  .intro-lead br, .intro-body br { display: none; }
  .section-sub br { display: none; }
}

@media (max-width: 480px) {
  .feature-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-list { gap: 20px; flex-direction: column; align-items: center; }
  .ss-dots { bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
