/* ─────────────────────────────────────────────────────────────────────────────
   BoundlessFiction — static site
   Ink & Ember: deep night-indigo, violet + amber accents, comic halftone
   texture, Bengali display type as a first-class design element.
   ──────────────────────────────────────────────────────────────────────────── */

:root {
  --ink: #0c0a14;            /* page background — near-black indigo        */
  --ink-2: #14101f;          /* raised surfaces                            */
  --ink-3: #1c1730;          /* cards                                      */
  --line: rgba(167, 139, 250, 0.16);
  --violet: #8b5cf6;
  --violet-deep: #6d28d9;
  --ember: #f59e0b;          /* warm accent — star/amber from the app      */
  --paper: #f5f1e8;          /* light "paper" card for legal docs          */
  --text: #ece8f4;
  --text-dim: #a79fbd;
  --text-mute: #6f6885;
  --display: "Fraunces", Georgia, serif;
  --body: "Albert Sans", "Segoe UI", sans-serif;
  --bengali: "Noto Serif Bengali", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--ink);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grain + vignette atmosphere over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

::selection { background: var(--violet); color: #fff; }

a { color: inherit; text-decoration: none; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }

/* ── Header ────────────────────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(12, 10, 20, 0.78);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo img.mark {
  width: 34px; height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 3px 12px rgba(139, 92, 246, 0.5));
}
.logo em { font-style: normal; color: var(--violet); }
nav.links { display: flex; gap: 28px; font-size: 0.88rem; font-weight: 600; }
.menu-toggle { display: none; }
.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.menu-btn span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.menu-toggle:checked ~ .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle:checked ~ .menu-btn span:nth-child(2) { opacity: 0; }
.menu-toggle:checked ~ .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
nav.links a {
  color: var(--text-dim);
  position: relative;
  padding: 4px 0;
  transition: color 0.22s;
}
nav.links a:hover, nav.links a[aria-current] { color: var(--text); }
nav.links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--ember));
  transition: right 0.25s ease;
}
nav.links a:hover::after, nav.links a[aria-current]::after { right: 0; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 110px 0 90px;
  overflow: hidden;
}
/* violet aurora */
.hero::before {
  content: "";
  position: absolute;
  width: 720px; height: 720px;
  top: -320px; right: -180px;
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.32), transparent 70%);
  filter: blur(8px);
}
/* ember glow bottom-left */
.hero::after {
  content: "";
  position: absolute;
  width: 460px; height: 460px;
  bottom: -260px; left: -140px;
  background: radial-gradient(closest-side, rgba(245, 158, 11, 0.14), transparent 70%);
}
/* giant decorative Bengali glyph */
.hero .glyph {
  position: absolute;
  right: -40px;
  top: 40%;
  transform: translateY(-50%) rotate(-6deg);
  font-family: var(--bengali);
  font-weight: 800;
  font-size: clamp(11rem, 30vw, 24rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(167, 139, 250, 0.16);
  user-select: none;
  pointer-events: none;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
  color: var(--ember);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: rise 0.7s 0.05s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ember);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55); }
  60% { box-shadow: 0 0 0 9px rgba(245, 158, 11, 0); }
}
.hero-cols {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
.hero-art {
  justify-self: center;
  position: relative;
  -webkit-box-reflect: below 6px linear-gradient(transparent 52%, rgba(255, 255, 255, 0.16));
  animation: rise 0.9s 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero-art img {
  width: min(320px, 64vw);
  display: block;
  filter: drop-shadow(0 24px 70px rgba(139, 92, 246, 0.5));
  animation: float 7s ease-in-out infinite;
}
.hero-art .halo {
  position: absolute;
  inset: -22%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.3), transparent 72%);
  filter: blur(6px);
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin: 28px 0 10px;
  max-width: 15ch;
  animation: rise 0.7s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero h1 .accent {
  font-style: italic;
  background: linear-gradient(100deg, var(--violet) 10%, #c4b5fd 50%, var(--ember) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .bn {
  font-family: var(--bengali);
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  color: var(--violet);
  font-weight: 600;
  margin-bottom: 22px;
  animation: rise 0.7s 0.25s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero p.lede {
  max-width: 56ch;
  color: var(--text-dim);
  font-size: 1.08rem;
  animation: rise 0.7s 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
  animation: rise 0.7s 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--violet), var(--violet-deep));
  color: #fff;
  box-shadow: 0 8px 26px rgba(139, 92, 246, 0.4);
}
.btn-primary:hover { box-shadow: 0 12px 34px rgba(139, 92, 246, 0.55); }
.btn-play {
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  border-radius: 14px;
  padding: 10px 22px 10px 16px;
  gap: 12px;
}
.btn-play:hover { border-color: rgba(255, 255, 255, 0.45); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.btn-play .lines { display: flex; flex-direction: column; line-height: 1.18; text-align: left; }
.btn-play .lines .small {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.btn-play .lines .big { font-size: 1.05rem; font-weight: 700; }

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover { color: var(--text); border-color: rgba(167, 139, 250, 0.4); }

/* ── Panels (manga-panel feature cards) ───────────────────────────────── */
.panels {
  padding: 30px 0 100px;
}
.panels .kicker, .kicker {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--ember);
  margin-bottom: 12px;
}
.panels h2, .section h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  letter-spacing: -0.02em;
  margin-bottom: 42px;
  max-width: 24ch;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 1px 1px, rgba(167, 139, 250, 0.07) 1px, transparent 0) 0 0 / 14px 14px,
    linear-gradient(160deg, var(--ink-3), var(--ink-2));
  padding: 28px 26px 30px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.panel:hover { transform: translateY(-5px); border-color: rgba(167, 139, 250, 0.42); }
.panel:nth-child(2) { transform: translateY(18px); }
.panel:nth-child(2):hover { transform: translateY(13px); }
.panel .num {
  position: absolute;
  top: 10px; right: 16px;
  font-family: var(--display);
  font-style: italic;
  font-size: 3.2rem;
  color: rgba(167, 139, 250, 0.12);
  font-weight: 700;
}
.panel .ic {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  margin-bottom: 18px;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.3);
}
.panel h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.18rem;
  margin-bottom: 8px;
}
.panel p { color: var(--text-dim); font-size: 0.93rem; }
.panel .bn-tag {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--bengali);
  color: var(--violet);
  font-size: 0.95rem;
  opacity: 0.85;
}

/* ── Formats chips ───────────────────────────────────────────────────── */
.formats { padding: 0 0 96px; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 26px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--ink-3), var(--ink-2));
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.02rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.chip:hover { transform: translateY(-3px) rotate(-1deg); border-color: rgba(167, 139, 250, 0.5); }
.chip.more { color: var(--ember); border-style: dashed; border-color: rgba(245, 158, 11, 0.45); }
.globe-line {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border-left: 3px solid var(--ember);
  padding-left: 18px;
  max-width: 62ch;
}
.globe-line p { color: var(--text-dim); margin: 0; }
.globe-line strong { color: var(--text); }

/* ── Marquee strip ────────────────────────────────────────────────────── */
.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  overflow: hidden;
  white-space: nowrap;
  background: rgba(139, 92, 246, 0.05);
}
.strip .track {
  display: inline-block;
  animation: scroll 30s linear infinite;
}
.strip span {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-mute);
  margin: 0 28px;
}
.strip span.bn { font-family: var(--bengali); font-style: normal; color: var(--violet); }
.strip span.star { color: var(--ember); }
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── Generic content sections (about / contact) ──────────────────────── */
.section { padding: 90px 0; }
.section p { color: var(--text-dim); max-width: 64ch; margin-bottom: 18px; }
.section p strong { color: var(--text); }
.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}
.stat-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  background: linear-gradient(160deg, var(--ink-3), var(--ink-2));
  margin-bottom: 16px;
}
.stat-card .big {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.stat-card .bn-line {
  font-family: var(--bengali);
  color: var(--violet);
  font-size: 1.05rem;
}
.stat-card p { font-size: 0.9rem; margin: 6px 0 0; }

/* contact */
.contact-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 44px 40px;
  text-align: center;
  background:
    radial-gradient(circle at 1px 1px, rgba(167, 139, 250, 0.07) 1px, transparent 0) 0 0 / 14px 14px,
    linear-gradient(160deg, var(--ink-3), var(--ink-2));
  max-width: 560px;
  margin: 0 auto;
}
.contact-card .ic {
  width: 58px; height: 58px;
  margin: 0 auto 18px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--violet), var(--violet-deep));
  box-shadow: 0 8px 26px rgba(139, 92, 246, 0.4);
}
.contact-card h2 { margin-bottom: 8px; }
.contact-card .email {
  display: inline-block;
  margin: 18px 0 6px;
  font-family: var(--display);
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 600;
  color: var(--violet);
  border-bottom: 2px solid rgba(139, 92, 246, 0.4);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.contact-card .email:hover { color: #c4b5fd; border-color: var(--ember); }
.contact-card .hint { font-size: 0.85rem; color: var(--text-mute); }

/* ── Legal pages — paper card ─────────────────────────────────────────── */
.paper-wrap { padding: 70px 0 90px; }
.paper {
  background: var(--paper);
  border-radius: 20px;
  padding: clamp(20px, 5vw, 64px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  overflow-wrap: break-word;
}
/* Termly embeds tables (US-residents section) wider than a phone screen —
   let them scroll horizontally inside the card instead of bursting it. */
.paper table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}
.paper img { max-width: 100%; height: auto; }
.paper-title {
  margin-bottom: 30px;
}
.paper-title .kicker { color: var(--violet); }
.paper-title h2 { margin-bottom: 6px; }
.paper-title p { color: var(--text-mute); font-size: 0.9rem; }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  padding: 46px 0 54px;
  position: relative;
  z-index: 2;
}
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  align-items: center;
  justify-content: space-between;
}
.foot .links { display: flex; flex-wrap: wrap; gap: 22px; font-size: 0.85rem; }
.foot .links a { color: var(--text-mute); transition: color 0.2s; }
.foot .links a:hover { color: var(--text); }
.foot .copy { font-size: 0.82rem; color: var(--text-mute); }
.foot .copy .bn { font-family: var(--bengali); color: var(--violet); }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 880px) {
  .grid { grid-template-columns: 1fr; }
  .panel:nth-child(2) { transform: none; }
  .panel:nth-child(2):hover { transform: translateY(-5px); }
  .two-col { grid-template-columns: 1fr; gap: 30px; }
  .hero-cols { grid-template-columns: 1fr; gap: 34px; }
  .hero-art { order: -1; -webkit-box-reflect: none; }
  .hero-art img { width: min(190px, 48vw); }
  .hero { padding: 56px 0 56px; }
  .hero .glyph {
    font-size: clamp(8rem, 38vw, 13rem);
    top: 16%;
    right: -60px;
    opacity: 0.6;
  }
  .section { padding: 60px 0; }
  .panels { padding: 16px 0 64px; }
  .formats { padding: 0 0 64px; }
  nav.links { gap: 16px; font-size: 0.82rem; }
}

/* ── Hamburger nav on phones ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .menu-btn { display: flex; }
  nav.links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
    background: rgba(12, 10, 20, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
  }
  .menu-toggle:checked ~ nav.links { display: flex; animation: menuDrop 0.22s ease both; }
  nav.links a {
    padding: 14px 2px;
    font-size: 1rem;
    border-bottom: 1px solid rgba(167, 139, 250, 0.08);
  }
  nav.links a:last-child { border-bottom: none; }
  nav.links a::after { display: none; }
  nav.links a.hide-sm { display: block; }   /* room for all 5 in the panel */
  .nav { position: relative; }
}
@keyframes menuDrop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 540px) {
  .wrap { padding: 0 18px; }
  .nav { height: 60px; }
  .logo { font-size: 1.08rem; gap: 8px; }
  .logo img.mark { width: 28px; height: 28px; }
  .hero { padding: 40px 0 48px; }
  .hero .glyph { display: none; }             /* don't crowd small screens */
  .hero-art img { width: 150px; }
  .hero h1 { margin-top: 20px; }
  .hero p.lede { font-size: 1rem; }
  .cta-row { margin-top: 28px; gap: 10px; }
  .cta-row .btn { width: 100%; justify-content: center; }
  .badge { font-size: 0.72rem; padding: 7px 13px; }
  .strip { padding: 13px 0; }
  .strip span { font-size: 0.92rem; margin: 0 18px; }
  .panel { padding: 22px 20px 24px; }
  .chip { padding: 10px 16px; font-size: 0.93rem; }
  .stat-card { padding: 20px; }
  .contact-card { padding: 32px 22px; border-radius: 18px; }
  .paper-wrap { padding: 44px 0 60px; }
  .foot { flex-direction: column; align-items: flex-start; gap: 14px; }
  footer { padding: 34px 0 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
