/* NT Design Engineering — main stylesheet */
:root {
  --navy-900: #071a3a;
  --navy-800: #0b2a5b;
  --navy-700: #12407f;
  --blue-500: #2a6fd6;
  --amber: #f5a623;
  --amber-dark: #d98a07;
  --ink: #16202e;
  --muted: #5b6676;
  --line: #e3e8ef;
  --bg: #ffffff;
  --bg-soft: #f4f7fb;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(7, 26, 58, .10);
  --max: 1200px;
  --font-head: "Kanit", system-ui, sans-serif;
  --font-body: "Sarabun", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-700); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; margin: 0 0 .5em; color: var(--navy-900); font-weight: 600; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 999; background: #fff; padding: 8px 12px; }

/* ---------- Header ---------- */
.topbar { background: var(--navy-900); color: #c9d6ea; font-size: 14px; }
.topbar .container { display: flex; justify-content: space-between; gap: 16px; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.topbar a { color: #fff; }
.topbar span + span { margin-left: 18px; }

.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--navy-800); }
.brand img { width: 62px; height: auto; }
.brand-logo { width: 62px; height: 42px; color: var(--navy-800); }
.brand strong { display: block; font-family: var(--font-head); font-size: 19px; letter-spacing: .3px; line-height: 1.1; }
.brand small { display: block; font-size: 13px; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--ink); font-family: var(--font-head); font-weight: 500; font-size: 16px; position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0; background: var(--amber); transition: width .25s; }
.nav a:hover::after, .nav a[aria-current]::after { width: 100%; }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-toggle span { display: block; width: 26px; height: 2px; background: var(--navy-900); margin: 6px 0; transition: .3s; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 999px; font-family: var(--font-head); font-weight: 500; font-size: 16px; border: 2px solid transparent; transition: transform .2s, background .2s, box-shadow .2s; cursor: pointer; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--amber); color: var(--navy-900); box-shadow: 0 8px 20px rgba(245,166,35,.35); }
.btn-primary:hover { background: var(--amber-dark); }
.btn-outline { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-700); }
.nav .btn { padding: 9px 20px; color: var(--navy-900); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 88vh; display: flex; align-items: center; color: #fff; overflow: hidden; background: var(--navy-900); }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.06); animation: heroZoom 18s ease-out forwards; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(7,26,58,.94) 0%, rgba(7,26,58,.75) 45%, rgba(7,26,58,.25) 100%); }
@keyframes heroZoom { to { transform: scale(1); } }
.hero .container { position: relative; z-index: 2; padding-top: 60px; padding-bottom: 80px; }
.eyebrow { display: inline-block; font-family: var(--font-head); font-size: 14px; letter-spacing: 2px; text-transform: uppercase; color: var(--amber); margin-bottom: 14px; }
.hero h1 { color: #fff; font-size: clamp(34px, 5.4vw, 62px); max-width: 780px; font-weight: 600; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero p.lead { font-size: clamp(17px, 1.6vw, 20px); max-width: 640px; color: #d5e0f0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.hero-badges span { border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); padding: 6px 14px; border-radius: 999px; font-size: 14px; }

.page-hero { position: relative; color: #fff; padding: 110px 0 70px; background: var(--navy-900) center/cover no-repeat; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(7,26,58,.95), rgba(7,26,58,.6)); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: #fff; font-size: clamp(32px, 4.5vw, 52px); }
.page-hero p { color: #d5e0f0; max-width: 700px; font-size: 18px; }
.breadcrumb { font-size: 14px; color: #aebfd8; margin-bottom: 12px; }
.breadcrumb a { color: #fff; }

/* ---------- Stats ---------- */
.stats { position: relative; z-index: 3; margin-top: -60px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.stat { padding: 30px 24px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-family: var(--font-head); font-size: 44px; color: var(--navy-800); line-height: 1; }
.stat b sup { font-size: 22px; color: var(--amber-dark); }
.stat span { color: var(--muted); font-size: 15px; }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--navy-900); color: #d5e0f0; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 42px); }
.section-head p { color: var(--muted); font-size: 18px; }
.section-dark .section-head p { color: #aebfd8; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.about-media { position: relative; }
.about-media img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.about-media .float { position: absolute; right: -24px; bottom: -28px; width: 46%; border: 6px solid #fff; aspect-ratio: 1; }
.about-media .years { position: absolute; left: -18px; top: 24px; background: var(--amber); color: var(--navy-900); border-radius: var(--radius); padding: 16px 20px; font-family: var(--font-head); box-shadow: var(--shadow); text-align: center; }
.about-media .years b { display: block; font-size: 40px; line-height: 1; }
.checklist { list-style: none; padding: 0; margin: 24px 0 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.checklist li { padding-left: 30px; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--navy-800) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5a623' stroke-width='3.5'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .3s, box-shadow .3s; display: flex; flex-direction: column; }
.service:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.service img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.service-body { padding: 24px 26px 28px; }
.service-body h3 { font-size: 21px; }
.service-body p { color: var(--muted); font-size: 16px; margin: 0; }
.service-num { font-family: var(--font-head); color: var(--amber-dark); font-size: 14px; letter-spacing: 1px; }

/* Machines */
.machines-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.machine { position: relative; border-radius: var(--radius); overflow: hidden; background: #0d2247; min-height: 320px; display: flex; align-items: flex-end; }
.machine img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; opacity: .85; }
.machine:hover img { transform: scale(1.08); }
.machine::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(7,26,58,.95)); }
.machine-info { position: relative; z-index: 2; padding: 22px; color: #fff; }
.machine-info .tag { display: inline-block; background: var(--amber); color: var(--navy-900); font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; margin-bottom: 8px; letter-spacing: .5px; }
.machine-info h3 { color: #fff; font-size: 20px; margin-bottom: 4px; }
.machine-info p { margin: 0; font-size: 14px; color: #c9d6ea; }
.machine.wide { grid-column: span 2; }

.spec-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: 16px; }
.spec-table th, .spec-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.spec-table thead th { background: var(--navy-800); color: #fff; font-family: var(--font-head); font-weight: 500; }
.spec-table tbody tr:hover { background: var(--bg-soft); }
.spec-table .flag { font-size: 13px; background: var(--bg-soft); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }

/* Projects */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.filters button { border: 1px solid var(--line); background: #fff; padding: 9px 20px; border-radius: 999px; font-family: var(--font-head); font-size: 15px; cursor: pointer; color: var(--ink); transition: .2s; }
.filters button.active, .filters button:hover { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 4px 16px rgba(7,26,58,.06); transition: transform .3s, box-shadow .3s; }
.project:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.project figure { margin: 0; position: relative; overflow: hidden; cursor: zoom-in; }
.project figure img { aspect-ratio: 4/3; object-fit: cover; width: 100%; transition: transform .6s; }
.project:hover figure img { transform: scale(1.06); }
.project .client { position: absolute; left: 14px; top: 14px; background: rgba(7,26,58,.85); color: #fff; font-size: 13px; padding: 4px 12px; border-radius: 999px; }
.project-body { padding: 20px 22px 24px; }
.project-body h3 { font-size: 19px; margin-bottom: 6px; }
.project-body p { color: var(--muted); font-size: 15px; margin: 0; }
.project-body .meta { font-size: 13px; color: var(--amber-dark); font-weight: 600; margin-bottom: 6px; }
.project.hidden { display: none; }

/* Feature project (large) */
.feature { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; margin-bottom: 80px; }
.feature.reverse { grid-template-columns: 1fr 1.2fr; }
.feature.reverse .feature-media { order: 2; }
.feature-media { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; height: 440px; }
.feature-media img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; cursor: zoom-in; }
.feature-media img:first-child { grid-row: span 2; }
.feature h3 { font-size: clamp(24px, 2.6vw, 32px); }
.feature ul { padding-left: 20px; color: var(--muted); }

/* Clients */
.clients-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.client-card { border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 22px 16px; text-align: center; font-family: var(--font-head); font-size: 15px; color: #fff; display: flex; align-items: center; justify-content: center; min-height: 96px; background: rgba(255,255,255,.03); transition: .3s; }
.client-card:hover { background: rgba(245,166,35,.12); border-color: var(--amber); }

/* Why us */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.why { padding: 30px 26px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.why .icon { width: 54px; height: 54px; border-radius: 14px; background: var(--navy-800); color: var(--amber); display: grid; place-items: center; margin-bottom: 18px; }
.why .icon svg { width: 28px; height: 28px; }
.why h3 { font-size: 19px; }
.why p { color: var(--muted); font-size: 15px; margin: 0; }

/* Process */
.process { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: step; }
.step { text-align: center; padding: 0 12px; position: relative; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: #fff; border: 2px solid var(--amber); font-family: var(--font-head); font-size: 20px; color: var(--navy-800); position: relative; z-index: 2; }
.step::after { content: ""; position: absolute; top: 32px; left: 50%; width: 100%; height: 2px; background: var(--line); z-index: 1; }
.step:last-child::after { display: none; }
.step h3 { font-size: 18px; }
.step p { font-size: 15px; color: var(--muted); }

/* CTA */
.cta { background: linear-gradient(110deg, var(--navy-800), var(--navy-700)); color: #fff; border-radius: 20px; padding: 56px; display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; right: -80px; top: -80px; width: 300px; height: 300px; border-radius: 50%; border: 40px solid rgba(245,166,35,.15); }
.cta h2 { color: #fff; font-size: clamp(26px, 3vw, 36px); margin-bottom: 8px; }
.cta p { color: #c9d6ea; margin: 0; }
.cta > * { position: relative; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; }
.contact-item { display: flex; gap: 16px; margin-bottom: 22px; }
.contact-item .icon { flex: 0 0 48px; height: 48px; border-radius: 12px; background: var(--navy-800); color: var(--amber); display: grid; place-items: center; }
.contact-item .icon svg { width: 22px; height: 22px; }
.contact-item b { display: block; font-family: var(--font-head); font-weight: 500; color: var(--navy-900); }
.contact-item span, .contact-item a { color: var(--muted); }
.form { background: #fff; border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--navy-900); }
.form input, .form textarea, .form select { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 16px; margin-bottom: 16px; background: var(--bg-soft); }
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--blue-500); background: #fff; }
.map { border: 0; width: 100%; height: 340px; border-radius: var(--radius); margin-top: 8px; }

/* FAQ */
.faq { max-width: 860px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; padding: 0 22px; }
.faq summary { cursor: pointer; padding: 18px 0; font-family: var(--font-head); font-weight: 500; font-size: 17px; color: var(--navy-900); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font-size: 24px; color: var(--amber-dark); line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* Footer */
.footer { background: var(--navy-900); color: #aebfd8; padding: 70px 0 0; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; }
.footer h4 { color: #fff; font-size: 17px; margin-bottom: 16px; }
.footer a { color: #aebfd8; }
.footer a:hover { color: var(--amber); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer .brand { color: #fff; margin-bottom: 16px; }
.footer .brand-logo { color: #fff; }
.footer .brand small { color: #aebfd8; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 50px; padding: 20px 0; font-size: 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.social { display: flex; gap: 10px; margin-top: 16px; }
.social a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); display: grid; place-items: center; color: #fff; }
.social a:hover { background: var(--amber); color: var(--navy-900); border-color: var(--amber); }
.social svg { width: 18px; height: 18px; }

/* Floating contact */
.float-call { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; gap: 10px; }
.float-call a { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(0,0,0,.25); color: #fff; }
.float-call .phone { background: var(--amber); color: var(--navy-900); }
.float-call .fb { background: #1877f2; }
.float-call svg { width: 24px; height: 24px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(4,12,28,.94); z-index: 100; display: none; align-items: center; justify-content: center; padding: 30px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 86vh; border-radius: 8px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.1); border: 0; color: #fff; width: 50px; height: 50px; border-radius: 50%; font-size: 26px; cursor: pointer; }
.lightbox .lb-close { top: 20px; right: 20px; }
.lightbox .lb-prev { left: 20px; top: 50%; }
.lightbox .lb-next { right: 20px; top: 50%; }
.lightbox .lb-caption { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: #d5e0f0; font-size: 15px; padding: 0 20px; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-bg { animation: none; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .machines-grid { grid-template-columns: repeat(2, 1fr); }
  .clients-grid { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 920px) {
  .menu-toggle { display: block; }
  .nav { position: fixed; top: 76px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px 24px; border-bottom: 1px solid var(--line); transform: translateY(-130%); visibility: hidden; transition: transform .3s, visibility .3s; box-shadow: var(--shadow); }
  .nav.open { transform: none; visibility: visible; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav .btn { margin-top: 14px; justify-content: center; border-bottom: 0; }
  .about-grid, .contact-grid, .feature, .feature.reverse { grid-template-columns: 1fr; gap: 40px; }
  .feature.reverse .feature-media { order: 0; }
  .services-grid, .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .process { grid-template-columns: 1fr; gap: 28px; }
  .step::after { display: none; }
  .about-media .float { right: 10px; }
  .about-media .years { left: 10px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  section { padding: 68px 0; }
  .container { padding: 0 16px; }
  .topbar .hide-sm { display: none; }
  .services-grid, .projects-grid, .machines-grid, .why-grid, .checklist, .form-row { grid-template-columns: 1fr; }
  .machine.wide { grid-column: auto; }
  .clients-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .stat b { font-size: 34px; }
  .cta { padding: 36px 24px; }
  .form { padding: 24px; }
  .feature-media { height: 300px; }
  .brand small { display: none; }
  .hero { min-height: 80vh; }
}

/* Language switch */
.lang-switch { display: flex; margin-left: 22px; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--bg-soft); }
.lang-switch a { font-family: var(--font-head); font-weight: 500; font-size: 14px; padding: 4px 12px; border-radius: 999px; color: var(--muted); line-height: 1.4; }
.lang-switch a[aria-current] { background: var(--navy-800); color: #fff; }
.lang-switch a:not([aria-current]):hover { color: var(--navy-800); }
@media (max-width: 920px) {
  .lang-switch { order: 3; margin-left: auto; margin-right: 10px; }
  .menu-toggle { order: 4; }
}
