/* Kei Inference — neobrutalism x soft
   Thick ink borders + hard offset shadows (brutalist), pastel fills + big radii (soft),
   layered parallax scene in the hero. Mascots are framed as polaroid photo cards. */

@font-face { font-family: 'Space Grotesk'; src: url('/fonts/space-grotesk-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('/fonts/space-grotesk-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jetbrains-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jetbrains-mono-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --paper: #FBF8FF;
  --ink: #221C35;
  --muted: #5E5578;
  --violet: #8B5CF6;
  --violet-deep: #7C3AED;
  --violet-soft: #E9E4FF;
  --pink-soft: #FFD6E8;
  --yellow-soft: #FFE08A;
  --mint-soft: #B8F1CC;
  --sky-soft: #C7E4FF;
  --white: #FFFFFF;
  --ok: #0E9F6E;
  --warn: #D97706;
  --down: #DC2626;
  --idle: #8A83A3;
  --bd: 2.5px solid var(--ink);
  --r-lg: 20px;
  --r-md: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; overflow-x: clip; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: var(--violet-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--yellow-soft); color: var(--ink); }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; position: relative; }
/* Grid children must be allowed to shrink below content min-content (wide tables/code) */
.hero-grid > *, .pagehero > *, .ticket > *, .cta-band > *, .duo > *, .cards > *, .steps > *, footer.site .cols > * { min-width: 0; }
#out { min-width: 0; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* ---------- header ---------- */
header.site { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: var(--bd); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.logo:hover { text-decoration: none; }
.logo img { width: 40px; height: 40px; object-fit: cover; object-position: top; border: var(--bd); border-radius: 12px; background: #000; }
.logo b { color: var(--violet-deep); }
nav.main { display: flex; align-items: center; gap: 8px; }
nav.main a { color: var(--ink); font-size: 15px; font-weight: 700; padding: 8px 14px; border-radius: 999px; border: 2.5px solid transparent; }
nav.main a:hover { text-decoration: none; border-color: var(--ink); background: var(--white); }
nav.main a.act { border-color: var(--ink); background: var(--violet-soft); }
nav.main a.cta { background: var(--violet); color: #fff; border: var(--bd); box-shadow: 3px 3px 0 var(--ink); margin-left: 8px; }
nav.main a.cta:hover { background: var(--violet-deep); color: #fff; }
nav.main a.cta:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* ---------- buttons & chips ---------- */
.btn { display: inline-block; background: var(--violet); color: #fff; border: var(--bd); border-radius: 999px; padding: 12px 26px; font-family: inherit; font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); }
.btn:hover { background: var(--violet-deep); color: #fff; text-decoration: none; }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.ghost { background: var(--white); color: var(--ink); }
.btn.ghost:hover { background: var(--violet-soft); color: var(--ink); }
.btn.yellow { background: var(--yellow-soft); color: var(--ink); }
.btn.yellow:hover { background: var(--pink-soft); color: var(--ink); }
.pill { display: inline-block; padding: 4px 14px; border: 2px solid var(--ink); border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--white); color: var(--ink); }
.pill.ok { background: var(--mint-soft); }
.pill.warn { background: var(--yellow-soft); }
.pill.down { background: var(--pink-soft); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--idle); border: 2px solid var(--ink); margin-right: 8px; vertical-align: 0; }
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.down { background: var(--down); }
.dot.idle { background: var(--idle); }

/* ---------- hero + parallax scene ---------- */
.hero { position: relative; padding: 76px 0 70px; overflow: hidden; overflow: clip; }
.plx { position: absolute; pointer-events: none; will-change: transform; }
.blob { border: var(--bd); border-radius: 50%; }
.blob.v { background: var(--violet-soft); }
.blob.p { background: var(--pink-soft); }
.blob.y { background: var(--yellow-soft); }
.blob.m { background: var(--mint-soft); }
.star { font-size: 30px; color: var(--violet); font-weight: 700; }
.ring { border: var(--bd); border-radius: 50%; background: transparent; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 54px; align-items: center; position: relative; }
.hero h1 { font-size: clamp(44px, 6vw, 70px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 700; }
.hl { background: var(--yellow-soft); padding: 0 12px; border-radius: 12px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.lead { color: var(--muted); font-size: 18px; line-height: 1.65; margin: 24px 0 26px; max-width: 33em; }
.codebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--ink); color: #F4F1FA; border: var(--bd); border-radius: var(--r-md); box-shadow: 5px 5px 0 rgba(34, 28, 53, 0.25); padding: 13px 18px; font-family: 'JetBrains Mono', monospace; font-size: 15px; margin-bottom: 26px; }
.codebar .scheme { color: #A79FC0; }
.codebar button { background: var(--violet); color: #fff; border: 2px solid #F4F1FA; border-radius: 999px; padding: 5px 14px; font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.codebar button:hover { background: var(--violet-deep); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.status-teaser { margin-top: 28px; color: var(--muted); font-size: 15px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sticker { position: absolute; background: var(--white); border: var(--bd); border-radius: 999px; padding: 7px 16px; font-weight: 700; font-size: 14px; box-shadow: 4px 4px 0 var(--ink); pointer-events: none; white-space: nowrap; }
.sticker.s1 { background: var(--mint-soft); }
.sticker.s2 { background: var(--pink-soft); }

/* polaroid photo card */
.polaroid { background: var(--white); border: var(--bd); border-radius: var(--r-lg); padding: 12px 12px 14px; box-shadow: 8px 8px 0 var(--ink); transform: rotate(2.5deg); position: relative; }
.polaroid .ph { border-radius: 12px; overflow: hidden; background: #000; border: 2px solid var(--ink); }
.polaroid img { width: 100%; aspect-ratio: 4/4.6; object-fit: cover; object-position: top; }
.polaroid figcaption { display: flex; justify-content: space-between; gap: 10px; padding: 12px 6px 2px; font-weight: 700; font-size: 15px; }
.polaroid figcaption span:last-child { color: var(--muted); font-weight: 500; }
.polaroid .tape { position: absolute; top: -14px; left: 50%; transform: translateX(-50%) rotate(-3deg); width: 110px; height: 26px; background: var(--yellow-soft); border: 2px solid var(--ink); border-radius: 4px; opacity: 0.95; }

/* marquee */
.marquee { border-top: var(--bd); border-bottom: var(--bd); background: var(--violet-soft); overflow: hidden; padding: 10px 0; }
.marquee .track { display: flex; gap: 0; width: max-content; animation: mq 30s linear infinite; }
.marquee span { font-weight: 700; font-size: 15px; letter-spacing: 0.04em; padding: 0 18px; white-space: nowrap; }
.marquee i { color: var(--violet-deep); font-style: normal; }
@keyframes mq { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
section { padding: 64px 0; }
section.tint { background: var(--violet-soft); border-top: var(--bd); border-bottom: var(--bd); }
section.tint-y { background: #FFF6E0; border-top: var(--bd); border-bottom: var(--bd); }
h1.sec, h2.sec { font-size: 34px; letter-spacing: -0.02em; line-height: 1.12; margin-bottom: 12px; }
.sub { color: var(--muted); max-width: 38em; margin-bottom: 36px; font-size: 17px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: var(--white); border: var(--bd); border-radius: var(--r-lg); padding: 24px; box-shadow: 6px 6px 0 var(--ink); }
.card .thumb { border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; background: #000; margin-bottom: 18px; }
.card .thumb img { width: 100%; height: 200px; object-fit: cover; object-position: center 25%; }
.card h3 { font-size: 19px; margin-bottom: 8px; letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 15.5px; }
.card.c-v { box-shadow: 6px 6px 0 var(--violet); }
.card.c-p { box-shadow: 6px 6px 0 #F472B6; }
.card.c-m { box-shadow: 6px 6px 0 #34D399; }

/* pricing */
.ticket { display: grid; grid-template-columns: 1fr 1.15fr 230px; background: var(--white); border: var(--bd); border-radius: 24px; box-shadow: 9px 9px 0 var(--ink); overflow: hidden; }
.ticket .t-price { padding: 32px; background: var(--yellow-soft); border-right: 2.5px dashed var(--ink); }
.ticket .amt { font-size: 54px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; margin: 12px 0 8px; }
.ticket .t-price p { color: var(--muted); font-weight: 700; }
.ticket .t-list { padding: 32px; }
.ticket ul { list-style: none; }
.ticket li { padding: 8px 0 8px 26px; position: relative; border-bottom: 2px dashed #D9D2F0; font-weight: 500; }
.ticket li::before { content: ''; position: absolute; left: 0; top: 15px; width: 11px; height: 11px; border-radius: 4px; background: var(--violet); border: 2px solid var(--ink); }
.ticket li.soon { color: var(--muted); }
.ticket li.soon::before { background: var(--yellow-soft); }
.ticket .t-art { background: #000; border-left: 2.5px dashed var(--ink); display: flex; flex-direction: column; }
.ticket .t-art img { flex: 1; object-fit: contain; width: 100%; min-height: 180px; }
.ticket .t-art .btn { border: none; border-top: 2.5px dashed var(--ink); border-radius: 0; box-shadow: none; text-align: center; }
.ticket .t-art .btn:active { transform: none; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: var(--white); border: var(--bd); border-radius: var(--r-lg); padding: 24px; box-shadow: 6px 6px 0 var(--ink); }
.step .num { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border: var(--bd); border-radius: 50%; background: var(--pink-soft); font-size: 21px; font-weight: 700; margin-bottom: 14px; }
.step:nth-child(2) .num { background: var(--mint-soft); }
.step:nth-child(3) .num { background: var(--sky-soft); }
.step h3 { margin-bottom: 6px; font-size: 18px; }
.step p { color: var(--muted); font-size: 15px; }

/* code block */
.codeblock { background: var(--ink); border: var(--bd); border-radius: var(--r-lg); box-shadow: 7px 7px 0 rgba(34, 28, 53, 0.3); margin-top: 30px; overflow: hidden; }
.codeblock .bar { border-bottom: 2px solid rgba(244, 241, 250, 0.25); padding: 10px 18px; font-family: 'JetBrains Mono', monospace; font-size: 13px; color: #A79FC0; }
.codeblock pre { padding: 20px; overflow-x: auto; font-size: 14px; line-height: 1.7; color: #F4F1FA; }

/* faq */
.faq details { background: var(--white); border: var(--bd); border-radius: var(--r-md); padding: 18px 22px; margin-bottom: 14px; box-shadow: 4px 4px 0 var(--ink); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 17px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; font-size: 22px; line-height: 1; color: var(--violet-deep); }
.faq details[open ] summary::after { content: '–'; }
.faq details p { color: var(--muted); margin-top: 10px; max-width: 44em; }

/* cta band */
.cta-band { background: var(--ink); color: #F4F1FA; border: var(--bd); border-radius: 24px; box-shadow: 9px 9px 0 var(--violet); display: grid; grid-template-columns: 1fr 250px; overflow: hidden; }
.cta-band .in { padding: 38px; }
.cta-band h2 { font-size: 31px; letter-spacing: -0.02em; margin-bottom: 10px; }
.cta-band p { color: #C9C2E0; margin-bottom: 24px; max-width: 32em; }
.cta-band img { width: 100%; height: 100%; object-fit: contain; background: #000; }

/* ---------- inner pages ---------- */
.pagehero { display: grid; grid-template-columns: 1fr 290px; gap: 48px; align-items: center; padding: 58px 0 10px; position: relative; }
.pagehero .polaroid { transform: rotate(-2deg); }
.pagehero .polaroid img { aspect-ratio: 1/1; }
.keyin { width: 100%; background: var(--white); border: var(--bd); border-radius: var(--r-md); color: var(--ink); padding: 14px 18px; font-family: 'JetBrains Mono', monospace; font-size: 15px; margin-top: 20px; box-shadow: 4px 4px 0 var(--ink); }
.keyin:focus { outline: none; border-color: var(--violet-deep); }
.searchin { width: 100%; max-width: 460px; background: var(--white); border: var(--bd); border-radius: 999px; color: var(--ink); padding: 12px 20px; font-family: inherit; font-size: 16px; font-weight: 500; margin: 22px 0 12px; box-shadow: 4px 4px 0 var(--ink); }
.searchin:focus { outline: none; border-color: var(--violet-deep); }
.note { display: flex; gap: 10px; background: var(--violet-soft); border: var(--bd); border-radius: var(--r-md); padding: 14px 18px; color: var(--ink); font-size: 14.5px; margin-top: 24px; }
.note b { font-weight: 700; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.duo .card img { height: 160px; width: 100%; object-fit: cover; object-position: top; }
.pool-line { color: var(--muted); font-size: 15.5px; }
.pool-line b { color: var(--ink); }
.legend { color: var(--muted); font-size: 15px; display: flex; gap: 24px; flex-wrap: wrap; margin: 20px 0 16px; }
.legend b { color: var(--ink); }

/* tables */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
table th { text-align: left; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: var(--bd); white-space: nowrap; }
table td { padding: 10px 12px; border-bottom: 2px solid #E7E1F7; }
.tablecard { background: var(--white); border: var(--bd); border-radius: var(--r-lg); box-shadow: 6px 6px 0 var(--ink); padding: 8px 20px; }

/* ---------- footer ---------- */
footer.site { border-top: var(--bd); padding: 46px 0 30px; background: var(--white); }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
footer.site h4 { font-size: 16px; margin-bottom: 12px; }
footer.site p { color: var(--muted); font-size: 15px; max-width: 26em; }
footer.site .cols a { display: block; color: var(--muted); padding: 3px 0; font-size: 15px; font-weight: 500; }
footer.site .cols a:hover { color: var(--ink); }
footer.site .base { border-top: 2px solid #E7E1F7; margin-top: 30px; padding-top: 18px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { padding: 48px 0 52px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .polaroid { max-width: 400px; transform: rotate(1.5deg); }
  .sticker { display: none; }
  .cards, .steps, .duo { grid-template-columns: 1fr; }
  .ticket { grid-template-columns: 1fr; }
  .ticket .t-price { border-right: none; border-bottom: 2.5px dashed var(--ink); }
  .ticket .t-art { border-left: none; border-top: 2.5px dashed var(--ink); }
  .ticket .t-art img { max-height: 230px; }
  .ticket .amt { font-size: 44px; }
  .pagehero { grid-template-columns: 1fr; gap: 32px; }
  .pagehero .polaroid { max-width: 320px; }
  .cta-band { grid-template-columns: 1fr; }
  .cta-band img { max-height: 210px; }
  footer.site .cols { grid-template-columns: 1fr; }
  nav.main a:not(.cta) { display: none; }
  table { font-size: 14px; }
  table th, table td { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee .track { animation: none; }
}
