/* ============================================================
   PowerTeam — Pre-launch Countdown Website
   ธีมสีจากโลโก้: ทอง (Gold) / น้ำเงินเข้ม (Navy) / แดง (Red)
   Responsive: Mobile-first → Mobile · Tablet · PC
   ============================================================ */

/* ---------- Reset & Design Tokens ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* สีแบรนด์ */
  --gold: #ffc72c;
  --gold-2: #f7a823;
  --gold-deep: #b97e0a;
  --navy: #12355b;
  --navy-deep: #0a1f44;
  --blue: #2f6fe4;
  --red: #d42027;
  --ink: #eef3ff;
  --ink-dim: #a9b8d8;
  --bg-0: #040b1c;
  --bg-1: #0a1a38;

  --card-glass: linear-gradient(165deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
  --card-border: rgba(255, 199, 44, 0.28);
  --radius: 18px;
  --shadow-gold: 0 10px 40px -8px rgba(255, 199, 44, 0.35);

  --font-head: 'Kanit', system-ui, -apple-system, sans-serif;
  --font-body: 'Sarabun', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(47, 111, 228, 0.25), transparent 60%),
    radial-gradient(1000px 520px at -10% 15%, rgba(212, 32, 39, 0.18), transparent 55%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0) 55%);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background: var(--gold);
  color: #1a1206;
}

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

a {
  color: inherit;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- พื้นหลังเคลื่อนไหว ---------- */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  animation: float 14s ease-in-out infinite alternate;
}

.orb-1 {
  width: 44vmax;
  height: 44vmax;
  left: -14vmax;
  top: -16vmax;
  background: radial-gradient(circle at 35% 35%, rgba(255, 199, 44, 0.5), transparent 62%);
}

.orb-2 {
  width: 38vmax;
  height: 38vmax;
  right: -12vmax;
  top: 24%;
  background: radial-gradient(circle at 60% 40%, rgba(47, 111, 228, 0.55), transparent 62%);
  animation-delay: -5s;
}

.orb-3 {
  width: 34vmax;
  height: 34vmax;
  left: 22%;
  bottom: -18vmax;
  background: radial-gradient(circle at 50% 45%, rgba(212, 32, 39, 0.4), transparent 60%);
  animation-delay: -9s;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 75%);
}

@keyframes float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4vmax, 3vmax, 0) scale(1.12); }
}

/* ---------- โครงหน้า ---------- */
.page {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding: clamp(28px, 6vw, 72px) clamp(18px, 4.5vw, 44px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(40px, 7vw, 84px);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.brand    { animation: rise 0.7s ease both; }
.hero     { animation: rise 0.7s 0.15s ease both; }
.pillars  { animation: rise 0.7s 0.3s ease both; }
.connect  { animation: rise 0.7s 0.45s ease both; }

/* ---------- ส่วนแบรนด์ ---------- */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.logo-ring {
  position: relative;
  width: min(176px, 42vw);
  aspect-ratio: 1;
  border-radius: 50%;
}

.logo-ring::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--gold), var(--red) 30%, var(--blue) 62%, var(--gold));
  animation: spin 9s linear infinite;
}

.logo-ring::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  box-shadow: 0 0 60px rgba(255, 199, 44, 0.35), inset 0 0 24px rgba(255, 199, 44, 0.18);
  pointer-events: none;
}

.logo-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid #071228;
  background: #071228;
}

@keyframes spin {
  to { transform: rotate(1turn); }
}

.brand-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  letter-spacing: 0.06em;
  line-height: 1.05;
}

.brand-name .gold {
  background: linear-gradient(180deg, #fff3c4, var(--gold) 45%, var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 10px rgba(255, 199, 44, 0.35));
}

.brand-name .red {
  background: linear-gradient(180deg, #ff8a8a, var(--red) 55%, #8e1116);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 10px rgba(212, 32, 39, 0.35));
}

.tagline {
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: clamp(0.62rem, 2.4vw, 0.85rem);
  color: var(--ink-dim);
  display: flex;
  align-items: center;
  gap: 0.9em;
}

.tagline::before,
.tagline::after {
  content: "";
  height: 1px;
  width: clamp(28px, 8vw, 64px);
}

.tagline::before { background: linear-gradient(90deg, transparent, var(--gold)); }
.tagline::after  { background: linear-gradient(90deg, var(--gold), transparent); }

/* ---------- ส่วนนับถอยหลัง ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.5vw, 22px);
}

.coming-soon {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(0.8rem, 2.6vw, 0.95rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(255, 199, 44, 0.4);
  border-radius: 999px;
  padding: 0.55em 1.4em;
  background: rgba(255, 199, 44, 0.08);
  animation: glow 2.6s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 199, 44, 0.25); }
  50%      { box-shadow: 0 0 26px 2px rgba(255, 199, 44, 0.3); }
}

.headline {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.7rem, 5.6vw, 3.1rem);
  line-height: 1.25;
}

.headline .highlight {
  background: linear-gradient(90deg, var(--gold), #ffe9a3, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sub {
  font-size: clamp(1rem, 3.4vw, 1.2rem);
  color: var(--ink-dim);
  max-width: 36ch;
}

.sub .usdc {
  color: var(--gold);
  font-family: var(--font-head);
  font-weight: 700;
}

/* --- การ์ดเวลา --- */
.countdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 2.5vw, 18px);
  width: min(560px, 100%);
  margin-top: clamp(6px, 1.5vw, 12px);
}

.time-card {
  position: relative;
  border-radius: var(--radius);
  background: var(--card-glass);
  border: 1px solid var(--card-border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: clamp(14px, 3.5vw, 24px) 8px clamp(10px, 2.5vw, 16px);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.time-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.85;
}

.time-value {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.1rem, 9vw, 4rem);
  line-height: 1.1;
  background: linear-gradient(180deg, #fff6d8 8%, var(--gold) 52%, var(--gold-2) 78%, var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 14px rgba(255, 199, 44, 0.28));
}

.time-label {
  display: block;
  margin-top: 4px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(0.72rem, 2.8vw, 0.9rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.time-value.tick {
  animation: tick 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
}

@keyframes tick {
  0%   { transform: translateY(-14%) scale(0.92); opacity: 0.25; filter: blur(2px); }
  60%  { transform: translateY(3%) scale(1.03); opacity: 1; filter: blur(0); }
  100% { transform: translateY(0) scale(1); }
}

/* --- วันเปิดตัว + สถานะเปิดตัวแล้ว --- */
.launch-date {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(0.85rem, 3vw, 1rem);
  color: var(--ink-dim);
}

.launch-date strong {
  color: var(--gold);
  font-weight: 600;
}

.noscript-note {
  color: var(--gold);
  font-size: 0.85rem;
}

.launched-message {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.launched-message.show {
  display: flex;
}

.is-launched .countdown {
  display: none;
}

.launched-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  color: var(--gold);
}

.launched-sub {
  color: var(--ink-dim);
  margin-bottom: 8px;
}


/* ---------- หัวข้อร่วม ---------- */
.section-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.25rem, 4vw, 1.7rem);
  display: flex;
  align-items: center;
  gap: 0.6em;
  justify-content: center;
  width: 100%;
}

.section-title .bar {
  width: clamp(22px, 5vw, 34px);
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), var(--red));
  flex: none;
}

/* ---------- จุดเด่น 4 เสาหลัก ---------- */
.pillars {
  width: 100%;
  max-width: 980px;
}

.pillars-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 2.6vw, 20px);
  margin-top: clamp(16px, 3vw, 26px);
}

.pillar {
  border-radius: var(--radius);
  background: var(--card-glass);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: clamp(18px, 4vw, 28px) clamp(14px, 3vw, 22px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.pillar:hover {
  transform: translateY(-6px);
  border-color: var(--card-border);
  box-shadow: var(--shadow-gold);
}

.pillar-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: linear-gradient(160deg, rgba(255, 199, 44, 0.16), rgba(255, 199, 44, 0.04));
  border: 1px solid rgba(255, 199, 44, 0.35);
  flex: none;
}

.pillar-icon svg {
  width: 28px;
  height: 28px;
}

.pillar h3 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1rem, 3vw, 1.12rem);
  color: #fff;
  line-height: 1.4;
}

.pillar p {
  font-size: clamp(0.85rem, 2.6vw, 0.95rem);
  color: var(--ink-dim);
}

/* ---------- ติดตาม / ติดต่อ ---------- */
.connect {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.connect-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(420px, 100%);
  margin-top: clamp(16px, 3vw, 26px);
}

.btn {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(0.95rem, 3vw, 1.05rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.95em 1.6em;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(135deg, #ffe08a, var(--gold) 45%, var(--gold-2));
  color: #241703;
  box-shadow: 0 14px 34px -12px rgba(255, 199, 44, 0.55);
}

.btn-gold:hover {
  box-shadow: 0 20px 44px -12px rgba(255, 199, 44, 0.7);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ---------- Footer ---------- */
.footer {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 18px;
}

.footer p {
  font-size: 0.82rem;
  color: #7e8db0;
}

.footer .dot {
  margin: 0 0.5em;
  color: var(--gold);
}

/* ============================================================
   Responsive Breakpoints
   ============================================================ */

/* --- มือถือใหญ่ / มือถือแนวนอน (~520px+) --- */
@media (min-width: 520px) {
  .countdown {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .pillars-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .connect-actions {
    flex-direction: row;
    justify-content: center;
  }

  .connect-actions .btn {
    flex: 0 1 auto;
  }
}

/* --- แท็บเล็ต (~768px+) --- */
@media (min-width: 768px) {
  .logo-ring {
    width: min(196px, 30vw);
  }
}

/* --- PC / Desktop (~1000px+) --- */
@media (min-width: 1000px) {
  .pillars-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .pillar {
    text-align: center;
  }
}

/* --- จอเล็กมาก (<360px) --- */
@media (max-width: 359px) {
  .countdown {
    gap: 8px;
  }

  .time-label {
    letter-spacing: 0.08em;
  }
}

/* --- เคารพการตั้งค่าลด motion ของผู้ใช้ --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

