/* ===== Tokens ===== */
:root {
  --paper: #EEF3F5;
  --paper-raised: #FFFFFF;
  --navy: #16233A;
  --navy-soft: #24344E;
  --steel: #52667C;
  --ice: #4FA9D6;
  --ice-soft: #DCEEF6;
  --amber: #E8A23A;
  --amber-soft: #FBE6C4;
  --tag-metal-1: #E9EDEF;
  --tag-metal-2: #C7CFD4;
  --tag-metal-3: #F5F7F8;

  --display: 'Baloo 2', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius-lg: 26px;
  --radius-md: 16px;
  --wrap: 1120px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* subtle paper grain so flat blue/white doesn't feel like a template */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  margin: 0;
  color: var(--navy);
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(238, 243, 245, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(22, 35, 58, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 74px;
}

.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 9px;
}
.wordmark-sub { color: var(--ice); }
.wordmark-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--paper-raised);
  border: 1.5px solid rgba(22,35,58,0.1);
}

.header-nav {
  display: flex;
  gap: 28px;
  font-size: 0.95rem;
  font-weight: 600;
}
.header-nav a { opacity: 0.75; transition: opacity 0.15s; position: relative; padding-bottom: 4px; }
.header-nav a:hover { opacity: 1; }
.header-nav a.nav-active { opacity: 1; }
.header-nav a.nav-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 3px;
  border-radius: 3px;
  background: var(--ice);
}

/* ===== Hero ===== */
.hero { padding: 76px 0 60px; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: start;
}

.hero-copy { position: relative; }

.hero-sticker {
  position: absolute;
  top: -46px;
  right: -8px;
  width: 108px;
  height: auto;
  transform: rotate(6deg);
  filter: drop-shadow(0 14px 18px rgba(22,35,58,0.18));
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ice);
  font-weight: 700;
  margin: 0 0 14px;
}
.eyebrow-center { text-align: center; }

.hero h1 {
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
}

.hero-lede {
  margin-top: 20px;
  font-size: 1.08rem;
  color: var(--steel);
  max-width: 46ch;
}

.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

.btn {
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 24px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary {
  background: var(--navy);
  color: var(--paper);
  box-shadow: 0 6px 0 rgba(22,35,58,0.15);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid rgba(22,35,58,0.22);
}
.btn-ghost:hover { border-color: var(--navy); }

/* ===== Dog tag (signature element) ===== */
.hero-tag-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.tag-chain {
  position: absolute;
  top: -30px;
  width: 110px;
  height: 40px;
  border: 6px solid var(--tag-metal-2);
  border-bottom: none;
  border-radius: 60px 60px 0 0;
  opacity: 0.9;
}

.dogtag {
  position: relative;
  width: min(370px, 100%);
  background: linear-gradient(155deg, var(--tag-metal-3) 0%, var(--tag-metal-1) 45%, var(--tag-metal-2) 100%);
  border-radius: 30px;
  padding: 38px 30px 30px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 22px 40px -18px rgba(22, 35, 58, 0.35);
  transform: rotate(-2.2deg);
  border: 1px solid rgba(22,35,58,0.08);
}

.dogtag-ring {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 5px solid var(--tag-metal-2);
  background: var(--paper);
}

.dogtag-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--steel);
  margin: 18px 0 6px;
  font-weight: 700;
}
.dogtag-label:first-of-type { margin-top: 6px; }

.dogtag-value {
  width: 100%;
  text-align: left;
  font-family: var(--mono);
  font-size: clamp(0.92rem, 4.2vw, 1.06rem);
  font-weight: 700;
  color: var(--navy);
  background: rgba(255,255,255,0.6);
  border: 1px dashed rgba(22,35,58,0.25);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-wrap: anywhere;
  word-break: break-word;
  transition: background 0.15s, border-color 0.15s;
}
.dogtag-value:hover { background: var(--ice-soft); border-color: var(--ice); }
.dogtag-value-small { font-size: clamp(0.8rem, 3.8vw, 0.94rem); }
.dogtag-value .port { font-size: 0.78rem; color: var(--steel); font-weight: 500; overflow-wrap: normal; }
.copy-hint {
  font-family: var(--body);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ice);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dogtag-note {
  margin: 16px 2px 0;
  font-size: 0.82rem;
  color: var(--steel);
}

/* ===== Platforms ===== */
.platforms { padding: 10px 0 70px; }
.platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.platform-card {
  background: var(--paper-raised);
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid rgba(22,35,58,0.07);
}
.platform-icon { font-size: 1.6rem; }
.platform-card h3 { margin-top: 12px; font-size: 1.15rem; }
.platform-card p { color: var(--steel); margin-top: 8px; font-size: 0.95rem; }

/* ===== Section shared ===== */
.section-title { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.section-title-center { text-align: center; }

/* ===== Rules ===== */
.rules { padding: 70px 0; background: var(--paper-raised); border-top: 1px solid rgba(22,35,58,0.06); border-bottom: 1px solid rgba(22,35,58,0.06); }
.rules-list {
  list-style: none;
  margin: 44px auto 0;
  padding: 0;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.rules-list li {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 18px;
  align-items: start;
}
.rules-index {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--ice);
  background: var(--ice-soft);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.rules-list h4 { font-size: 1.02rem; }
.rules-list p { margin: 4px 0 0; color: var(--steel); font-size: 0.93rem; }
.rules-footnote {
  text-align: center;
  font-size: 0.8rem;
  color: var(--steel);
  margin-top: 34px;
  font-style: italic;
}

.rules-page { border-top: none; padding-top: 56px; }

.rules-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  max-width: 780px;
  margin: 0 auto;
}
.rules-intro-copy { color: var(--steel); margin-top: 14px; max-width: 40ch; }
.rules-mascot {
  width: 132px;
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 16px 20px rgba(22,35,58,0.16));
}

.strike-card {
  margin: 46px auto 0;
  max-width: 720px;
  background: var(--navy);
  border-radius: var(--radius-md);
  padding: 30px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: center;
}
.strike-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.strike-rule {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.92rem;
  color: rgba(238,243,245,0.75);
  margin: 0;
}
.strike-eq {
  font-family: var(--mono);
  color: var(--ice);
  margin: 2px 0;
}
.strike-result {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--paper);
  margin: 0;
}
.strike-result-final { color: var(--amber); }

@media (max-width: 620px) {
  .strike-card { grid-template-columns: 1fr; }
}

/* ===== Footer ===== */
.site-footer { padding: 40px 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; color: var(--steel); }
.footer-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1.5px solid rgba(22,35,58,0.1); }
.footer-socials { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-socials a { font-size: 0.88rem; color: var(--steel); font-weight: 600; }
.footer-socials a:hover { color: var(--ice); }

.footer-bottom {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(22,35,58,0.08);
  display: flex;
  justify-content: center;
}
.hyperveil-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper-raised);
  border: 1px solid rgba(22,35,58,0.1);
  border-radius: 999px;
  padding: 8px 18px;
  transition: border-color 0.15s, transform 0.15s;
}
.hyperveil-badge:hover { border-color: var(--ice); transform: translateY(-1px); }
.hyperveil-badge-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--steel); font-family: var(--mono); }
.hyperveil-badge-name { font-family: var(--display); font-weight: 700; font-size: 0.95rem; color: var(--ice); }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: var(--paper);
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 20px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 880px) {
  .header-nav { display: none; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-tag-wrap { padding-top: 30px; }
  .platform-grid { grid-template-columns: 1fr; }
  .hero-sticker { width: 84px; top: -34px; right: 0; }
  .rules-intro { flex-direction: column-reverse; text-align: center; gap: 20px; }
  .rules-mascot { margin: 0 auto; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 20px; }
  .dogtag { padding: 34px 20px 26px; }
  .hero-sticker { width: 68px; top: -26px; }
}

/* Keyboard focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2.5px solid var(--ice);
  outline-offset: 2px;
}
