/* ==========================================================
   FLAMONT GAMES — Brand Stylesheet (v5)
   Sections: tokens · base · nav · hero · section · about ·
             games · footer · utilities · responsive
   ========================================================== */

/* ============== Design Tokens ============== */
:root{
  /* Brand */
  --c-flame:        #E94E0F;
  --c-flame-2:      #FF6B35;
  --c-flame-3:      #FFB347;
  --c-gold:         #FFD56B;
  --c-ink:          #0A0E1A;
  --c-ink-2:        #111726;
  --c-line:         rgba(255,255,255,.08);
  --c-line-2:       rgba(255,255,255,.14);

  /* Text */
  --text:           #F5F7FA;
  --text-muted:     #97A0B3;
  --text-dim:       #6A7385;

  /* Surfaces */
  --bg:             #0A0E1A;
  --bg-elev:        #111726;
  --surface:        rgba(255,255,255,.04);
  --surface-2:      rgba(255,255,255,.08);

  /* Radii / Eases */
  --radius:         14px;
  --radius-lg:      22px;
  --ease-out:       cubic-bezier(.22,1,.36,1);

  /* Type */
  --font-en:        'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-zh:        'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', system-ui, sans-serif;
}

[data-theme="light"]{
  --bg: #FAFBFD;
  --text: #1A1F2E;
  /* not used by default; theme-ready for engineers */
}

/* ============== Base ============== */
*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body{
  margin: 0;
  font-family: var(--font-en);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
:lang(zh), :lang(zh-Hant) body{ font-family: var(--font-zh), var(--font-en); }

img, svg{ display: block; max-width: 100%; height: auto; }
a{ color: inherit; text-decoration: none; }
button{ font: inherit; cursor: pointer; }
ul{ list-style: none; padding: 0; margin: 0; }
h1,h2,h3,h4{ margin: 0; line-height: 1.15; letter-spacing: -.01em; }
p{ margin: 0; }

.container{
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(20px, 3vw, 32px);
}

/* ============== Nav ============== */
.nav{
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 12px 0;
  transition: background .3s var(--ease-out), backdrop-filter .3s var(--ease-out), border-color .3s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled{
  background: rgba(10, 14, 26, .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--c-line);
}
.nav__inner{
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
}
.nav__logo img{
  height: 52px; width: auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.5));
}
.nav__links{
  display: flex; align-items: center;
  gap: 30px;
  font-size: 14px; font-weight: 500;
}
.nav__links a{
  position: relative;
  padding: 6px 0;
  color: var(--text);
  transition: color .25s var(--ease-out);
}
.nav__links a::after{
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px; background: var(--c-flame-2);
  transition: width .3s var(--ease-out);
}
.nav__links a:hover::after,
.nav__links a.is-active::after{ width: 100%; }
.nav__links a.is-active{ color: var(--c-flame-2); }

/* ============== Hero ============== */
.hero{
  position: relative;
  height: 100vh; min-height: 640px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

/* Carousel: each slide is a stacked child; only .is-active is opaque */
.hero__carousel{
  position: absolute; inset: 0;
  z-index: 0;
}
.hero__slide{
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .9s var(--ease-out);
  pointer-events: none;
}
.hero__slide.is-active{
  opacity: 1;
  pointer-events: auto;
}
.hero__bg{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  animation: heroZoom 18s ease-out both;
}
.hero__slide.is-active .hero__bg{
  animation: heroZoom 18s ease-out both;
}
/* When the carousel switches, restart the zoom on the freshly-active slide */
.hero__slide.is-refreshing .hero__bg{
  animation: none !important;
}
@keyframes heroZoom{
  from{ transform: scale(1.08); }
  to  { transform: scale(1.0); }
}

.hero__overlay{
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(0,0,0,.30) 0%, rgba(0,0,0,.72) 75%),
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.45) 45%, rgba(0,0,0,.78) 100%);
}

.hero__content{
  position: relative; z-index: 2;
  text-align: center;
  max-width: 920px;
  padding: 0 24px;
}

.hero__motto{
  font-size: clamp(56px, 10vw, 132px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: .96;
  margin: 0 0 84px;
  color: #fff;
  text-shadow: 0 4px 28px rgba(0,0,0,.45);
}
.hero__motto span{ display: block; }
.hero__motto span:nth-child(2){
  background: linear-gradient(95deg, var(--c-flame), var(--c-flame-2) 45%, var(--c-flame-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero__cta{
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px;
  background: var(--c-flame);
  color: #fff;
  font-weight: 600; font-size: 14.5px;
  border-radius: 999px;
  border: 0;
  box-shadow: 0 12px 32px rgba(233,78,15,.36), 0 0 0 1px rgba(255,255,255,.08) inset;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background .25s var(--ease-out);
}
.hero__cta:hover{
  background: var(--c-flame-2);
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(233,78,15,.5), 0 0 0 1px rgba(255,255,255,.12) inset;
}

/* Carousel arrows */
.hero__arrow{
  position: absolute; top: 50%;
  z-index: 3;
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(10, 14, 26, .42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  color: #fff;
  transform: translateY(-50%);
  transition: background .25s var(--ease-out), border-color .25s var(--ease-out), transform .25s var(--ease-out), opacity .25s var(--ease-out);
}
.hero__arrow:hover{
  background: var(--c-flame);
  border-color: var(--c-flame);
  transform: translateY(-50%) scale(1.06);
}
.hero__arrow:active{ transform: translateY(-50%) scale(.94); }
.hero__arrow--prev{ left: clamp(14px, 3vw, 32px); }
.hero__arrow--next{ right: clamp(14px, 3vw, 32px); }

/* Dots */
.hero__dots{
  position: absolute;
  left: 50%; bottom: 96px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex; align-items: center;
  gap: 10px;
}
.hero__dot{
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.55);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: width .25s var(--ease-out), background .25s var(--ease-out), border-color .25s var(--ease-out);
}
.hero__dot:hover{ border-color: var(--c-flame-2); }
.hero__dot.is-active{
  width: 28px;
  background: var(--c-flame-2);
  border-color: var(--c-flame-2);
  border-radius: 999px;
}

.hero__scroll{
  position: absolute; left: 50%; bottom: 28px;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px; height: 42px;
  border: 1.5px solid rgba(255,255,255,.5);
  border-radius: 14px;
}
.hero__scroll::before{
  content: ''; position: absolute; left: 50%; top: 8px;
  width: 3px; height: 8px;
  background: rgba(255,255,255,.8);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollDot 1.6s var(--ease-out) infinite;
}
@keyframes scrollDot{
  0%   { opacity: 0; transform: translate(-50%, 0); }
  40%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 14px); }
}

/* ============== Section (shared) ============== */
.section{
  padding: clamp(72px, 9vw, 120px) 0;
  position: relative;
}
.section--dark{ background: var(--bg-elev); }

.section__head{
  max-width: 760px;
  margin: 0 auto clamp(40px, 5vw, 64px);
  text-align: center;
}
/* Right-aligned hint variant (used by Games) */
.section__head--row{
  display: flex; align-items: end; justify-content: space-between;
  text-align: left; max-width: none; gap: 24px;
  margin-bottom: clamp(36px, 4.5vw, 56px);
}
/* Left-aligned variant (used by About) */
.section__head--left{
  text-align: left;
  margin: 0 0 22px;
  max-width: none;
}
.section__eyebrow{
  display: inline-block;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: .26em; text-transform: uppercase;
  color: var(--c-flame-2);
  margin: 0 0 14px;
}
.section__title{
  font-size: clamp(30px, 4.4vw, 54px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
  margin: 0 0 22px;
}
.section__lede{
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 640px; margin: 0 auto;
}
/* Left-aligned lede block (used by About to mirror Games' rhythm) */
.section__lede--left{
  text-align: left;
  max-width: 820px;
  margin: 0 0 clamp(40px, 5vw, 56px);
}
.section__hint{
  font-size: 12.5px;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

/* Reveal-on-scroll hook for JS to set .is-visible */
[data-reveal]{
  opacity: 0; transform: translateY(20px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
[data-reveal].is-visible{
  opacity: 1; transform: none;
}

/* ============== About (merged services) ============== */
.about__points{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.point{
  padding: 26px 24px 28px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), rgba(255,255,255,0));
  transition: transform .3s var(--ease-out), border-color .3s var(--ease-out), background .3s var(--ease-out);
}
.point:hover{
  transform: translateY(-3px);
  border-color: rgba(255,107,53,.4);
  background: linear-gradient(180deg, var(--surface-2), rgba(255,255,255,.02));
}
.point__num{
  display: inline-block;
  font-size: 12px; font-weight: 700;
  letter-spacing: .22em;
  color: var(--c-flame-2);
  margin-bottom: 16px;
}
.point__title{
  font-size: 17px; font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -.01em;
}
.point__desc{
  font-size: 13.5px; line-height: 1.6;
  color: var(--text-muted); margin: 0;
}

/* ============== Games ============== */
.games__list{
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 40px);
}
.game-card{
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  border: 1px solid var(--c-line);
  transition: transform .35s var(--ease-out), border-color .35s var(--ease-out);
}
.game-card:hover{
  transform: translateY(-3px);
  border-color: var(--c-line-2);
}

/* Horizontal-friendly media: full-width key art on top */
.game-card__media{
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: #0A0E1A;
}
.game-card__media::after{
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,.45) 100%);
  pointer-events: none;
}
.game-card__media img{
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  transition: transform .8s var(--ease-out);
}
.game-card:hover .game-card__media img{
  transform: scale(1.03);
}

/* Game body sits below the wide key art */
.game-card__body{
  padding: clamp(24px, 3vw, 36px) clamp(24px, 3vw, 40px) clamp(28px, 3vw, 40px);
}
.game-card__tags{
  display: flex; flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.tag{
  display: inline-flex; align-items: center;
  padding: 5px 11px;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .04em;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: color-mix(in srgb, currentColor 10%, transparent);
}
.tag--slg    { color: #6BCB77; }   /* green */
.tag--rpg    { color: #FFD56B; }   /* gold */
.tag--idle   { color: #7BB6FF; }   /* blue */
.tag--tribe  { color: #C68AFF; }   /* violet */

.game-card__title{
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 6px;
}
.game-card__sub{
  font-size: 13px;
  color: var(--c-flame-2);
  letter-spacing: .12em; text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 18px;
}
.game-card__desc{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 0 0 28px;
}
.game-card__desc p{
  font-size: 14px; line-height: 1.75;
  color: var(--text-muted);
}

.game-card__features{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0 0 24px;
}
.feat{
  display: flex; align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .25s var(--ease-out), background .25s var(--ease-out);
}
.feat:hover{
  border-color: rgba(255,107,53,.4);
  background: var(--surface-2);
}
.feat__k{
  font-size: 11px; font-weight: 700;
  letter-spacing: .22em;
  color: var(--c-flame-2);
  flex-shrink: 0;
  margin-top: 2px;
}
.feat b{
  display: block;
  font-size: 14px; font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.feat span{
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.game-card__factions{
  display: flex; flex-wrap: wrap;
  gap: 10px;
}
.faction{
  display: inline-flex; align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  font-size: 12.5px; font-weight: 700;
  letter-spacing: .04em;
  border-radius: 999px;
  border: 1px solid var(--c-line);
  background: var(--surface);
}
.faction i{
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 22%, transparent);
}
.faction--shennong{ color: #5DD0C5; }
.faction--jiuli   { color: #FF7AA8; }
.faction--xuanyuan{ color: #FFD56B; }

/* ============== Footer ============== */
.footer{
  background: var(--bg-ink, #07101e);
  background: var(--bg-elev);
  border-top: 1px solid var(--c-line);
  padding: clamp(48px, 6vw, 72px) 0 24px;
}
.footer__inner{
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 1fr;
  gap: 40px;
  align-items: start;
}
.footer__logo img{
  height: 52px; width: auto;
}
.footer__name{
  font-size: 14.5px; font-weight: 700;
  letter-spacing: .04em;
  margin: 0 0 12px;
}
.footer__addr{
  font-style: normal;
  font-size: 13px; line-height: 1.7;
  color: var(--text-muted);
}
.footer__k{
  font-size: 11px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--c-flame-2);
  margin: 0 0 14px;
}
.footer__email{
  font-size: 15px; font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--c-line-2);
  transition: color .25s var(--ease-out), border-color .25s var(--ease-out);
}
.footer__email:hover{
  color: var(--c-flame-2);
  border-color: var(--c-flame-2);
}
.footer__legal{
  max-width: 1180px;
  margin: clamp(36px, 4vw, 56px) auto 0;
  padding: 18px clamp(20px, 3vw, 32px) 0;
  border-top: 1px solid var(--c-line);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  font-size: 12px;
  color: var(--text-dim);
}
.footer__policies{
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
  font-size: 12px;
}
.footer__policies a{
  color: var(--text-dim);
  position: relative;
  transition: color .25s var(--ease-out);
}
.footer__policies a + a::before{
  content: "";
  position: absolute;
  left: calc(clamp(14px, 2vw, 24px) * -0.5);
  top: 50%;
  transform: translateY(-50%);
  height: 10px; width: 1px;
  background: var(--c-line-2);
}
.footer__policies a:hover{
  color: var(--text);
}

/* ============== Responsive ============== */
@media (max-width: 960px){
  .about__points{ grid-template-columns: 1fr 1fr; }
  .game-card__desc{ grid-template-columns: 1fr; gap: 14px; }
  .game-card__features{ grid-template-columns: 1fr 1fr; }
  .footer__inner{ grid-template-columns: 1fr 1fr; }
  .footer__logo{ grid-column: 1 / -1; }
  .hero__arrow{ width: 42px; height: 42px; }
}
@media (max-width: 640px){
  .nav__links{ display: none; }
  .nav__logo img{ height: 44px; }
  .footer__logo img{ height: 44px; }
  .container{ padding: 0 20px; }

  .hero{ min-height: 560px; }
  .hero__motto{ font-size: clamp(44px, 13vw, 64px); margin-bottom: 80px; }
  .hero__content{ padding-bottom: 48px; }
  .hero__arrow{ width: 38px; height: 38px; }
  .hero__arrow--prev{ left: 10px; }
  .hero__arrow--next{ right: 10px; }
  .hero__dots{ bottom: 70px; }

  .section{ padding: 64px 0; }
  .section__head--row{
    flex-direction: column; align-items: flex-start; gap: 12px;
  }
  .section__title{ font-size: 32px; }

  .about__points{ grid-template-columns: 1fr; }
  .game-card__features{ grid-template-columns: 1fr; }
  .footer__inner{ grid-template-columns: 1fr; gap: 28px; }
  .footer__legal{
    flex-direction: column;
    text-align: center;
  }
}
