/* ห้างหุ้นส่วนจำกัด นวัตนิมิต — สไตล์ชีตหลัก
   แนวคิด: ป้ายห้อยสินค้า (hang tag) เป็นองค์ประกอบเด่นของหน้าแรก
   เส้นประแบบรอยเย็บ (running stitch) ใช้เป็นเส้นแบ่ง
   สี: เขียวศิลาดล เขียวเข้ม เหลืองดาวเรือง และชมพูบานเย็น */

:root {
  --celadon: #e3ede6;    /* เขียวศิลาดลอ่อน: พื้นหลังหลัก */
  --paper: #f8fbf9;      /* พื้นสลับ */
  --white: #ffffff;
  --ink: #143f3b;        /* เขียวเข้ม: ตัวหนังสือ */
  --ink-deep: #0c2b28;
  --muted: #47625e;
  --rule: #b9cdc3;
  --marigold: #f2a60c;   /* เหลืองดาวเรือง: ปุ่มและจุดเน้น */
  --fuchsia: #b4235f;    /* ชมพูบานเย็น: ลิงก์และเชือกป้าย */

  --display: "Pridi", "Anuphan", "Noto Serif Thai", "Leelawadee UI", Tahoma, serif;
  --body: "Anuphan", "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;

  --s--1: 0.86rem;
  --s-0: 1rem;
  --s-1: 1.22rem;
  --s-2: 1.5rem;
  --s-3: 1.9rem;
  --s-4: 2.4rem;
  --s-5: 3rem;

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --wrap: 72rem;
  --radius: 10px;
}

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

html { font-size: 106.25%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--celadon);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--s-0);
  line-height: 1.85;
}

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

a { color: var(--fuchsia); text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--fuchsia); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--display); font-weight: 600; line-height: 1.4;
  margin: 0; text-wrap: balance;
}
h1 { font-size: clamp(var(--s-3), 4.2vw, var(--s-5)); line-height: 1.35; }
h2 { font-size: clamp(var(--s-2), 3vw, var(--s-4)); }
h3 { font-size: var(--s-1); }

p { margin: 0 0 1em; max-width: 40em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.6em 1em; z-index: 60; }
.skip:focus { left: 0; }

/* รอยเย็บใต้หัวข้อ */
.stitch { display: block; width: 5.5rem; border-top: 3px dashed var(--marigold); margin-top: 0.9rem; }

/* ---------- ส่วนหัว ---------- */
.site-head { background: var(--white); border-bottom: 2px dashed var(--rule); position: sticky; top: 0; z-index: 30; }
.site-head__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand svg { width: 2.4rem; height: 2.4rem; flex: none; }
.brand__name { display: block; font-family: var(--display); font-weight: 600; font-size: var(--s-2); line-height: 1.15; }
.brand__legal { display: block; font-size: var(--s--1); color: var(--muted); line-height: 1.3; }

.nav ul { list-style: none; display: flex; gap: 0.2rem; }
.nav a {
  display: block; padding: 0.5em 0.85em; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.97rem;
}
.nav a:hover { background: var(--celadon); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }

.nav-toggle {
  display: none; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--white); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 999px; padding: 0.35em 1.1em;
}
@media (max-width: 60rem) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 2px dashed var(--rule); padding: 0.6rem var(--gutter) 1rem; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0.3rem; }
  .nav a { padding: 0.7em 1em; }
}

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-block; font-family: var(--body); font-weight: 600; font-size: 1rem; line-height: 1.4;
  padding: 0.8em 1.5em; border-radius: 999px; cursor: pointer; text-decoration: none;
  background: var(--marigold); color: var(--ink-deep); border: 2px solid var(--marigold);
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--line { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: #fff; }
.band--ink .btn:hover { background: #fff; border-color: #fff; color: var(--ink-deep); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }

/* ---------- แบนเนอร์หน้าแรก + ป้ายห้อยสินค้า ---------- */
.hero { overflow: hidden; padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.hero__media {
  position: relative; height: clamp(20rem, 64vh, 36rem);
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 2px, transparent 2px 12px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.05) 0 2px, transparent 2px 12px),
    var(--ink);
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,43,40,.1) 40%, rgba(12,43,40,.55) 100%); }
.hero__credit { position: absolute; z-index: 1; right: 0.9rem; top: 0.6rem; font-size: 0.72rem; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.hero__credit a { color: inherit; }

.tag-holder {
  position: relative; z-index: 2;
  width: min(100%, 47rem);
  margin-top: clamp(-11rem, -18vw, -5rem);
  filter: drop-shadow(0 10px 18px rgba(12,43,40,.22));
}
.tag-holder::before {              /* เชือกป้าย */
  content: ""; position: absolute; left: 50%; bottom: calc(100% - 1.75rem);
  width: 2px; height: 46rem; background: var(--fuchsia);
  transform: rotate(7deg); transform-origin: bottom center; z-index: 3;
}
.tag {
  background: var(--white);
  padding: 3.6rem clamp(1.3rem, 4vw, 3rem) clamp(1.6rem, 4vw, 2.6rem);
  clip-path: polygon(2.4rem 0, calc(100% - 2.4rem) 0, 100% 2.4rem, 100% 100%, 0 100%, 0 2.4rem);
  position: relative;
}
.tag__eyelet {
  position: absolute; left: 50%; top: 1.1rem; transform: translateX(-50%);
  width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: var(--ink-deep); border: 4px solid var(--marigold);
}
.tag__lead { font-size: var(--s-1); line-height: 1.8; color: var(--muted); margin-top: 1rem; }

/* ---------- แบนเนอร์หน้าใน ---------- */
.page-head { position: relative; overflow: hidden; color: #fff;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 2px, transparent 2px 12px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.05) 0 2px, transparent 2px 12px),
    var(--ink);
}
.page-head img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-head::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,43,40,.93) 0%, rgba(12,43,40,.8) 50%, rgba(12,43,40,.4) 100%); }
.page-head--plain::after { display: none; }
.page-head__body { position: relative; z-index: 1; padding: clamp(2.8rem, 8vw, 5.5rem) 0; }
.page-head__body p { font-size: var(--s-1); line-height: 1.8; margin-top: 1rem; color: #e2ede8; max-width: 36em; }
.page-head__body .stitch { margin-top: 1.1rem; }
.page-head__credit { position: absolute; z-index: 1; right: 0.9rem; bottom: 0.5rem; font-size: 0.72rem; color: #d3e2db; }
.page-head__credit a { color: inherit; }

/* ---------- ส่วนเนื้อหา ---------- */
.band { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.band--paper { background: var(--paper); }
.band--white { background: var(--white); }
.band--ink { background: var(--ink); color: #fff; }
.band--ink p { color: #dbe8e2; }
.band--ink a { color: #fff; }

.band__head { margin-bottom: clamp(1.8rem, 4vw, 3rem); max-width: 44rem; }
.band__head p { margin-top: 1rem; color: var(--muted); font-size: var(--s-1); line-height: 1.8; }
.band--ink .band__head p { color: #dbe8e2; }

.split { display: grid; gap: clamp(1.8rem, 5vw, 4rem); grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; }
.split--top { align-items: start; }
@media (max-width: 54rem) { .split { grid-template-columns: 1fr; } }

/* ---------- ภาพถ่าย ---------- */
.photo { margin: 0; }
.photo__frame {
  aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 2px, transparent 2px 12px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.06) 0 2px, transparent 2px 12px),
    var(--ink);
}
.photo--tall .photo__frame { aspect-ratio: 4 / 5; }
.photo--wide .photo__frame { aspect-ratio: 3 / 2; }
.photo__frame img { width: 100%; height: 100%; object-fit: cover; }
.photo figcaption { font-size: 0.74rem; color: var(--muted); margin-top: 0.4rem; }
.photo figcaption a { color: inherit; }
.band--ink .photo figcaption { color: #b9cdc3; }
img.is-missing { visibility: hidden; }

/* ---------- หมวดสินค้า ---------- */
.goods { list-style: none; display: grid; gap: clamp(1.8rem, 3.5vw, 2.6rem) clamp(1.2rem, 3vw, 2.2rem); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 58rem) { .goods { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 36rem) { .goods { grid-template-columns: 1fr; } }
.goods h3 { margin-top: 0.9rem; font-size: var(--s-2); }
.goods p { margin-top: 0.4rem; color: var(--muted); }

/* ---------- บริการ ---------- */
.works { list-style: none; display: grid; gap: 0 clamp(2rem, 5vw, 4rem); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 50rem) { .works { grid-template-columns: 1fr; } }
.works li { padding: 1.5rem 0; border-top: 2px dashed var(--rule); }
.works p { margin-top: 0.4rem; color: var(--muted); }
.works .more, .more { display: inline-block; margin-top: 0.7rem; font-weight: 600; }

/* ---------- ขั้นตอน ---------- */
.steps { list-style: none; counter-reset: st; display: grid; gap: 1.6rem 1.4rem; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.steps li { counter-increment: st; position: relative; padding-top: 4rem; }
.steps li::before {
  content: counter(st);
  position: absolute; left: 0; top: 0;
  width: 2.9rem; height: 3.2rem; padding-top: 0.5rem;
  display: grid; place-items: center;
  background: var(--marigold); color: var(--ink-deep);
  font-family: var(--display); font-weight: 600; font-size: var(--s-2); line-height: 1;
  clip-path: polygon(0.75rem 0, calc(100% - 0.75rem) 0, 100% 0.75rem, 100% 100%, 0 100%, 0 0.75rem);
}
.steps h3 { color: #fff; }
.steps p { margin-top: 0.4rem; font-size: 0.96rem; line-height: 1.75; }
@media (max-width: 62rem) {
  .steps { grid-template-columns: 1fr; gap: 1.5rem; }
  .steps li { padding: 0.2rem 0 0 4.1rem; min-height: 3.2rem; }
}
.note { margin-top: 2rem; font-size: 0.95rem; color: var(--muted); }
.band--ink .note { color: #b9cdc3; }

/* ---------- กลุ่มลูกค้า ---------- */
.audience { list-style: none; display: grid; gap: 1.6rem 2.2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 2rem; }
@media (max-width: 40rem) { .audience { grid-template-columns: 1fr; } }
.audience li { border-left: 3px dashed var(--marigold); padding-left: 1.1rem; }
.audience p { margin-top: 0.3rem; color: var(--muted); }

/* ---------- รายการแบบหัวข้อ-คำอธิบาย ---------- */
.deflist { margin: 0; }
.deflist div { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 0.4rem 2rem; padding: 1.3rem 0; border-top: 2px dashed var(--rule); }
.deflist div:last-child { border-bottom: 2px dashed var(--rule); }
.deflist dt { font-family: var(--display); font-weight: 600; font-size: var(--s-1); line-height: 1.5; }
.deflist dd { margin: 0; color: var(--muted); max-width: 40em; }
@media (max-width: 46rem) { .deflist div { grid-template-columns: 1fr; } }

.ticks { list-style: none; margin-top: 0.7rem; }
.ticks li { position: relative; padding-left: 1.5rem; margin-top: 0.35rem; max-width: 38em; }
.ticks li::before { content: ""; position: absolute; left: 0.1rem; top: 0.68em; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--marigold); }

/* ---------- รายละเอียดสินค้า (หน้าสินค้าและบริการ) ---------- */
.item { padding: clamp(2.2rem, 5vw, 3.6rem) 0; border-top: 2px dashed var(--rule); }
.item:first-of-type { border-top: 0; padding-top: 0; }
.item:last-of-type { padding-bottom: 0; }
.item h3 { font-size: clamp(var(--s-2), 2.4vw, var(--s-3)); }
.item h4 { font-family: var(--body); font-weight: 600; font-size: var(--s-0); margin: 1.3rem 0 0; }
.item p { margin-top: 0.8rem; }
.item:nth-of-type(even) .split > .photo { order: -1; }
@media (max-width: 54rem) { .item .split > .photo { order: -1; } }

/* ---------- คำถามที่พบบ่อย ---------- */
.faq { max-width: 50rem; }
.faq details { background: var(--white); border-radius: var(--radius); margin-top: 0.7rem; }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  font-family: var(--display); font-weight: 600; font-size: var(--s-1); line-height: 1.5;
  padding: 1rem 3.2rem 1rem 1.3rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%);
  font-family: var(--body); font-size: 1.6rem; font-weight: 500; color: var(--fuchsia); line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 1.3rem 1.2rem; color: var(--muted); }

/* ---------- ช่องติดต่อท้ายหน้า ---------- */
.cta { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(1.8rem, 5vw, 4rem); align-items: center; }
@media (max-width: 54rem) { .cta { grid-template-columns: 1fr; } }
.cta__card { background: var(--ink-deep); border-radius: var(--radius); padding: 1.5rem 1.6rem; border: 2px dashed rgba(255,255,255,.35); }
.cta__card small { display: block; font-size: var(--s--1); color: #b9cdc3; }
.cta__card a { font-family: var(--display); font-weight: 600; font-size: var(--s-1); text-decoration: none; overflow-wrap: anywhere; }
.cta__card a:hover { text-decoration: underline; }
.cta__card p + p { margin-top: 1rem; }

/* ---------- ตารางข้อมูลกิจการ ---------- */
.spec { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; }
.spec th, .spec td { text-align: left; vertical-align: top; padding: 0.9em 1.2em; border-top: 2px dashed var(--rule); }
.spec tr:first-child th, .spec tr:first-child td { border-top: 0; }
.spec th { width: 13rem; font-weight: 500; color: var(--muted); }
.spec td { font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 40rem) {
  .spec th, .spec td { display: block; width: auto; }
  .spec td { border-top: 0; padding-top: 0; }
}

/* ---------- หน้าเนื้อหายาว (นโยบาย) ---------- */
.prose { max-width: 46rem; }
.prose h2 { font-size: var(--s-2); margin-top: 2.6rem; }
.prose h2:first-of-type { margin-top: 1.5rem; }
.prose p, .prose ul { margin-top: 0.9rem; }
.prose ul { padding-left: 1.4rem; }
.prose li { margin-top: 0.35rem; max-width: 38em; }
.prose .meta { color: var(--muted); font-size: 0.95rem; margin-top: 0; }

/* ---------- หน้าติดต่อ ---------- */
.contact-list { margin: 1.8rem 0 0; }
.contact-list div { padding: 1.1rem 0; border-top: 2px dashed var(--rule); }
.contact-list div:last-child { border-bottom: 2px dashed var(--rule); }
.contact-list dt { color: var(--muted); font-size: var(--s--1); }
.contact-list dd { margin: 0.15rem 0 0; font-family: var(--display); font-weight: 600; font-size: var(--s-1); line-height: 1.6; overflow-wrap: anywhere; }
.contact-list dd small { display: block; font-family: var(--body); font-weight: 400; font-size: var(--s--1); color: var(--muted); }

.form { background: var(--white); border-radius: var(--radius); padding: clamp(1.2rem, 3vw, 2rem); }
.form h2 { font-size: var(--s-2); }
.form > p { color: var(--muted); margin-top: 0.6rem; font-size: 0.95rem; }
.field { margin-top: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  padding: 0.65em 0.85em; border: 1.5px solid var(--muted); border-radius: 8px;
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--marigold); outline-offset: 0; border-color: var(--ink); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 34rem) { .field-row { grid-template-columns: 1fr; } }
.form .btn { margin-top: 1.4rem; }
.form__hint { font-size: var(--s--1); color: var(--muted); margin-top: 0.8rem; }

.map { background: var(--white); border-radius: var(--radius); overflow: hidden; }
.map iframe { display: block; width: 100%; height: clamp(18rem, 45vw, 26rem); border: 0; }
.map p { padding: 0.8rem 1.2rem; font-size: 0.95rem; max-width: none; }

/* ---------- ส่วนท้าย ---------- */
.site-foot { background: var(--ink-deep); color: #dbe8e2; padding: clamp(2.5rem, 5vw, 4rem) 0 1.5rem; font-size: 0.95rem; }
.site-foot a { color: #fff; }
.site-foot__grid { display: grid; gap: 2rem 3rem; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 1fr); }
@media (max-width: 54rem) { .site-foot__grid { grid-template-columns: 1fr; } }
.site-foot h2 { font-size: var(--s-1); color: #fff; margin-bottom: 0.7rem; }
.site-foot ul { list-style: none; }
.site-foot li { margin-top: 0.3rem; }
.site-foot address { font-style: normal; overflow-wrap: anywhere; }
.site-foot__base {
  margin-top: 2.5rem; padding-top: 1.2rem; border-top: 2px dashed rgba(255,255,255,.25);
  display: flex; flex-wrap: wrap; gap: 0.4rem 2rem; justify-content: space-between;
  font-size: var(--s--1); color: #b9cdc3;
}
.site-foot__base p { max-width: none; margin: 0; }

/* ---------- การเคลื่อนไหว: ป้ายแกว่งลงมาครั้งเดียวตอนเปิดหน้าแรก ---------- */
@media (prefers-reduced-motion: no-preference) {
  .tag-holder { animation: hang 0.9s cubic-bezier(.2,.8,.3,1) both; transform-origin: 50% -14rem; }
  @keyframes hang {
    0% { opacity: 0; transform: rotate(-3deg) translateY(-12px); }
    60% { opacity: 1; transform: rotate(1.2deg); }
    100% { opacity: 1; transform: none; }
  }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media print {
  .site-head { position: static; }
  .nav, .nav-toggle, .btn-row, .map { display: none; }
}
