/* ====================================================================
   OGAWA FORGING (THAILAND) — modern Thai industrial theme
   ==================================================================== */
:root {
  --navy: #0f1f3d;
  --navy-2: #16294f;
  --steel: #5b6b86;
  --ink: #1a2230;
  --muted: #5d6675;
  --line: #e3e7ee;
  --bg: #ffffff;
  --bg-alt: #f4f6fa;
  --fire: #e8531a;
  --fire-dark: #c8410f;
  --amber: #f6a623;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 14px 40px -18px rgba(15, 31, 61, 0.28);
  --shadow-sm: 0 6px 20px -12px rgba(15, 31, 61, 0.35);
  --wrap: 1180px;
  --font-th: "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Sora", "Noto Sans Thai", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-th);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16.5px;
  overflow-x: hidden;
}

img, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.25; color: var(--navy); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.18rem; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--fire); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------------------------- Buttons ---------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-th); font-weight: 600; font-size: 1rem;
  padding: 13px 26px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn-sm { padding: 9px 18px; font-size: .92rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--fire); color: #fff; box-shadow: 0 10px 24px -10px rgba(232,83,26,.7); }
.btn-primary:hover { background: var(--fire-dark); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* ---------------------------- Header ----------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 72px; }

.brand { display: flex; align-items: center; gap: 11px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-display); font-size: 1.06rem; color: var(--navy); letter-spacing: .3px; }
.brand-text small { font-size: .68rem; color: var(--fire); letter-spacing: 1.5px; font-weight: 600; }

.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a {
  padding: 9px 14px; border-radius: 8px; font-weight: 500; font-size: .97rem; color: var(--ink);
  transition: background .15s ease, color .15s ease;
}
.main-nav a:hover, .main-nav a.active { background: var(--bg-alt); color: var(--fire); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch button {
  border: 0; background: transparent; padding: 7px 11px; font-size: .82rem; font-weight: 600;
  cursor: pointer; color: var(--muted); font-family: var(--font-th);
}
.lang-switch button.active { background: var(--navy); color: #fff; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2.5px; background: var(--navy); border-radius: 2px; transition: .25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ----------------------------- Hero ------------------------------ */
.hero { position: relative; color: #fff; padding: 150px 0 90px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(900px 500px at 78% -10%, rgba(232,83,26,.42), transparent 60%),
    radial-gradient(700px 600px at 8% 110%, rgba(246,166,35,.22), transparent 55%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #0a1730 100%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(circle at 70% 30%, #000, transparent 75%);
          mask-image: radial-gradient(circle at 70% 30%, #000, transparent 75%);
}
.hero-inner { max-width: 760px; }
.eyebrow {
  display: inline-block; font-size: .82rem; font-weight: 600; letter-spacing: 1.2px;
  color: var(--amber); border: 1px solid rgba(246,166,35,.4); padding: 6px 14px;
  border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { color: #fff; font-size: clamp(2.1rem, 5.4vw, 3.5rem); letter-spacing: -.5px; }
.hero-lead { margin: 20px 0 30px; font-size: 1.1rem; color: #cdd6e6; max-width: 620px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-badges {
  display: flex; gap: 30px; flex-wrap: wrap; list-style: none;
  margin-top: 46px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,.13);
}
.hero-badges li { display: flex; flex-direction: column; }
.hero-badges strong { font-family: var(--font-display); font-size: 1.5rem; color: var(--amber); }
.hero-badges span { font-size: .9rem; color: #b9c3d6; }

/* ----------------------------- Stats ----------------------------- */
.stats { background: var(--navy-2); }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: rgba(255,255,255,.08);
}
.stat { background: var(--navy-2); padding: 34px 20px; text-align: center; color: #fff; }
.stat .num { font-family: var(--font-display); font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; color: #fff; }
.stat .suffix { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: var(--fire); }
.stat p { margin-top: 6px; font-size: .92rem; color: #aeb9cd; }

/* ---------------------------- Sections --------------------------- */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--navy); color: #fff; }
.section-dark h2 { color: #fff; }
.center { text-align: center; }
.kicker {
  font-size: .82rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--fire); margin-bottom: 10px;
}
.kicker.center { margin-left: auto; margin-right: auto; }
.section-lead { max-width: 660px; margin: 14px auto 0; color: var(--muted); }
.section-dark .section-lead { color: #b9c3d6; }

/* ----------------------------- About ----------------------------- */
.about-grid { display: grid; grid-template-columns: 1.25fr .85fr; gap: 46px; align-items: start; }
.about-text h2 { margin-bottom: 16px; }
.about-text p { color: var(--muted); margin-bottom: 14px; }
.about-facts { list-style: none; margin-top: 22px; display: grid; gap: 10px; }
.about-facts li {
  display: flex; justify-content: space-between; gap: 16px; padding: 13px 16px;
  background: var(--bg-alt); border-radius: 10px; border-left: 3px solid var(--fire);
}
.about-facts span { color: var(--muted); font-size: .95rem; }
.about-facts strong { color: var(--navy); text-align: right; }

.about-card {
  background: var(--navy); color: #fff; padding: 32px 28px; border-radius: var(--radius-lg);
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.about-card::before {
  content: ""; position: absolute; top: -60px; right: -60px; width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(232,83,26,.55), transparent 70%);
}
.about-card h3 { color: #fff; }
.about-card .quote {
  font-family: var(--font-display); font-size: 1.18rem; color: var(--amber);
  margin: 14px 0; font-weight: 600;
}
.about-card p { color: #c5cee0; font-size: .96rem; }
.org-list { margin-top: 22px; display: grid; gap: 12px; }
.org-list div { border-top: 1px solid rgba(255,255,255,.13); padding-top: 12px; }
.org-list span { display: block; font-size: .82rem; color: #93a0ba; }
.org-list strong { font-family: var(--font-display); color: #fff; }

/* -------------------------- Capabilities ------------------------- */
.cap-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px;
}
.cap-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cap-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.cap-icon {
  width: 56px; height: 56px; border-radius: 13px; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--fire), var(--amber));
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}
.cap-card h3 { margin-bottom: 8px; }
.cap-card p { color: var(--muted); font-size: .95rem; }

.spec-table {
  margin-top: 50px; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm);
}
.spec-table h3 { margin-bottom: 16px; }
.spec-table table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.spec-table th, .spec-table td {
  border: 1px solid var(--line); padding: 11px 12px; text-align: center;
}
.spec-table thead th { background: var(--navy); color: #fff; font-family: var(--font-display); font-weight: 600; }
.spec-table tbody td:first-child { background: var(--bg-alt); font-weight: 600; color: var(--navy); }
.spec-note { margin-top: 12px; font-size: .86rem; color: var(--muted); }

/* ---------------------------- Products --------------------------- */
.prod-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-top: 42px;
}
.prod-card {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--bg); transition: transform .2s ease, box-shadow .2s ease;
}
.prod-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.prod-img {
  aspect-ratio: 1 / 1;
  background: linear-gradient(160deg, #eef1f6, #d9deea);
  background-repeat: no-repeat; background-position: center; background-size: 58%;
}
.prod-card figcaption {
  padding: 12px; text-align: center; font-family: var(--font-display);
  font-weight: 600; font-size: .9rem; color: var(--navy);
  border-top: 1px solid var(--line);
}

/* ---------------------------- Timeline --------------------------- */
.timeline {
  list-style: none; margin: 46px auto 0; max-width: 760px;
  position: relative; padding-left: 34px;
}
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--fire), var(--amber));
}
.timeline li { position: relative; padding: 0 0 26px 18px; }
.timeline li::before {
  content: ""; position: absolute; left: -34px; top: 4px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--fire); box-shadow: 0 0 0 4px rgba(232,83,26,.22);
}
.timeline .year { font-family: var(--font-display); font-weight: 800; color: var(--amber); font-size: 1.15rem; }
.timeline p { color: #c5cee0; margin-top: 2px; }

/* ---------------------------- Contact ---------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.contact-info h2 { margin-bottom: 12px; }
.contact-info > p { color: var(--muted); }
.contact-list { list-style: none; margin: 24px 0; display: grid; gap: 16px; }
.contact-list li { display: flex; gap: 14px; }
.ci-icon {
  flex: 0 0 42px; width: 42px; height: 42px; border-radius: 11px;
  background: var(--navy); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.ci-icon {
  background:
    linear-gradient(135deg, var(--fire), var(--amber));
}
.contact-list strong { display: block; font-family: var(--font-display); color: var(--navy); font-size: .96rem; }
.contact-list p { color: var(--muted); font-size: .95rem; }
.contact-list a:hover { color: var(--fire); }

.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-top: 8px; }
.map-wrap iframe { width: 100%; height: 260px; border: 0; }

.contact-form-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px; box-shadow: var(--shadow);
}
.contact-form-card h3 { margin-bottom: 18px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .9rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font-family: var(--font-th); font-size: 1rem; color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--bg-alt); transition: border-color .15s ease, background .15s ease;
}
.field input:focus, .field textarea:focus {
  border-color: var(--fire); background: #fff; outline: none;
}
.field textarea { resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 12px; font-size: .92rem; font-weight: 600; min-height: 1.2em; }
.form-status.ok { color: #1f9d55; }
.form-status.err { color: #d8392b; }

/* ----------------------------- Footer ---------------------------- */
.site-footer { background: #0a1424; color: #aeb9cd; padding-top: 56px; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 36px; padding-bottom: 40px;
}
.brand-footer .brand-text strong { color: #fff; }
.footer-desc { margin-top: 14px; font-size: .92rem; max-width: 320px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer a, .site-footer p { display: block; font-size: .93rem; margin-bottom: 8px; color: #aeb9cd; }
.site-footer a:hover { color: var(--amber); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 18px 0; }
.footer-bottom p { font-size: .85rem; color: #7b87a0; text-align: center; }

/* ----------------------------- To top ---------------------------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; background: var(--fire); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* --------------------------- Reveal anim -------------------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ----------------------------- Icons ----------------------------- */
.cap-icon, .ci-icon {
  -webkit-mask-size: 58%; mask-size: 58%;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.cap-icon[data-icon="hammer"] { -webkit-mask-image: url(/img/icon-hammer.svg); mask-image: url(/img/icon-hammer.svg); }
.cap-icon[data-icon="anvil"]  { -webkit-mask-image: url(/img/icon-anvil.svg);  mask-image: url(/img/icon-anvil.svg); }
.cap-icon[data-icon="car"]    { -webkit-mask-image: url(/img/icon-car.svg);    mask-image: url(/img/icon-car.svg); }
.cap-icon[data-icon="gear"]   { -webkit-mask-image: url(/img/icon-gear.svg);   mask-image: url(/img/icon-gear.svg); }
.cap-icon[data-icon="bolt"]   { -webkit-mask-image: url(/img/icon-bolt.svg);   mask-image: url(/img/icon-bolt.svg); }
.cap-icon[data-icon="crane"]  { -webkit-mask-image: url(/img/icon-crane.svg);  mask-image: url(/img/icon-crane.svg); }
.ci-icon[data-icon="pin"]     { -webkit-mask-image: url(/img/icon-pin.svg);    mask-image: url(/img/icon-pin.svg); }
.ci-icon[data-icon="phone"]   { -webkit-mask-image: url(/img/icon-phone.svg);  mask-image: url(/img/icon-phone.svg); }
.ci-icon[data-icon="fax"]     { -webkit-mask-image: url(/img/icon-fax.svg);    mask-image: url(/img/icon-fax.svg); }
.ci-icon[data-icon="clock"]   { -webkit-mask-image: url(/img/icon-clock.svg);  mask-image: url(/img/icon-clock.svg); }

.prod-img[data-shape="boss"]      { background-image: url(/img/prod-boss.svg); }
.prod-img[data-shape="tjoint"]    { background-image: url(/img/prod-tjoint.svg); }
.prod-img[data-shape="ljoint"]    { background-image: url(/img/prod-ljoint.svg); }
.prod-img[data-shape="joint3"]    { background-image: url(/img/prod-joint3.svg); }
.prod-img[data-shape="joint4"]    { background-image: url(/img/prod-joint4.svg); }
.prod-img[data-shape="elbow"]     { background-image: url(/img/prod-elbow.svg); }
.prod-img[data-shape="connector"] { background-image: url(/img/prod-connector.svg); }
.prod-img[data-shape="socket"]    { background-image: url(/img/prod-socket.svg); }
.prod-img[data-shape="gear"]      { background-image: url(/img/prod-gear.svg); }
.prod-img[data-shape="shaft"]     { background-image: url(/img/prod-shaft.svg); }

/* --------------------------- Responsive --------------------------- */
@media (max-width: 980px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .prod-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 10px 16px 18px;
    transform: translateY(-130%); transition: transform .3s ease; box-shadow: var(--shadow);
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 13px 10px; border-radius: 8px; }
  .header-actions .btn { display: none; }
  .section { padding: 62px 0; }
  .hero { padding: 124px 0 70px; }
}
@media (max-width: 520px) {
  .cap-grid, .prod-grid, .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-badges { gap: 20px; }
  .contact-form-card { padding: 22px; }
}
