/* =========================================================
   HEIBAI CO., LTD – landing page
   Black / white / red · angular cuts from the logo · gaming energy
   ========================================================= */
:root {
    --red: #FF3131;
    --red-dark: #D91F1F;
    --black: #0B0B0B;
    --ink: #1D1D1D;
    --ink-2: #262626;
    --white: #FFFFFF;
    --off: #F2F2F0;
    --gray: #9A9A9A;
    --gray-2: #5E5E5E;
    --line-d: rgba(255, 255, 255, .12);
    --line-l: #DADADA;
    --display: 'Chakra Petch', 'Segoe UI', sans-serif;
    --body: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --cut: 22px;
    --nav-h: 76px;
}

html { scroll-behavior: smooth; overflow-x: clip; }
body { font-family: var(--body); background: var(--black); color: rgba(255, 255, 255, .78); font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, h4, h5 { font-family: var(--display); font-weight: 700; color: var(--white); text-transform: uppercase; letter-spacing: .01em; line-height: 1.05; }
section[id], header[id] { scroll-margin-top: var(--nav-h); }
::selection { background: var(--red); color: #fff; }
.red { color: var(--red); }
.outline-txt { color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .85); }

/* Angular cut helpers (45° like the logo) */
.cut-tr { clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.cut-bl { clip-path: polygon(0 0, 100% 0, 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut))); }
.cut-both { clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut))); }

/* ---------- Buttons ---------- */
.btn-h { --cut: 14px; display: inline-flex; align-items: center; gap: 12px; padding: 16px 30px; font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; border: 0; cursor: pointer; transition: all .25s ease; clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #fff; color: var(--black); }
.btn-white { background: #fff; color: var(--black); }
.btn-white:hover { background: var(--red); color: #fff; }
.btn-dark { background: var(--black); color: #fff; }
.btn-dark:hover { background: #fff; color: var(--black); }
.btn-ghost-h { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); clip-path: none; }
.btn-ghost-h:hover { box-shadow: inset 0 0 0 1.5px var(--red); color: var(--red); }
.btn-h i { font-size: 18px; transition: transform .25s ease; }
.btn-h:hover i { transform: translateX(4px); }

/* ---------- Common ---------- */
.section { padding: 120px 0; position: relative; }
@media (max-width: 767.98px) { .section { padding: 80px 0; } }
.label { display: inline-flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 14px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--red); margin-bottom: 20px; }
.label::before { content: ""; width: 26px; height: 12px; background: var(--red); clip-path: polygon(0 0, 60% 0, 100% 100%, 40% 100%); }
.h-big { font-size: clamp(38px, 5.2vw, 72px); margin-bottom: 22px; }
.lead { font-size: 18px; color: rgba(255, 255, 255, .62); }
.light { background: var(--off); color: var(--gray-2); }
.light h2, .light h3, .light h4 { color: var(--black); }
.light .lead { color: var(--gray-2); }
.light .outline-txt { -webkit-text-stroke-color: var(--black); }

/* ---------- Header ---------- */
.hdr { position: fixed; top: 0; left: 0; right: 0; z-index: 1030; height: var(--nav-h); background: rgba(11, 11, 11, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-d); transition: background .3s ease; }
.hdr.scrolled { background: rgba(11, 11, 11, .96); }
.hdr-in { height: 100%; display: flex; align-items: stretch; justify-content: space-between; }
.hdr .brand { display: flex; align-items: center; gap: 12px; padding: 0 28px; text-decoration: none; }
.hdr .brand .mk { height: 38px; width: auto; }
.hdr .brand .tx { height: 20px; width: auto; }
.hdr nav { display: flex; align-items: center; }
.hdr nav ul { display: flex; list-style: none; margin: 0; padding: 0; }
.hdr nav a { display: flex; align-items: center; gap: 8px; padding: 0 18px; height: var(--nav-h); font-family: var(--display); font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .7); text-decoration: none; position: relative; transition: color .2s ease; }
.hdr nav a .idx { font-size: 11px; color: var(--gray-2); letter-spacing: 0; }
.hdr nav a:hover, .hdr nav a.active { color: #fff; }
.hdr nav a.active .idx, .hdr nav a:hover .idx { color: var(--red); }
.hdr nav a::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: -1px; height: 3px; background: var(--red); transform: scaleX(0); transition: transform .25s ease; }
.hdr nav a.active::after { transform: scaleX(1); }
.hdr .hdr-cta { display: flex; align-items: center; gap: 12px; padding: 0 34px 0 46px; background: var(--red); color: #fff; font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; clip-path: polygon(28px 0, 100% 0, 100% 100%, 0 100%); transition: background .25s ease; }
.hdr .hdr-cta:hover { background: #fff; color: var(--black); }
.hdr .burger { display: none; width: var(--nav-h); border: 0; background: var(--red); color: #fff; font-size: 26px; align-items: center; justify-content: center; }
@media (max-width: 1199.98px) {
    .hdr .hdr-cta { display: none; }
    .hdr .burger { display: flex; }
    .hdr nav { position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--black); border-bottom: 3px solid var(--red); display: none; }
    .hdr.open nav { display: block; }
    .hdr nav ul { flex-direction: column; padding: 10px 0; }
    .hdr nav a { height: auto; padding: 16px 28px; font-size: 16px; }
    .hdr nav a::after { left: 0; right: auto; top: 0; bottom: 0; width: 3px; height: auto; transform: scaleY(0); }
    .hdr nav a.active::after { transform: scaleY(1); }
}
@media (max-width: 575.98px) { .hdr .brand { padding: 0 16px; } .hdr .brand .tx { height: 17px; } .hdr .brand .mk { height: 32px; } }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; padding: calc(var(--nav-h) + 80px) 0 100px; position: relative; overflow: hidden; display: flex; align-items: center; }
.hero .slab-red { position: absolute; top: 0; right: 18%; width: 140px; height: 70%; background: var(--red); clip-path: polygon(0 0, 100% 22%, 100% 100%, 0 100%); opacity: .95; }
.hero .slab-dark { position: absolute; bottom: 0; right: 0; width: 46%; height: 52%; background: var(--ink); clip-path: polygon(0 0, 30% 0, 30% 55%, 72% 55%, 100% 100%, 0 100%); }
@media (max-width: 991.98px) { .hero .slab-red { right: 0; width: 44px; height: 34%; opacity: .35; } .hero .slab-dark { width: 70%; height: 30%; opacity: .6; } }
.hero .container { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(46px, 7.6vw, 112px); line-height: .95; margin-bottom: 30px; }
.hero h1 .line2 { display: block; }
.hero p.lead { max-width: 560px; margin-bottom: 40px; font-size: 19px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 46px; }
.hero-tags span { font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: 8px 14px; border: 1px solid var(--line-d); color: rgba(255, 255, 255, .8); }
.hero-tags span::before { content: "■ "; color: var(--red); font-size: 10px; }

/* HUD panel */
.hud { --cut: 26px; background: rgba(29, 29, 29, .92); border: 0; padding: 28px; position: relative; font-family: var(--display); }
.hud::before { content: ""; position: absolute; inset: 0; border: 1px solid rgba(255, 255, 255, .14); clip-path: inherit; pointer-events: none; }
.hud-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--gray); }
.hud-head strong { color: #fff; letter-spacing: .14em; }
.hud-head .live { color: var(--red); display: inline-flex; align-items: center; gap: 6px; }
.hud-head .live::before { content: ""; width: 8px; height: 8px; background: var(--red); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .2; } }
.slot { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line-d); }
.slot .ic { width: 44px; height: 44px; background: var(--black); display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--red); clip-path: polygon(0 0, 75% 0, 100% 25%, 100% 100%, 0 100%); }
.slot .nm { color: #fff; font-size: 15px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2; }
.slot .nm small { display: block; color: var(--gray); font-size: 12px; letter-spacing: .08em; font-weight: 500; }
.slot .lv { font-size: 12px; font-weight: 700; letter-spacing: .1em; padding: 4px 9px; background: var(--red); color: #fff; }
.slot .lv.mid { background: #fff; color: var(--black); }
.slot .lv.jr { background: var(--ink-2); color: #fff; border: 1px solid var(--line-d); }
.xp { margin-top: 18px; }
.xp-top { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gray); margin-bottom: 8px; }
.xp-top b { color: #fff; }
.xp-bar { height: 10px; background: var(--black); position: relative; overflow: hidden; }
.xp-bar span { position: absolute; inset: 0 auto 0 0; width: 72%; background: repeating-linear-gradient(90deg, var(--red) 0 14px, transparent 14px 17px); animation: xp 3.5s ease-in-out infinite alternate; }
@keyframes xp { from { width: 38%; } to { width: 86%; } }

/* ---------- Ticker ---------- */
.ticker { background: var(--red); padding: 18px 0; overflow: hidden; transform: rotate(-1.5deg); margin: -10px -20px 0; position: relative; z-index: 3; }
.ticker-track { display: flex; width: max-content; animation: tick 30s linear infinite; }
.ticker-track span { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: .1em; text-transform: uppercase; color: #fff; padding: 0 22px; white-space: nowrap; display: inline-flex; align-items: center; gap: 44px; }
.ticker-track span::after { content: "/"; color: var(--black); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- Services ---------- */
.svc { --cut: 30px; background: var(--ink); padding: 40px 36px; height: 100%; position: relative; transition: background .3s ease, transform .3s ease; }
.svc:hover { background: var(--ink-2); transform: translateY(-6px); }
.svc .n { font-family: var(--display); font-size: 14px; font-weight: 700; letter-spacing: .2em; color: var(--red); }
.svc .ico { font-size: 44px; color: #fff; margin: 22px 0 18px; display: block; line-height: 1; }
.svc h3 { font-size: 26px; margin-bottom: 12px; }
.svc p { color: rgba(255, 255, 255, .6); margin-bottom: 22px; }
.svc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.svc li { font-family: var(--display); font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px; background: var(--black); color: rgba(255, 255, 255, .8); }
.svc.feat { background: var(--red); }
.svc.feat:hover { background: var(--red-dark); }
.svc.feat .n { color: var(--black); }
.svc.feat p { color: rgba(255, 255, 255, .88); }
.svc.feat li { background: rgba(0, 0, 0, .22); color: #fff; }
.svc .corner { position: absolute; right: 0; top: 0; width: 30px; height: 30px; background: var(--red); clip-path: polygon(0 0, 100% 100%, 100% 0); opacity: 0; transition: opacity .3s ease; }
.svc:hover .corner { opacity: 1; }
.svc.feat .corner { background: var(--black); }

/* ---------- Gaming (light) ---------- */
.game-visual { position: relative; }
.game-visual .frame { --cut: 40px; background: var(--black); position: relative; overflow: hidden; aspect-ratio: 4 / 5; }
.game-visual .frame img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1); mix-blend-mode: screen; opacity: .9; }
.game-visual .frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255, 49, 49, .55), transparent 55%); mix-blend-mode: multiply; }
.game-visual .frame .stamp { position: absolute; left: 24px; bottom: 24px; z-index: 2; font-family: var(--display); color: #fff; text-transform: uppercase; }
.game-visual .frame .stamp b { display: block; font-size: 44px; line-height: 1; }
.game-visual .frame .stamp span { font-size: 13px; letter-spacing: .24em; color: rgba(255, 255, 255, .7); }
.game-visual .tagbox { position: absolute; right: -14px; top: 40px; background: var(--red); color: #fff; font-family: var(--display); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 14px 20px; font-size: 14px; z-index: 3; }
@media (max-width: 575.98px) { .game-visual .tagbox { right: 0; } }
.g-list { margin-top: 34px; border-top: 2px solid var(--black); }
.g-item { display: grid; grid-template-columns: 56px 1fr; gap: 6px 18px; padding: 22px 0; border-bottom: 1px solid var(--line-l); }
.g-item i { width: 56px; height: 56px; background: var(--black); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; clip-path: polygon(0 0, 75% 0, 100% 25%, 100% 100%, 0 100%); transition: background .25s ease; }
.g-item:hover i { background: var(--red); }
.g-item h4 { font-size: 20px; margin: 4px 0 4px; }
.g-item p { margin: 0; color: var(--gray-2); font-size: 15px; }
.engines { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.engines span { font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; padding: 10px 16px; border: 2px solid var(--black); color: var(--black); }

/* ---------- Squad ---------- */
.squad-card { --cut: 22px; background: var(--ink); padding: 30px 28px; height: 100%; display: flex; flex-direction: column; transition: transform .3s ease; position: relative; }
.squad-card:hover { transform: translateY(-6px); }
.squad-card:hover .role-ic { background: var(--red); }
.role-ic { width: 60px; height: 60px; background: var(--black); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 22px; transition: background .25s ease; clip-path: polygon(0 0, 75% 0, 100% 25%, 100% 100%, 0 100%); }
.squad-card h4 { font-size: 21px; margin-bottom: 8px; }
.squad-card p { color: rgba(255, 255, 255, .58); font-size: 15px; margin-bottom: 18px; }
.stats { margin-top: auto; display: flex; gap: 6px; }
.stats span { flex: 1; font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-align: center; padding: 5px 0; background: var(--black); color: var(--gray); }
.stats span.on { background: rgba(255, 49, 49, .15); color: var(--red); }
.levels-row { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 60px; border: 1px solid var(--line-d); }
.levels-row > div { padding: 30px 32px; }
.levels-row > div + div { border-left: 1px solid var(--line-d); }
.levels-row h5 { font-size: 22px; margin: 10px 0 6px; }
.levels-row p { margin: 0; font-size: 15px; color: rgba(255, 255, 255, .58); }
.levels-row .bar { display: flex; gap: 4px; }
.levels-row .bar i { width: 26px; height: 8px; background: var(--ink-2); display: block; transform: skewX(-30deg); }
.levels-row .bar i.on { background: var(--red); }
@media (max-width: 767.98px) { .levels-row { grid-template-columns: 1fr; } .levels-row > div + div { border-left: 0; border-top: 1px solid var(--line-d); } }

/* ---------- Process as levels ---------- */
.lvl { --cut: 24px; background: #fff; padding: 34px 30px; height: 100%; position: relative; border-bottom: 4px solid var(--black); transition: border-color .25s ease; }
.lvl:hover { border-bottom-color: var(--red); }
.lvl .lv-n { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .24em; color: var(--red); }
.lvl .big-n { font-family: var(--display); font-weight: 700; font-size: 80px; line-height: 1; color: transparent; -webkit-text-stroke: 2px var(--black); margin: 8px 0 14px; }
.lvl h4 { font-size: 22px; margin-bottom: 8px; }
.lvl p { margin: 0; color: var(--gray-2); font-size: 15px; }
.models { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 70px; background: var(--black); color: rgba(255, 255, 255, .7); }
.models > div { padding: 34px 32px; }
.models > div + div { border-left: 1px solid var(--line-d); }
.models h5 { font-size: 20px; color: #fff; margin-bottom: 8px; }
.models p { margin: 0; font-size: 15px; }
.models .tag-m { font-family: var(--display); font-size: 12px; letter-spacing: .2em; color: var(--red); font-weight: 700; }
@media (max-width: 991.98px) { .models { grid-template-columns: 1fr; } .models > div + div { border-left: 0; border-top: 1px solid var(--line-d); } }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line-d); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 0; font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: .04em; text-transform: uppercase; color: #fff; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; background: var(--ink); color: #fff; transition: all .25s ease; }
.faq-item[open] summary::after { content: "−"; background: var(--red); }
.faq-item p { margin: 0; padding: 0 60px 26px 0; color: rgba(255, 255, 255, .62); }

/* ---------- Contact ---------- */
.contact-wrap { --cut: 40px; background: var(--ink); padding: 56px; }
@media (max-width: 575.98px) { .contact-wrap { padding: 32px 22px; --cut: 24px; } }
.contact-wrap .f { font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .6); margin-bottom: 8px; display: block; }
.contact-wrap .form-control { background: var(--black); border: 1px solid var(--line-d); border-radius: 0; color: #fff; padding: 14px 16px; font-size: 15px; }
.contact-wrap .form-control::placeholder { color: rgba(255, 255, 255, .35); }
.contact-wrap .form-control:focus { background: var(--black); color: #fff; border-color: var(--red); box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label { font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 10px 16px; border: 1px solid var(--line-d); background: var(--black); color: rgba(255, 255, 255, .75); cursor: pointer; transition: all .2s ease; }
.chips input:checked + label { background: var(--red); border-color: var(--red); color: #fff; }
.chips input:focus-visible + label { outline: 2px solid #fff; outline-offset: 2px; }
.c-info a, .c-info div { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line-d); color: #fff; text-decoration: none; }
.c-info i { width: 48px; height: 48px; background: var(--red); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; clip-path: polygon(0 0, 75% 0, 100% 25%, 100% 100%, 0 100%); }
.c-info small { display: block; font-family: var(--display); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--gray); }
.form-msg { border-left: 3px solid var(--red); background: var(--black); padding: 12px 16px; font-size: 14.5px; color: #fff; }

/* ---------- Footer ---------- */
.footer { background: var(--red); color: rgba(255, 255, 255, .9); position: relative; padding: 130px 0 0; margin-top: 40px; clip-path: polygon(0 60px, 60% 60px, calc(60% + 60px) 0, 100% 0, 100% 100%, 0 100%); }
.footer .f-logo { height: 110px; width: auto; }
.footer h6 { font-family: var(--display); font-size: 14px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--black); margin-bottom: 18px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 10px; }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { color: var(--black); }
.footer .big-word { font-family: var(--display); font-weight: 700; font-size: clamp(70px, 17vw, 260px); line-height: .8; color: var(--black); letter-spacing: -.01em; margin: 60px 0 0; white-space: nowrap; user-select: none; text-transform: uppercase; }
.footer .big-word span { color: transparent; -webkit-text-stroke: 2px var(--black); }
.f-bar { background: var(--black); color: rgba(255, 255, 255, .6); font-size: 14px; padding: 18px 0; }
.f-bar .container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.f-bar a { color: #fff; text-decoration: none; font-family: var(--display); letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }
.f-bar a:hover { color: var(--red); }
@media (max-width: 767.98px) { .footer { clip-path: polygon(0 40px, 50% 40px, calc(50% + 40px) 0, 100% 0, 100% 100%, 0 100%); padding-top: 100px; } }

/* ---------- Reveal ---------- */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .rv { opacity: 1; transform: none; transition: none; } .ticker-track, .xp-bar span, .hud-head .live::before { animation: none; } }
