:root {
  --white: #ffffff;
  --panel: #e4e4e4;
  --text: #3d3d3d;
  --accent: #da8e47;
  --footer: #8a8a88;
  --border: #8a8a88;
  --container: min(960px, calc(100vw - 40px));
  --narrow: min(720px, calc(100vw - 40px));
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--white);
  color: var(--text);
  font-family: "Bai Jamjuree", "Avenir Next", "Segoe UI", Arial, sans-serif;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

p, .footer-item a{
  font-size: 1.2em;
  line-height: 1.40;
}
.container {
  width: var(--container);
  margin: 0 auto;
}

.section {
  padding: 10px 0;
}

.site-header {
  background: var(--white);
}

.header-bar {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  color: var(--text);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1;
}

.brand img {
  display: inline-block;
  width: 300px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 22px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
}

.main-nav a {
  transition: color 180ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav .is-active {
  color: var(--accent);
}

.main-nav .nav-cta {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  background: var(--accent);
  color: var(--white);
}

.main-nav .nav-cta:hover,
.main-nav .nav-cta:focus-visible {
  color: var(--white);
}

.hero-section {
  padding-top: 0;
}

.hero-panel {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  background: var(--text);
  isolation: isolate;
}

.hero-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(61, 61, 61, 0.52);
  z-index: -1;
}

.hero-copy {
  width: min(500px, calc(100% - 42px));
  margin-left: auto;
  padding: 28px 22px 24px;
  color: var(--white);
  text-align: right;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0 0 120px;
  color: var(--white);
  font-size: clamp(1.55rem, 3.5vw, 2.35rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0.08em;
}

.hero-copy p {
  max-width: 600px;
  margin: 0 0 0 auto;
  color: var(--white);
  font-size: clamp(0.76rem, 1.6vw, 0.95rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.06em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 0;
  padding: 0 13px;
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease;
}

.button:hover,
.button:focus-visible {
  opacity: 0.9;
  transform: translateY(-1px);
}

.button-primary {
  background: var(--accent);
}

.button-dark {
  min-width: 110px;
  background: var(--footer);
}

.hero-button {
  position: absolute;
  left: 34px;
  bottom: 28px;
}

.section-title {
  width: 100%;
  margin: 0 0 28px;
  padding: 8px 20px;
  background: var(--panel);
  color: var(--text);
  text-align: center;
  text-transform: uppercase;
  font-size: clamp(1.1rem, 2.3vw, 1.45rem);
  font-weight: 600;
  line-height: 1.1;
}

.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--panel);
  transition: transform 180ms ease, background-color 180ms ease;
}

.service-card:hover {
  transform: translateY(-3px);
}

.service-toggle {
  width: 100%;
  min-height: 92px;
  position: relative;
  display: grid;
  place-items: center;
  border: 0;
  background: var(--panel);
  color: var(--text);
  padding: 22px;
  cursor: pointer;
}

.service-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

.service-toggle::after {
  content: "+";
  position: absolute;
  right: 14px;
  bottom: 10px;
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1;
}

.service-toggle[aria-expanded="true"]::after {
  content: "-";
}

.service-toggle span {
  margin: 0;
  color: var(--text);
  text-align: center;
  text-transform: uppercase;
  font-size: clamp(1rem, 2vw, 1.32rem);
  font-weight: 600;
  line-height: 1.02;
}

.service-copy {
  height: 0;
  overflow: hidden;
  padding: 0 22px;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.35;
  opacity: 0;
  transition:
    height 320ms ease,
    opacity 220ms ease,
    padding-bottom 320ms ease;
}

.service-card.is-open .service-copy {
  padding-bottom: 24px;
  opacity: 1;
}

.service-copy p {
  margin: 0 0 12px;
  text-align: justify;
  font-size: 1.2rem;
}

.service-copy p:last-child {
  margin-bottom: 0;
}

.service-copy li{
  font-size: 1.2rem;
  line-height: 1.4;
  margin-bottom: 10px;
}

.cnc-capabilities {
  margin-top: 18px;
  color: var(--text);
}

.cnc-block {
  display: grid;
  gap: 12px;
}

.cnc-block + .cnc-block {
  margin-top: 26px;
}

.cnc-heading {
  margin: 0;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 600;
  text-transform: uppercase;
  text-align: center;
}

.cnc-image {
  width: 100%;
  max-width: 320px;
  display: block;
  margin: 0 auto 8px;
  object-fit: contain;
}

.cnc-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.18;
}

.cnc-table th,
.cnc-table td {
  padding: 10px 16px;
  text-align: left;
  vertical-align: middle;
}

.cnc-table thead th {
  border-bottom: 2px solid var(--text);
  font-weight: 600;
}

.cnc-table tbody tr {
  border-bottom: 1px solid var(--text);
}

.cnc-formats {
  margin-top: 20px !important;
  color: var(--text);
  font-weight: 700;
}

.service-contact-button {
  width: fit-content;
  display: flex;
  margin: 18px auto 0;
}

.service-card.is-open {
  grid-column: 1 / -1;
}

.service-card.is-open .service-toggle {
  min-height: 82px;
  padding-bottom: 14px;
}

.portfolio-section {
  padding-top: 34px;
}

.portfolio-wrap {
  display: grid;
  grid-template-columns: 50px 1fr 50px;
  align-items: center;
  gap: 18px;
}

.portfolio-track {
  min-width: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  cursor: grab;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.portfolio-track::-webkit-scrollbar {
  display: none;
}

.portfolio-track.is-dragging {
  cursor: grabbing;
}

.slider-arrow {
  width: 44px;
  height: 74px;
  border: 0;
  background: var(--white);
  color: var(--footer);
  font-size: 4.5rem;
  line-height: 1;
  cursor: pointer;
}

.portfolio-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  align-items: stretch;
  gap: 54px;
  scroll-snap-align: start;
}

.portfolio-card img {
  width: 100%;
  object-fit: cover;
}

.portfolio-copy {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}


.portfolio-copy p {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 1.5em;
  font-weight: 600;
  line-height: 1.25;
  text-align: justify;
}

.portfolio-copy p:last-child {
  margin-bottom: 0;
}

.about-section {
  padding-top: 28px;
}

.about-section .text-block p{
  text-align: justify;
}

.text-block {
  width: var(--narrow);
  margin: 0 auto;
  color: var(--text);
  text-align: center;
  font-size: clamp(0.95rem, 1.8vw, 1.08rem);
  line-height: 1.45;
}

.text-block p {
  margin: 0 0 14px;
}

.competencies-section, .industrias-section {
  margin-top: 22px;
  margin-bottom: 45px;
  padding: 40px 0 40px;
  background: var(--panel);
}

.competencies-title, .industrias-title {
  margin: 0 0 42px;
  color: var(--text);
  text-align: center;
  text-transform: uppercase;
  font-size: clamp(1.25rem, 2.7vw, 1.7rem);
  font-weight: 600;
}

.industrias-section{
  margin-bottom: 0;

}

.industrias-section p{
  text-align: justify;
  margin-top: -30px;
}

.industrias-section .container {
  display: grid;
  gap: 22px;
}

.industrias-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.industry-item {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid rgba(61, 61, 61, 0.14);
  border-left: 4px solid var(--accent);
  color: var(--text);
  text-align: center;
  text-transform: uppercase;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.15;
  box-shadow: 0 8px 18px rgba(61, 61, 61, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.industry-item:hover {
  transform: translateY(-2px);
  border-left-color: var(--text);
  box-shadow: 0 14px 26px rgba(61, 61, 61, 0.1);
}

.competencies-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.competency-item {
  min-height: 76px;
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid rgba(61, 61, 61, 0.14);
  border-left: 4px solid var(--accent);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(61, 61, 61, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.competency-item:hover {
  transform: translateY(-2px);
  border-left-color: var(--text);
  box-shadow: 0 14px 26px rgba(61, 61, 61, 0.1);
}

.competency-item strong {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.15;
  text-transform: uppercase;
}

.competency-icon {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 3px solid var(--text);
  background: var(--white);
}

.about-long {
  padding-top: 66px;
  padding-bottom: 48px;
}

.contact-section {
  padding: 0;
  background: var(--panel);
}

.contact-panel {
  padding: 36px 0 40px;
}

.contact-panel h2 {
  margin: 0 0 28px;
  color: var(--text);
  text-align: center;
  text-transform: uppercase;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  font-weight: 600;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 26px;
}

.contact-form label {
  display: grid;
  gap: 4px;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-height: 28px;
  border: 2px solid var(--border);
  border-radius: 0;
  background: var(--panel);
  color: var(--text);
  padding: 3px 8px;
  line-height: 1.2;
}

.contact-form textarea {
  min-height: 30px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.full-width {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 8px;
}

.form-note {
  max-width: 830px;
  margin: 24px 0 0;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.25;
}

.map-section {
  padding: 30px 0 30px;
}

.map-section .container {
  position: relative;
  padding-bottom: 20%;
  padding-top: 25px;
  height: 0;
}

.map-section .container iframe{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.site-footer {
  padding: 50px 0 40px;
  background: var(--footer);
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 54px;
}

.footer-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: start;
  gap: 10px;
  color: var(--white);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 600;
  line-height: 1.25;
}

.footer-icon {
  width: 24px;
  height: 24px;
  position: relative;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--white);
  color: var(--footer);
}

.footer-icon::before,
.footer-icon::after {
  content: "";
  position: absolute;
  background: var(--footer);
}

.footer-phone::before {
  width: 10px;
  height: 10px;
  border: 3px solid var(--footer);
  border-top-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  background: transparent;
  transform: rotate(-35deg);
}

.footer-location::before {
  width: 10px;
  height: 10px;
  border-radius: 50% 50% 50% 0;
  background: var(--footer);
  transform: translateY(-1px) rotate(-45deg);
}

.footer-location::after {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--white);
}

.footer-company::before {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--footer);
}

.footer-company::after {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--white);
}

.footer-item a,
.footer-item p {
  display: block;
  margin: 0 0 8px;
}

.whatsapp-cta {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.whatsapp-cta img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.whatsapp-cta:hover,
.whatsapp-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px rgba(0, 0, 0, 0.25);
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .header-bar {
    min-height: 92px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 18px;
    margin-top: 20px;
  }

  .main-nav {
    width: 100%;
    justify-content: center;
    gap: 14px;
    font-size: 0.78rem;
  }

  .portfolio-card {
    gap: 28px;
  }

  .competencies-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .industrias-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    justify-items: center;
  }

  .footer-item {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

@media (max-width: 680px) {
  :root {
    --container: min(100% - 28px, 960px);
    --narrow: min(100% - 28px, 720px);
  }

  .hero-panel {
    min-height: 430px;
  }

  .hero-copy {
    width: 100%;
    padding: 30px 18px;
    text-align: left;
  }

  .hero-copy h1 {
    margin-bottom: 130px;
  }

  .hero-copy p {
    margin-left: 0;
  }

  .hero-button {
    left: 18px;
    bottom: 22px;
  }

  .service-grid,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .service-card.is-open {
    grid-column: auto;
  }

  .portfolio-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .portfolio-copy p {
    font-size: 1.1em;
  }

  .portfolio-copy h3 {
    margin-bottom: 24px;
  }

  .competencies-grid {
    grid-template-columns: 1fr;
  }

  .industrias-grid {
    grid-template-columns: 1fr;
  }

  .contact-panel {
    padding: 30px 0 34px;
  }

  .cnc-image {
    max-width: 240px;
  }

  .map-section .container {
    padding-bottom: 60%;
  }

  .whatsapp-cta {
    right: 14px;
    bottom: 14px;
    width: 58px;
    height: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
