/* ===========================================================================
   Trinity Force — company site
   Aesthetic: forged obsidian / esports-tech. Three powers → one artifact.
   =========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Unbounded:wght@400;500;600;700;800&display=swap");
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css");

:root {
  /* surfaces */
  --bg:        #0a0c12;
  --bg-2:      #0e1119;
  --panel:     #12161f;
  --line:      rgba(255, 255, 255, 0.08);
  --line-2:    rgba(255, 255, 255, 0.16);

  /* ink */
  --ink:       #eef1f7;
  --ink-soft:  #aab2c2;
  --ink-mute:  #6b7385;

  /* the three forces */
  --gold:      #f5c451;
  --cyan:      #46d6e0;
  --rose:      #f0607f;

  --accent:    var(--gold);

  --maxw:      1120px;
  --radius:    18px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);

  --display:   "Unbounded", "Pretendard", system-ui, sans-serif;
  --body:      "Pretendard", "Pretendard Variable", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* atmospheric background: forge-glow + grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(58% 46% at 50% -4%, rgba(245, 196, 81, 0.16), transparent 70%),
    radial-gradient(48% 40% at 10% 16%, rgba(70, 214, 224, 0.10), transparent 70%),
    radial-gradient(48% 42% at 90% 82%, rgba(240, 96, 127, 0.10), transparent 72%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 62px 62px;
  -webkit-mask-image: radial-gradient(72% 60% at 50% 32%, #000 0%, transparent 86%);
          mask-image: radial-gradient(72% 60% at 50% 32%, #000 0%, transparent 86%);
  opacity: 0.5;
  pointer-events: none;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

a { color: inherit; text-decoration: none; }

/* ---------- top bar ---------- */
header.bar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(10, 12, 18, 0.86), rgba(10, 12, 18, 0.5));
  border-bottom: 1px solid var(--line);
}
/* tricolor hairline beneath the header */
header.bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent,
    rgba(245, 196, 81, 0.5), rgba(70, 214, 224, 0.5), rgba(240, 96, 127, 0.5), transparent);
  opacity: 0.5;
}
.bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 70px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.05em;
  font-size: 0.92rem;
}
.brand .mark { width: 26px; height: 26px; flex: none; }
.brand b { color: var(--ink); }

.nav { display: flex; align-items: center; gap: 24px; }
.nav a {
  font-size: 0.82rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  transition: color 0.2s var(--ease);
}
.nav a:hover { color: var(--ink); }

/* language toggle */
.lang {
  display: inline-flex;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  overflow: hidden;
  font-family: var(--display);
  font-size: 0.66rem;
  font-weight: 600;
}
.lang button {
  background: transparent;
  color: var(--ink-mute);
  border: 0;
  padding: 6px 12px;
  cursor: pointer;
  font-family: var(--display);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  /* transition color only — background flips instantly so active state never blurs */
  transition: color 0.15s var(--ease);
}
.lang button.on { background: var(--gold); color: #1a1205; }

/* ---------- language visibility ---------- */
[data-lang] { display: none; }
html[lang="ko"] [data-lang="ko"] { display: revert; }
html[lang="en"] [data-lang="en"] { display: revert; }

/* ---------- hero ---------- */
main { flex: 1; }

.hero {
  position: relative;
  text-align: center;
  padding: clamp(64px, 11vw, 128px) 0 clamp(56px, 8vw, 104px);
}
.emblem-stage {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}
.emblem-float { animation: float 7s ease-in-out infinite alternate; }
.emblem { width: clamp(168px, 30vw, 250px); height: auto; display: block; }

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 24px;
}
.eyebrow .sep-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }

.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.5rem, 7.4vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: -0.01em;
  margin-bottom: 26px;
  text-wrap: balance;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--gold), var(--cyan) 50%, var(--rose));
  background-size: 200% auto;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shimmer 9s linear infinite;
}
.hero p.lede {
  max-width: 600px;
  margin: 0 auto;
  font-size: clamp(1rem, 2.3vw, 1.16rem);
  color: var(--ink-soft);
  text-wrap: pretty;
}
.hero .lede b { color: var(--ink); font-weight: 600; }

/* ---------- three forces ---------- */
.forces {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.force {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border-radius: var(--radius);
  padding: 30px 26px 32px;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
/* top color bar */
.force::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--c);
  opacity: 0.9;
}
/* corner glow tinted by the force color */
.force::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -20px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 17%, transparent), transparent 70%);
  pointer-events: none;
}
.force:hover {
  transform: translateY(-6px);
  border-color: var(--line-2);
  box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--c) 50%, transparent);
}
.force .num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--c);
  letter-spacing: 0.1em;
}
.force h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 14px 0 8px;
}
.force p { font-size: 0.92rem; color: var(--ink-soft); text-wrap: pretty; }

/* ---------- section heading ---------- */
.section { padding: clamp(40px, 7vw, 80px) 0; scroll-margin-top: 90px; }
.section.alt { border-top: 1px solid var(--line); padding: clamp(48px, 8vw, 88px) 0; }
.kicker {
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.7rem, 4.4vw, 2.7rem);
  line-height: 1.05;
  margin-bottom: 36px;
  letter-spacing: -0.01em;
}
.section.alt h2 { margin-bottom: 20px; }
.section .body { max-width: 640px; color: var(--ink-soft); font-size: 1.02rem; text-wrap: pretty; }
.section .body p + p { margin-top: 14px; }

/* product tiles */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 32px;
  max-width: 720px;
}
.tile {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 16px 18px;
  background: var(--panel);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.tile:hover { transform: translateY(-3px); border-color: rgba(245, 196, 81, 0.4); }
.tile .icon {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 14px;
  background-image: repeating-linear-gradient(135deg, rgba(245, 196, 81, 0.18) 0 6px, transparent 6px 12px);
  border: 1px solid rgba(245, 196, 81, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.5rem;
  color: var(--gold);
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-align: center;
}
.tile .name { display: flex; align-items: center; gap: 8px; }
.tile .name .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; }
.tile .name b { font-weight: 600; color: var(--ink); font-size: 0.94rem; }
.tile .sub { font-size: 0.82rem; color: var(--ink-mute); margin-top: 3px; }
.tile .min { min-width: 0; }

.tile.soon { border-style: dashed; background: transparent; }
.tile.soon:hover { transform: none; border-color: var(--line-2); }
.tile.soon .plus {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 14px;
  border: 1px dashed var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-mute);
  font-size: 1.4rem;
}
.tile.soon .label { font-weight: 600; color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- legal pages ---------- */
.legal { padding: clamp(48px, 8vw, 84px) 0 80px; }
.legal .lead { max-width: 780px; }
.legal .backlink {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--ink-mute);
  margin-bottom: 26px;
  transition: color 0.2s var(--ease);
}
.legal .backlink:hover { color: var(--ink-soft); }
.legal .backlink .arrow { font-size: 1rem; line-height: 1; }
.legal .eyebrow-l {
  display: inline-flex;
  font-family: var(--display);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.legal .eyebrow-l.cyan { color: var(--cyan); }
.legal h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 5.6vw, 3.1rem);
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin-bottom: 14px;
}
.legal .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--ink-mute);
  font-size: 0.82rem;
  margin-bottom: 44px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.legal .meta .hl { color: var(--ink-soft); }
.legal .meta .sep { color: rgba(107, 115, 133, 0.5); }
.legal .body { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.78; }
.legal h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.18rem;
  margin: 42px 0 12px;
  letter-spacing: -0.005em;
  scroll-margin-top: 90px;
}
.legal h2 .idx {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  flex: none;
}
.legal p { margin-bottom: 12px; }
.legal ul { margin: 0 0 14px 1.1rem; }
.legal li { margin-bottom: 7px; }
.legal a.inline { color: var(--cyan); border-bottom: 1px solid rgba(70, 214, 224, 0.4); }
.legal strong { color: var(--ink); font-weight: 600; }
.placeholder {
  background: rgba(245, 196, 81, 0.12);
  color: var(--gold);
  border-radius: 4px;
  padding: 0 5px;
  font-size: 0.92em;
}

/* ---------- footer ---------- */
footer.foot {
  border-top: 1px solid var(--line);
  padding: 46px 0 40px;
  margin-top: auto;
}
.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.foot .left { display: flex; align-items: center; gap: 12px; }
.foot .mark { width: 22px; height: 22px; }
.foot .co { font-family: var(--display); font-weight: 600; font-size: 0.84rem; letter-spacing: 0.05em; }
.foot .links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot .links a { font-size: 0.82rem; color: var(--ink-soft); transition: color 0.2s var(--ease); }
.foot .links a:hover { color: var(--ink); }
.foot .copy {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--ink-mute);
  font-size: 0.74rem;
  letter-spacing: 0.01em;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.foot .copy .sep { color: rgba(107, 115, 133, 0.5); }

/* ---------- emblem + entrance animation ---------- */
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes pulse   { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
@keyframes draw    { from { stroke-dashoffset: 240; } to { stroke-dashoffset: 0; } }
@keyframes float   { from { transform: translateY(6px); } to { transform: translateY(-10px); } }
@keyframes shimmer { to { background-position: 200% center; } }
/* rest state is the *visible* state — entrance only nudges position, never opacity */
@keyframes rise    { from { transform: translateY(20px); } to { transform: none; } }

.emblem .ring1 { transform-box: fill-box; transform-origin: center; animation: spin 64s linear infinite; }
.emblem .ring2 { transform-box: fill-box; transform-origin: center; animation: spin 96s linear infinite reverse; }
.emblem .orbit { transform-box: view-box; transform-origin: 110px 114px; animation: spin 16s linear infinite; }
.emblem .edge  { animation: draw 1.4s var(--ease) forwards; }
.emblem .edge.e2 { animation-delay: 0.2s; }
.emblem .edge.e3 { animation-delay: 0.4s; }
.emblem .node  { animation: pulse 3.4s ease-in-out infinite; }
.emblem .node.n2 { animation-delay: 1.1s; }
.emblem .node.n3 { animation-delay: 2.2s; }

.rise { animation: rise 0.9s var(--ease) both; }
.d1 { animation-delay: 0.15s; }
.d2 { animation-delay: 0.30s; }
.d3 { animation-delay: 0.45s; }

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

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .nav { gap: 14px; }
  .nav a.hide-sm { display: none; }
  .forces { grid-template-columns: 1fr; }
  .foot .wrap { flex-direction: column; align-items: flex-start; }
}
