/* Skytools — shared styles */

:root {
  --brand: #1b4a8f;          /* logo navy */
  --brand-dark: #123566;
  --brand-deep: #0d264b;     /* hero field */
  --brand-tint: #e7eef8;
  --gear-light: #cfdff3;
  --accent: #f26b1d;
  --accent-dark: #d4570e;
  --ink: #0f1b2a;
  --ink-soft: #4a5768;
  --line: #dde3eb;
  --ground: #ffffff;
  --surface: #f2f5f9;
  --radius: 2px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 132px;
  --font: "Manrope", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Montserrat", "Noto Sans Thai", var(--font);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-press: cubic-bezier(0.3, 0.7, 0.4, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--brand); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; margin: 0; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--ink); color: #fff; padding: 8px 14px;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  font: 700 15px/1.2 var(--font);
  text-decoration: none; border: 0; border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), transform 0.16s var(--ease-press);
}
.btn:active { transform: scale(0.97); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8); }
.btn-outline:hover { background: #fff; color: var(--brand-dark); }
.btn-ghost { background: var(--brand-tint); color: var(--brand-dark); }
.btn-ghost:hover { background: #d4e2f3; }
.btn .arrow { transition: transform 0.25s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { height: 116px; width: auto; flex: none; }
@media (max-width: 600px) { .logo img { height: 84px; } }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  position: relative; padding: 10px 14px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px;
}
.nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease-out);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--brand); }
.nav .btn { margin-left: 12px; color: #fff; }
.nav .btn::after { display: none; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  color: var(--ink); padding: 10px;
}
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 600px) { :root { --header-h: 100px; } }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav .btn { margin: 16px 0 0; border-bottom: 0; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--brand-deep); color: #fff; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 32px;
  min-height: min(calc(100vh - var(--header-h)), 760px); padding-top: 56px; padding-bottom: 56px;
}
.hero h1 { font-size: clamp(40px, 5.6vw, 76px); letter-spacing: -0.035em; line-height: 1.02; }
.hero .lead { margin-top: 28px; font-size: clamp(17px, 1.5vw, 20px); color: rgba(255, 255, 255, 0.86); max-width: 540px; }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 40px; display: flex; align-items: center; gap: 14px; font-size: 15px; color: rgba(255, 255, 255, 0.75); }
.hero-note img { height: 30px; width: auto; background: #fff; padding: 5px 8px; }
.hero-copy { position: relative; z-index: 1; }
.hero-art { position: relative; align-self: stretch; min-height: 420px; }
.hero-art svg { position: absolute; top: 50%; left: 0; width: 130%; height: auto; transform: translateY(-50%); overflow: visible; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; padding-top: 48px; padding-bottom: 0; gap: 8px; }
  .hero-art { min-height: 0; height: 340px; margin: 16px calc(var(--gutter) * -1) 0; overflow: hidden; }
  .hero-art svg { width: 100%; max-width: 520px; left: 50%; top: 50%; transform: translate(-50%, -50%); }
}

/* load-in for the hero copy */
.rise { opacity: 0; transform: translateY(18px); filter: blur(6px); animation: rise 0.8s var(--ease-out) forwards; }
.rise:nth-child(2) { animation-delay: 0.08s; }
.rise:nth-child(3) { animation-delay: 0.16s; }
.rise:nth-child(4) { animation-delay: 0.24s; }
@keyframes rise { to { opacity: 1; transform: none; filter: blur(0); } }
.hero-art { animation: gearsIn 1.2s var(--ease-out) 0.1s both; }
@keyframes gearsIn { from { opacity: 0; transform: translateX(40px) scale(0.96); } }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head h2 { font-size: clamp(30px, 3.8vw, 46px); }
.section-head p { margin-top: 16px; color: var(--ink-soft); font-size: 18px; }

/* ---------- Partner logos (details open on the partner page) ---------- */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 300px)); justify-content: center; gap: 16px; }
.logo-tile {
  position: relative; display: grid; place-items: center; height: 168px; padding: 28px 32px 40px;
  background: var(--surface); text-decoration: none; color: var(--brand-dark); overflow: hidden;
  transition: background-color 0.3s var(--ease-out), transform 0.35s var(--ease-out);
}
.logo-tile img { max-height: 72px; max-width: 100%; width: auto; mix-blend-mode: multiply; transition: transform 0.45s var(--ease-out); }
.logo-tile .tile-cta {
  position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 700; opacity: 0; transform: translateY(8px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.logo-tile::after { /* a light sweep across the tile on hover */
  content: ""; position: absolute; inset: 0; transform: translateX(-110%) skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
}
.logo-tile:hover, .logo-tile:focus-visible { background: var(--brand-tint); transform: translateY(-4px); }
.logo-tile:hover img, .logo-tile:focus-visible img { transform: scale(1.05) translateY(-8px); }
.logo-tile:hover .tile-cta, .logo-tile:focus-visible .tile-cta { opacity: 1; transform: none; }
.logo-tile:hover::after { transform: translateX(110%) skewX(-18deg); transition: transform 0.8s var(--ease-out); }
.logo-tile.invite { background: transparent; box-shadow: inset 0 0 0 2px var(--line); text-align: center; align-content: center; gap: 6px; padding-bottom: 28px; }
.logo-tile.invite strong { font-family: var(--display); font-size: 20px; color: var(--ink); }
.logo-tile.invite span { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; }
.logo-tile.invite:hover { box-shadow: inset 0 0 0 2px var(--brand); background: transparent; }
@media (hover: none) { .logo-tile .tile-cta { opacity: 1; transform: none; } }

/* ---------- Portfolio grid ---------- */
.portfolio { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; align-items: start; }
.portfolio-card { background: #fff; }
.portfolio-card .media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface); }
.portfolio-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease-out); }
.portfolio-card:hover .media img { transform: scale(1.05); }
.portfolio-card h3 { margin: 0; font-family: var(--font); letter-spacing: 0; }
.portfolio-card h3 a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--brand); color: #fff; text-decoration: none;
  padding: 15px 18px; font-size: 16px; font-weight: 700;
  transition: background-color 0.2s var(--ease-out);
}
.portfolio-card h3 a:hover { background: var(--brand-dark); }
.portfolio-card .by { display: block; padding: 10px 18px 0; font-size: 13px; color: var(--ink-soft); }
.portfolio-card ul { list-style: none; margin: 0; padding: 6px 0 8px; }
.portfolio-card li a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 18px; color: var(--ink); text-decoration: none; font-size: 15px;
  transition: background-color 0.18s var(--ease-out), color 0.18s var(--ease-out), padding-left 0.25s var(--ease-out);
}
.portfolio-card li a:hover { background: var(--brand-tint); color: var(--brand-dark); }
.arrow-circle { width: 20px; height: 20px; flex: none; transition: transform 0.25s var(--ease-out); }
.portfolio-card a:hover .arrow-circle { transform: translateX(3px); }
.portfolio-card h3 .arrow-circle { color: #fff; }
.portfolio-card li .arrow-circle { color: var(--brand); }

/* ---------- How it works: gear train ---------- */
.train { position: relative; }
.train svg { display: block; width: 100%; height: auto; overflow: visible; }
.train-steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.train-steps li { text-align: center; padding: 0 8px; }
.train-steps h3 { font-size: 21px; }
.train-steps p { margin-top: 10px; color: var(--ink-soft); font-size: 15px; }
@media (max-width: 760px) {
  .train-steps { grid-template-columns: 1fr; gap: 0; margin-top: 20px; }
  .train-steps li { text-align: left; padding: 18px 0; border-top: 1px solid var(--line); }
  .train-steps li::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--dot, var(--brand)); margin-right: 10px; vertical-align: 2px; }
  .train-steps h3 { display: inline; }
}

/* ---------- Industries (bento) ---------- */
.industries { display: grid; grid-template-columns: 1.4fr 1fr 1fr; grid-template-rows: repeat(2, clamp(220px, 24vw, 340px)); gap: 16px; }
.industry { position: relative; overflow: hidden; background: var(--ink); margin: 0; }
.industry:first-child { grid-row: span 2; }
.industry img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease-out); }
.industry:hover img { transform: scale(1.05); }
.industry figcaption {
  position: absolute; left: 0; bottom: 0; right: 0;
  padding: 56px 22px 20px; color: #fff;
  background: linear-gradient(to top, rgba(6, 16, 30, 0.82), rgba(6, 16, 30, 0)); /* neutral scrim for legibility */
}
.industry strong { display: block; font-family: var(--display); font-size: 22px; letter-spacing: -0.01em; }
.industry span { display: block; margin-top: 4px; font-size: 14px; color: rgba(255, 255, 255, 0.86); }
@media (max-width: 900px) {
  .industries { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .industry { aspect-ratio: 4 / 3; }
  .industry:first-child { grid-row: auto; grid-column: span 2; aspect-ratio: 16 / 9; }
}
@media (max-width: 520px) {
  .industries { grid-template-columns: 1fr; }
  .industry:first-child { grid-column: auto; aspect-ratio: 4 / 3; }
}

/* ---------- Split CTA ---------- */
.split-cta { display: grid; grid-template-columns: 1fr 1fr; min-height: 460px; }
.split-cta .media { overflow: hidden; }
.split-cta .media img { width: 100%; height: 100%; object-fit: cover; }
.split-cta .panel { background: var(--brand); color: #fff; padding: clamp(40px, 6vw, 88px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.split-cta h2 { font-size: clamp(28px, 3.2vw, 40px); }
.split-cta p { margin: 20px 0 32px; max-width: 520px; color: rgba(255, 255, 255, 0.88); font-size: 18px; }
@media (max-width: 860px) {
  .split-cta { grid-template-columns: 1fr; }
  .split-cta .media { aspect-ratio: 16 / 9; }
}

/* ---------- Page header (inner pages) ---------- */
.page-head { background: var(--brand-deep); color: #fff; padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 5vw, 64px); position: relative; overflow: hidden; }
.page-head .wrap { position: relative; z-index: 1; }
.page-head svg.deco { position: absolute; right: -60px; top: 50%; width: min(520px, 60vw); height: auto; transform: translateY(-50%); opacity: 0.9; overflow: visible; }
.breadcrumb { font-size: 14px; color: rgba(255, 255, 255, 0.7); margin-bottom: 18px; }
.breadcrumb a { color: rgba(255, 255, 255, 0.85); }
.page-head h1 { font-size: clamp(36px, 5vw, 60px); }
.page-head .lead { margin-top: 14px; font-size: 19px; color: rgba(255, 255, 255, 0.86); max-width: 640px; }
@media (max-width: 700px) { .page-head svg.deco { opacity: 0.35; right: -120px; } }

/* ---------- Partner intro ---------- */
.partner-intro { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.partner-intro .logo-box { display: inline-block; background: #fff; padding: 14px 18px; margin-bottom: 24px; border: 1px solid var(--line); }
.partner-intro .logo-box img { height: 48px; width: auto; }
.partner-intro p + p { margin-top: 16px; }
.partner-intro .text p { color: var(--ink-soft); font-size: 17px; }
.partner-intro .media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 860px) { .partner-intro { grid-template-columns: 1fr; } }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(40px, 6vw, 64px); background: var(--brand); color: #fff; }
.fact { padding: 28px 24px; border-left: 1px solid rgba(255, 255, 255, 0.18); }
.fact:first-child { border-left: 0; }
.fact strong { display: block; font-family: var(--display); font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -0.02em; }
.fact span { display: block; margin-top: 6px; font-size: 14px; color: rgba(255, 255, 255, 0.86); }
@media (max-width: 860px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { border-left: 0; }
  .fact:nth-child(n + 3) { border-top: 1px solid rgba(255, 255, 255, 0.18); }
}

.capabilities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.capability { background: #fff; overflow: hidden; }
.capability .cap-media { overflow: hidden; }
.capability img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 0.7s var(--ease-out); }
.capability:not(:has(.cap-media)) { border-top: 4px solid var(--brand); }
.partner-intro .logo-box.own img { height: 110px; }
.capability:hover img { transform: scale(1.04); }
.capability div { padding: 22px 22px 26px; position: relative; background: #fff; }
.capability h3 { font-size: 19px; }
.capability p { margin-top: 10px; color: var(--ink-soft); font-size: 15px; }
@media (max-width: 860px) { .capabilities { grid-template-columns: 1fr; } }

/* ---------- Product list (partner page) ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters button {
  min-height: 44px; padding: 10px 18px; cursor: pointer;
  font: 700 15px var(--font); color: var(--brand-dark); background: #fff; border: 0; border-radius: var(--radius);
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), transform 0.16s var(--ease-press);
}
.filters button:hover { background: var(--brand-tint); }
.filters button:active { transform: scale(0.97); }
.filters button[aria-pressed="true"] { background: var(--brand); color: #fff; }

.product {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px);
  background: #fff; padding: clamp(24px, 3vw, 40px);
}
.product + .product { margin-top: 16px; }
.product[hidden] { display: none; }
.product.show { animation: productIn 0.45s var(--ease-out) both; }
@keyframes productIn { from { opacity: 0; transform: translateY(12px); } }
.product .media { background: var(--surface); aspect-ratio: 4 / 3; overflow: hidden; }
.product .media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-out); }
.product:hover .media img { transform: scale(1.03); }
.product h3 { font-size: clamp(24px, 2.4vw, 30px); }
.product .tagline { margin-top: 6px; color: var(--ink-soft); font-size: 17px; }
.product .desc { margin-top: 18px; font-size: 16px; }
.product .desc p + p { margin-top: 12px; }
.product .tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.product .tags li { background: var(--brand-tint); color: var(--brand-dark); font-size: 14px; font-weight: 600; padding: 5px 11px; }
.product details { margin-top: 20px; border-top: 1px solid var(--line); }
.product summary { cursor: pointer; padding: 14px 0; font-weight: 700; font-size: 15px; color: var(--brand-dark); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.product summary::-webkit-details-marker { display: none; }
.product summary::after { content: "+"; font-size: 22px; font-weight: 400; line-height: 1; transition: transform 0.25s var(--ease-out); }
.product details[open] summary::after { transform: rotate(45deg); }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table th, .spec-table td { text-align: left; vertical-align: top; padding: 9px 0; border-top: 1px solid var(--line); }
.spec-table th { width: 38%; padding-right: 16px; font-weight: 600; color: var(--ink-soft); }
.product .actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-band { background: var(--brand-deep); color: #fff; padding: clamp(48px, 7vw, 88px) 0; }
.contact-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 960px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-band h1 { font-size: clamp(32px, 4vw, 48px); }
.contact-band .intro { margin: 14px 0 32px; color: rgba(255, 255, 255, 0.88); max-width: 620px; font-size: 17px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 15px; }
.field label .req { color: #ffc9a8; margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px;
  font: 400 16px var(--font); color: #fff;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.5); border-radius: var(--radius);
  transition: border-color 0.18s var(--ease-out), background-color 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}
.field textarea { min-height: 150px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px; }
.field select option, .field select optgroup { color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: rgba(255, 255, 255, 0.55); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #fff; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: #fff; background-color: rgba(255, 255, 255, 0.09); box-shadow: 0 0 0 2px #fff; }
.field .error { display: none; margin-top: 6px; font-size: 14px; font-weight: 600; color: #ffc9a8; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #ffa477; box-shadow: 0 0 0 1px #ffa477; }
.field.invalid .error { display: block; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; margin-bottom: 24px; color: rgba(255, 255, 255, 0.9); }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; }

.form-status { margin-top: 18px; padding: 14px 16px; font-weight: 600; display: none; }
.form-status.show { display: block; animation: productIn 0.35s var(--ease-out) both; }
.form-status.ok { background: #fff; color: var(--brand-dark); }
.form-status.err { background: #ffe7da; color: #8a2d00; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.side-card { background: #fff; color: var(--ink); padding: 28px 24px; }
.side-card + .side-card { margin-top: 24px; }
.side-card h2 { font-size: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); margin-bottom: 16px; }
.side-card p, .side-card li { font-size: 15px; color: var(--ink-soft); }
.side-card ul { margin: 0; padding-left: 18px; }
.side-card li + li { margin-top: 8px; }
.side-card a { font-weight: 600; }
.side-card .thai { margin-top: 4px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.8); padding: 64px 0 28px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-logo { height: 180px; width: auto; }
.site-footer h2 { font-family: var(--font); letter-spacing: 0; font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 8px; }
.site-footer a { color: rgba(255, 255, 255, 0.8); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .about { margin-top: 18px; max-width: 380px; }
.site-footer .company { margin-top: 10px; color: #fff; font-weight: 600; }
.footer-bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.credits { margin-top: 16px; font-size: 13px; line-height: 1.6; color: rgba(255, 255, 255, 0.7); }
.credits a { color: rgba(255, 255, 255, 0.85); text-decoration: underline; }

/* ---------- Page transitions between pages (supporting browsers) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtOut 0.25s var(--ease-out) both; }
::view-transition-new(root) { animation: vtIn 0.4s var(--ease-out) both; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Header hides while scrolling down, returns on scroll up ---------- */
.site-header { transition: transform 0.35s var(--ease-out), box-shadow 0.3s var(--ease-out); }
.site-header.scrolled { box-shadow: 0 1px 0 var(--line), 0 6px 24px rgba(15, 27, 42, 0.06); }
.site-header.hide { transform: translateY(-100%); }

/* ---------- Stats band ---------- */
.stats { background: var(--brand); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { padding: 34px 28px; border-left: 1px solid rgba(255, 255, 255, 0.16); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat strong { display: block; font-family: var(--display); font-size: clamp(38px, 4.4vw, 56px); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 10px; color: rgba(255, 255, 255, 0.86); max-width: 240px; }
@media (max-width: 700px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat, .stat:first-child { padding: 22px 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.16); }
  .stat:first-child { border-top: 0; }
}

/* ---------- Product carousel ---------- */
.section-head.split { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; max-width: none; }
.section-head.split > div:first-child { max-width: 680px; }
.carousel-controls { display: flex; gap: 10px; flex: none; }
.round-btn {
  width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  background: #fff; color: var(--brand-dark); border: 0; box-shadow: inset 0 0 0 2px var(--line);
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), transform 0.16s var(--ease-press);
}
.round-btn:hover { background: var(--brand); color: #fff; box-shadow: none; }
.round-btn:active { transform: scale(0.94); }
.carousel {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(240px, 26vw, 320px); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
  padding: 4px max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))) 8px;
  scroll-padding: 0 max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  cursor: grab; user-select: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel.grabbing { cursor: grabbing; scroll-snap-type: none; }
.carousel.grabbing .slide { pointer-events: none; }
.slide { scroll-snap-align: start; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.slide-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface); }
.slide-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease-out); }
.slide:hover .slide-media img { transform: scale(1.06); }
.slide-by { margin-top: 14px; font-size: 14px; color: var(--ink-soft); }
.slide strong { margin-top: 2px; font-size: 17px; line-height: 1.3; transition: color 0.2s var(--ease-out); }
.slide:hover strong { color: var(--brand); }
.carousel-progress { height: 3px; background: var(--line); margin-top: 28px; overflow: hidden; }
.carousel-progress span { display: block; height: 100%; background: var(--brand); transform-origin: left; transform: scaleX(0.15); transition: transform 0.2s linear; }
@media (max-width: 600px) { .carousel-controls { display: none; } }

/* ---------- Back to top, with a ring that fills as you scroll ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: #fff; color: var(--brand-dark); display: grid; place-items: center; box-shadow: 0 4px 18px rgba(15, 27, 42, 0.16);
  opacity: 0; transform: translateY(12px) scale(0.9); pointer-events: none;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), background-color 0.2s var(--ease-out);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--brand-tint); }
.to-top svg.ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.to-top svg.ring circle { fill: none; stroke: var(--accent); stroke-width: 3; stroke-dasharray: 150.8; stroke-dashoffset: calc(150.8 * (1 - var(--p, 0))); }

/* ---------- Industry photos drift slightly as you scroll past ---------- */
.industry img { transform: translateY(var(--py, 0px)) scale(1.12); }
.industry:hover img { transform: translateY(var(--py, 0px)) scale(1.17); }

/* ---------- Enquiry sent: a tick draws itself ---------- */
.form-status .tick { width: 22px; height: 22px; vertical-align: -5px; margin-right: 10px; }
.form-status .tick path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: tick 0.5s var(--ease-out) 0.15s forwards; }
@keyframes tick { to { stroke-dashoffset: 0; } }

/* ---------- Scroll progress (shows how far down the page you are) ---------- */
.scroll-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--accent);
  transform: scaleX(var(--p, 0)); transform-origin: left; pointer-events: none;
}

/* ---------- Headline words rise in one after another ---------- */
.words .w { display: inline-block; opacity: 0; transform: translateY(0.45em); filter: blur(6px); animation: wordIn 0.75s var(--ease-out) forwards; animation-delay: calc(var(--i) * 70ms + 80ms); }
@keyframes wordIn { to { opacity: 1; transform: none; filter: blur(0); } }

/* ---------- Images wipe open as their card enters ---------- */
.reveal .media img, .industry.reveal img, .capability.reveal .cap-media img {
  clip-path: inset(0 0 100% 0); transition: clip-path 1s var(--ease-out) 0.1s, transform 0.7s var(--ease-out);
}
.reveal.in .media img, .industry.reveal.in img, .capability.reveal.in .cap-media img { clip-path: inset(0 0 0 0); }
.no-js .reveal .media img, .no-js .industry img { clip-path: none; }

/* ---------- Magnetic buttons: lean toward the pointer ---------- */
.magnetic { transition: transform 0.35s var(--ease-out), background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out); }

/* ---------- Product media float on hover ---------- */
.product .media img { transform-origin: center; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); filter: blur(4px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out), filter 0.7s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; filter: none; }
.no-js .reveal { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-delay: 0s !important; }
  .reveal, .rise, .words .w { opacity: 1; transform: none; filter: none; }
  .reveal .media img, .industry.reveal img, .capability.reveal .cap-media img { clip-path: none; }
  .scroll-progress { display: none; }
  .industry img, .industry:hover img { transform: none; }
  .site-header.hide { transform: none; }
  @view-transition { navigation: none; }
}
