:root {
    --red: #fe9d4c;
    --red-dark: #b9540e;
    --ink: #101820;
    --muted: #65707b;
    --soft: #f4f6f8;
    --line: #e4e7ea;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: var(--visual-viewport-width, 100%); overflow-x: hidden; background: #fff; color: var(--ink); font-family: 'Noto Sans Thai', sans-serif; line-height: 1.65; }
.container { max-width: 1280px; }

.site-header { border-bottom: 1px solid rgba(16, 24, 32, .06); background: rgba(255, 255, 255, .94); box-shadow: 0 8px 30px rgba(16, 24, 32, .06); backdrop-filter: blur(18px); }
.navbar { min-height: 76px; }
.brand { display: inline-flex; flex-direction: column; color: var(--ink); line-height: .8; text-decoration: none; }
.brand-mark { font-size: 30px; font-style: italic; font-weight: 900; letter-spacing: -2px; }
.brand-mark::before { display: inline-block; width: 18px; height: 8px; margin-right: -13px; margin-bottom: 12px; background: var(--red); content: ''; transform: skew(-30deg); }
.brand small { margin-left: 8px; font-size: 9px; font-weight: 800; letter-spacing: 7px; }
.nav-link { position: relative; color: #24303b !important; font-size: 14px; font-weight: 600; }
.nav-link.active, .nav-link:hover { color: var(--red-dark) !important; }

.btn { padding: .75rem 1.35rem; font-weight: 700; transition: transform .2s ease, box-shadow .2s ease, filter .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-brand { border: 0; background: var(--red); box-shadow: 0 10px 24px rgba(254, 157, 76, .28); color: #28170a; }
.btn-brand:hover, .btn-brand:focus { color: #28170a; filter: brightness(.95); }

.hero { position: relative; overflow: hidden; background: #17110e; color: #fff; }
.hero-bg { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9, 8, 7, .97) 0%, rgba(9, 8, 7, .84) 42%, rgba(9, 8, 7, .2) 78%), url('../images/cnc-grinding-enhanced.jpg') center 48% / cover no-repeat; transform: scale(1.015); }
.hero-content { position: relative; z-index: 2; }
.min-vh-hero { min-height: 620px; }
.hero-badge { padding: .65rem .9rem; border: 1px solid rgba(255, 255, 255, .22); background: rgba(254, 157, 76, .18); color: #ffe4cc; font-size: 11px; font-weight: 800; letter-spacing: 1.8px; }
.hero h1 { margin: 22px 0; font-size: clamp(42px, 5vw, 72px); font-weight: 800; line-height: 1.08; letter-spacing: -.025em; text-shadow: 0 5px 25px rgba(0, 0, 0, .22); }
.hero h1 span { color: var(--red); }
.hero .lead { max-width: 690px; margin-bottom: 32px; color: #edf0f2; font-size: 18px; line-height: 1.8; }

.benefits { position: relative; z-index: 3; margin-top: -42px; padding-bottom: 44px; }
.benefit { display: flex; align-items: center; gap: 15px; min-height: 110px; padding: 22px; border: 1px solid rgba(16, 24, 32, .06); background: #fff; box-shadow: 0 14px 40px rgba(16, 24, 32, .1); }
.benefit b { display: grid; flex: 0 0 auto; width: 46px; height: 46px; place-items: center; border-radius: 14px; background: rgba(254, 157, 76, .12); color: var(--red-dark); font-size: 25px; }
.benefit strong, .benefit span { display: block; }
.benefit strong { font-size: 14px; line-height: 1.4; }
.benefit span { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }

.section { padding: 92px 0; }
.section-soft { background: linear-gradient(180deg, #f7f8fa, #eef1f4); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 38px; }
.kicker { color: var(--red-dark); font-size: 11px; font-weight: 800; letter-spacing: 2.2px; }
.section h2, .manufacturing h2, .contact h2 { margin: 6px 0 8px; font-size: clamp(32px, 3vw, 46px); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; }
.section-head p { max-width: 780px; margin: 0; color: var(--muted); }
.text-link { flex: 0 0 auto; color: var(--red-dark); font-weight: 700; text-decoration: none; }
.text-link:hover { color: #8f3f0a; }

.product-card, .service-card { overflow: hidden; background: #fff; transition: transform .25s ease, box-shadow .25s ease; }
.product-card:hover, .product-card:focus-within, .service-card:hover { box-shadow: 0 20px 45px rgba(16, 24, 32, .13) !important; transform: translateY(-7px); }
.product-card:focus-within { outline: 3px solid rgba(254, 157, 76, .4); outline-offset: 3px; }
.product-card .stretched-link:focus-visible { outline: 0; }
.product-card .card-img-top { width: 100%; height: 210px; object-fit: cover; }
.product-card .card-body { position: relative; min-height: 98px; padding: 18px; }
.product-card .card-title, .product-card .card-text { display: block; }
.product-card .card-title { padding-right: 25px; font-size: 14px; font-weight: 800; }
.product-card .card-text { margin-top: 4px; color: var(--muted); font-size: 12px; }
.product-card i { position: absolute; right: 17px; bottom: 19px; color: var(--red-dark); font-style: normal; font-weight: 800; }
.catalog-card { margin-top: 48px; scroll-margin-top: 104px; background: radial-gradient(circle at 85% 15%, rgba(254, 157, 76, .24), transparent 34%), #17191a; box-shadow: 0 22px 60px rgba(16, 24, 32, .18); color: #fff; }
.catalog-cover { background: #eceff1; }
.catalog-cover img { display: block; width: 100%; max-width: 100%; height: 100%; min-height: 380px; max-height: 430px; object-fit: cover; object-position: top; }
.catalog-content { padding: clamp(30px, 5vw, 62px); }
.catalog-content h3 { margin: 7px 0 13px; font-size: clamp(28px, 3vw, 42px); font-weight: 800; line-height: 1.2; }
.catalog-content p { max-width: 740px; margin-bottom: 18px; color: #dfe3e6; }
.catalog-list { display: grid; gap: 7px; margin: 0 0 26px; padding: 0; color: #f2f4f5; font-size: 14px; list-style: none; }
.catalog-list li::before { margin-right: 9px; color: var(--red); content: '✓'; font-weight: 800; }
.product-showcase { margin-top: 64px; padding-top: 44px; border-top: 1px solid var(--line); }
.product-showcase-head { max-width: 760px; margin-bottom: 26px; }
.product-showcase h3 { margin: 6px 0 8px; font-size: clamp(26px, 2.2vw, 36px); font-weight: 800; line-height: 1.25; }
.product-showcase-head p { margin: 0; color: var(--muted); }
.product-gallery-item { position: relative; aspect-ratio: 4 / 5; margin: 0; overflow: hidden; background: #202326; }
.product-gallery-item::after { position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .82)); content: ''; pointer-events: none; }
.product-gallery-item img { display: block; width: 100%; max-width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-gallery-item:hover img { transform: scale(1.035); }
.product-gallery-item figcaption { position: absolute; z-index: 1; right: 14px; bottom: 13px; left: 14px; color: #fff; font-size: 12px; font-weight: 700; line-height: 1.45; }
.service-card .card-img-top { width: 100%; height: 235px; object-fit: cover; }
.service-card .card-body { padding: 22px; }
.service-card h3 { font-size: 18px; font-weight: 800; line-height: 1.35; }
.service-card h3 small { display: block; margin-top: 4px; color: var(--red-dark); font-size: 11px; font-weight: 700; }
.service-card p { margin: 0; color: var(--muted); font-size: 13px; }

.manufacturing { overflow: hidden; background: #101315; color: #fff; }
.manufacture-copy { position: relative; padding: 82px clamp(42px, 5vw, 96px); background: radial-gradient(circle at 20% 20%, rgba(254, 157, 76, .2), transparent 38%), linear-gradient(145deg, #17191a, #28140f); }
.manufacture-copy::before { position: absolute; top: 82px; left: 0; width: 5px; height: 70px; background: var(--red); content: ''; }
.manufacture-copy h2, .manufacture-copy p { max-width: 520px; }
.manufacture-copy p { margin: 18px 0 28px; color: #d9dcdf; }
.kicker.light { color: #ffd4b2; }
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); height: 100%; }
.process-grid figure { display: flex; flex-direction: column; min-height: 455px; margin: 0; overflow: hidden; background: #fff; color: var(--ink); }
.process-grid img { width: 100%; height: 365px; object-fit: cover; transition: transform .35s ease; }
.process-grid figure:hover img { transform: scale(1.035); }
.process-grid figcaption { padding: 18px 15px; font-size: 12px; font-weight: 700; }
.process-grid b { display: inline-grid; width: 30px; height: 30px; margin-right: 7px; place-items: center; border-radius: 50%; background: #eef0f2; }

.about { background: linear-gradient(135deg, #fff 0%, #fff 62%, #f6f7f8 62%); }
.lead-copy { color: var(--muted); line-height: 1.9; }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; }
.feature-list span { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .78); font-size: 14px; font-weight: 600; }
.feature-list span::first-letter { color: var(--red-dark); }
.wood-panel { position: relative; min-height: 430px; overflow: hidden; background: #251a13; }
.wood-panel img { width: 100%; height: 430px; object-fit: cover; opacity: .78; }
.wood-panel::after { position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); content: ''; }
.wood-panel blockquote { position: absolute; z-index: 1; right: 32px; bottom: 26px; left: 32px; margin: 0; color: #fff; font-size: 26px; font-weight: 700; }

.contact { padding: 86px 0; background: radial-gradient(circle at 75% 25%, rgba(254, 157, 76, .18), transparent 30%), linear-gradient(120deg, #111820, #251311); color: #fff; }
.contact p { max-width: 720px; color: #d8dde1; font-size: 17px; }
.contact-card { padding: 30px; background: rgba(255, 255, 255, .98); color: var(--ink); }
.contact-qr { display: flex; align-items: center; gap: 22px; margin-bottom: 24px; }
.contact-qr a { flex: 0 0 148px; }
.contact-qr img { display: block; width: 148px; height: 148px; border-radius: 16px; }
.contact-qr strong, .contact-qr span { display: block; }
.contact-qr strong { font-size: 20px; }
.contact-qr span { margin-top: 4px; color: var(--muted); font-size: 14px; }

.footer { padding: 44px 0; border-top: 1px solid var(--line); background: #fff; }
.brand-footer { margin-bottom: 12px; }
.footer p, .copyright { margin: 0; color: var(--muted); font-size: 10px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-nav a { color: #39434c; font-size: 12px; font-weight: 600; text-decoration: none; }
.footer-nav a:hover { color: var(--red-dark); }
a:focus-visible, button:focus-visible { outline: 3px solid rgba(254, 157, 76, .48); outline-offset: 3px; }

@media (min-width: 992px) {
    .nav-link::after { position: absolute; right: .5rem; bottom: .2rem; left: .5rem; height: 2px; background: var(--red); content: ''; transform: scaleX(0); transition: transform .2s ease; }
    .nav-link.active::after, .nav-link:hover::after { transform: scaleX(1); }
}

@media (max-width: 1199px) {
    .product-card .card-img-top { height: 230px; }
    .manufacture-copy { padding: 64px max(34px, calc((100vw - 960px) / 2)); }
    .manufacture-copy::before { top: 64px; }
    .manufacture-copy p { max-width: 720px; }
    .process-grid { grid-template-columns: 1fr 1fr; }
    .process-grid figure { min-height: 370px; }
    .process-grid img { height: 290px; }
}

@media (max-width: 991px) {
    .navbar-collapse { padding: 18px 0 6px; }
    .btn-brand.ms-lg-3 { margin-top: 14px; }
    .min-vh-hero { min-height: 560px; }
    .hero-bg { background-position: 62% center; }
    .benefits { margin-top: 0; padding: 24px 0 46px; background: #fff; }
    .benefit { box-shadow: 0 8px 24px rgba(16, 24, 32, .08); }
    .section { padding: 76px 0; }
}

@media (max-width: 575px) {
    .navbar { min-height: 66px; }
    .brand-mark { font-size: 25px; }
    .hero-bg { background: linear-gradient(180deg, rgba(10, 8, 7, .55), rgba(10, 8, 7, .97)), url('../images/cnc-grinding-enhanced.jpg') center / cover no-repeat; }
    .min-vh-hero { min-height: 660px; align-items: end !important; padding-bottom: 26px; }
    .hero h1 { font-size: clamp(35px, 10vw, 42px); }
    .hero .lead { font-size: 15px; line-height: 1.7; }
    .hero .btn { width: 100%; }
    .hero-badge { font-size: 9px; letter-spacing: 1.2px; }
    .benefit { align-items: flex-start; gap: 10px; min-height: 128px; padding: 16px 12px; }
    .benefit b { width: 36px; height: 36px; border-radius: 10px; font-size: 21px; }
    .benefit strong { font-size: 12px; }
    .section { padding: 64px 0; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 28px; }
    .product-card .card-img-top { height: 155px; }
    .product-card .card-body { min-height: 96px; padding: 14px; }
    .product-card .card-title { font-size: 12px; }
    .product-card i { right: 13px; bottom: 15px; }
    .catalog-card { margin-top: 36px; scroll-margin-top: 86px; }
    .catalog-cover img { height: 300px; min-height: 300px; max-height: 300px; }
    .catalog-content { padding: 28px 22px 30px; }
    .catalog-content p, .catalog-list { font-size: 13px; }
    .service-card .card-img-top { height: 220px; }
    .manufacture-copy { padding: 58px 24px; }
    .manufacture-copy::before { top: 58px; }
    .process-grid { grid-template-columns: 1fr; }
    .process-grid img { height: 250px; }
    .process-grid figure { min-height: 330px; }
    .process-grid figcaption { padding: 15px 14px; font-size: 12px; }
    .feature-list { grid-template-columns: 1fr; }
    .wood-panel, .wood-panel img { min-height: 320px; height: 320px; }
    .contact { padding: 66px 0; }
    .contact-card { padding: 20px; }
    .contact-qr { gap: 16px; }
    .contact-qr a { flex-basis: 120px; }
    .contact-qr img { width: 120px; height: 120px; border-radius: 12px; }
    .contact-qr strong { font-size: 17px; }
    .footer-nav { gap: 10px 14px; }
}

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