:root {
  --text: #111318;
  --text-muted: #5f6368;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #f5f8ff;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --ink: #0b1220;
  --ink-soft: #1a2438;
  --shadow: 0 4px 16px rgba(17, 19, 24, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", "Noto Sans Thai", -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  letter-spacing: -0.02em;
}

section[id] {
  scroll-margin-top: 84px;
}

/* Eyebrow label */
.eyebrow {
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.eyebrow.center {
  text-align: center;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.nav-inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.logo-mark {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 800;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  font-size: 1.125rem;
  font-weight: 700;
}

.logo-text em {
  color: var(--text-muted);
  font-weight: 600;
  font-style: normal;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 8px;
  border: none;
  text-decoration: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1.0312rem;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-outline {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Hero */
.hero {
  position: relative;
  padding: 120px 0 130px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 700px;
  background:
    radial-gradient(420px 280px at 15% 20%, rgba(37, 99, 235, 0.12), transparent 70%),
    radial-gradient(360px 260px at 85% 10%, rgba(37, 99, 235, 0.10), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-center {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.25;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* Section headings */
.contact h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 40px;
}

/* Contact */
.contact {
  padding: 100px 0;
}

.contact-card {
  max-width: 440px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 40px 44px;
  text-align: center;
}

.contact-name {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 0.9062rem;
}

.contact-info {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.contact-info-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
}

.contact-info-link:hover {
  color: var(--accent);
}

.contact-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-icon svg {
  width: 18px;
  height: 18px;
}

.contact-icon-line {
  background: #e6faf0;
  color: #06c755;
}

/* Footer */
.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.65);
}

.footer .logo-text {
  color: #fff;
}

.footer .logo-text em {
  color: rgba(255, 255, 255, 0.55);
}

.footer-inner {
  display: flex;
  justify-content: center;
  padding: 40px 0 24px;
}

.copyright {
  border-top: 1px solid var(--ink-soft);
  padding: 20px 0;
  text-align: center;
  font-size: 0.8125rem;
}

/* แจ้งเตือนการเก็บข้อมูลการใช้งาน (privacy notice) */
.privacy-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 -4px 16px rgba(17, 19, 24, 0.15);
}

.privacy-banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 14px 24px;
  flex-wrap: wrap;
  text-align: center;
}

.privacy-banner-inner p {
  font-size: 0.8438rem;
  margin: 0;
}

/* การ์ดวีดีโอ (แสดงต่อจาก hero เฉพาะเมื่อมี video_url) */
.video-card-section {
  padding: 0 0 60px;
}

.video-card-frame {
  position: relative;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(17, 19, 24, 0.16);
  margin: 0 auto;
}

.video-card-frame.portrait {
  max-width: 380px;
  aspect-ratio: 9 / 16;
}

.video-card-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* เนื้อหาเสริม (html_addon จาก config แสดงต่อจากการ์ดวีดีโอ) */
.addon-section {
  padding: 0 0 60px;
}

.addon-content {
  max-width: 720px;
  margin: 0 auto;
}

/* Offer modal (ราคา/ฟีเจอร์ + ปุ่มดำเนินการ เปิดตอนกด "เริ่มใช้งาน!") */
.offer-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.offer-modal.is-open {
  display: flex;
}

.offer-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 32, 0.8);
}

.offer-modal-content {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  padding: 36px 32px;
  box-shadow: 0 24px 60px rgba(17, 19, 24, 0.25);
  text-align: center;
}

.offer-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: none;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.offer-modal-close:hover {
  color: var(--text);
}

.offer-price {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 22px;
}

.offer-features {
  list-style: none;
  text-align: left;
  margin-bottom: 28px;
}

.offer-features li {
  position: relative;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 10px;
}

.offer-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.offer-features:empty {
  display: none;
}

/* Lead-style form fields (ใช้ในฟอร์มขอใบเสนอราคาในตัว offer modal) */
.lead-field {
  margin-bottom: 14px;
  text-align: left;
}

.lead-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.lead-field input,
.lead-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.9062rem;
  color: var(--text);
}

.lead-field input:focus,
.lead-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.lead-field textarea {
  resize: vertical;
}

.lead-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.lead-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  cursor: pointer;
}

.lead-consent input {
  margin-top: 3px;
}

.lead-submit {
  width: 100%;
  text-align: center;
}

.lead-error {
  color: #dc2626;
  font-size: 0.8125rem;
  margin-top: 12px;
}

#offer-ending-view {
  text-align: center;
}

.offer-ending-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.offer-ending-icon.is-success {
  background: #dcfce7;
  color: #16a34a;
}

.offer-ending-icon.is-warning {
  background: #fef3c7;
  color: #b45309;
}

#offer-ending-message {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Responsive */
@media (max-width: 700px) {
  .hero {
    padding: 80px 0 90px;
  }

  .hero h1 {
    font-size: 1.875rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    text-align: center;
  }

  .contact-card {
    padding: 32px 24px;
  }
}
