/* TeoDaTank · "The guild hall"
   Night blue with gold trim and a sky-blue glint, sampled from the approved
   social mark and logo. Playful and warm: a crest, a loot table, portals. */

:root {
  --night: var(--teo-night);
  --night-2: #0b1b4f;
  --night-3: #112463;
  --surface: var(--night);
  --surface-2: var(--night-2);
  --on-surface: var(--teo-ice);
  --on-surface-muted: rgb(246 247 255 / 0.68);
  --line: rgb(246 247 255 / 0.12);
  --accent-1: var(--teo-gold);
  --accent-2: var(--teo-sky);
  --on-accent: var(--teo-night);
  --gold-grad: linear-gradient(135deg, var(--teo-gold), var(--teo-gold-light) 55%, var(--teo-gold));
  --accent-grad: var(--gold-grad);
  --focus: var(--teo-gold-light);
  --mast-bg: var(--night);
  --mast-line: var(--line);
  --nav-active-bg: var(--teo-ice);
  --nav-active-fg: var(--night);
  --logo-h: 48px;
  --foot-bg: #040b24;
  --foot-fg: var(--teo-ice);
}
body { background: var(--night); }
.btn--gold { --btn-fg: var(--night); background: var(--gold-grad); box-shadow: 0 10px 30px -10px rgb(228 168 18 / 0.7); }
.btn--ghost { --btn-fg: var(--teo-ice); --btn-line: rgb(246 247 255 / 0.35); }
.btn--ghost:hover { --btn-line: var(--teo-sky); color: var(--teo-sky); }
.masthead__cta { min-height: 40px; font-size: 0.75rem; padding-inline: 1.1em; }
.masthead--teo .masthead__logo img { filter: drop-shadow(0 0 12px rgb(68 186 254 / 0.35)); }
@media (max-width: 720px) { .masthead__cta { margin-left: auto; } }
.eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--teo-sky); display: inline-flex; align-items: center; gap: 0.7em; }
.eyebrow::before { content: ""; width: 10px; height: 10px; background: var(--gold-grad); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }

/* ---- Hero ---------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; isolation: isolate; padding-top: clamp(3rem, 2rem + 4vw, 6rem); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(70% 60% at 75% 40%, #123083, transparent 70%), linear-gradient(180deg, var(--night), #050e2c); }
.hero__rays {
  position: absolute; z-index: -1; width: 1600px; height: 1600px; left: 75%; top: 42%; translate: -50% -50%;
  background: repeating-conic-gradient(from 0deg, rgb(255 228 108 / 0.09) 0 6deg, transparent 6deg 18deg);
  mask-image: radial-gradient(closest-side, #000 20%, transparent 70%);
}
@media (prefers-reduced-motion: no-preference) { .hero__rays { animation: spin 90s linear infinite; } @keyframes spin { to { rotate: 360deg; } } }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: var(--s-7); align-items: center; }
.hero__title { font-size: var(--step-6); font-weight: 800; line-height: 0.92; letter-spacing: -0.045em; margin-top: var(--s-5); }
.hero__title span { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: italic; display: inline-block; padding: 0 0.16em 0.06em 0.02em; margin-right: -0.04em; }
.hero__lede { font-size: var(--step-1); color: var(--on-surface-muted); max-width: 44ch; margin-top: var(--s-5); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }

.crest { position: relative; justify-self: center; width: min(100%, 520px); }
.crest__glow { position: absolute; inset: 10%; border-radius: 50%; background: radial-gradient(closest-side, rgb(68 186 254 / 0.5), transparent); filter: blur(30px); }
.crest__logo { position: relative; width: 100%; height: auto; border-radius: 32px; box-shadow: 0 0 0 2px rgb(228 168 18 / 0.6), 0 40px 120px -20px rgb(0 0 0 / 0.7); }
@media (prefers-reduced-motion: no-preference) { .crest__logo { animation: float 6s var(--ease-in-out) infinite alternate; } @keyframes float { to { transform: translateY(-12px); } } }
.crest__badge {
  position: absolute; display: inline-flex; align-items: center; gap: 0.5em; padding: 0.6em 1em; border-radius: var(--radius-pill);
  background: rgb(7 19 59 / 0.85); border: 1px solid rgb(228 168 18 / 0.5); backdrop-filter: blur(8px);
  font-size: 0.8125rem; font-weight: 600; color: var(--teo-gold-light); box-shadow: 0 12px 30px -10px rgb(0 0 0 / 0.6);
}
.crest__badge--a { left: -6%; top: 12%; }
.crest__badge--b { right: -6%; bottom: 14%; }

.statbar { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: var(--s-8); border-top: 1px solid var(--line); }
.statbar li { padding: var(--s-5) var(--s-4) var(--s-6) 0; display: grid; gap: var(--s-1); }
.statbar li + li { padding-left: var(--s-5); border-left: 1px solid var(--line); }
.statbar b { font-family: var(--font-display); font-weight: 800; font-size: var(--step-4); letter-spacing: -0.04em; line-height: 1; color: var(--teo-gold-light); }
.statbar span { font-size: 0.875rem; color: var(--on-surface-muted); }

/* ---- Projects (loot table) ------------------------------------------------ */
.sec-head { display: grid; gap: var(--s-3); margin-bottom: var(--s-7); max-width: 720px; }
.sec-head h2 { font-size: var(--step-5); font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; }
.sec-head p:not(.eyebrow) { color: var(--on-surface-muted); font-size: var(--step-1); }
.projects { background: linear-gradient(180deg, #050e2c, var(--night) 30%); }
.loot { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.item { --rim: var(--teo-gold); }
.item--qol { --rim: var(--teo-sky); }
.item__frame {
  position: relative; height: 100%; display: flex; flex-direction: column; border-radius: 22px; padding: 2px;
  background: linear-gradient(160deg, var(--rim), rgb(246 247 255 / 0.08) 35%, rgb(246 247 255 / 0.04) 65%, var(--rim));
  transition: transform var(--dur-3) var(--ease-out), box-shadow var(--dur-3);
}
.item__frame:hover { transform: translateY(-8px) rotate(-0.5deg); box-shadow: 0 30px 70px -24px color-mix(in srgb, var(--rim) 70%, transparent); }
.item__art { border-radius: 20px 20px 0 0; overflow: hidden; background: #050e2c; aspect-ratio: 16 / 10; display: grid; place-items: center; }
.item__art img { width: 62%; height: auto; border-radius: 14px; transition: transform var(--dur-4) var(--ease-out); }
.item__frame:hover .item__art img { transform: scale(1.06) rotate(-2deg); }
.item__body { flex: 1; display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-5); background: var(--night-2); border-radius: 0 0 20px 20px; }
.item__kind { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rim); }
.item__name { font-size: var(--step-2); letter-spacing: -0.025em; line-height: 1.1; }
.item__line { color: var(--on-surface-muted); font-size: 0.9375rem; }
.item__stat { margin-top: auto; display: grid; gap: var(--s-2); padding-top: var(--s-3); }
.item__count { font-size: 0.875rem; color: var(--on-surface-muted); }
.item__count b { font-family: var(--font-display); font-size: var(--step-2); color: var(--teo-ice); margin-right: 0.15em; }
.item__bar { height: 6px; border-radius: 6px; background: rgb(246 247 255 / 0.08); overflow: hidden; }
.item__bar i { display: block; height: 100%; width: var(--w); border-radius: 6px; background: linear-gradient(90deg, var(--rim), var(--teo-gold-light)); }
@media (prefers-reduced-motion: no-preference) {
  .js .item__bar i { width: 0; transition: width 1.4s var(--ease-out) 0.3s; }
  .js .item.is-in .item__bar i { width: var(--w); }
}
.item__cta {
  display: flex; justify-content: space-between; align-items: center; margin-top: var(--s-3); padding: 0.85em 1.1em; border-radius: 12px;
  background: rgb(246 247 255 / 0.06); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 0.9375rem;
  transition: background-color var(--dur-2), color var(--dur-2), border-color var(--dur-2);
}
.item__cta:hover { background: var(--gold-grad); color: var(--night); border-color: transparent; }
.loot__note { margin-top: var(--s-5); font-size: 0.8125rem; color: var(--on-surface-muted); }
.side-quest {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s-1) var(--s-5); margin-top: var(--s-6);
  padding: var(--s-5) var(--s-6); border-radius: 18px; border: 1.5px dashed rgb(228 168 18 / 0.45); text-decoration: none;
  transition: border-color var(--dur-2), background-color var(--dur-2);
}
.side-quest:hover { border-color: var(--teo-gold); background: rgb(228 168 18 / 0.06); }
.side-quest__tag { grid-row: span 2; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teo-gold-light); padding: 0.4em 0.7em; border-radius: 6px; background: rgb(228 168 18 / 0.12); }
.side-quest__name { font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); }
.side-quest__line { grid-column: 2; font-size: 0.875rem; color: var(--on-surface-muted); }
.side-quest__go { grid-row: 1 / span 2; grid-column: 3; font-size: 1.4rem; color: var(--teo-gold-light); }

/* ---- Channels (portals) ---------------------------------------------------- */
.channels { border-top: 1px solid var(--line); }
.portals { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.portal {
  position: relative; display: flex; flex-direction: column; gap: var(--s-2); min-height: 260px; padding: var(--s-6);
  border-radius: 22px; background: var(--night-2); border: 1px solid var(--line); text-decoration: none; overflow: hidden; isolation: isolate;
  transition: transform var(--dur-3) var(--ease-out), border-color var(--dur-2);
}
.portal::before {
  content: ""; position: absolute; z-index: -1; width: 340px; height: 340px; right: -120px; top: -140px; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(68 186 254 / 0.35), transparent); transition: transform var(--dur-4) var(--ease-out);
}
.portal--youtube::before { background: radial-gradient(closest-side, rgb(228 168 18 / 0.3), transparent); }
.portal--plays::before { background: radial-gradient(closest-side, rgb(6 70 254 / 0.55), transparent); }
.portal:hover { transform: translateY(-6px); border-color: rgb(246 247 255 / 0.3); }
.portal:hover::before { transform: scale(1.6); }
.portal__name { font-family: var(--font-display); font-weight: 800; font-size: var(--step-4); letter-spacing: -0.04em; line-height: 1; margin-top: auto; }
.portal__handle { color: var(--teo-sky); font-weight: 600; }
.portal__line { color: var(--on-surface-muted); font-size: 0.9375rem; max-width: 34ch; }
.portal--plays img { height: 44px; width: auto; align-self: flex-start; margin-top: auto; margin-bottom: var(--s-3); }
.portal__go { position: absolute; top: var(--s-5); right: var(--s-5); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line); font-size: 1.1rem; transition: transform var(--dur-3) var(--ease-out), background-color var(--dur-2), color var(--dur-2); }
.portal__go svg { width: 18px; }
.portal:hover .portal__go { background: var(--teo-ice); color: var(--night); transform: rotate(-45deg); }
.portal--twitch:hover .portal__go, .portal--youtube:hover .portal__go { transform: none; }

/* ---- Responsive ----------------------------------------------------------- */
@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr; }
  .crest { width: min(80%, 420px); }
  .loot, .portals { grid-template-columns: 1fr; }
  .statbar { grid-template-columns: 1fr 1fr; }
  .statbar li:nth-child(3) { padding-left: 0; border-left: 0; }
  .statbar li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .portal { min-height: 200px; }
}
@media (max-width: 560px) {
  .crest__badge { font-size: 0.6875rem; }
  .crest__badge--a { left: -4%; top: 4%; }
  .crest__badge--b { right: -4%; bottom: 4%; }
  .side-quest { grid-template-columns: 1fr auto; }
  .side-quest__tag { grid-row: auto; justify-self: start; }
  .side-quest__name, .side-quest__line { grid-column: 1; }
  .side-quest__go { grid-row: 1 / span 3; grid-column: 2; }
  .statbar b { font-size: var(--step-3); }
}
