@import url('https://fonts.googleapis.com/css2?family=Anuphan:wght@300;400;500;600;700&family=Oswald:wght@400;500;600;700&display=swap');
/* the two brand teasers below carry their own CI, so their faces load here too */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@1,600;1,800&family=IBM+Plex+Sans+Thai:wght@300;400;600;700&family=Urbanist:wght@200;300;500;600&display=swap');

/* ============================================================
   perfection.css — Perfection Automotive (company page)
   Palette: black / red / silver / grey   Type: Sukhumvit Set + Oswald
   Loads on top of core.css.
   ============================================================ */
:root {
  /* surfaces */
  --ink:        #08080a;
  --ink-2:      #0d0d10;
  --surface:    #141418;
  --surface-2:  #1b1b21;
  --line:       rgba(255, 255, 255, .075);
  --line-2:     rgba(255, 255, 255, .14);

  /* brand */
  --accent:        #c4121f;
  --accent-hi:     #e4252f;
  --accent-deep:   #7d0d14;
  --accent-rgb: 196, 18, 31;
  --text:     #dfe2e7;
  --text-2:   #a2a8b2;
  --muted:      #7b818b;

  /* type */
  --font-body: 'Sukhumvit Set', 'Anuphan', 'Noto Sans Thai', -apple-system, sans-serif;
  --font-display: 'Oswald', 'Sukhumvit Set', sans-serif;

  --wrap: 1240px;
  --pad: clamp(20px, 5vw, 56px);
  --radius: 3px;
}

/* ── shared bits ── */
.eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent-hi);
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--accent);
  flex: none;
}
.eyebrow.center { justify-content: center; }

h1, h2, h3, h4 { line-height: 1.38; font-weight: 700; color: #fff; }

.h-display {
  font-size: clamp(30px, 4.6vw, 56px);
  letter-spacing: -.01em;
  line-height: 1.38;
  margin-block: 18px 20px;
}
.h-display em { font-style: normal; color: var(--accent-hi); }
.h-display .en { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .01em; }

.lede { color: var(--text-2); font-size: clamp(15px, 1.3vw, 17px); max-width: 62ch; }

.sec-head { margin-bottom: clamp(40px, 5vw, 64px); }
.sec-head.center { text-align: center; }
.sec-head.center .lede { margin-inline: auto; }
.sec-head.split { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }


.link-more {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .2s, gap .2s;
}
.link-more:hover { color: var(--accent-hi); gap: 14px; }

/* ── top bar ── */
.topbar {
  background: #000;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; }
.topbar-info { display: flex; gap: 22px; }
.topbar-info span { display: inline-flex; align-items: center; gap: 7px; }
.topbar-info svg { width: 13px; height: 13px; color: var(--accent-hi); }
.topbar-social { display: flex; align-items: center; gap: 4px; }
.topbar-social a {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  color: var(--muted);
  transition: color .2s;
}
.topbar-social a:hover { color: #fff; }
.topbar-social svg { width: 15px; height: 15px; }
.topbar-social a.topbar-tel {
  white-space: nowrap;
  font-family: var(--font-display);
  letter-spacing: .06em;
  color: #fff;
  font-size: 14px;
  width: auto; height: auto;
  padding-left: 14px;
  margin-left: 8px;
  border-left: 1px solid var(--line-2);
  display: inline-flex; align-items: center; gap: 7px;
}
.topbar-social a.topbar-tel:hover { color: var(--accent-hi); }
.topbar-tel svg { width: 14px; height: 14px; color: var(--accent-hi); }

/* ── nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(8, 8, 10, .82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: background .3s, border-color .3s;
}
.nav.scrolled { background: rgba(8, 8, 10, .96); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 74px; }
.nav-logo img { height: 40px; width: auto; }
.nav-menu { display: flex; align-items: center; gap: clamp(13px, 1.9vw, 30px); list-style: none; }
.nav-menu a {
  font-size: 14.5px;
  white-space: nowrap;
  font-weight: 500;
  color: var(--text-2);
  position: relative;
  padding-block: 6px;
  transition: color .2s;
}
.nav-menu a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 2px;
  background: var(--accent);
  transition: right .28s ease;
}
.nav-menu a:hover, .nav-menu a.active { color: #fff; }
.nav-menu a:hover::after, .nav-menu a.active::after { right: 0; }

.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  background: none; border: 1px solid var(--line-2); border-radius: var(--radius);
  color: #fff;
  place-items: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* ── hero ── */
.hero {
  position: relative;
  padding-block: clamp(52px, 7vw, 92px) clamp(60px, 8vw, 110px);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -30% -10% auto -30%;
  height: 130%;
  background:
    radial-gradient(46% 52% at 22% 30%, rgba(var(--accent-rgb), .17), transparent 70%),
    radial-gradient(40% 40% at 82% 12%, rgba(255, 255, 255, .05), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-logo { width: clamp(150px, 17vw, 205px); margin-bottom: 26px; }
.hero h1 {
  font-size: clamp(32px, 4.2vw, 51px);
  line-height: 1.38;
  letter-spacing: -.015em;
  margin-bottom: 22px;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--accent-hi); display: inline-block; }
.hero-sub { color: var(--text-2); font-size: clamp(15px, 1.35vw, 17.5px); max-width: 54ch; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 44px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: clamp(18px, 3vw, 40px);
  justify-content: start;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.hero-stats dt { font-family: var(--font-display); font-size: clamp(24px, 2.6vw, 34px); font-weight: 600; color: #fff; line-height: 1; }
.hero-stats dt small { font-size: .5em; color: var(--accent-hi); margin-left: 2px; }
.hero-stats dd { font-size: 12.5px; color: var(--muted); margin-top: 7px; line-height: 1.4; }

/* hero image stack */
.hero-media { position: relative; }
.hero-media .shot {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 80px -40px #000;
}
.hero-media .shot img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 62%; }
.hero-media .shot::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(200deg, transparent 45%, rgba(8, 8, 10, .55));
}
.hero-badge {
  position: absolute;
  left: -22px; bottom: 34px;
  z-index: 2;
  background: rgba(20, 20, 24, .92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 24px 48px -20px #000;
  max-width: 84%;
}
.hero-badge img { width: 58px; height: 58px; object-fit: cover; border-radius: 2px; flex: none; }
.hero-badge .t { font-family: var(--font-display); font-size: 13px; letter-spacing: .12em; color: var(--accent-hi); text-transform: uppercase; }
.hero-badge .d { font-size: 13.5px; color: var(--text); line-height: 1.45; }

/* ── marquee of capabilities ── */
.ticker {
  border-block: 1px solid var(--line);
  background: var(--ink-2);
  overflow: hidden;
  padding-block: 15px;
}
.ticker-track { display: flex; width: max-content; animation: slide 42s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 34px;
  padding-inline: 17px;
}
.ticker-track span::after { content: ''; width: 5px; height: 5px; background: var(--accent); transform: rotate(45deg); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ── business lines ── */
.lines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.line-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .3s, transform .3s;
}
.line-card:hover { border-color: rgba(var(--accent-rgb), .55); transform: translateY(-5px); }
.line-card .pic { position: relative; overflow: hidden; }
.line-card .pic img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.3,1); }
.line-card:hover .pic img { transform: scale(1.06); }
.line-card .pic::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--surface) 2%, rgba(20,20,24,.15) 60%, transparent);
}
.line-card .no {
  position: absolute; z-index: 2; left: 20px; top: 16px;
  font-family: var(--font-display); font-size: 40px; font-weight: 700;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.35);
  line-height: 1;
}
.line-body { padding: 4px 26px 30px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.line-body h3 { font-size: 20px; }
.line-body h3 .en { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; font-size: 15px; color: var(--accent-hi); display: block; margin-bottom: 4px; font-weight: 500; }
.line-body p { font-size: 14.5px; color: var(--text-2); line-height: 1.75; }
.line-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 6px; }
.line-tags i {
  font-style: normal; font-size: 11.5px; letter-spacing: .04em;
  color: var(--text-2);
  border: 1px solid var(--line-2); border-radius: 100px;
  padding: 4px 11px;
}

/* ── brand strip ── */
/* auto-fit so the row stays even however many brands are live
   (KEI is currently paused, so it is four rather than five) */
.brands { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.brand {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface), var(--ink-2));
  padding: 26px 14px;
  text-align: center;
  transition: border-color .3s, transform .3s, background .3s;
}
.brand:hover { border-color: rgba(var(--accent-rgb),.5); transform: translateY(-4px); }
.brand b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(16px, 1.7vw, 21px);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
}
.brand span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 5px; letter-spacing: .04em; }
/* the box is capped in px, not in %: a percentage max-height inside a grid
   whose row is auto-sized resolves against an indefinite height and is
   dropped, which let the square marks run out of the card. */
.brand .mark { display: flex; align-items: center; justify-content: center; height: 64px; margin: 0 0 13px; }
.brand .mark img { max-width: 86%; max-height: 64px; width: auto; height: auto; object-fit: contain; }
.brand .mark b { font-size: clamp(15px, 1.5vw, 19px); }

/* ── services grid ── */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.svc {
  background: var(--ink);
  padding: 34px 30px 36px;
  position: relative;
  transition: background .3s;
}
.svc::before {
  content: '';
  position: absolute; inset: 0 auto 0 0; width: 2px;
  background: var(--accent);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .35s;
}
.svc:hover { background: var(--surface); }
.svc:hover::before { transform: scaleY(1); }
.svc-ico {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  color: var(--accent-hi);
  margin-bottom: 20px;
  transition: border-color .3s, background .3s;
}
.svc:hover .svc-ico { border-color: rgba(var(--accent-rgb),.6); background: rgba(var(--accent-rgb),.1); }
.svc-ico svg { width: 22px; height: 22px; }
.svc h3 { font-size: 17.5px; margin-bottom: 9px; }
.svc h3 .en { display: block; font-family: var(--font-display); font-size: 11.5px; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; font-weight: 500; margin-bottom: 5px; }
.svc p { font-size: 14px; color: var(--text-2); line-height: 1.75; }

/* ── why / process ── */
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 68px); align-items: center; }
.why-list { display: grid; gap: 8px; }
.why-item {
  display: flex; gap: 18px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .3s, transform .3s;
}
.why-item:hover { border-color: rgba(var(--accent-rgb),.45); transform: translateX(5px); }
.why-item .n {
  font-family: var(--font-display); font-size: 13px; letter-spacing: .1em;
  color: var(--accent-hi); flex: none; padding-top: 4px; width: 26px;
}
.why-item h4 { font-size: 16px; margin-bottom: 5px; }
.why-item p { font-size: 13.8px; color: var(--text-2); line-height: 1.7; }

.why-media { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-2); }
.why-media img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 42% 42%; }
.why-media figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 46px 24px 22px;
  background: linear-gradient(to top, rgba(8,8,10,.97) 18%, rgba(8,8,10,.62) 58%, transparent);
  font-size: 13.5px; color: var(--text);
}
.why-media figcaption b { display: block; font-family: var(--font-display); font-size: 12px; letter-spacing: .18em; color: var(--accent-hi); text-transform: uppercase; margin-bottom: 3px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: clamp(40px, 5vw, 64px); }
.step { border-top: 2px solid var(--line-2); padding-top: 20px; position: relative; transition: border-color .3s; }
.step:hover { border-color: var(--accent); }
.step .n { font-family: var(--font-display); font-size: 12px; letter-spacing: .2em; color: var(--accent-hi); }
.step h4 { font-size: 16px; margin: 8px 0 6px; }
.step p { font-size: 13.5px; color: var(--text-2); line-height: 1.7; }

/* ── works gallery ── */
.works {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 210px;
  grid-auto-flow: dense;
  gap: 12px;
}
.work {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  cursor: zoom-in;
  background: var(--surface);
}
.work img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.3,1); }
.work:hover img { transform: scale(1.07); }
.work figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: 40px 18px 16px;
  background: linear-gradient(to top, rgba(8,8,10,.95) 20%, transparent);
  font-size: 13.5px; line-height: 1.5; color: #fff;
  transform: translateY(8px); opacity: 0;
  transition: transform .35s, opacity .35s;
}
.work figcaption b { display: block; font-family: var(--font-display); font-size: 11px; letter-spacing: .16em; color: var(--accent-hi); text-transform: uppercase; margin-bottom: 3px; }
.work:hover figcaption { transform: none; opacity: 1; }
.work.tall { grid-row: span 2; }
.work.wide { grid-column: span 2; }

/* ── facility ── */
.facility { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 190px; gap: 12px; }
.facility figure { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); }
.facility img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.3,1); }
.facility figure:hover img { transform: scale(1.06); }
.facility figcaption {
  position: absolute; inset: auto 0 0 0; padding: 36px 16px 14px;
  background: linear-gradient(to top, rgba(8,8,10,.92), transparent);
  font-family: var(--font-display); font-size: 12px; letter-spacing: .15em; text-transform: uppercase; color: #fff;
}
.facility .big { grid-column: span 2; grid-row: span 2; }

/* ── reviews ── */
.rating {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.rating .score { font-family: var(--font-display); font-size: 46px; font-weight: 600; color: #fff; line-height: 1; }
.stars { color: #f5b301; letter-spacing: 3px; font-size: 15px; }
.rating small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }

.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.review {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 22px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color .3s, transform .3s;
}
.review:hover { border-color: var(--line-2); transform: translateY(-4px); }
.review p { font-size: 14.2px; color: var(--text-2); line-height: 1.8; flex: 1; }
.review .who { display: flex; align-items: center; gap: 12px; }
.review .av {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  font-weight: 700; font-size: 15px; color: #fff;
}
.review .who b { display: block; font-size: 13.8px; color: #fff; font-weight: 600; }
.review .who span { font-size: 12px; color: var(--muted); }

/* ── contact ── */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 4vw, 56px); }
.info-item { display: flex; gap: 16px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.info-item:first-of-type { padding-top: 0; }
.info-ico {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  color: var(--accent-hi);
}
.info-ico svg { width: 18px; height: 18px; }
.info-item h4 { font-family: var(--font-display); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 5px; }
.info-item p { font-size: 15px; color: var(--text); line-height: 1.65; }
.info-item a { display: block; font-size: 15px; color: var(--text); line-height: 1.9; }
.info-item a:hover { color: var(--accent-hi); }
.info-item small { color: var(--muted); font-size: 13px; }

.socials { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.socials a {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  color: var(--text-2);
  transition: color .2s, border-color .2s, background .2s, transform .2s;
}
.socials a:hover { color: #fff; border-color: var(--accent); background: rgba(var(--accent-rgb),.14); transform: translateY(-3px); }
.socials svg { width: 18px; height: 18px; }

.map-frame {
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  height: 100%;
  min-height: 380px;
  display: flex; flex-direction: column;
  background: var(--surface);
}
/* invert + hue-rotate flips the map to a dark theme while keeping hues (and the red pin) intact */
.map-frame iframe { width: 100%; flex: 1; border: 0; filter: invert(.92) hue-rotate(180deg) saturate(.72) brightness(1.04) contrast(.9); min-height: 320px; }
.map-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.map-foot p { font-size: 13.5px; color: var(--text-2); }

/* ── cta band ── */
.cta-band {
  position: relative;
  text-align: center;
  background:
    linear-gradient(rgba(8,8,10,.93), rgba(8,8,10,.97)),
    url('../img/perfection/shop-front.webp') center 30% / cover;
  border-block: 1px solid var(--line);
}
.cta-band h2 { font-size: clamp(26px, 3.6vw, 44px); margin-bottom: 16px; }
.cta-band p { color: var(--text-2); max-width: 56ch; margin: 0 auto 32px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── footer ── */
footer { background: #000; border-top: 1px solid var(--line); padding-block: clamp(48px, 6vw, 72px) 0; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: clamp(28px, 4vw, 60px); }
.foot-brand img { height: 46px; width: auto; margin-bottom: 20px; }
.foot-brand p { font-size: 14px; color: var(--muted); line-height: 1.8; max-width: 42ch; }
footer h4 { font-family: var(--font-display); font-size: 12.5px; letter-spacing: .2em; text-transform: uppercase; color: #fff; margin-bottom: 18px; font-weight: 500; }
.foot-links { list-style: none; display: grid; gap: 11px; }
.foot-links a { font-size: 14px; color: var(--muted); transition: color .2s, padding-left .2s; }
.foot-links a:hover { color: #fff; padding-left: 5px; }
.foot-contact p, .foot-contact a { display: block; font-size: 14px; color: var(--muted); line-height: 1.85; }
.foot-contact a:hover { color: var(--accent-hi); }
.foot-bottom {
  margin-top: clamp(36px, 5vw, 56px);
  border-top: 1px solid var(--line);
  padding-block: 22px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12.5px; color: #7b818b;
}

/* ── responsive ── */
@media (max-width: 1080px) {
  .lines, .services, .reviews { grid-template-columns: repeat(2, 1fr); }
  .brands { grid-template-columns: repeat(3, 1fr); }
  .works, .facility { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: span 2; }
}

/* the menu turns into a sheet well before the rest of the layout does:
   nine Thai labels plus the CTA stop fitting on one row near 1100px */
@media (max-width: 1100px) {
  .nav-menu {
    position: fixed;
    /* the nav's own backdrop-filter makes it the containing block for this
       fixed sheet, so the offset is measured from the nav, not the viewport:
       100% hangs it off the nav's bottom edge whatever its height. */
    inset: 100% 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(8,8,10,.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--pad) 22px;
    transform: translateY(-14px);
    opacity: 0; pointer-events: none;
    transition: opacity .25s, transform .25s;
  }
  .nav-menu.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-menu a { display: block; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-menu a::after { display: none; }
  .nav-toggle { display: grid; }
  .nav-cta .btn { display: none; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 520px; }
  .hero-badge { left: 12px; }
  .why-grid, .contact-grid { grid-template-columns: 1fr; }
  .why-media img { aspect-ratio: 16 / 10; }
  .topbar-info { display: none; }
  .topbar .wrap { justify-content: flex-end; }
}

@media (max-width: 700px) {
  .lines, .services, .reviews, .steps { grid-template-columns: 1fr; }
  .brands { grid-template-columns: repeat(2, 1fr); }
  .works, .facility { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .work.wide { grid-column: span 2; }
  .facility .big { grid-column: span 2; grid-row: span 2; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-brand { grid-column: auto; }
  .float-line span { display: none; }
  .float-line { padding: 15px; }
  .work figcaption { opacity: 1; transform: none; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* ── brand teasers ─────────────────────────────────────────────
   Each block is a window into its brand: it borrows that brand's
   ground, accent, typeface and graphic signature, so the two read
   as visibly different worlds sitting inside the company page.
   ------------------------------------------------------------ */

.brand.has-page { display: block; position: relative; }
.brand.has-page i {
  display: block; font-style: normal;
  font-size: 11.5px; letter-spacing: .04em;
  color: var(--accent-hi);
  margin-top: 9px;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .28s, transform .28s;
}
.brand.has-page:hover i { opacity: 1; transform: none; }

.bf {
  --bf-pad: clamp(26px, 4vw, 60px);
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  gap: clamp(26px, 3.4vw, 52px);
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: var(--bf-pad);
  border: 1px solid var(--bf-line);
  border-radius: var(--radius);
  background: var(--bf-bg);
  margin-bottom: clamp(20px, 2.6vw, 32px);
}
.bf.reverse { grid-template-columns: .94fr 1.06fr; }
.bf.reverse .bf-media { order: 2; }

/* — REVSTANCE skin — */
.bf {
  --bf-bg: linear-gradient(150deg, #101319 0%, #0a0b0e 58%);
  --bf-line: rgba(255, 255, 255, .12);
  --bf-accent: #2f4fff;
  --bf-accent-hi: #7f97ff;
  --bf-fg: #eef0f5;
  --bf-fg-2: #98a0b1;
  --bf-display: 'Barlow Condensed', sans-serif;
  --bf-body: 'IBM Plex Sans Thai', sans-serif;
}
.bf::before {                      /* the logo's parallelogram, enlarged */
  content: '';
  position: absolute; right: -14%; top: -34%;
  width: 62%; height: 230px;
  background: linear-gradient(90deg, transparent, rgba(47, 79, 255, .22));
  transform: skewX(-30deg);
  pointer-events: none;
}
.bf::after {
  content: '';
  position: absolute; inset: auto auto -30% -18%;
  width: 52%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(47, 79, 255, .18), transparent 68%);
  pointer-events: none;
}

/* — KEI skin: paper, bronze, arcs — */
.bf.paper {
  --bf-bg: linear-gradient(150deg, #fbf9f5 0%, #efeae1 100%);
  --bf-line: rgba(60, 48, 36, .18);
  --bf-accent: #855819;
  --bf-accent-hi: #9c6b26;
  --bf-fg: #2c2621;
  --bf-fg-2: #6b6259;
  --bf-display: 'Urbanist', sans-serif;
  --bf-body: 'IBM Plex Sans Thai', sans-serif;
}
.bf.paper::before {                /* the arc from the KEI mark */
  content: '';
  position: absolute; right: -8%; top: -46%;
  width: 56%; aspect-ratio: 1; height: auto;
  border: 1px solid rgba(133, 88, 25, .28);
  border-radius: 50%;
  background: none; transform: none;
}
.bf.paper::after {
  background: radial-gradient(circle, rgba(133, 88, 25, .10), transparent 68%);
}

/* — media collage — */
.bf-media {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-auto-rows: 1fr;
  gap: 10px;
}
.bf-media figure { overflow: hidden; border-radius: var(--radius); border: 1px solid var(--bf-line); background: rgba(0,0,0,.2); }
.bf.paper .bf-media figure { background: rgba(60,48,36,.06); }
.bf-media .big { grid-row: span 2; }
.bf-media img { width: 100%; height: 100%; object-fit: cover; min-height: 118px; transition: transform .7s cubic-bezier(.2,.7,.3,1); }
.bf-media .big img { min-height: 300px; }
.bf:hover .bf-media .big img { transform: scale(1.04); }

/* — body — */
.bf-body { position: relative; z-index: 2; font-family: var(--bf-body); color: var(--bf-fg); }

.bf-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.bf-brand img { height: 62px; width: auto; }
.bf.paper .bf-brand img { height: 74px; }
.bf-brand b {
  display: block;
  font-family: var(--bf-display);
  font-style: italic; font-weight: 800;
  font-size: 30px; letter-spacing: .01em; text-transform: uppercase;
  color: var(--bf-fg); line-height: 1;
}
.bf-brand span {
  display: block; margin-top: 6px;
  font-family: var(--bf-display);
  font-style: italic; font-weight: 600;
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--bf-accent-hi);
}

.bf-own {
  display: inline-block;
  font-family: var(--bf-body);
  font-weight: 600; font-size: 12px;
  letter-spacing: .04em;
  color: var(--bf-accent);
  border: 1px solid rgba(133, 88, 25, .4);
  border-radius: 100px;
  padding: 6px 16px;
  margin-bottom: 16px;
}

.bf-body h3 {
  font-size: clamp(23px, 2.5vw, 33px);
  line-height: 1.4;
  color: var(--bf-fg);
  margin-bottom: 14px;
}
.bf-body h3 em { font-style: normal; color: var(--bf-accent-hi); }
.bf.paper .bf-body h3 { font-weight: 400; line-height: 1.45; }

.bf-body > p { font-size: 14.8px; color: var(--bf-fg-2); line-height: 1.85; max-width: 46ch; }

.bf-stats {
  display: flex; flex-wrap: wrap; gap: clamp(20px, 2.6vw, 38px);
  margin: 24px 0;
  padding-block: 18px;
  border-block: 1px solid var(--bf-line);
}
.bf-stats dt {
  font-family: var(--bf-display);
  font-size: 30px; line-height: 1;
  color: var(--bf-fg);
}
.bf-stats dd { font-size: 12.5px; color: var(--bf-fg-2); margin-top: 7px; }
.bf:not(.paper) .bf-stats dt { font-style: italic; font-weight: 800; text-transform: uppercase; }
.bf.paper .bf-stats dt { font-weight: 200; letter-spacing: .02em; }

.bf-lead {
  font-family: var(--bf-body);
  font-size: 14px; font-weight: 600;
  letter-spacing: .01em;
  color: var(--bf-accent-hi);
  margin-bottom: 12px;
}
/* Latin-only leads may use the brand display face */
.bf-lead.en {
  font-family: var(--bf-display);
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.bf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.bf-chips a {
  font-size: 13.5px; font-weight: 500;
  color: var(--bf-fg);
  border: 1px solid var(--bf-line);
  border-radius: 100px;
  padding: 8px 16px;
  transition: border-color .2s, background .2s, transform .2s;
}
.bf-chips a i { font-style: normal; color: var(--bf-fg-2); font-size: 12px; margin-left: 5px; }
.bf-chips a:hover { border-color: var(--bf-accent); background: rgba(255, 255, 255, .05); transform: translateY(-2px); }
.bf.paper .bf-chips a:hover { background: rgba(133, 88, 25, .08); }

.bf .btn-primary {
  background: var(--bf-accent);
  border-color: var(--bf-accent);
  box-shadow: 0 12px 34px -16px var(--bf-accent);
  font-family: var(--bf-body);   /* labels are Thai — keep them upright */
  font-weight: 600; font-size: 15px; letter-spacing: .01em;
}
.bf .btn-primary:hover { background: var(--bf-accent-hi); }

@media (max-width: 980px) {
  /* .bf.reverse also sets grid-template-columns, so it has to be named here
     or its higher specificity keeps the block in two columns on phones */
  .bf, .bf.reverse { grid-template-columns: 1fr; }
  .bf.reverse .bf-media { order: 0; }
  .bf-media .big img { min-height: 220px; }
}
@media (max-width: 560px) {
  /* Once the big shot stops spanning rows, `grid-auto-rows: 1fr` would force
     the second row to match its height and stretch the two small tiles into
     tall strips. Decouple the rows and pin explicit ratios instead. */
  .bf-media { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; }
  .bf-media .big { grid-column: span 2; grid-row: auto; }
  .bf-media img { height: auto; min-height: 0; aspect-ratio: 1 / 1; }
  .bf-media .big img { aspect-ratio: 4 / 3; }
  .bf-brand img { height: 50px; }
  .bf-brand b { font-size: 25px; }
  .bf-stats { gap: 18px 26px; }
}

/* ── นิ้วโป้งต้องกดโดน ─────────────────────────────────────────
   ลิงก์ตัวหนังสือใน footer และหน้าติดต่อสูงราว 20px ซึ่งเล็กเกินไป
   สำหรับการกดบนมือถือ ขยายพื้นที่กดโดยไม่ขยับหน้าตาบนจอคอม   */
@media (max-width: 700px) {
  .foot-links a, .foot-contact a, .info-item a, .topbar-tel, .link-more {
    display: block;
    min-height: 40px;
    padding-block: 9px;
    line-height: 1.5;
  }
}

/* language switch — same button in every nav */
.lang-btn {
  flex: none;
  font-family: var(--font-display); font-weight: 700;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  padding: 0 12px; height: 42px; min-width: 50px;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: none; color: var(--text); cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.lang-btn:hover { border-color: var(--accent); color: #fff; background: rgba(var(--accent-rgb), .12); }
