/* GL GROUP 68 — "site board" industrial direction.
   Concrete paper, charcoal ink, safety amber used only for actions and markers. */

:root {
  color-scheme: light;

  --concrete: #ebe7df;
  --paper: #f6f4ef;
  --ink: #1b1c1e;
  --ink-2: #393b3f;
  --muted: #5f5e5a;
  --line: #cdc6b9;
  --amber: #f2b01e;
  --amber-deep: #c98a00;
  --amber-text: #7f5500; /* amber for text on light backgrounds: >= 4.8:1 */
  --steel: #243240;
  --steel-2: #31414f;
  --on-dark: #eef0f1;
  --on-dark-muted: #b4bcc3;

  --font-display: "Chakra Petch", "IBM Plex Sans Thai", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;

  --text-sm: 0.9rem;
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  --text-lead: clamp(1.06rem, 1rem + 0.35vw, 1.25rem);
  --text-h2: clamp(1.9rem, 1.4rem + 2vw, 3rem);
  --text-h1: clamp(2.3rem, 1.4rem + 4vw, 4.6rem);

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --space-section: clamp(4rem, 3rem + 5vw, 8rem);
  --radius: 4px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 700ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.75;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0; letter-spacing: -0.005em; }
h2 { font-size: var(--text-h2); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.process :focus-visible, .contact :focus-visible, .footer :focus-visible, .lightbox :focus-visible { outline-color: var(--amber); }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--amber); color: var(--ink); padding: .6rem 1rem; font-weight: 600;
}
.skip:focus { top: 1rem; }

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--amber-text);
  display: inline-flex; align-items: center; gap: .6rem;
  margin-bottom: .9rem;
}
.eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--amber-deep); }
.process .eyebrow::before, .contact .eyebrow::before { background: currentColor; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 52px; padding: .7rem 1.4rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  text-decoration: none; border-radius: var(--radius);
  border: 2px solid transparent;
  transition: transform 160ms var(--ease-out), background-color 160ms, box-shadow 160ms, color 160ms;
}
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn:active { transform: translateY(1px); }
.btn--amber { background: var(--amber); color: var(--ink); box-shadow: 0 3px 0 var(--amber-deep); }
.btn--amber:hover { background: #ffc23a; box-shadow: 0 5px 0 var(--amber-deep); transform: translateY(-2px); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--ghost-light { border-color: var(--on-dark-muted); color: var(--on-dark); }
.btn--ghost-light:hover { border-color: var(--on-dark); background: rgba(255,255,255,.08); }
.btn--sm { min-height: 42px; padding: .4rem 1rem; font-size: .95rem; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 244, 239, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; margin-right: auto; }
.brand__mark { width: 40px; height: 40px; flex: none; }
.brand__mark rect { fill: var(--ink); }
.brand__mark path { fill: var(--amber); }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: .04em; }
.brand__text small { font-size: .78rem; color: var(--muted); }
.nav { display: flex; gap: 1.6rem; }
.nav a {
  font-family: var(--font-display); font-weight: 500; text-decoration: none;
  padding: .3rem 0; background: linear-gradient(var(--amber), var(--amber)) left bottom / 0 3px no-repeat;
  transition: background-size 220ms var(--ease-out);
}
.nav a:hover { background-size: 100% 3px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background-color: var(--concrete);
  background-image:
    linear-gradient(rgba(27, 28, 30, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 28, 30, .055) 1px, transparent 1px);
  background-size: 32px 32px;
  padding-top: clamp(2.5rem, 2rem + 4vw, 5.5rem);
}
.hero__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto auto;
  column-gap: clamp(1rem, 2vw, 2rem);
  padding-bottom: clamp(3rem, 2rem + 4vw, 6rem);
}
.hero__copy { grid-column: 1 / span 6; grid-row: 1; align-self: center; padding-block: 1rem 2rem; position: relative; z-index: 2; }
.hero__title { font-size: var(--text-h1); font-weight: 700; margin-bottom: 1.3rem; }
.nobr { white-space: nowrap; }
.hl { position: relative; white-space: nowrap; }
.hl::after {
  content: ""; position: absolute; left: -.1em; right: -.1em; bottom: .08em; height: .32em;
  background: var(--amber); z-index: -1;
}
.hero__title { position: relative; z-index: 0; }
.hero__lead { font-size: var(--text-lead); color: var(--ink-2); max-width: 34em; margin-bottom: 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; }

.hero__photo {
  grid-column: 7 / span 6; grid-row: 1 / span 2;
  align-self: start; margin: 0; position: relative;
}
.hero__photo img {
  width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 18px 18px 0 var(--ink);
}
.hero__photo figcaption {
  position: absolute; right: 0; bottom: 0;
  background: var(--ink); color: var(--on-dark); font-size: .82rem;
  padding: .35rem .8rem; border-top-left-radius: var(--radius);
}

.board {
  grid-column: 1 / span 5; grid-row: 2;
  align-self: end;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--amber);
  max-width: 470px;
  position: relative; z-index: 2;
}
.board__head {
  display: flex; justify-content: space-between;
  background: var(--ink); color: var(--amber);
  font-family: var(--font-display); font-weight: 600; letter-spacing: .06em;
  padding: .45rem 1rem; font-size: .9rem;
}
.board dl { margin: 0; padding: .4rem 1rem .8rem; }
.board dl > div { display: grid; grid-template-columns: 6.5rem 1fr; gap: .8rem; padding: .5rem 0; border-bottom: 1px dashed var(--line); }
.board dl > div:last-child { border-bottom: 0; }
.board dt { color: var(--muted); font-size: var(--text-sm); }
.board dd { margin: 0; font-weight: 500; }
.board dd a { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.board dd a:hover { color: var(--amber-text); }

.hazard {
  height: 12px;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 16px, var(--ink) 16px 32px);
}

/* Load sequence: one staggered rise, nothing else animates on its own. */
.rise { animation: rise var(--dur) var(--ease-out) both; }
.hero__copy .rise:nth-child(1) { animation-delay: 60ms; }
.hero__copy .rise:nth-child(2) { animation-delay: 140ms; }
.hero__copy .rise:nth-child(3) { animation-delay: 220ms; }
.hero__copy .rise:nth-child(4) { animation-delay: 300ms; }
.hero__photo.rise { animation-delay: 180ms; }
.board.rise { animation-delay: 420ms; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Section heads ---------- */
.section-head h2 { margin-bottom: .8rem; }
.section-head p:not(.eyebrow) { color: var(--ink-2); max-width: 34em; }

/* ---------- Services ---------- */
.services { padding-block: var(--space-section); background: var(--paper); }
.services__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.services__head { position: sticky; top: 100px; }
.services__photo {
  margin-top: 2rem; border-radius: var(--radius);
  aspect-ratio: 4 / 3; object-fit: cover; width: 100%;
  filter: saturate(.9);
  box-shadow: -14px 14px 0 var(--concrete);
}
.svc-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.svc {
  display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem;
  padding: 1.7rem 0; border-bottom: 1px solid var(--line);
  transition: background-color 200ms;
}
.svc__no {
  font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--ink);
  transition: color 200ms;
}
.svc:hover .svc__no { color: var(--amber); -webkit-text-stroke-color: var(--amber-deep); }
.svc h3 { margin-bottom: .45rem; }
.svc p { color: var(--ink-2); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: .9rem 0 0; padding: 0; }
.tags li {
  font-size: .82rem; padding: .15rem .6rem;
  border: 1px solid var(--line); border-radius: 2px; background: var(--concrete); color: var(--ink-2);
}

/* ---------- Work gallery ---------- */
.work { padding-block: var(--space-section); background: var(--concrete); }
.work__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem; margin-bottom: 2.2rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.filters[hidden] { display: none; }
.chip {
  font: 500 .92rem var(--font-display);
  min-height: 42px; padding: .35rem 1rem;
  border: 2px solid var(--ink); border-radius: 999px;
  background: transparent; color: var(--ink); cursor: pointer;
  transition: background-color 160ms, color 160ms;
}
.chip:hover { background: rgba(27, 28, 30, .08); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--amber); }

.gallery { list-style: none; margin: 0; padding: 0; columns: 3 300px; column-gap: 1.1rem; }
.gallery__item { break-inside: avoid; margin-bottom: 1.1rem; background: var(--paper); border-radius: var(--radius); overflow: hidden; }
.gallery__item[hidden] { display: none; }
.gallery__item a { display: block; overflow: hidden; }
.gallery__item a:focus-visible { outline-offset: -3px; }
.gallery__item img { width: 100%; transition: transform 500ms var(--ease-out); }
.gallery__item a:hover img { transform: scale(1.04); }
.gallery__item p { padding: .6rem .85rem .75rem; font-size: .9rem; color: var(--ink-2); border-top: 3px solid var(--amber); line-height: 1.5; }

/* ---------- Process ---------- */
.process { padding-block: var(--space-section); background: var(--ink); color: var(--on-dark); }
.process .eyebrow { color: var(--amber); }
.steps { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; counter-reset: step; }
.steps li { position: relative; padding-top: 4.2rem; }
.steps li::before {
  content: ""; position: absolute; top: 1.6rem; left: 3.6rem; right: -1.5rem; height: 2px;
  background: repeating-linear-gradient(90deg, var(--steel-2) 0 10px, transparent 10px 18px);
}
.steps li:last-child::before { display: none; }
.steps__no {
  position: absolute; top: 0; left: 0;
  width: 3.2rem; height: 3.2rem; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
  background: var(--amber); color: var(--ink); border-radius: var(--radius);
}
.steps h3 { margin-bottom: .5rem; color: #fff; }
.steps p { color: var(--on-dark-muted); }

/* ---------- Contact ---------- */
.contact { background: var(--steel); color: var(--on-dark); padding-block: var(--space-section); }
.contact .eyebrow { color: var(--amber); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: stretch; }
.contact__phone {
  display: inline-block; margin: 1rem 0 1.6rem;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem);
  color: var(--amber); text-decoration: none; line-height: 1.1;
}
.contact__phone:hover { text-decoration: underline; text-underline-offset: 6px; }
.contact__list { margin: 0 0 2rem; }
.contact__list > div { display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--steel-2); }
.contact__list dt { color: var(--on-dark-muted); font-size: var(--text-sm); padding-top: .15rem; }
.contact__list dd { margin: 0; }
.contact__cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.contact__map { min-height: 380px; border-radius: var(--radius); overflow: hidden; border: 2px solid var(--steel-2); background: var(--steel-2); }
.contact__map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--on-dark-muted); padding: 2.2rem 0; font-size: .9rem; }
.footer__inner { display: grid; gap: .3rem; }
.footer strong { color: var(--amber); font-family: var(--font-display); letter-spacing: .04em; }
.footer__copy { margin-top: .6rem; font-size: .8rem; }

/* ---------- Back to top ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.totop {
  position: fixed; right: 16px; bottom: 24px; z-index: 55;
  width: 52px; height: 52px; display: grid; place-items: center;
  background: var(--ink); color: var(--amber);
  border-radius: var(--radius); box-shadow: 0 3px 0 var(--amber-deep);
  transition: background-color 160ms, color 160ms;
}
/* Animate show/hide only after JS has set the initial state, so it never flashes on load. */
.totop.is-ready { transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), visibility 220ms, background-color 160ms, color 160ms; }
.totop svg { width: 26px; height: 26px; fill: currentColor; }
.totop:hover { background: var(--amber); color: var(--ink); }
.totop:focus-visible { outline-color: var(--amber); }
/* Hidden while the hero is on screen; JS toggles the class. Without JS it stays visible. */
.totop.is-hidden { opacity: 0; visibility: hidden; transform: translateY(12px); pointer-events: none; }

/* ---------- Mobile call bar ---------- */
.callbar { display: none; }

/* ---------- Lightbox ---------- */
.lightbox {
  width: min(96vw, 1400px); max-width: none; max-height: 94vh;
  padding: 0; border: 0; background: transparent; overflow: visible;
}
.lightbox::backdrop { background: rgba(15, 16, 18, .92); }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: .8rem; }
.lightbox img { max-height: 82vh; width: auto; border-radius: var(--radius); }
.lightbox figcaption { color: var(--on-dark); text-align: center; padding-inline: 3.5rem; }
.lightbox__btn {
  position: fixed; width: 52px; height: 52px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5); background: rgba(27,28,30,.6); color: #fff;
  font-size: 2rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.lightbox__btn:hover { background: var(--amber); color: var(--ink); border-color: var(--amber); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- Responsive ---------- */
@media (max-width: 959px) {
  .nav { display: none; }
  .hero__grid { grid-template-columns: 1fr; row-gap: 1.5rem; }
  .hero__copy, .hero__photo, .board { grid-column: 1; grid-row: auto; }
  .hero__copy { padding-block: 0; }
  .hero__photo img { aspect-ratio: 4 / 3; box-shadow: 10px 10px 0 var(--ink); }
  .board { max-width: none; margin-top: .5rem; }
  .services__grid, .contact__grid { grid-template-columns: 1fr; }
  .services__head { position: static; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; }
  .steps li::before { display: none; }
}
@media (max-width: 719px) {
  body { padding-bottom: 72px; }
  .topbar__call { display: none; }
  .hl { white-space: normal; }
  .hero__cta .btn { flex: 1 1 100%; }
  .board dl > div { grid-template-columns: 5.5rem 1fr; }
  .gallery { columns: 2; column-gap: .6rem; }
  .gallery__item { margin-bottom: .6rem; }
  .gallery__item p { font-size: .8rem; padding: .45rem .55rem .55rem; }
  .svc { grid-template-columns: 3.2rem 1fr; }
  .svc__no { font-size: 1.9rem; }
  .steps { grid-template-columns: 1fr; }
  .contact__list > div { grid-template-columns: 1fr; gap: .1rem; }
  .contact__cta .btn { flex: 1 1 100%; }
  .callbar {
    display: flex; align-items: center; justify-content: center; gap: .6rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    min-height: 60px; padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom));
    background: var(--amber); color: var(--ink);
    font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; text-decoration: none;
    box-shadow: 0 -2px 0 var(--amber-deep);
  }
  .callbar svg { width: 22px; height: 22px; fill: currentColor; }
  .totop { right: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); width: 48px; height: 48px; }
  .lightbox figcaption { padding-inline: 1rem; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 16px; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- 404 ---------- */
.notfound { min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 0; }
.notfound .wrap { padding-block: 4rem; }
