/* ============================================
   3D PRINT @ NAKHONPATHOM — Main Stylesheet
   ============================================ */

/* RESET & ROOT */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --c-orange:     #D4680A;
  --c-orange-lt:  #F07A18;
  --c-orange-dk:  #9A4A07;
  --c-orange-dim: rgba(212,104,10,0.12);
  --c-orange-glow:rgba(212,104,10,0.25);
  --c-bg:         #080808;
  --c-bg2:        #0D0D0D;
  --c-bg3:        #131313;
  --c-card:       #111111;
  --c-card2:      #171717;
  --c-border:     #222222;
  --c-border2:    #2E2E2E;
  --c-text:       #EDEDEB;
  --c-text2:      #999;
  --c-text3:      #A3A3A3;
  --font-heading: 'Barlow Condensed', sans-serif;
  --font-body:    'Sarabun', sans-serif;
  --font-mono:    'Space Mono', monospace;
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-xl:  20px;
  --r-2xl: 28px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-orange: 0 0 40px rgba(212,104,10,0.15);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-body); border: none; }
input, select, textarea { font-family: var(--font-body); }
::selection { background: var(--c-orange); color: var(--c-bg); }
[hidden] { display: none !important; }
:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid #FF9D45;
  outline-offset: 3px;
}


/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--c-bg); }
::-webkit-scrollbar-thumb { background: var(--c-border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-orange); }


/* ============ TYPOGRAPHY ============ */
.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--c-orange);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: block;
}

h2.title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}

h3.subtitle {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.lead {
  color: var(--c-text2);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 580px;
}


/* ============ LAYOUT ============ */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
section { padding: 6rem 0; }
.section-center { text-align: center; }
.section-center .lead { margin-inline: auto; }


/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  line-height: 1;
}

.btn-primary {
  background: var(--c-orange);
  color: var(--c-bg);
}
.btn-primary:hover {
  background: var(--c-orange-lt);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212,104,10,0.3);
}
.btn-primary:active { transform: translateY(0); }
.btn:disabled {
  cursor: not-allowed;
  opacity: .55;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  color: var(--c-text);
  border: 1px solid var(--c-border2);
}
.btn-ghost:hover {
  border-color: var(--c-orange);
  color: var(--c-orange);
}

.btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-full { width: 100%; justify-content: center; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }


/* ============ NAVBAR ============ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 68px;
  background: rgba(8,8,8,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--c-border);
  transition: background 0.3s;
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.nav-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}
.nav-brand .line1 {
  font-size: 1.05rem;
  color: var(--c-text);
  letter-spacing: 0.04em;
}
.nav-brand .line2 {
  font-size: 0.68rem;
  color: var(--c-orange);
  font-weight: 500;
  letter-spacing: 0.14em;
  font-family: var(--font-mono);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  font-size: 0.88rem;
  color: var(--c-text2);
  transition: color 0.2s;
  letter-spacing: 0.02em;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--c-orange);
  transform: scaleX(0);
  transition: transform 0.2s;
}
.nav-links a:hover { color: var(--c-orange); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-actions { display: flex; gap: 10px; align-items: center; }

/* Hamburger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
  padding: 4px 0;
  background: none;
}
.nav-burger span {
  display: block;
  height: 2px;
  background: var(--c-text);
  border-radius: 1px;
  transition: all 0.3s;
  transform-origin: center;
}
.nav-burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
#mobile-menu {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: rgba(10,10,10,0.97);
  border-bottom: 1px solid var(--c-border);
  padding: 1.5rem 2rem 2rem;
  z-index: 999;
  flex-direction: column;
  gap: 1.5rem;
  backdrop-filter: blur(20px);
}
#mobile-menu.open { display: flex; }
#mobile-menu a {
  font-size: 1.1rem;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--c-text2);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--c-border);
  transition: color 0.2s;
}
#mobile-menu a:last-child { border: none; }
#mobile-menu a:hover { color: var(--c-orange); }


/* ============ HERO ============ */
#home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 68px 0 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg-grad {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(212,104,10,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 20%, rgba(212,104,10,0.05) 0%, transparent 60%);
}
.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
}
.hero-grid-lines::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, transparent 40%, var(--c-bg) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  padding: 6rem 0;
}

.hero-text .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--c-orange-dim);
  border: 1px solid rgba(212,104,10,0.25);
  color: var(--c-orange);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  margin-bottom: 1.75rem;
}
.hero-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-orange);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0.2; } }

.hero-h1 {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.hero-h1 .accent { color: var(--c-orange); }
.hero-h1 .thin { font-weight: 400; color: var(--c-text2); }

.hero-desc {
  font-size: 1.1rem;
  color: var(--c-text2);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  max-width: 460px;
}

.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--c-border);
}
.hstat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--c-orange);
  line-height: 1;
  margin-bottom: 4px;
}
.hstat span { font-size: 0.8rem; color: var(--c-text3); font-family: var(--font-mono); letter-spacing: 0.06em; }

/* Hero logo side */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.hero-logo-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-logo-ring {
  position: absolute;
  width: 440px; height: 440px;
  border-radius: 50%;
  border: 1px solid rgba(212,104,10,0.15);
  animation: spin-slow 30s linear infinite;
}
.hero-logo-ring::after {
  content: '';
  position: absolute;
  top: -2px; left: 50%;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--c-orange);
  transform: translateX(-50%);
}
.hero-logo-ring2 {
  position: absolute;
  width: 360px; height: 360px;
  border-radius: 50%;
  border: 1px dashed rgba(212,104,10,0.1);
  animation: spin-slow 20s linear infinite reverse;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }

.hero-logo-img {
  width: 300px;
  height: 300px;
  object-fit: contain;
  filter: drop-shadow(0 0 40px rgba(212,104,10,0.3));
  animation: float 6s ease-in-out infinite;
  position: relative;
  z-index: 1;
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}


/* ============ BADGE STRIP ============ */
.badge-strip {
  background: var(--c-bg2);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  padding: 1rem 0;
  overflow: hidden;
}
.badge-strip-inner {
  display: flex;
  gap: 3rem;
  animation: marquee 25s linear infinite;
  width: max-content;
}
.badge-strip-inner span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--c-text3);
  letter-spacing: 0.08em;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-strip-inner span b { color: var(--c-orange); font-weight: 700; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }


/* ============ ESTIMATE SECTION ============ */
#estimate { background: var(--c-bg2); }

.estimate-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 3.5rem;
  align-items: start;
}

/* Upload zone */
.upload-area {
  display: block;   /* <label> เป็น inline โดยปริยาย — ไม่ตั้ง block แล้วกรอบจะเหลือแค่มุมซ้าย */
  background: var(--c-card);
  border: 2px dashed var(--c-border2);
  border-radius: var(--r-2xl);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.upload-area:hover { border-color: var(--c-orange); background: rgba(212,104,10,0.04); }
.upload-area.dragover { border-color: var(--c-orange); background: rgba(212,104,10,0.07); transform: scale(1.01); }
.upload-area.has-file { border-style: solid; border-color: var(--c-orange); background: rgba(212,104,10,0.05); }

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.file-input:focus-visible + .upload-area {
  outline: 3px solid #FF9D45;
  outline-offset: 4px;
  border-color: var(--c-orange);
}

.upload-icon-wrap {
  width: 72px; height: 72px;
  background: var(--c-orange-dim);
  border-radius: var(--r-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  transition: all 0.3s;
}
.upload-area:hover .upload-icon-wrap { background: rgba(212,104,10,0.2); }
.upload-icon-wrap svg {
  width: 32px; height: 32px;
  stroke: var(--c-orange);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.upload-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.4rem; }
.upload-hint { font-size: 0.85rem; color: var(--c-text2); }
.upload-formats {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
.fmt {
  background: var(--c-bg3);
  border: 1px solid var(--c-border2);
  color: var(--c-text2);
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

/* Progress */
.progress-wrap { margin: 1rem 0; display: none; }
.progress-wrap.show { display: block; }
.progress-track {
  height: 3px;
  background: var(--c-border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--c-orange), var(--c-orange-lt));
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 2px;
}
.progress-label {
  font-size: 0.8rem;
  color: var(--c-text2);
  text-align: center;
  margin-top: 8px;
  min-height: 20px;
  overflow-wrap: anywhere;
}
.progress-label:empty { display: none; }
.progress-wrap.processing .progress-bar { animation: file-processing 1.2s ease-in-out infinite; transition: none; }
@keyframes file-processing { from { transform: translateX(-100%); } to { transform: translateX(385%); } }
@media (prefers-reduced-motion: reduce) { .progress-wrap.processing .progress-bar { animation: none; width: 100% !important; opacity: .55; } }

.file-guide { margin-top: 1rem; }
.file-guide-content { padding: 0 1.25rem 1.25rem; color: var(--c-text2); font-size: .9rem; line-height: 1.75; }
.file-guide-content ul { margin: 0; padding-left: 1.2rem; }
.file-guide-content li + li { margin-top: .65rem; }
.file-guide-content strong { color: var(--c-text); }
.pricing-examples { margin: 2rem 0; padding: 1.5rem; border: 1px solid var(--c-border2); border-radius: var(--r-lg); background: var(--c-card); }
.estimate-price-link { display: inline-block; margin-top: .65rem; color: var(--c-orange); font-size: .9rem; text-underline-offset: .2em; }
.estimate-price-link:hover { text-decoration: underline; }
.printed-work-gallery { margin-top: 4rem; }
.printed-work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.printed-work-card { margin: 0; overflow: hidden; border: 1px solid var(--c-border2); border-radius: var(--r-lg); background: var(--c-card); }
.printed-work-card > a { display: block; }
.printed-work-card > a:focus-visible { outline: 3px solid var(--c-orange); outline-offset: -3px; }
.printed-work-card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: #101512; }
.printed-work-card figcaption { padding: 1rem; }
.printed-work-card h3 { margin: 0 0 .35rem; font-size: 1.1rem; }
.printed-work-card p { margin: 0; color: var(--c-text2); font-size: .875rem; line-height: 1.7; }
.printed-work-source { margin-top: 1rem; color: var(--c-text3); font-size: .8rem; }
@media (max-width: 900px) { .printed-work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .printed-work-grid { grid-template-columns: 1fr; } }
.pricing-examples h3 { margin-bottom: .5rem; font-size: 1.15rem; }
.pricing-examples > p { color: var(--c-text2); font-size: .9rem; line-height: 1.7; }
.pricing-example-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.pricing-example-grid > div { padding: 1rem; border-radius: var(--r-md); background: var(--c-bg); }
.pricing-example-grid dt { color: var(--c-text2); font-size: .9rem; }
.pricing-example-grid dd { margin: 0; }
.pricing-example-grid strong { display: block; margin: .35rem 0; color: var(--c-orange); font-family: var(--font-heading); font-size: 2rem; }
.pricing-example-grid small { display: block; color: var(--c-text2); font-size: .8rem; line-height: 1.65; }
.delivery-note { padding: 1rem; color: var(--c-text2); background: var(--c-card); border: 1px solid var(--c-border2); border-radius: var(--r-md); font-size: .9rem; line-height: 1.75; }
@media (max-width: 640px) {
  .pricing-examples { padding: 1.1rem; }
  .pricing-example-grid { grid-template-columns: 1fr; gap: .65rem; }
  .pricing-example-grid > div { display: grid; grid-template-columns: 1fr 1.5fr; align-items: center; gap: .75rem; }
  .pricing-example-grid strong { font-size: 1.75rem; }
}

/* Config */
.config-block { margin-top: 1.75rem; display: flex; flex-direction: column; gap: 1.25rem; }
.material-summary { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; color: var(--c-text2); font-size: .95rem; }
.material-summary strong { padding: .25rem .65rem; border: 1px solid var(--c-border2); border-radius: var(--r-md); color: var(--c-text); }
.estimate-details { border: 1px solid var(--c-border2); border-radius: var(--r-lg); }
.estimate-details summary { padding: 1rem; cursor: pointer; font-size: 1rem; font-weight: 600; color: var(--c-text); }
.estimate-details summary::marker { color: var(--c-orange); }
.estimate-details summary:focus-visible { outline: 2px solid var(--c-orange); outline-offset: 3px; border-radius: var(--r-md); }
.advanced-settings summary span { display: block; margin: .35rem 0 0 1rem; font-size: .9375rem; font-weight: 400; color: var(--c-text2); }
.advanced-fields { display: flex; flex-direction: column; gap: 1.25rem; padding: .5rem 1rem 1.25rem; }
#estimate .field label { font-family: var(--font-body); font-size: .9375rem; letter-spacing: 0; }
#estimate .field select { font-size: 1rem; }
#supportHelp, .estimate-help { font-size: .9375rem; line-height: 1.7; color: var(--c-text2); }
#supportHelp { margin-top: .6rem; }

.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--c-text2);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-family: var(--font-mono);
}

.field select {
  width: 100%;
  background: var(--c-card2);
  border: 1px solid var(--c-border2);
  color: var(--c-text);
  padding: 11px 14px;
  border-radius: var(--r-md);
  font-size: 0.9rem;
  transition: border-color 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.field select:focus { border-color: var(--c-orange); }

.range-wrap { display: flex; align-items: center; gap: 12px; }
.range-wrap input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  background: var(--c-border2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.range-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--c-orange);
  cursor: pointer;
  border: 2px solid var(--c-bg);
  box-shadow: 0 0 6px rgba(212,104,10,0.4);
  transition: transform 0.15s;
}
.range-wrap input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
.range-val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--c-orange);
  min-width: 52px;
  text-align: right;
}
.range-edge { font-size: 0.75rem; color: var(--c-text3); min-width: 28px; }

.qty-input {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--c-card2);
  border: 1px solid var(--c-border2);
  border-radius: var(--r-md);
  overflow: hidden;
  width: fit-content;
}
.qty-btn {
  background: none;
  border: none;
  width: 40px; height: 40px;
  font-size: 1.2rem;
  color: var(--c-text2);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover { background: var(--c-orange-dim); color: var(--c-orange); }
.qty-display {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--c-text);
  min-width: 40px;
  text-align: center;
  border-left: 1px solid var(--c-border);
  border-right: 1px solid var(--c-border);
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-input input.qty-display { width: 58px; min-width: 58px; padding: 0 4px; background: transparent; border-top: 0; border-bottom: 0; border-radius: 0; appearance: textfield; }
.qty-input input.qty-display::-webkit-inner-spin-button,
.qty-input input.qty-display::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input input.qty-display:focus { outline: 2px solid var(--c-orange); outline-offset: -2px; }

/* Result panel */
.result-panel {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-2xl);
  overflow: hidden;
  transition: border-color 0.3s;
}
.result-panel.has-data { border-color: rgba(212,104,10,0.35); }
#resultPanel, #estimate { scroll-margin-top: 88px; }
.quote-basis { font-size: .9375rem; color: #fbbf24; margin: .5rem 0 .75rem; }
.quote-basis[data-state="confirmed"] { color: #86efac; }
.support-summary { margin: .75rem 1.75rem 1.25rem; padding: .75rem; border-radius: var(--r-md); background: var(--c-card2); color: var(--c-text); font-size: .9375rem; line-height: 1.6; }
.quote-details { margin: 0 1.25rem 1.25rem; }
.quote-details .data-row { padding-inline: 1rem; }
.data-row { gap: .75rem; }
.data-value { text-align: right; overflow-wrap: anywhere; min-width: 0; }
#estimate .data-label, #estimate .data-value { font-family: var(--font-body); font-size: .9375rem; }
#estimate .data-label { flex: 1; }
#estimate .data-value { flex: 1; }

.result-header {
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid var(--c-border);
}
.result-header .tag { margin-bottom: 0.25rem; }
.result-header h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
}

/* Empty state */
.empty-state {
  padding: 4rem 2rem;
  text-align: center;
}
.empty-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--c-bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}
.empty-icon svg {
  width: 36px; height: 36px;
  stroke: var(--c-text3);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.empty-state p { color: var(--c-text2); font-size: 0.9rem; line-height: 1.6; }

/* Data rows */
.result-rows { padding: 0.5rem 0; }
.data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 1.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.data-row:last-child { border: none; }
.data-label {
  font-size: 0.82rem;
  color: var(--c-text2);
  font-family: var(--font-mono);
}
.data-value {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--c-text);
  font-weight: 700;
}
.data-value.orange { color: var(--c-orange); }

/* Price box */
.price-box {
  margin: 1rem 1.75rem 1.75rem;
  background: linear-gradient(135deg, rgba(212,104,10,0.12), rgba(212,104,10,0.05));
  border: 1px solid rgba(212,104,10,0.25);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  text-align: center;
}
.price-label {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--c-orange);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.price-big {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--c-orange);
  line-height: 1;
  margin-bottom: 8px;
}
.price-note { font-size: .9375rem; color: var(--c-text3); line-height: 1.65; }
.print-time-summary { margin: 1rem 0; padding: 1rem .5rem; border-block: 1px solid rgba(212,104,10,.3); }
.print-time-label { font-size: 1rem; font-weight: 600; color: var(--c-text); }
.print-time-value { margin: .35rem 0; font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 700; line-height: 1.5; color: var(--c-text); overflow-wrap: anywhere; }
.print-time-support { font-size: .9375rem; line-height: 1.6; color: #9debc5; }
.print-time-note { margin-top: .6rem; font-size: .9375rem; line-height: 1.6; color: #fbbf24; }
.slice-status {
  margin: 0 1.75rem 1rem;
  font-size: .9375rem;
  color: var(--c-text3);
}
.slice-status[data-state="running"] { color: var(--c-orange); }
.slice-status[data-state="done"] { color: #4ade80; }
.slice-status[data-state="failed"] { color: #fbbf24; }
.slice-progress { margin: 0 1.75rem 1rem; padding: .85rem 1rem; border: 1px solid var(--c-border); border-radius: 12px; }
.slice-progress-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; font-size: .9375rem; color: var(--c-text); }
.slice-progress-heading strong { flex-shrink: 0; font-variant-numeric: tabular-nums; color: var(--c-orange); }
.slice-progress progress { display: block; width: 100%; height: 10px; margin-top: .65rem; border: 0; border-radius: 10px; accent-color: var(--c-orange); overflow: hidden; }
.slice-progress progress[value] { appearance: none; }
.slice-progress progress::-webkit-progress-bar { background: var(--c-bg); border-radius: 10px; }
.slice-progress progress::-webkit-progress-value { background: var(--c-orange); border-radius: 10px; transition: width .25s ease; }
.slice-progress progress::-moz-progress-bar { background: var(--c-orange); border-radius: 10px; }
.slice-progress[data-state="done"] strong { color: #4ade80; }
.slice-progress[data-state="done"] progress { accent-color: #4ade80; }
.slice-progress[data-state="done"] progress::-webkit-progress-value { background: #4ade80; }
.slice-progress[data-state="done"] progress::-moz-progress-bar { background: #4ade80; }
@media (prefers-reduced-motion: reduce) { .slice-progress progress::-webkit-progress-value { transition: none; } }
#retrySliceBtn { margin: 0 1.75rem 1rem; }

/* ตัวดูชิ้นงาน 3D ของลูกค้า (js/model-preview.js) */
.model-preview {
  position: relative;
  height: 320px;
  margin-top: 14px;
  border: 1px solid rgba(212,104,10,0.25);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, rgba(212,104,10,0.08), rgba(8,8,8,0.92));
  cursor: grab;
  touch-action: none;
}
.model-preview[hidden] { display: none; }
.support-preview-note { margin: .65rem 0; font-size: .9375rem; line-height: 1.6; color: #9debc5; }
.support-preview-toggle[aria-pressed="true"] { border-color: #66d6a0; color: #9debc5; }
.support-preview-toggle:disabled { opacity: .55; cursor: default; }
.model-preview:active { cursor: grabbing; }
.model-preview canvas { display: block; width: 100% !important; height: 100% !important; }
.preview-tools {
  position: absolute;
  top: 10px; left: 10px; right: 10px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.preview-btn {
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--c-text, #ededeb);
  background: rgba(20,22,26,0.82);
  border: 1px solid rgba(212,104,10,0.45);
  padding: 7px 11px;
  border-radius: 9px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.2s, border-color 0.2s;
}
.preview-btn:hover, .preview-btn:focus-visible { background: var(--c-orange); border-color: var(--c-orange); color: #fff; }
.preview-btn:disabled { opacity: .5; cursor: default; }
#pvFace[aria-pressed="true"] { border-color: #73e9ba; color: #baffdd; background: #17583d; }
.model-preview.picking-face, .model-preview.picking-face:active { cursor: crosshair; }
.model-preview.picking-face { height: 400px; }
.face-pick-note { margin: .65rem 0; font-size: .875rem; line-height: 1.7; color: var(--c-text2); }
.preview-hint {
  position: absolute;
  left: 10px; bottom: 10px;
  z-index: 2;
  font-size: 0.72rem;
  color: var(--c-text3);
  background: rgba(0,0,0,0.5);
  padding: 4px 9px;
  border-radius: 20px;
  pointer-events: none;
}
.model-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.model-list[hidden] { display: none; }
.model-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  font-size: 0.75rem;
  background: var(--c-card);
  border: 1px solid var(--c-border2);
  border-radius: 999px;
  padding: 3px 4px 3px 10px;
}
.model-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.model-chip button { border: 0; background: transparent; color: var(--c-text3); cursor: pointer; font-size: 1rem; line-height: 1; padding: 2px 6px; border-radius: 999px; }
.model-chip button:hover, .model-chip button:focus-visible { color: #fff; background: rgba(212,104,10,0.6); }
.model-copies { display: inline-flex; align-items: center; gap: 2px; padding-left: 4px; border-left: 1px solid var(--c-border2); }
.model-copies output { min-width: 2.2em; text-align: center; font-variant-numeric: tabular-nums; color: var(--c-text); }
.model-chip .model-copies button { font-size: .95rem; padding: 4px 7px; }
.model-chip button:disabled { opacity: .35; cursor: default; background: transparent; }
.model-add { border-style: dashed; padding: 0; }
.model-add label { cursor: pointer; padding: 4px 12px; color: var(--c-orange); font-weight: 600; }
.model-add:hover, .model-add:focus-within { border-color: var(--c-orange); }
.fit-banner {
  margin: 1rem 1.75rem 0;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
}
.fit-banner[hidden] { display: none; }
.fit-banner[data-state="ok"] { color: #4ade80; background: rgba(74,222,128,0.08); border-color: rgba(74,222,128,0.35); }
.fit-banner[data-state="warn"] { color: #fbbf24; background: rgba(251,191,36,0.08); border-color: rgba(251,191,36,0.35); }
.fit-banner[data-state="bad"] { color: #f87171; background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.35); }
@media (max-width: 640px) {
  .model-preview { height: 260px; }
  .preview-btn { font-size: 0.7rem; padding: 6px 9px; }
}

.result-actions {
  padding: 0 1.75rem 1.75rem;
  display: flex;
  gap: 0.75rem;
}


/* ============ SERVICES ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.service-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  cursor: default;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--c-orange), var(--c-orange-lt));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.service-card:hover {
  border-color: rgba(212,104,10,0.3);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}
.service-card:hover::before { transform: scaleX(1); }

.svc-icon {
  width: 52px; height: 52px;
  background: var(--c-orange-dim);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}
.svc-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.svc-desc { color: var(--c-text2); font-size: 0.88rem; line-height: 1.65; }
.svc-price {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--c-orange);
  border-top: 1px solid var(--c-border);
  padding-top: 1rem;
}

.project-showcase {
  margin-top: 5rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--c-border2);
  border-radius: var(--r-2xl);
  background:
    radial-gradient(circle at 90% 0%, rgba(212,104,10,.16), transparent 32%),
    var(--c-card);
}
.showcase-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 2.25rem;
  overflow: hidden;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  background: var(--c-border);
}
.project-card {
  min-height: 250px;
  padding: 1.5rem;
  background: var(--c-bg2);
  display: flex;
  flex-direction: column;
  transition: background .25s, transform .25s;
}
.project-card:hover { background: var(--c-card2); }
.project-num {
  font-family: var(--font-mono);
  color: var(--c-text3);
  font-size: .7rem;
  letter-spacing: .12em;
}
.project-icon { font-size: 2rem; margin: 1.2rem 0 .8rem; }
.project-card h3 { font-family: var(--font-heading); font-size: 1.35rem; }
.project-card p { color: var(--c-text2); font-size: .82rem; line-height: 1.6; margin: .5rem 0 1.25rem; }
.project-card button, .project-card > a {
  margin-top: auto;
  width: fit-content;
  background: none;
  color: var(--c-orange-lt);
  font-weight: 700;
  font-size: .8rem;
}
.project-card button:hover, .project-card > a:hover { color: var(--c-text); }


/* ============ MATERIALS ============ */
.materials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}
.mat-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  text-align: center;
  transition: all 0.25s;
}
.mat-card:hover {
  border-color: rgba(212,104,10,0.3);
  transform: translateY(-3px);
}
.mat-swatch {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.08);
  margin: 0 auto 10px;
}
.mat-name { font-weight: 700; font-size: 0.9rem; margin-bottom: 3px; }
.mat-info { font-size: 0.75rem; color: var(--c-text3); }
.mat-badge {
  display: inline-block;
  margin-top: 8px;
  background: var(--c-orange-dim);
  color: var(--c-orange);
  font-size: 0.65rem;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: 100px;
  letter-spacing: 0.06em;
}


/* ============ HOW IT WORKS ============ */
#how { background: var(--c-bg2); }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--c-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-top: 3rem;
  border: 1px solid var(--c-border);
}
.step-card {
  background: var(--c-card);
  padding: 2.5rem 2rem;
  position: relative;
  transition: background 0.3s;
}
.step-card:hover { background: var(--c-card2); }
.step-num {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 900;
  color: var(--c-border2);
  line-height: 1;
  margin-bottom: 1.25rem;
  transition: color 0.3s;
}
.step-card:hover .step-num { color: rgba(212,104,10,0.25); }
.step-card h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.step-card p { color: var(--c-text2); font-size: 0.88rem; line-height: 1.6; }

/* Machine spec */
.machine-spec {
  margin-top: 3rem;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-2xl);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}
.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.spec-item strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--c-orange);
  line-height: 1;
  margin-bottom: 4px;
}
.spec-item span { font-size: 0.75rem; color: var(--c-text3); font-family: var(--font-mono); letter-spacing: 0.06em; }
.spec-logo-wrap img { height: 60px; opacity: 0.7; filter: grayscale(1) brightness(2); }


/* ============ FAQ ============ */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
  align-items: start;
}
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color 0.25s;
}
.faq-item.open { border-color: rgba(212,104,10,0.3); }
.faq-q {
  width: 100%;
  border: 0;
  background: none;
  color: var(--c-text);
  text-align: left;
  padding: 1.1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  user-select: none;
  transition: color 0.2s;
}
.faq-q:hover { color: var(--c-orange); }
.faq-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--c-border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--c-text2);
  transition: all 0.3s;
  font-style: normal;
}
.faq-item.open .faq-icon {
  background: var(--c-orange);
  border-color: var(--c-orange);
  color: #fff;
  transform: rotate(45deg);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-a.open, .faq-item.open .faq-a { max-height: 300px; }
.faq-a-inner {
  padding: 0 1.25rem 1.1rem;
  color: var(--c-text2);
  font-size: 0.88rem;
  line-height: 1.7;
  border-top: 1px solid var(--c-border);
}

.faq-cta-card {
  background: var(--c-orange-dim);
  border: 1px solid rgba(212,104,10,0.2);
  border-radius: var(--r-xl);
  padding: 2.5rem 2rem;
  text-align: center;
  height: fit-content;
}
.faq-cta-card .big-icon { font-size: 3rem; margin-bottom: 1rem; }
.faq-cta-card h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.faq-cta-card p { color: var(--c-text2); font-size: 0.88rem; margin-bottom: 1.5rem; line-height: 1.6; }


/* ============ CONTACT ============ */
#contact { background: var(--c-bg2); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3.5rem;
  margin-top: 3rem;
  align-items: start;
}

.contact-channels { display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }
.line-contact-card { display: flex; align-items: center; gap: 1.25rem; padding: 1.25rem; background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--r-lg); }
.line-contact-card > a { flex: 0 0 160px; }
.line-contact-qr { display: block; width: 160px; height: auto; background: white; border-radius: 8px; }
.line-contact-details { min-width: 0; }
.line-contact-details strong, .line-contact-details > span { display: block; }
.line-contact-details > span { color: var(--c-text2); margin-top: .3rem; }
.line-contact-details p { color: var(--c-text2); font-size: .85rem; line-height: 1.7; margin: .6rem 0 1rem; }
@media (max-width: 480px) {
  .line-contact-card { flex-direction: column; text-align: center; }
  .line-contact-card > a { flex-basis: auto; }
  .line-contact-details > a { display: inline-block; }
}
.channel {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1rem 1.25rem;
  transition: all 0.25s;
  text-decoration: none;
  color: inherit;
}
.channel:hover { border-color: rgba(212,104,10,0.3); transform: translateX(4px); }
.ch-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.ch-text strong { display: block; font-size: 0.88rem; margin-bottom: 2px; }
.ch-text span { font-size: 0.8rem; color: var(--c-text2); }

.contact-form-box {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-2xl);
  padding: 2.5rem;
}
.form-grid { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-label {
  display: block;
  margin-bottom: .4rem;
  color: var(--c-text2);
  font-size: .78rem;
  font-weight: 700;
}
.config-note {
  color: #E4A467;
  font-size: .76rem;
  line-height: 1.5;
  text-align: center;
  margin-top: .75rem;
}

.inp {
  width: 100%;
  background: var(--c-bg3);
  border: 1px solid var(--c-border2);
  color: var(--c-text);
  padding: 11px 14px;
  border-radius: var(--r-md);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.inp:focus {
  border-color: var(--c-orange);
  box-shadow: 0 0 0 3px rgba(212,104,10,0.12);
}
.inp::placeholder { color: var(--c-text3); }
textarea.inp { resize: vertical; min-height: 110px; }


/* ============ FOOTER ============ */
footer {
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
  padding: 4rem 0 2rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--c-border);
}

.footer-brand .logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}
.footer-brand .logo-row img { height: 48px; width: auto; object-fit: contain; }
.footer-brand p {
  font-size: 0.85rem;
  color: var(--c-text2);
  line-height: 1.65;
  max-width: 260px;
}
.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 1.25rem;
}
.social-btn {
  width: 36px; height: 36px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
}
.social-btn:hover { background: var(--c-orange-dim); border-color: var(--c-orange); }

.footer-col h4 {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  color: var(--c-text3);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: var(--c-text2);
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--c-orange); }

.footer-bottom {
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p { font-size: 0.78rem; color: var(--c-text3); }
.footer-bottom .tech { font-family: var(--font-mono); font-size: 0.72rem; color: var(--c-orange); }


/* ============ SCROLL REVEAL ============ */
.reveal { opacity: 1; transform: none; }
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-ready .reveal.up { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }


/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: 2rem; right: 2rem;
  background: var(--c-card2);
  border: 1px solid var(--c-border2);
  border-radius: var(--r-lg);
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  max-width: 320px;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.35s ease;
  box-shadow: var(--shadow);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: rgba(212,104,10,0.4); }


/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; gap: 3rem; padding: 4rem 0; }
  .hero-visual { order: -1; }
  .hero-logo-img { width: 220px; height: 220px; }
  .hero-logo-ring { width: 300px; height: 300px; }
  .hero-logo-ring2 { width: 250px; height: 250px; }
  .hero-text { text-align: center; }
  .hero-desc, .lead { max-width: 100%; }
  .hero-btns { justify-content: center; }
  .hero-stats { justify-content: center; }

  .steps-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .machine-spec { grid-template-columns: 1fr; text-align: center; }
  .spec-grid { justify-items: center; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  #home { min-height: auto; }
  .hero-content { padding: 1.5rem 0 2.5rem; gap: 1.25rem; }
  .hero-logo-img { width: 110px; height: 125px; }
  .hero-logo-ring, .hero-logo-ring2 { display: none; }
  .hero-h1 { font-size: 2.5rem; line-height: 1.1; }
  .hero-desc { font-size: 1rem; margin-bottom: 1.25rem; }
  .hero-btns { gap: .75rem; }
  .hero-btns .btn { width: 100%; max-width: 360px; font-size: 1rem; padding: .85rem 1rem; }
  .hero-stats { margin-top: 1.5rem; padding-top: 1rem; gap: 1rem; }
  .price-box { margin: 1rem; padding: 1.25rem 1rem; }
  .result-actions { padding: 0 1rem 1.25rem; flex-wrap: wrap; }
  .result-actions .btn { min-height: 44px; }
  .quote-highlights .data-row { padding-inline: 1rem; }
  .support-summary { margin-inline: 1rem; }
  section { padding: 4rem 0; }
  .wrap { padding: 0 1.25rem; }
  .nav-links, .nav-actions { display: none; }
  .nav-burger { display: flex; }
  .estimate-layout { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .showcase-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  .hero-h1 { font-size: 2.5rem; }
  .hero-stats { flex-wrap: wrap; gap: 1.5rem; }
  .hero-logo-ring, .hero-logo-ring2 { display: none; }
  .project-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


/* ============ LIVE COUNTERS ============ */
.live-stats {
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg2);
  padding: 2.5rem 0;
}
.live-stats-inner { display: grid; gap: 1.25rem; }
.live-stats-tag { margin-bottom: 0; }
.live-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}
.live-stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--c-orange);
  /* ตัวเลขนับขึ้นแล้วความกว้างต้องไม่กระตุก */
  font-variant-numeric: tabular-nums;
}
.live-stat span {
  font-size: 0.78rem;
  color: var(--c-text2);
  letter-spacing: 0.02em;
}

@media (max-width: 560px) {
  .live-stats { padding: 2rem 0; }
  .live-stats-grid { gap: 1rem 0.75rem; }
  .live-stat strong { font-size: 1.6rem; }
  .live-stat span { font-size: 0.7rem; }
}
.reference-designs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
.reference-design { display: grid; gap: 10px; padding: 25px 28px; border: 1px solid #685438; border-radius: 14px; background: linear-gradient(120deg, #342c23, #202225); color: #f4e7d0; text-decoration: none; transition: border-color .2s, transform .2s; }
.reference-design > span { font-size: 12px; color: #c9ae80; }
.reference-design > strong { font-size: clamp(19px, 2vw, 26px); font-weight: 600; }
.reference-design strong b { float: right; font-weight: 400; }
.reference-design small { color: #b9b5aa; line-height: 1.7; }
.fullcolor-design { border-color: #3a6467; background: linear-gradient(120deg, #23383b, #242633); }
.fullcolor-design > span { color: #97d6ce; }
.reference-design:hover, .reference-design:focus-visible { border-color: #edbd78; transform: translateY(-2px); }
@media (max-width: 600px) { .reference-designs { grid-template-columns: 1fr; } .reference-design { padding: 22px; } }

/* ราคาขั้นต่ำต่อออเดอร์ ใต้หัวข้อประเมินราคา */
.estimate-minimum { margin: .75rem auto 0; text-align: center; color: var(--c-text2, #b9b9b9); font-size: .95rem; }
.estimate-minimum strong { color: var(--c-orange, #f47c12); font-size: 1.1rem; }

/* ปุ่มออกจากระบบข้างชื่อสมาชิก */
.member-signout[hidden], [data-member-signout][hidden] { display: none !important; }
#mobile-menu [data-member-signout] { display: block; width: 100%; padding: 14px 0; color: inherit; background: none; border: 0; border-bottom: 1px solid var(--c-border, #e5e0d8); font: inherit; text-align: left; cursor: pointer; }
/* ช่องล่อบอทในฟอร์มติดต่อ คนมองไม่เห็น */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.delivery-choice { margin: 1rem 0; }
.delivery-choice .inp { width: 100%; }
.delivery-choice .config-note { margin-top: .65rem; }
