/* ppn-leads /join/ — โทนเมดิเตอร์เรเนียน · mobile-first · 3-state theme */

:root {
  --bg: #F4EEDF;
  --surface: #FDFAF2;
  --soft: #E9DFC8;
  --ink: #2C3A52;
  --ink-soft: #5C6982;
  --line: #D8CCAF;
  --accent: #4D96D2;
  --accent-deep: #33415C;
  --accent-ink: #FFFFFF;
  --ok: #3E8E5E;
  --shadow: 0 1px 3px rgba(51, 65, 92, .10), 0 6px 20px rgba(51, 65, 92, .07);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1A2233;
    --surface: #232E44;
    --soft: #2C3852;
    --ink: #EDE6D6;
    --ink-soft: #A8B0C2;
    --line: #38445E;
    --accent: #6FB0E8;
    --accent-deep: #16406B;
    --accent-ink: #0F1826;
    --ok: #6FBF8F;
    --shadow: 0 1px 3px rgba(0, 0, 0, .35), 0 6px 20px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  --bg: #1A2233;
  --surface: #232E44;
  --soft: #2C3852;
  --ink: #EDE6D6;
  --ink-soft: #A8B0C2;
  --line: #38445E;
  --accent: #6FB0E8;
  --accent-deep: #16406B;
  --accent-ink: #0F1826;
  --ok: #6FBF8F;
  --shadow: 0 1px 3px rgba(0, 0, 0, .35), 0 6px 20px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Sarabun", "Noto Sans Thai", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}
h1, h2, .brand, .btn {
  font-family: "Mitr", "Sarabun", system-ui, sans-serif;
  font-weight: 500;
}
h1 { font-size: 1.55rem; line-height: 1.3; margin: .2rem 0 .4rem; text-wrap: balance; }
h2 { font-size: 1.12rem; margin: 0 0 .35rem; }
a { color: var(--accent); }

main { max-width: 30rem; margin: 0 auto; padding: 0 1.1rem 2rem; }

/* ---- header ---- */
.top {
  max-width: 30rem; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 1.1rem .4rem;
}
.brand {
  display: flex; align-items: center; gap: .5rem;
  color: var(--ink); text-decoration: none; font-size: 1.15rem;
}
.brand svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; }
.lang { display: flex; gap: .25rem; }
.lang button {
  border: 1px solid var(--line); background: transparent; color: var(--ink-soft);
  border-radius: 999px; padding: .5rem .85rem; font: inherit; font-size: .95rem; cursor: pointer; min-height: 44px;
}
.lang button.on { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
:root[data-theme="dark"] .lang button.on { color: var(--ink); }

/* ---- hero รูปจริง ---- */
.hero {
  position: relative; border-radius: 18px; overflow: hidden;
  margin: .7rem 0 .9rem; box-shadow: var(--shadow);
}
.hero img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.hero-tx {
  position: absolute; inset: auto 0 0 0;
  padding: 2.4rem 1.1rem .85rem;
  background: linear-gradient(transparent, rgba(20, 28, 44, .84));
}
.hero-tx h1, .hero-tx .kicker { margin: 0; }
.hero-tx h1 { color: #FFFFFF; font-size: 1.4rem; }
.hero-tx .kicker { color: #BFDCF5; margin-bottom: .15rem; }

.event {
  display: flex; align-items: center; gap: .6rem;
  background: var(--soft); border-radius: 12px; padding: .6rem .8rem;
  margin: 0 0 .6rem; font-size: .9rem; font-weight: 500;
}
.event svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--accent-deep); stroke-width: 1.8; }
:root[data-theme="dark"] .event svg { stroke: var(--accent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .event svg { stroke: var(--accent); }
}

.thumb { flex: none; width: 54px; height: 54px; border-radius: 13px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo { border-radius: 14px; overflow: hidden; margin: .55rem 0 .3rem; }
.photo img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.cap { font-size: .95rem; color: var(--ink-soft); margin: 0 0 .7rem; }

/* ---- หน้าเลือกกลุ่ม ---- */
.kicker {
  margin: 1rem 0 0; font-size: .8rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); font-weight: 700;
}
.sub { color: var(--ink-soft); margin: .1rem 0 1rem; }

.roles { display: flex; flex-direction: column; gap: .7rem; }
.role {
  display: flex; align-items: center; gap: .85rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: .95rem 1rem; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow);
}
.role:active { transform: scale(.985); }
.rtx { flex: 1; display: flex; flex-direction: column; gap: .1rem; }
.rtx b { font-size: 1.05rem; }
.rtx small { color: var(--ink-soft); line-height: 1.45; }
.chev { color: var(--ink-soft); font-size: 1.4rem; line-height: 1; }

.ric {
  flex: none; width: 46px; height: 46px; border-radius: 13px;
  background: var(--soft); display: grid; place-items: center;
}
.ric svg { width: 26px; height: 26px; fill: none; stroke: var(--accent-deep); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="dark"] .ric svg { stroke: var(--accent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ric svg { stroke: var(--accent); }
}
.ric.big { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 1rem; }
.ric.big svg { width: 36px; height: 36px; stroke: var(--ok); }

/* ---- การ์ด ---- */
.view { padding-top: .4rem; }
.back { display: inline-flex; align-items: center; min-height: 44px; margin: .3rem 0; text-decoration: none; color: var(--ink-soft); font-size: 1rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 1rem 1.1rem; margin: 0 0 .8rem; box-shadow: var(--shadow);
}
.card p { margin: .2rem 0 .7rem; color: var(--ink-soft); }

/* ราคายาง */
.price { border-top: 4px solid var(--accent); }
.pr-top { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; font-size: .85rem; color: var(--ink-soft); }
.tag {
  flex: none; font-size: .7rem; color: var(--accent-deep); background: var(--soft);
  border-radius: 999px; padding: .1rem .55rem; font-weight: 700;
}
:root[data-theme="dark"] .tag { color: var(--accent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tag { color: var(--accent); }
}
.pr-num { font-family: "Mitr", sans-serif; font-variant-numeric: tabular-nums; margin: .2rem 0 0; }
.pr-num b { font-size: 2.6rem; font-weight: 600; }
.pr-num span { color: var(--ink-soft); }
.pr-date { font-size: .85rem; color: var(--ink-soft); }

/* ร้านค้า */
.shops { display: flex; flex-direction: column; gap: .7rem; margin-bottom: .8rem; }
.shop { display: flex; gap: .85rem; align-items: center; margin: 0; }
.shop b { display: block; }
.shop small { color: var(--ink-soft); }

.who { margin: .3rem 0 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .35rem; }

/* ---- ฟอร์ม ---- */
.form-card { border-top: 4px solid var(--accent); }
.lead-form { display: flex; flex-direction: column; gap: .75rem; margin-top: .5rem; }
.lead-form label { display: flex; flex-direction: column; gap: .3rem; font-size: 1rem; font-weight: 500; }
.lead-form input, .lead-form select, .lead-form textarea {
  font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: .6rem .7rem;
}
.lead-form :is(input, select, textarea):focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.consent { flex-direction: row !important; align-items: flex-start; gap: .7rem !important; font-weight: 400 !important;
  color: var(--ink); font-size: 1rem !important; line-height: 1.6; padding: .55rem 0; }
.consent input { width: 1.6rem; height: 1.6rem; min-width: 1.6rem; margin: .1rem 0 0; accent-color: var(--accent); flex: none; }
/* พื้นที่กดของ checkbox ให้ถึงนิ้ว (>=44px) โดยไม่ต้องขยายกล่องให้ดูเทอะทะ */
.consent input::before { content: ""; position: absolute; inset: -.7rem; }
.consent input { position: relative; }
.consent a { color: var(--accent); }

.btn {
  display: block; width: 100%; text-align: center; text-decoration: none;
  background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: 12px; padding: .8rem 1rem;
  font-size: 1.05rem; cursor: pointer;
}
.btn:active { transform: scale(.985); }
.btn.line2 { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }

/* ส่งสำเร็จ */
.done { text-align: center; padding: 2.2rem 0 1rem; }
.demo-note { text-align: center; color: var(--ink-soft); font-size: .85rem; margin-top: .6rem; }

/* ---- บริการทั้งหมด ---- */
.allsv { max-width: 30rem; margin: 0 auto; padding: 0 1.1rem 1rem; }
.allsv-toggle {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  background: transparent; border: 0; border-top: 1px solid var(--line);
  padding: .9rem .2rem; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer;
}
.allsv-toggle .chev { transition: transform .18s; }
.allsv-toggle[aria-expanded="true"] .chev { transform: rotate(90deg); }
.allsv-list { display: flex; flex-direction: column; }
.allsv-list[hidden] { display: none; }
.allsv-list a {
  padding: .55rem .2rem; text-decoration: none; color: var(--ink-soft);
  border-bottom: 1px dashed var(--line);
}
.allsv-list a:last-child { border-bottom: 0; }

footer {
  max-width: 30rem; margin: 0 auto; padding: .8rem 1.1rem 2.2rem;
  display: flex; flex-direction: column; gap: .2rem;
  font-size: .8rem; color: var(--ink-soft);
}
footer a { color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ส่งไม่สำเร็จ — ต้องเห็นชัด ห้ามให้เข้าใจผิดว่าส่งแล้ว */
.form-err {
  margin: .2rem 0 .8rem; padding: .8rem .9rem;
  background: #FDECEA; color: #8A1C13; border: 1px solid #F0B4AE; border-radius: 12px;
  font-size: 1rem; line-height: 1.6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .form-err { background: #3A1B18; color: #FFB4A8; border-color: #6B2C25; }
}
:root[data-theme="dark"] .form-err { background: #3A1B18; color: #FFB4A8; border-color: #6B2C25; }

/* เบอร์โทรท้ายหน้า */
.foot-tel { display: inline-flex; align-items: center; min-height: 44px; margin-left: .6rem;
  color: var(--accent); text-decoration: none; font-weight: 600; font-size: 1rem; }
