/* styles.css (รีดีไซน์ใหม่ทั้งหมด) */

/* =========================
   Theme
========================= */
:root{
  --bg0:#070B14;
  --bg1:#0B1220;
  --card: rgba(255,255,255,.07);
  --card2: rgba(255,255,255,.10);
  --stroke: rgba(255,255,255,.12);

  --text:#EAF0FF;
  --muted: rgba(234,240,255,.72);

  --line:#06C755;
  --primary:#7C5CFF;

  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --shadow2: 0 10px 30px rgba(0,0,0,.35);

  --radius: 18px;
  --radius2: 24px;

  --container: 1140px;

  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 22px;
  --space-5: 28px;
  --space-6: 36px;

  --focus: 0 0 0 4px rgba(124,92,255,.22);
}

/* =========================
   Base / Reset
========================= */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans Thai", "Noto Sans", sans-serif;
  line-height:1.6;
  background:
    radial-gradient(800px 520px at 14% 20%, rgba(124,92,255,.22), transparent 60%),
    radial-gradient(800px 520px at 86% 20%, rgba(6,199,85,.16), transparent 58%),
    radial-gradient(900px 650px at 50% 110%, rgba(255,255,255,.08), transparent 62%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
a:hover{ opacity:.95; }

.container{
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.skip-link{
  position:absolute;
  left:-999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
.skip-link:focus{
  left: 16px;
  top: 16px;
  width:auto;
  height:auto;
  padding: 10px 12px;
  background: rgba(0,0,0,.75);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  z-index: 99999;
}

/* =========================
   Topbar
========================= */
.topbar{
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  background: rgba(8,12,22,.56);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 0;
  gap: 14px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  white-space:nowrap;
}
.brand__dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--line), var(--primary));
  box-shadow: 0 0 0 6px rgba(255,255,255,.06);
}
.brand__name{
  font-weight: 900;
  letter-spacing: .2px;
}
.brand__sub{
  color: rgba(234,240,255,.62);
  font-size: 12px;
  font-weight: 700;
  margin-left: 2px;
}

.topbar__nav{
  display:flex;
  align-items:center;
  gap: 14px;
}
.topbar__nav a{
  color: rgba(234,240,255,.86);
  font-weight: 800;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 12px;
}
.topbar__nav a:hover{
  background: rgba(255,255,255,.06);
}

@media (max-width: 900px){
  .topbar__nav a:not(.btn){ display:none; }
}

/* =========================
   Buttons
========================= */
.btn{
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 900;
  letter-spacing: .2px;
  cursor: pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  transition: transform .12s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  user-select:none;
}
.btn:hover{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.22);
  box-shadow: 0 10px 26px rgba(0,0,0,.25);
}
.btn:active{ transform: translateY(1px); }
.btn:focus{ outline:none; box-shadow: var(--focus); }

.btn--small{ padding: 8px 12px; border-radius: 12px; font-size: 13px; }
.btn--large{ padding: 12px 16px; border-radius: 16px; }
.btn--block{ width: 100%; }

.btn--line{
  background: rgba(6,199,85,.14);
  border-color: rgba(6,199,85,.42);
}
.btn--line:hover{
  background: rgba(6,199,85,.18);
  border-color: rgba(6,199,85,.65);
}

.btn--primary{
  background: rgba(124,92,255,.18);
  border-color: rgba(124,92,255,.48);
}
.btn--primary:hover{
  background: rgba(124,92,255,.22);
  border-color: rgba(124,92,255,.70);
}

.btn--ghost{
  background: transparent;
}

/* =========================
   Hero Layout
========================= */
.hero{
  padding: 44px 0 18px;
}
.hero__inner{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 22px;
  align-items:start;
}
@media (max-width: 980px){
  .hero{ padding: 32px 0 8px; }
  .hero__inner{ grid-template-columns: 1fr; }
}

/* pill badge */
.pill{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(234,240,255,.90);
  font-weight: 900;
  font-size: 13px;
}
.pill__dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--line);
  box-shadow: 0 0 0 6px rgba(6,199,85,.12);
}

.hero__title{
  margin: 14px 0 12px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.7px;
}
.accent{
  background: linear-gradient(135deg, #8B7BFF, #35FF9A);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__desc{
  margin: 0 0 18px;
  color: rgba(234,240,255,.72);
  font-size: 16px;
  max-width: 62ch;
}

.hero__cta{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

/* =========================
   Meta Cards
========================= */
.hero__meta{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 680px){
  .hero__meta{ grid-template-columns: 1fr; }
}

.meta-card{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 22px rgba(0,0,0,.18);
}
.meta-card__k{
  font-weight: 950;
  margin-bottom: 6px;
  letter-spacing: .1px;
}
.meta-card__v{
  color: rgba(234,240,255,.68);
  font-size: 13px;
}

/* =========================
   Card
========================= */
.card{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  border-radius: var(--radius2);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card--glass{
  background: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.06));
}
.card__head{ margin-bottom: 14px; }
.card__title{
  margin: 0;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: .1px;
}
.card__sub{
  margin: 6px 0 0;
  color: rgba(234,240,255,.62);
  font-size: 13px;
  font-weight: 700;
}

/* =========================
   Preview Image Block (ทำให้รูป “สวย”)
========================= */
.preview{
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  box-shadow: var(--shadow2);
}
.preview__img{
  width: 100%;
  height: 340px;              /* ✅ คุมความสูงให้สวย */
  object-fit: cover;          /* ✅ ครอปอัตโนมัติ ไม่ยืด */
  object-position: center;    /* ✅ โฟกัสกลาง */
  display: block;
  filter: saturate(1.05) contrast(1.02);
}
@media (max-width: 980px){
  .preview__img{ height: 280px; }
}
@media (max-width: 520px){
  .preview__img{ height: 220px; }
}
.preview__cap{
  padding: 10px 12px;
  font-size: 12px;
  color: rgba(234,240,255,.72);
  background: rgba(0,0,0,.20);
  border-top: 1px solid rgba(255,255,255,.08);
}
.preview__actions{
  margin-top: 12px;
}
.form__hint{
  margin: 10px 0 0;
  color: rgba(234,240,255,.60);
  font-size: 12px;
}

/* =========================
   Mini Tip
========================= */
.mini{
  margin-top: 12px;
  display:flex;
  gap: 12px;
  align-items:flex-start;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  box-shadow: 0 10px 22px rgba(0,0,0,.16);
}
.mini__icon{ font-size: 18px; }
.mini__text{
  color: rgba(234,240,255,.76);
  font-size: 13px;
  font-weight: 700;
}

/* =========================
   Sections
========================= */
.section{
  padding: 56px 0;
}
.section--alt{
  background: rgba(255,255,255,.03);
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.section__head{
  margin-bottom: 18px;
}
.section__head h2{
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: -.3px;
  font-weight: 950;
}
.section__head p{
  margin: 0;
  color: rgba(234,240,255,.68);
  font-weight: 700;
}

/* =========================
   Grids / Steps
========================= */
.grid{ display:grid; gap: 14px; }
.grid--3{ grid-template-columns: repeat(3, 1fr); }
.grid--2{ grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px){
  .grid--3,.grid--2{ grid-template-columns: 1fr; }
}

.step{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 10px 22px rgba(0,0,0,.16);
}
.step__no{
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  font-weight: 950;
  background: rgba(124,92,255,.18);
  border: 1px solid rgba(124,92,255,.35);
  margin-bottom: 10px;
}
.step h3{
  margin: 0 0 6px;
  font-weight: 950;
}
.step p{
  margin: 0;
  color: rgba(234,240,255,.68);
  font-weight: 700;
}

/* =========================
   Lists / Callout
========================= */
.list{
  margin: 10px 0 0;
  padding-left: 18px;
  color: rgba(234,240,255,.82);
  font-weight: 700;
}
.list li{ margin: 7px 0; }
.muted{ color: rgba(234,240,255,.62); }

.callout{
  margin-top: 14px;
  display:flex;
  gap: 10px;
  align-items:flex-start;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(6,199,85,.28);
  background: rgba(6,199,85,.10);
}
.callout__icon{ font-size: 16px; }
.callout__text{ color: rgba(234,240,255,.84); font-weight: 800; }
.link{
  color: #BFFFE0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================
   FAQ
========================= */
.faq{
  display:grid;
  gap: 10px;
}
.faq__item{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 10px 22px rgba(0,0,0,.14);
}
.faq__item summary{
  cursor:pointer;
  font-weight: 950;
  list-style:none;
}
.faq__item summary::-webkit-details-marker{ display:none; }
.faq__body{
  margin-top: 10px;
  color: rgba(234,240,255,.70);
  font-weight: 700;
}

/* =========================
   Contact
========================= */
.contact{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items:start;
}
@media (max-width: 980px){
  .contact{ grid-template-columns: 1fr; }
}
.contact__cta{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.copybox{
  display:flex;
  gap: 10px;
  align-items:center;
}
.copybox input{
  flex: 1;
  font-size: 13px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  color:#fff;
  outline:none;
}
.copybox input:focus{ box-shadow: var(--focus); border-color: rgba(124,92,255,.6); }

.divider{
  height: 1px;
  background: rgba(255,255,255,.10);
  margin: 14px 0;
}

/* =========================
   Toast
========================= */
.toast{
  margin-top: 12px;
  min-height: 0;
  padding: 0;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, padding .18s ease;
}
.toast.is-show{
  opacity: 1;
  transform: translateY(0);
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.12);
}

/* =========================
   Footer
========================= */
.footer{
  padding: 26px 0 40px;
}
.footer__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.brand--footer .brand__sub{ display:none; }
.footer__right .link{ text-decoration: underline; }

/* =========================
   Floating LINE Button (วงกลมมุมขวาล่าง)
========================= */
.line-float{
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #06C755;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:
    0 10px 30px rgba(6,199,85,.45),
    0 0 0 0 rgba(6,199,85,.55);
  z-index: 9999;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
  animation: linePulse 2.2s infinite;
}
.line-float:hover{
  transform: scale(1.08);
  filter: saturate(1.1);
  box-shadow:
    0 14px 38px rgba(6,199,85,.55),
    0 0 0 0 rgba(6,199,85,.55);
}
.line-float:active{ transform: scale(1.02); }
.line-float:focus{ outline:none; box-shadow: 0 0 0 4px rgba(6,199,85,.22), 0 14px 38px rgba(6,199,85,.55); }

.line-float__icon{
  width: 34px;
  height: 34px;
}

@keyframes linePulse{
  0%{
    box-shadow:
      0 10px 30px rgba(6,199,85,.45),
      0 0 0 0 rgba(6,199,85,.45);
  }
  70%{
    box-shadow:
      0 10px 30px rgba(6,199,85,.45),
      0 0 0 14px rgba(6,199,85,0);
  }
  100%{
    box-shadow:
      0 10px 30px rgba(6,199,85,.45),
      0 0 0 0 rgba(6,199,85,0);
  }
}

@media (max-width: 480px){
  .line-float{
    width: 58px;
    height: 58px;
    right: 16px;
    bottom: 16px;
  }
  .line-float__icon{
    width: 30px;
    height: 30px;
  }
}
