/* =============================================================
   Ragnarok Membership Card 2027 - Landing
   -------------------------------------------------------------
   (Navbar + Footer styles live in gnjoy-nav-footer.css)

   01. Variables
   02. Base
   03. Hero  - layout / logo / text
   04. Hero  - buttons
   05. Hero  - cards
   06. Hero  - cloud bank & porings
   07. Hero  - scroll down cue
   08. Terms - layout & title
   09. Terms - rule cards
   10. Terms - decorations
   11. Floating dock (register + back to top)
   12. Animation - hero intro
   13. Animation - scroll reveal (fade up)
   14. Animation - loops & keyframes
   15. Responsive
   16. Reduced motion
   ============================================================= */


/* =============================================================
   01. Variables
   ============================================================= */
:root {
  --c-navy: #1c2f6e;
  --c-blue: #2557c9;
  --c-text: #2b3a55;
  --c-line: #5aaef5;
  --c-bg: #dcefff;
  --c-yellow-1: #fffdea;
  --c-yellow-2: #fff1a3;
  --c-yellow-line: #f3d45c;

  --nav-h: 56px;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
}


/* =============================================================
   02. Base
   ============================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Kanit", sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  overflow-x: hidden;
}

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

/* decorative layers (clouds, porings, stars) */
.deco {
  position: absolute;
  pointer-events: none;
}

.deco img {
  width: 100%;
}


/* =============================================================
   03. Hero - layout / logo / text
   z-order : wings(1) < mid cloud(2) < blue poring(3) < front clouds(4)
             < fade(5) < pink/green poring(6) < content(7) < scroll cue(8)
   ============================================================= */
.hero {
  position: relative;
  min-height: 1030px;
  padding: 40px 16px 12vw;
  background: url("../images/bg-hero.png") top center / cover no-repeat;
  overflow: hidden; /* clouds fade out inside the hero, never cover .terms */
}

.hero__inner {
  position: relative;
  z-index: 7;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.hero__logo {
  width: 100%;
  margin: 0 auto;
}

.hero__desc {
  margin: 10px auto 0;
  font-family: "Kanit", sans-serif;
  font-weight: 500;
  font-size: clamp(14px, 1.05vw, 18px);
  line-height: 1.6;
  color: var(--c-navy);
  text-shadow: 0 0 8px #fff, 0 0 2px #fff;
}


/* =============================================================
   04. Hero - buttons
   ============================================================= */
.hero__btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 260px;
  height: 52px;
  padding: 0 28px;
  border: 3px solid #fff;
  border-radius: 999px;
  font-family: "Kanit", sans-serif;
  font-weight: 600;
  font-size: 19px;
  color: var(--c-blue);
  text-decoration: none;
  background: linear-gradient(180deg, #ffffff 0%, #eaf5ff 45%, #cfe6ff 100%);
  box-shadow:
    0 0 0 2px #a9d2f7,
    inset 0 -4px 8px rgba(120, 180, 240, .35),
    0 6px 16px rgba(60, 130, 220, .25);
  transition:
    background .25s,
    box-shadow .25s,
    transform .25s var(--ease-back);
}

.btn:hover,
.btn:focus-visible {
  outline: none;
  background: linear-gradient(180deg, var(--c-yellow-1) 0%, #fff8c9 45%, var(--c-yellow-2) 100%);
  box-shadow:
    0 0 0 2px var(--c-yellow-line),
    inset 0 -4px 8px rgba(240, 200, 60, .35),
    0 6px 20px rgba(255, 214, 80, .55);
  transform: translateY(-3px);
}

.btn:active {
  transform: translateY(0) scale(.98);
}


/* =============================================================
   05. Hero - cards
   ============================================================= */
.cards {
  position: relative;
  width: min(980px, 96vw);
  aspect-ratio: 980 / 560;
  margin: 26px auto 0;
}

.cards__item {
  position: absolute;
}

.cards__item img {
  filter: drop-shadow(0 18px 24px rgba(40, 100, 190, .28));
}

.cards__item--main {
  left: 0;
  top: 60px;
  width: 66%;
  z-index: 2;
}

.cards__item--sub {
  left: 52%;
  top: 26%;
  width: 50%;
  z-index: 1;
}


/* =============================================================
   06. Hero - cloud bank & porings
   (all sizes in vw so the cloud pieces always overlap)
   ============================================================= */
.hero__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  height: 13vw;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(220, 239, 255, 0) 0%,
    rgba(220, 239, 255, .7) 50%,
    var(--c-bg) 92%
  );
}

/* cloud-bb.png holds both wings - each wrapper shows one half of it */
.cloud--wing-l,
.cloud--wing-r {
  z-index: 1;
  width: 64vw;
  overflow: hidden;
}

.cloud--wing-l {
  left: -13vw;
  bottom: -12vw;
}

.cloud--wing-r {
  right: -13vw;
  bottom: -2vw;
}

.cloud--wing-l img,
.cloud--wing-r img {
  width: 200%;
  max-width: none;
}

.cloud--wing-r img {
  margin-left: -100%;
}

.cloud--mid {
  z-index: 2;
  width: 46vw;
  left: 27vw;
  bottom: -10vw;
}

.cloud--bl {
  z-index: 4;
  width: 66vw;
  left: -10vw;
  bottom: -13vw;
}

.cloud--br {
  z-index: 4;
  width: 56vw;
  right: -10vw;
  bottom: -1vw;
}

/* porings (only 3 in the hero) */
.poring--pink {
  z-index: 6;
  width: clamp(120px, 18.5vw, 360px);
  left: 2.5vw;
  top: 170px;
}

.poring--green {
  z-index: 6;
  width: clamp(64px, 6.5vw, 125px);
  right: 18.5vw;
  top: 260px;
}

.poring--blue {
  z-index: 3; /* behind the front-right cloud */
  width: clamp(120px, 17.5vw, 335px);
  right: 3.5vw;
  bottom: 24vw;
}


/* =============================================================
   07. Hero - scroll down cue
   ============================================================= */
.scroll-down {
  position: absolute;
  left: 50%;
  bottom: 250px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--c-blue);
  text-decoration: none;
  transform: translateX(-50%);
  opacity: 0;
}

.scroll-down__mouse {
  position: relative;
  width: 26px;
  height: 40px;
  border: 2.5px solid var(--c-blue);
  border-radius: 14px;
  background: rgba(255, 255, 255, .6);
  box-shadow: 0 0 12px rgba(255, 255, 255, .9);
}

.scroll-down__wheel {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--c-blue);
  animation: wheel 1.6s ease-in-out infinite;
}

.scroll-down__text {
  font-family: "Kanit", sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-shadow: 0 0 6px #fff, 0 0 2px #fff;
}

.scroll-down__arrow {
  width: 12px;
  height: 12px;
  border-right: 2.5px solid var(--c-blue);
  border-bottom: 2.5px solid var(--c-blue);
  transform: rotate(45deg);
  animation: arrowBounce 1.6s ease-in-out infinite;
}

.scroll-down:hover .scroll-down__mouse {
  background: var(--c-yellow-1);
  border-color: var(--c-yellow-line);
}


/* =============================================================
   08. Terms - layout & title
   (sizes measured from the 1920px mockup)
   ============================================================= */
.terms {
  position: relative;
  padding: 0 16px 35px;
  background: url("../images/bg-bottom.png") top center / 100% auto repeat-y, var(--c-bg);
  overflow-x: clip;
  scroll-margin-top: var(--nav-h); /* #terms jump lands below the fixed navbar */
}

/* blend the pattern in so there is no seam under the hero */
.terms::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 220px;
  background: linear-gradient(180deg, var(--c-bg) 0%, rgba(220, 239, 255, 0) 100%);
  pointer-events: none;
}

.terms__inner {
  position: relative;
  z-index: 1;
  max-width: 1090px;
  margin: 0 auto;
}

.terms__title {
  margin: 0 0 58px;
  text-align: center;
  font-family: "Kanit", sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 2.6vw, 50px);
  line-height: 1.25;
  color: var(--c-navy);
}

.terms__title span {
  display: block;
}


/* =============================================================
   09. Terms - rule cards
   ============================================================= */
.rule {
  position: relative;
  margin-bottom: 46px;
  padding: 0; /* header sits flush with the card edge */
  border: 3px solid var(--c-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(60, 130, 220, .15);
}

.rule__head {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 12px 32px;
  border-radius: 15px 15px 0 0;
  font-family: "Kanit", sans-serif;
  font-weight: 600;
  font-size: clamp(18px, 1.15vw, 22px);
  color: #fff;
  background: linear-gradient(90deg, rgba(0, 147, 245, 1) 0%, rgba(109, 202, 253, 1) 100%);
  /* Figma: inner shadow x2 y2 blur0 white, soft-light (approximated) */
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .35);
  text-shadow: 0 1px 2px rgba(0, 60, 140, .3);
}

.rule__list {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 24px 36px 28px;
  font-size: 16px;
  line-height: 1.8;
}

ul.rule__list {
  padding-left: 58px;
}

.rule__list li::marker {
  color: var(--c-navy);
}

.rule__list p {
  margin: 0;
}


/* =============================================================
   10. Terms - decorations (anchored to each card)
   stars overlap the card edges and sit ON TOP of the card
   ============================================================= */
.rule .star   { z-index: 3; }
.rule .poring { z-index: 3; }
.rule .cloud  { z-index: 1; }

.star { width: 86px; }

/* card 1 : big star over the top-left corner + small star below it */
.star--1a       { left: -30px;   top: -54px;  width: 86px; }
.star--1b       { left: -86px;   top: 72px;   width: 44px; }

/* card 2 : star over the right edge, cloud far right */
.star--2        { right: -42px;  top: 66px;   width: 90px; }
.cloud--s2      { right: -440px; top: 90px;   width: 320px; }

/* card 3 : star over the top-left corner, flying poring + cloud far left */
.star--3        { left: -30px;   top: -54px;  width: 88px; }
.poring--fly    { left: -320px;  top: 40px;   width: 160px; }
.cloud--s3      { left: -460px;  top: 130px;  width: 340px; }

/* card 4 : big + small star overlapping above the top-right corner */
.star--4a       { right: -62px;  top: -120px; width: 92px; }
.star--4b       { right: -94px;  top: -28px;  width: 46px; }

/* card 5 : star over the top-left corner, green poring on a cloud far right */
.star--5        { left: -28px;   top: -6px;   width: 80px; }
.poring--green2 { right: -330px; top: 24px;   width: 135px; }
.cloud--s5      { right: -450px; top: 90px;   width: 340px; }


/* =============================================================
   11. Floating dock (register + back to top)
   the dock is only a show/hide switch - each button is fixed on its own:
   register = bottom centre, back to top = bottom right
   ============================================================= */
.float-dock > * {
  position: fixed;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(40px) scale(.9);
  transition:
    opacity .45s var(--ease-out),
    transform .45s var(--ease-back),
    visibility 0s linear .45s,
    background .25s,
    box-shadow .25s;
}

.float-dock.is-show > * {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity .45s var(--ease-out),
    transform .45s var(--ease-back),
    visibility 0s,
    background .25s,
    box-shadow .25s;
}

.float-dock.is-show > .to-top {
  transition-delay: .08s, .08s, 0s, 0s, 0s;
}

/* lift the dock above the cookie banner while it is open
   (--cookie-h is set by cookie-consent.js) */
.float-dock > *,
.float-dock.is-show > * {
  transition-property: opacity, transform, visibility, background, box-shadow, translate;
}

body.has-cookie-banner .float-dock > * {
  translate: 0 calc(-1 * var(--cookie-h, 0px));
}

/* ---------- register ---------- */
.btn--float {
  left: 0;
  right: 0;
  bottom: 28px;
  width: fit-content;
  min-width: 240px;
  margin: 0 auto; /* centred without transform (transform is used for show/hide) */
}

.float-dock.is-show .btn--float {
  animation: floatPulse 2.4s ease-in-out .5s infinite;
}

.float-dock.is-show .btn--float:hover,
.float-dock.is-show .btn--float:focus-visible {
  transform: translateY(-3px);
  animation-play-state: paused;
}

.float-dock.is-show .btn--float:hover {
  box-shadow:
    0 0 0 2px var(--c-yellow-line),
    inset 0 -4px 8px rgba(240, 200, 60, .35),
    0 6px 20px rgba(255, 214, 80, .55);
}

/* ---------- back to top ---------- */
.to-top {
  right: 28px;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 62px;
  height: 62px;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  font-family: "Kanit", sans-serif;
  color: var(--c-blue);
  cursor: pointer;
  background: linear-gradient(180deg, #ffffff 0%, #eaf5ff 45%, #cfe6ff 100%);
  box-shadow:
    0 0 0 2px #a9d2f7,
    inset 0 -4px 8px rgba(120, 180, 240, .35),
    0 6px 16px rgba(60, 130, 220, .25);
}

.to-top__arrow {
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border-left: 3px solid currentColor;
  border-top: 3px solid currentColor;
  border-radius: 2px 0 0 0;
  transform: rotate(45deg);
}

.to-top__text {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1;
}

.float-dock.is-show .to-top:hover,
.float-dock.is-show .to-top:focus-visible {
  outline: none;
  transform: translateY(-3px);
  background: linear-gradient(180deg, var(--c-yellow-1) 0%, #fff8c9 45%, var(--c-yellow-2) 100%);
  box-shadow:
    0 0 0 2px var(--c-yellow-line),
    inset 0 -4px 8px rgba(240, 200, 60, .35),
    0 6px 20px rgba(255, 214, 80, .55);
}

.to-top:hover .to-top__arrow {
  animation: arrowUp .8s ease-in-out infinite;
}

/* ---------- cute stars around the floating buttons ---------- */
.btn-star {
  position: absolute;
  z-index: 2;
  width: 26px;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(240, 180, 40, .35));
  animation: twinkle 2.4s ease-in-out infinite;
}

.btn-star--r1 { left: -14px;  top: -14px;    width: 30px; }
.btn-star--r2 { right: 14px;  top: -12px;    width: 18px; animation-delay: -.8s; }
.btn-star--r3 { right: -10px; bottom: -8px;  width: 22px; animation-delay: -1.6s; }
.btn-star--t1 { right: -10px; top: -10px;    width: 24px; animation-delay: -.4s; }
.btn-star--t2 { left: -8px;   bottom: -4px;  width: 16px; animation-delay: -1.2s; }

/* on hover the stars spin & pop a little */
.btn--float:hover .btn-star,
.to-top:hover .btn-star {
  animation: starHop .9s var(--ease-back) infinite alternate;
}


/* =============================================================
   12. Animation - hero intro
   1) clouds slide in  ->  2) content & porings  ->  3) loops (section 14)
   (replays every time the hero scrolls back into view - see main.js)
   ============================================================= */

/* hidden before start */
.hero .cloud,
.hero .poring,
.cards__item,
.hero__logo,
.hero__desc,
.hero__btns {
  opacity: 0;
}

/* step 1 : clouds move in */
.is-ready .cloud--bl,
.is-ready .cloud--wing-l {
  animation: cloudInLeft 1.4s var(--ease-out) forwards;
}

.is-ready .cloud--br,
.is-ready .cloud--wing-r {
  animation: cloudInRight 1.4s var(--ease-out) forwards;
}

.is-ready .cloud--mid {
  animation: cloudInUp 1.4s var(--ease-out) .15s forwards;
}

.is-ready .cloud--wing-l,
.is-ready .cloud--wing-r {
  animation-delay: .1s;
}

/* step 2 : hero content */
.is-ready .hero__logo        { animation: dropIn .9s var(--ease-back) .5s forwards; }
.is-ready .hero__desc        { animation: fadeUp .7s var(--ease-out) .8s forwards; }
.is-ready .hero__btns        { animation: fadeUp .7s var(--ease-out) .95s forwards; }
.is-ready .cards__item--main { animation: cardIn 1s var(--ease-out) 1.05s forwards; }
.is-ready .cards__item--sub  { animation: cardIn 1s var(--ease-out) 1.25s forwards; }
.is-ready .scroll-down       { animation: scrollCueIn .8s var(--ease-out) 1.9s forwards; }

/* step 2 : porings pop in after the clouds */
.is-ready .hero .poring        { animation: popIn .8s var(--ease-back) forwards; }
.is-ready .hero .poring--pink  { animation-delay: 1.3s; }
.is-ready .hero .poring--green { animation-delay: 1.5s; }
.is-ready .hero .poring--blue  { animation: peekUp 1s var(--ease-out) 1.45s forwards; }


/* =============================================================
   13. Animation - scroll reveal (fade up)
   (plays every time an element enters the viewport - see main.js)
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(70px);
  transition:
    opacity 1s var(--ease-out),
    transform 1s var(--ease-out);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* title : the 2 lines fade up one after another */
.terms__title,
.terms__title.reveal {
  opacity: 1;
  transform: none;
}

.terms__title .t-line {
  display: block;
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity .9s var(--ease-out),
    transform .9s var(--ease-out);
}

.terms__title.is-in .t-line {
  opacity: 1;
  transform: none;
}

.terms__title.is-in .t-line:nth-child(2) {
  transition-delay: .18s;
}

/* inside each card : header first, then each line in sequence */
.rule__head,
.rule__list > li,
.rule__list > p {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity .7s var(--ease-out),
    transform .7s var(--ease-out);
}

.rule.is-in .rule__head,
.rule.is-in .rule__list > li,
.rule.is-in .rule__list > p {
  opacity: 1;
  transform: none;
}

.rule.is-in .rule__head                   { transition-delay: .2s; }
.rule.is-in .rule__list > p,
.rule.is-in .rule__list > li:nth-child(1) { transition-delay: .35s; }
.rule.is-in .rule__list > li:nth-child(2) { transition-delay: .45s; }
.rule.is-in .rule__list > li:nth-child(3) { transition-delay: .55s; }
.rule.is-in .rule__list > li:nth-child(4) { transition-delay: .65s; }
.rule.is-in .rule__list > li:nth-child(5) { transition-delay: .75s; }
.rule.is-in .rule__list > li:nth-child(6) { transition-delay: .85s; }

/* card decorations appear together with their card */
.rule .deco {
  opacity: 0;
}

.rule.is-in .star,
.rule.is-in .poring {
  animation: popIn .8s var(--ease-back) .35s forwards;
}

.rule.is-in .cloud--s3 {
  animation: cloudInLeftSm 1.2s var(--ease-out) .1s forwards;
}

.rule.is-in .cloud--s2,
.rule.is-in .cloud--s5 {
  animation: cloudInRightSm 1.2s var(--ease-out) .1s forwards;
}

.rule.is-in .star--1b,
.rule.is-in .star--4b {
  animation-delay: .55s;
}


/* =============================================================
   14. Animation - loops & keyframes
   loops run on the inner <img> so they never fight the intro transform
   ============================================================= */

/* ---------- clouds ---------- */
.cloud img          { animation: cloudDrift 8s ease-in-out infinite; }
.cloud--bl img      { animation-duration: 9s;  animation-delay: -4s; }
.cloud--br img      { animation-duration: 10s; animation-delay: -1s; }
.cloud--s2 img      { animation-delay: -5s; }
.cloud--s5 img      { animation-delay: -3s; }
.cloud--mid img     { animation: cloudBob 8s ease-in-out -3s infinite; }
.cloud--wing-l img,
.cloud--wing-r img  { animation: cloudBob 9s ease-in-out infinite; }
.cloud--wing-r img  { animation-delay: -4.5s; }

/* ---------- porings ---------- */
.poring img         { animation: float 3.6s ease-in-out infinite; }
.poring--blue img   { animation-duration: 4.2s; animation-delay: -1.2s; }
.poring--green img  { animation-duration: 3.2s; animation-delay: -.8s; }
.poring--green2 img { animation-duration: 3.9s; animation-delay: -2s; }
.poring--fly img    { animation: flyBob 2.8s ease-in-out infinite; }

/* ---------- cards ---------- */
.cards__item--main img { animation: float 5s ease-in-out infinite; }
.cards__item--sub img  { animation: float 5.6s ease-in-out -1.8s infinite; }

/* ---------- stars ---------- */
.star img     { animation: twinkle 2.6s ease-in-out infinite; }
.star--1b img,
.star--4b img { animation-delay: -.9s; }
.star--2 img  { animation-delay: -1.9s; }
.star--3 img  { animation-delay: -1.3s; }
.star--5 img  { animation-delay: -.4s; }

/* ---------- keyframes : intro ---------- */
@keyframes cloudInLeft {
  from { opacity: 0; transform: translateX(-60vw); }
  to   { opacity: 1; transform: none; }
}

@keyframes cloudInRight {
  from { opacity: 0; transform: translateX(60vw); }
  to   { opacity: 1; transform: none; }
}

@keyframes cloudInUp {
  from { opacity: 0; transform: translateY(20vw); }
  to   { opacity: 1; transform: none; }
}

@keyframes cloudInLeftSm {
  from { opacity: 0; transform: translateX(-160px); }
  to   { opacity: 1; transform: none; }
}

@keyframes cloudInRightSm {
  from { opacity: 0; transform: translateX(160px); }
  to   { opacity: 1; transform: none; }
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-40px) scale(.85); }
  to   { opacity: 1; transform: none; }
}

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

@keyframes cardIn {
  from { opacity: 0; transform: translateY(60px) rotate(-4deg); }
  to   { opacity: 1; transform: none; }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(.3); }
  to   { opacity: 1; transform: none; }
}

@keyframes peekUp {
  from { opacity: 0; transform: translateY(60%); }
  to   { opacity: 1; transform: none; }
}

@keyframes scrollCueIn {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- keyframes : loops ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50%      { transform: translateY(-16px) rotate(1.5deg); }
}

@keyframes flyBob {
  0%, 100% { transform: translate(0, 0) rotate(-4deg); }
  50%      { transform: translate(10px, -14px) rotate(3deg); }
}

@keyframes cloudDrift {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(20px, -8px); }
}

@keyframes cloudBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0); opacity: 1; }
  50%      { transform: scale(.8) rotate(18deg); opacity: .75; }
}

@keyframes wheel {
  0%   { opacity: 1; transform: translateY(0); }
  70%  { opacity: 0; transform: translateY(12px); }
  100% { opacity: 0; transform: translateY(0); }
}

@keyframes arrowBounce {
  0%, 100% { transform: translateY(0) rotate(45deg); opacity: 1; }
  50%      { transform: translateY(6px) rotate(45deg); opacity: .5; }
}

@keyframes arrowUp {
  0%, 100% { transform: translateY(0) rotate(45deg); }
  50%      { transform: translateY(-4px) rotate(45deg); }
}

@keyframes starHop {
  from { transform: scale(1) rotate(0); }
  to   { transform: scale(1.25) rotate(35deg); }
}

@keyframes floatPulse {
  0%, 100% {
    box-shadow:
      0 0 0 2px #a9d2f7,
      inset 0 -4px 8px rgba(120, 180, 240, .35),
      0 6px 16px rgba(60, 130, 220, .25),
      0 0 0 0 rgba(59, 140, 240, .45);
  }
  60% {
    box-shadow:
      0 0 0 2px #a9d2f7,
      inset 0 -4px 8px rgba(120, 180, 240, .35),
      0 6px 16px rgba(60, 130, 220, .25),
      0 0 0 14px rgba(59, 140, 240, 0);
  }
}


/* =============================================================
   15. Responsive
   ============================================================= */

/* ---------- <= 1600px : pull card decorations closer ---------- */
@media (max-width: 1600px) {
  .poring--fly    { left: -200px;  width: 130px; }
  .cloud--s3      { left: -300px;  width: 260px; }
  .poring--green2 { right: -210px; width: 115px; }
  .cloud--s5      { right: -300px; width: 260px; }
  .cloud--s2      { right: -320px; width: 260px; }
}

/* ---------- <= 1100px : keep only the main stars ---------- */
@media (max-width: 1100px) {
  .rule .poring,
  .rule .cloud,
  .star--1b,
  .star--4b {
    display: none;
  }

  .star--1a { left: -30px;  top: -40px; width: 60px; }
  .star--2  { right: -20px;             width: 50px; }
  .star--3  { left: -25px;  top: -25px; width: 50px; }
  .star--4a { right: -25px; top: -45px; width: 60px; }
  .star--5  { left: -25px;              width: 50px; }
}

/* ---------- <= 991px : tablet ---------- */
@media (max-width: 991px) {
  .hero {
    min-height: 0;
    padding-bottom: 90px;
  }

  .poring--pink  { top: 220px; left: 2vw; }
  .poring--green { top: 240px; right: 6vw; }

  .br-pc {
    display: none;
  }
}

/* ---------- <= 640px : mobile ---------- */
@media (max-width: 640px) {
  /* hero */
  .hero {
    padding-top: 24px;
    padding-bottom: 70px;
  }

  .hero__btns {
    gap: 10px;
  }

  .btn {
    width: 100%;
    min-width: 0;
    max-width: 300px;
    height: 48px;
    font-size: 18px;
  }

  .poring--pink  { top: 150px; }
  .poring--green { top: 170px; }

  .scroll-down       { bottom: 14px; }
  .scroll-down__text { font-size: 11px; }

  /* terms */
  .terms {
    padding-bottom: 120px;
  }

  .rule__head {
    padding: 10px 16px;
  }

  .rule__list {
    padding: 14px 16px 16px;
    font-size: 14.5px;
  }

  ul.rule__list {
    padding-left: 34px;
  }

  .star--1a,
  .star--4a {
    width: 50px;
  }

  /* floating dock */
  .btn--float {
    width: fit-content;
    min-width: 180px;
    bottom: 16px;
    height: 46px;
    padding: 0 24px;
    font-size: 17px;
  }

  .to-top {
    right: 16px;
    bottom: 76px;
    width: 50px;
    height: 50px;
  }

  /* footer : leave room for the floating register button */
  .gg-footer__inner {
    padding-bottom: 84px;
  }
}


/* =============================================================
   16. Reduced motion
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .hero .cloud,
  .hero .poring,
  .cards__item,
  .hero__logo,
  .hero__desc,
  .hero__btns,
  .scroll-down,
  .float-dock.is-show > * {
    opacity: 1;
  }

  .rule .deco,
  .reveal,
  .terms__title .t-line,
  .rule__head,
  .rule__list > li,
  .rule__list > p {
    opacity: 1;
    transform: none;
  }
}
