/* ==========================================================
   BSKLAB — Design refresh (overrides only)
   Loaded last in <head>. Changes look & readability only:
   no ids, data attributes, API URLs or JS behaviour touched.
   ========================================================== */

:root{
  /* Brighter secondary text for readability on dark navy (WCAG AA) */
  --text-dim:#a3acc2;
  --surface:linear-gradient(160deg,rgba(20,28,52,.72),rgba(9,13,27,.72));
  --ring:0 0 0 3px rgba(107,145,255,.45);
}

body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}

/* ---------- Page scene: dark galaxy ----------
   Near-black base, very faint cool nebula, a dim Milky Way band and
   a sparse star field. Everything drifts slowly (stars pan, band
   breathes, bright stars twinkle). Motion stops for users who set
   "reduce motion". Nothing glows behind the phone. */
:root{--bg:#020205}
body{
  /* one very faint violet haze top-left only; right side kept pure
     black so nothing reads as light beside the phone */
  background:
    radial-gradient(40% 35% at 8% 12%,rgba(80,60,150,.05),transparent 70%),
    linear-gradient(180deg,#030308 0%,#010103 100%),
    #020205;
  background-attachment:fixed
}
/* star field: two layers panning very slowly (seamless loop) */
body::before{
  content:"";position:fixed;inset:0;z-index:0;pointer-events:none;
  background:
    url("/galaxy-stars-medium.svg") 0 0/760px 760px repeat,
    url("/galaxy-stars-small.svg") 0 0/420px 420px repeat;
  animation:bskStarDrift 240s linear infinite
}
@keyframes bskStarDrift{
  from{background-position:0 0,0 0}
  to{background-position:-1520px 760px,-840px 420px}
}
/* Milky Way band (reuses the page's existing .bg-glow-1 layer) */
.bg-glow{display:block}
.bg-glow-1{
  top:50%;left:50%;width:160vmax;height:30vmax;
  transform:translate(-50%,-50%) rotate(-24deg);
  background:
    radial-gradient(50% 50% at 50% 50%,rgba(120,120,170,.022),transparent 70%),
    radial-gradient(30% 40% at 35% 55%,rgba(100,80,180,.03),transparent 70%);
  filter:blur(22px);
  animation:bskBandDrift 70s ease-in-out infinite alternate
}
@keyframes bskBandDrift{
  from{transform:translate(-50%,-50%) rotate(-24deg) scale(1);opacity:.8}
  to{transform:translate(-48%,-52%) rotate(-20deg) scale(1.06);opacity:1}
}
/* bright twinkling stars (reuses .bg-glow-2) */
.bg-glow-2{
  inset:0;top:0;left:0;bottom:auto;right:auto;width:100%;height:100%;
  background:url("/galaxy-stars-bright.svg") 0 0/1100px 1100px repeat;
  animation:bskTwinkle 7s ease-in-out infinite alternate,bskBrightDrift 300s linear infinite
}
@keyframes bskTwinkle{0%{opacity:.45}50%{opacity:.9}100%{opacity:.6}}
@keyframes bskBrightDrift{from{background-position:0 0}to{background-position:-2200px 1100px}}
@media(prefers-reduced-motion:reduce){body::before,.bg-glow-1,.bg-glow-2{animation:none}}

/* ---------- Global focus ring (keyboard users) ---------- */
a:focus-visible,button:focus-visible,[tabindex]:focus-visible{outline:none;box-shadow:var(--ring);border-radius:12px}

/* ---------- Section labels: were 10px, barely visible ---------- */
.sec-label{font-size:.78rem;letter-spacing:4px;color:#8fb0ff;font-weight:500}
.sec-label::after{background:linear-gradient(90deg,rgba(77,127,255,.45),transparent)}

/* ======================= HERO ======================= */
.hero.hero-promo-layout{padding-top:64px;padding-bottom:40px;position:relative}
.hero-promo-columns{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px}
.hero-promo-layout h1 em{
  background:linear-gradient(90deg,#6b91ff,#9fc0ff 55%,#6b91ff);
  -webkit-background-clip:text;background-clip:text;color:transparent
}
.hero-promo-layout .hero-sub{color:rgba(232,234,240,.86);font-size:clamp(1rem,1.3vw,1.12rem);line-height:1.85}

/* Buttons: one tidy row instead of 2 + orphan */
.hero-promo-layout .hero-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.hero-promo-layout .hero-journal-row{flex-basis:auto;display:contents}
.hero-promo-layout .hero-journal-row .hero-cta{width:auto}
.hero-cta{font-size:.98rem;padding:13px 26px;min-height:48px}
.hero-cta-primary{background:linear-gradient(135deg,#4d7fff,#6b91ff);box-shadow:0 12px 30px rgba(77,127,255,.35)}

/* ===== CLIP SCENE =====
   The clip is a transparent WebM (phone + text only). The page draws
   the clip's background itself, so there is no box or frame.
   Rings + dots use the clip's exact geometry (1080x1920 space),
   pinned to the video so they line up on every screen size.
   Safari can't show WebM transparency, so it gets the original MP4
   (class .is-mp4) and a "screen" blend that hides the MP4's black. */
.hero.hero-promo-layout{z-index:auto;overflow-x:clip}
html{overflow-x:clip}
.hero-promo-frame{
  width:100%;max-width:440px;justify-self:center;position:relative;
  overflow:visible;mix-blend-mode:normal;margin:-70px 0
}
.hero-promo-frame video{position:relative;z-index:1}
.hero-promo-frame.is-mp4 video{
  mix-blend-mode:screen;
  -webkit-mask-image:linear-gradient(to bottom,transparent,#000 4%,#000 94%,transparent),linear-gradient(to right,transparent,#000 5%,#000 95%,transparent);
  -webkit-mask-composite:source-in;
          mask-image:linear-gradient(to bottom,transparent,#000 4%,#000 94%,transparent),linear-gradient(to right,transparent,#000 5%,#000 95%,transparent);
          mask-composite:intersect
}
.hero-promo-frame::after{
  content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1080 1920' fill='none' stroke='rgba(120,150,255,.12)' stroke-width='1.5'%3E%3Cellipse cx='540' cy='1190.4' rx='453.6' ry='307.2' transform='rotate(-12 540 1190.4)'%3E%3CanimateTransform attributeName='transform' type='rotate' from='-12 540 1190.4' to='348 540 1190.4' dur='300s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3Cellipse cx='540' cy='1190.4' rx='324' ry='499.2' transform='rotate(20 540 1190.4)'%3E%3CanimateTransform attributeName='transform' type='rotate' from='20 540 1190.4' to='-340 540 1190.4' dur='400s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3Cg fill='rgba(150,180,255,.5)' stroke='none'%3E%3Ccircle cx='702' cy='1190' r='2'/%3E%3Ccircle cx='246' cy='1475' r='3'/%3E%3Ccircle cx='561' cy='862' r='4'/%3E%3Ccircle cx='687' cy='1378' r='2'/%3E%3Ccircle cx='71' cy='1124' r='3'/%3E%3Ccircle cx='857' cy='957' r='4'/%3E%3Ccircle cx='479' cy='1500' r='2'/%3E%3Ccircle cx='425' cy='995' r='3'/%3E%3Ccircle cx='983' cy='1318' r='4'/%3E%3Ccircle cx='207' cy='1371' r='2'/%3E%3Ccircle cx='637' cy='905' r='3'/%3E%3Ccircle cx='623' cy='1387' r='4'/%3E%3Ccircle cx='129' cy='1007' r='2'/%3E%3Ccircle cx='881' cy='1063' r='3'/%3E%3C/g%3E%3C/svg%3E") center/100% 100% no-repeat
}
.hero-copy{position:relative;z-index:1}

/* Stats: real cards, readable numbers */
.hero-promo-layout .hero-stats{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;
  border-top:0;padding-top:0;margin-top:44px
}
.hero-promo-layout .hstat{
  padding:18px 16px;border-radius:16px;text-align:center;
  background:var(--surface);border:1px solid rgba(126,170,255,.16)
}
.hero-promo-layout .hstat:not(:last-child)::after{display:none}
.hero-promo-layout .hstat .v{font-family:'Bebas Neue',sans-serif;font-size:2.2rem;letter-spacing:1px;line-height:1;color:#fff}
.hero-promo-layout .hstat .l{font-size:.82rem;letter-spacing:.5px;color:var(--text-dim);margin-top:6px;text-transform:none}

/* ===================== PRICING ===================== */
.purchase-kicker{font-size:.8rem;letter-spacing:3px;color:#cfdcff}
.purchase-card{padding:28px 24px 22px}
.purchase-card-label{font-size:.7rem;letter-spacing:2px}
.purchase-card h3{font-size:2.1rem}
.purchase-card .purchase-desc{font-size:.92rem;line-height:1.7;color:rgba(255,255,255,.74)}
.purchase-list{gap:12px}
.purchase-list li{font-size:.9rem;line-height:1.55;color:rgba(255,255,255,.88);padding-left:24px}
.purchase-cta{font-size:.95rem;padding:13px 16px;min-height:48px}
.purchase-note{font-size:.72rem;color:rgba(255,255,255,.55)}
@media(min-width:1051px){
  .purchase-card.featured{transform:translateY(-10px)}
  .purchase-card.featured:hover{transform:translateY(-16px)}
}

/* ================= EXTRA SERVICES ================= */
.secondary-services.extra-services .extra-services__label{font-size:13px;color:#86efac;letter-spacing:3px}
.secondary-services.extra-services .svc__title{font-size:22px}
.secondary-services.extra-services .svc__desc{font-size:15px;line-height:1.6;color:rgba(232,240,236,.82)}
@media(max-width:760px){
  .secondary-services.extra-services .svc__title{font-size:19px}
  .secondary-services.extra-services .svc__desc{font-size:14px}
}

/* ====================== FOOTER ====================== */
footer{font-size:.78rem;letter-spacing:1px;line-height:1.9;padding:32px 20px 40px;color:var(--text-dim)}
footer a{font-weight:500}

/* ====================== MOBILE ====================== */
@media(max-width:760px){
  .hero.hero-promo-layout{padding-top:44px}
  .hero-promo-layout h1{text-align:center;margin-inline:auto}
  .hero.hero-promo-layout::before{width:360px;height:360px;inset:0 -30% auto auto}
  .hero-promo-columns{grid-template-columns:minmax(0,1fr)}
  .hero-promo-layout .hero-sub{font-size:.98rem;text-align:center;margin-inline:auto}
  .hero-promo-layout .hero-actions .hero-cta,
  .hero-promo-layout .hero-journal-row .hero-cta{width:100%;max-width:none}
  .hero-promo-frame{max-width:340px;margin:-40px auto -50px}
  .hero-promo-layout .hero-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:30px}
  .hero-promo-layout .hstat{padding:14px 10px}
  .hero-promo-layout .hstat .v{font-size:1.9rem}
  .hero-promo-layout .hstat .l{font-size:.8rem}
  .purchase-card .purchase-desc{font-size:.9rem}
}

@media(prefers-reduced-motion:reduce){
  .purchase-card.featured,.purchase-card.featured:hover{transform:none}
}

/* Stats row (+82% / 5,000+ / 24/7 / 5) hidden on request.
   Markup kept in index.html so it can be brought back easily. */
.hero-promo-layout .hero-stats{display:none}
.hero.hero-promo-layout{padding-bottom:72px}

/* ---------- Side gutters: content sat 40px from the edge on ~1240px
   screens. Gutter now grows with the screen (24–72px) and every
   container shares it, so nav, hero and sections stay aligned. ---------- */
@media(min-width:761px){
  :root{--gutter:clamp(24px,5.5vw,72px)}
  .hinner,
  .hero.hero-promo-layout,
  .sec,
  .purchase-section,
  .secondary-services.extra-services{
    max-width:calc(1200px + 2 * var(--gutter));
    padding-left:var(--gutter);padding-right:var(--gutter)
  }
}

/* Remove two leftover blue lights from the original theme:
   - body::after  = 135deg blue wash brightening toward the bottom-right
   - .hero::before = round blue glow inside the hero section */
body::after{display:none!important}
.hero::before{display:none!important}

/* Pure black galaxy: no Milky Way band, no haze - stars only. */
.bg-glow-1{display:none!important}
body{background:#020205!important}

/* Rings + dots around the phone removed on request. */
.hero-promo-frame::after{display:none!important}

/* Bigger phone (440 -> 520px desktop, 340 -> 390px mobile). The clip's
   top/bottom are mostly transparent, so pull it in vertically. */
@media(min-width:761px){
  .hero-promo-frame{max-width:520px;margin:-110px 0 -90px}
}
@media(max-width:760px){
  .hero-promo-frame{max-width:min(390px,100%);margin:-50px auto -60px}
}

/* The enlarged clip's transparent top reaches behind the menu bar:
   keep the header above it and never let the video catch clicks. */
header{z-index:20}
.hero-promo-frame,.hero-promo-frame video{pointer-events:none}

/* Pricing area toned down to match the PRODUCTS & SERVICES box
   (.cert-banner: #060912 + faint blue border). Cards sit just a
   hair above the shell so they still read as cards. */
.purchase-shell{
  background:#060912;
  border-color:rgba(77,127,255,.2);
  box-shadow:0 0 40px rgba(77,127,255,.06)
}
.purchase-card{
  background:linear-gradient(155deg,#0a0e1b,#060912);
  border-color:rgba(77,127,255,.16);
  border-top-color:var(--card-accent)
}
.purchase-card.featured{
  background:linear-gradient(155deg,#0a0e1b,#060912) padding-box
}

/* "เลือกแพ็คเกจ" glow centred on the button (was offset 12px down) */
.hero-cta-primary{box-shadow:0 0 26px rgba(77,127,255,.38)}
.hero-cta-primary:hover{box-shadow:0 0 32px rgba(107,145,255,.5)}
