/* xflag homepage.
   Dark by design. The rest of the site follows the reader's theme, but this page
   commits to one look, because a hero that has to work both ways ends up
   working neither. Everything is self hosted: no external fonts, no scripts,
   nothing that would need the CSP relaxed. */

@import url("/_fonts/fonts.css");

:root {
  color-scheme: dark;

  --ink: #0a0b0e;
  --ink-2: #101218;
  --paper: #f4f5f7;
  --muted: #8c939e;
  --line: #1e212a;

  /* Crimson into amber. The Nepali flag is a crimson field with a blue border,
     which is a better fit here than the violet every AI site reaches for. */
  --flame: #ff5a3c;
  --ember: #ffb547;
  --deep: #2d3f8f;

  --display: "Khand", "Mukta", ui-sans-serif, system-ui, sans-serif;
  --body: "Karla", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --deva: "Noto Sans Devanagari", "Mukta", sans-serif;

  --edge: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

.wrap { width: min(100% - 2.5rem, var(--edge)); margin-inline: auto; }

/* ---------------------------------------------------------------- header -- */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand svg { width: 26px; height: 26px; color: var(--flame); display: block; }
.brand b {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -.01em;
  line-height: 1;
}

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a { color: var(--muted); text-decoration: none; font-size: .94rem; transition: color .15s; }
.nav a:hover { color: var(--paper); }
.nav .go {
  color: var(--ink);
  background: var(--paper);
  padding: .5rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .9rem;
}
.nav .go:hover { background: var(--flame); color: #fff; }
@media (max-width: 620px) { .nav a:not(.go) { display: none; } }

/* ------------------------------------------------------------------ hero -- */
.hero { position: relative; padding: clamp(3.5rem, 11vw, 8rem) 0 clamp(1rem, 3vw, 2.5rem); }

/* Two slow drifting blooms. Pure CSS so there is no script to allow. */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  pointer-events: none;
  z-index: -1;
}
.hero::before {
  top: -14rem;
  height: 46rem;
  background:
    radial-gradient(42rem 26rem at 22% 34%, color-mix(in srgb, var(--flame) 26%, transparent), transparent 66%),
    radial-gradient(34rem 22rem at 76% 22%, color-mix(in srgb, var(--deep) 40%, transparent), transparent 68%),
    radial-gradient(26rem 18rem at 58% 64%, color-mix(in srgb, var(--ember) 15%, transparent), transparent 70%);
  filter: blur(14px);
  animation: drift 26s ease-in-out infinite alternate;
}
/* A fine grain over the blooms, which kills the banding you get on big soft
   gradients and gives the dark a bit of texture. */
.hero::after {
  top: -14rem;
  height: 46rem;
  opacity: .32;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}
@keyframes drift {
  from { transform: translate3d(-3%, 0, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; }
  html { scroll-behavior: auto; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 4%, transparent);
  border-radius: 999px;
  padding: .32rem .9rem .32rem .55rem;
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 1.6rem;
}
.eyebrow i {
  width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--flame);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--flame) 22%, transparent);
  font-style: normal;
}

h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3.2rem, 9.5vw, 7.5rem);
  line-height: .92;
  letter-spacing: -.025em;
  margin: 0 0 1.3rem;
  max-width: 16ch;
}
h1 .lit {
  background: linear-gradient(96deg, var(--flame), var(--ember));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--muted); max-width: 52ch; margin: 0 0 2.4rem; }
.lede strong { color: var(--paper); font-weight: 500; }

.cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid transparent;
  transition: transform .15s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: linear-gradient(96deg, var(--flame), var(--ember)); color: #1a0d08; }
.btn.ghost { border-color: var(--line); color: var(--paper); }
.btn.ghost:hover { border-color: var(--muted); }

/* ------------------------------------------------------------------ bento -- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  letter-spacing: -.02em;
  margin: 0;
  line-height: 1;
}
.section-head p { color: var(--muted); margin: 0; font-size: .96rem; }
/* A short heading like "Play" leaves room for the subtitle beside it, which
   then crowds against it on a phone. Stack them instead. */
@media (max-width: 700px) {
  .section-head { flex-direction: column; gap: .4rem; align-items: flex-start; }
}

.bento { display: grid; gap: 1rem; grid-template-columns: repeat(6, 1fr); }
@media (max-width: 900px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .bento { grid-template-columns: 1fr; } }

.tile {
  position: relative;
  overflow: hidden;
  grid-column: span 2;
  min-height: 15rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(168deg, var(--ink-2), var(--ink));
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: border-color .18s, transform .18s;
}
.tile:hover { border-color: color-mix(in srgb, var(--flame) 45%, var(--line)); transform: translateY(-3px); }
.tile.wide { grid-column: span 3; }
.tile.half { grid-column: span 3; }
.tile.full { grid-column: span 6; min-height: 13rem; }
@media (max-width: 900px) {
  .tile, .tile.wide, .tile.half, .tile.full { grid-column: span 1; }
}

/* The wash is what gives each tile its own identity without needing artwork. */
.tile .wash {
  position: absolute; inset: 0; z-index: 0; opacity: .75;
  transition: opacity .18s;
}
.tile:hover .wash { opacity: 1; }
.tile > * { position: relative; z-index: 1; }
.t-deva .wash { background: radial-gradient(20rem 14rem at 78% 12%, color-mix(in srgb, var(--flame) 55%, transparent), transparent 70%); }
.t-slate .wash { background: radial-gradient(20rem 14rem at 78% 12%, color-mix(in srgb, var(--deep) 80%, transparent), transparent 70%); }
.t-chess .wash { background: radial-gradient(20rem 14rem at 78% 12%, color-mix(in srgb, var(--ember) 44%, transparent), transparent 70%); }
.t-baag .wash  { background: radial-gradient(20rem 14rem at 78% 12%, color-mix(in srgb, #21a179 58%, transparent), transparent 70%); }
.t-call .wash  { background: radial-gradient(20rem 14rem at 78% 12%, color-mix(in srgb, #8b5cf6 56%, transparent), transparent 70%); }
.t-think .wash { background: radial-gradient(20rem 14rem at 78% 12%, color-mix(in srgb, #22d3ee 50%, transparent), transparent 70%); }

.tile .glyph {
  position: absolute; top: .4rem; right: 1.1rem; z-index: 1;
  font-size: 5.4rem; line-height: 1; opacity: .22;
  font-family: var(--deva);
  pointer-events: none;
  user-select: none;
}
.tile .glyph.mono { font-family: var(--body); }
.tile h3 { font-family: var(--display); font-weight: 600; font-size: 1.6rem; margin: 0 0 .35rem; letter-spacing: -.01em; }
.tile p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.5; }
.tag {
  align-self: flex-start;
  font-size: .72rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line);
  padding: .2rem .6rem; border-radius: 999px; margin-bottom: .9rem;
  background: color-mix(in srgb, var(--ink) 60%, transparent);
}

/* ----------------------------------------------------------------- promises -- */
.promises { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .promises { grid-template-columns: 1fr; } }
.promise { border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem; background: var(--ink-2); }
.promise h4 { font-family: var(--display); font-weight: 600; font-size: 1.25rem; margin: 0 0 .4rem; }
.promise p { margin: 0; color: var(--muted); font-size: .93rem; }
.promise .num { font-family: var(--display); font-size: .9rem; color: var(--flame); letter-spacing: .1em; }

/* -------------------------------------------------------------------- foot -- */
.foot { border-top: 1px solid var(--line); padding: 2.5rem 0 3.5rem; margin-top: 2rem; }
.foot .wrap { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.foot a { color: var(--muted); text-decoration: none; font-size: .9rem; margin-right: 1.2rem; }
.foot a:hover { color: var(--paper); }
.foot small { color: #5c626c; font-size: .82rem; }
