/* banglavcweb.org homepage. Same world as the Classic launcher (DESIGN.md):
   slate-navy night sky with a still film grain, slate stucco panels, mint
   structure, neon cyan for the way in, square corners. */
@font-face {
  font-family: "Righteous";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/righteous-400-latin.woff2") format("woff2");
}

:root {
  --sky-top: #10151f;
  --sky-mid: #141c2a;
  --sky-low: #1a2335;
  --sky-ground: #1e2840;
  --stucco: #2b3d55;
  --stucco-shade: #1f2d44;
  --glass: #121a2c;
  --mint: #9ee6c8;
  --mint-dim: rgba(158, 230, 200, 0.22);
  --neon: #3ef0ff;
  --text-1: #eef3f8;
  --text-2: #bccbd9;
  --text-3: #93a6ba;
  --font-display: "Righteous", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

::selection {
  background: #ffc46b;
  color: #160f2c;
}

html {
  height: 100%;
  background: var(--sky-top);
}

body {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--text-1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-align: center;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 40%, var(--sky-low) 78%, var(--sky-ground) 100%) fixed;
}

/* the same still film grain as the launcher */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") repeat;
  opacity: 0.09;
}

.home {
  align-self: center;
  width: min(1120px, 100% - 32px);
  margin: 0 auto;
  padding: 40px 0 24px;
}

.banner {
  width: min(520px, 86vw);
  aspect-ratio: 1040 / 437;
  margin: 0 auto;
  background: var(--bvc-title) center / contain no-repeat;
  filter: drop-shadow(0 6px 12px rgba(5, 3, 16, 0.6));
}

.tagline {
  margin: 14px 0 36px;
  color: var(--mint);
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

/* each project is a framed window on the stucco wall */
.project {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 24px 22px;
  border: 2px solid var(--mint-dim);
  outline: 4px solid var(--stucco-shade);
  background: var(--stucco);
  color: inherit;
  text-align: left;
  text-decoration: none;
  overflow: hidden;
  transition:
    transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.2s ease-out,
    box-shadow 0.25s ease-out;
}

/* The cover art: a CSS background from covers.css (no image file, no "Save image"
   menu), shown whole on black, framed like a window. Not selectable or draggable. */
.project-cover {
  display: block;
  aspect-ratio: 1;
  margin: -24px -24px 6px;
  border-bottom: 2px solid var(--mint-dim);
  background: #000 center / contain no-repeat;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none;
  transition: filter 0.3s ease-out;
}
.cover-classic { background-image: var(--cover-classic); }
.cover-extreme { background-image: var(--cover-extreme); }
.cover-dhaka { background-image: var(--cover-dhaka); }
/* not ready yet: the cover is only slightly muted, and shows in full on hover */
.project.is-soon .project-cover { filter: saturate(0.85) brightness(0.88); }


.project-name {
  color: var(--mint);
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-text {
  flex: 1;
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* "Played 1,240 times": shown only once the count is worth showing (home.js).
   Its line is always reserved, so the page does not grow when it appears. */
.project-stat {
  display: block;
  min-height: 1.3em;
  color: var(--mint);
  font-size: 0.85rem;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.project-stat[hidden] {
  visibility: hidden;
}

.project-action {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid var(--neon);
  background: var(--glass);
  color: #eaffff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 0 6px var(--neon);
  transition:
    background 0.2s ease-out,
    box-shadow 0.25s ease-out;
}

.project-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: square;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* the playable card lifts toward you, its cover brightens, the neon sign
   glows stronger and the arrow nudges out */
.project.is-live:hover,
.project.is-live:focus-visible {
  transform: translateY(-5px);
  border-color: var(--mint);
  box-shadow: 0 16px 30px rgba(5, 3, 16, 0.5);
}
.project.is-live:hover .project-cover,
.project.is-live:focus-visible .project-cover {
  filter: brightness(1.08) saturate(1.08);
}
.project.is-live:hover .project-action,
.project.is-live:focus-visible .project-action {
  background: #13203a;
  box-shadow: 0 0 18px rgba(62, 240, 255, 0.5), inset 0 0 10px rgba(62, 240, 255, 0.2);
}
.project.is-live:hover .project-action svg,
.project.is-live:focus-visible .project-action svg {
  transform: translate(3px, -3px);
}
.project.is-live:active {
  transform: translateY(-2px);
}
.project.is-live:focus-visible {
  outline: 3px solid var(--neon);
  outline-offset: 3px;
}

/* Entrance, once on load: title, tagline, then the cards one by one, then the
   footer. Uses the separate translate property so hover transforms still work.
   The Play sign lights up after its card arrives. */
@keyframes rise {
  from { opacity: 0; translate: 0 16px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes neon-on {
  0%, 18%, 34% { border-color: #35566a; color: #6f8ea0; text-shadow: none; }
  10%, 26%, 48%, 100% { border-color: var(--neon); color: #eaffff; text-shadow: 0 0 6px var(--neon); }
}
.banner { animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.tagline { animation: fade 0.8s ease-out 0.25s both; }
.project { animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.project:nth-child(1) { animation-delay: 0.3s; }
.project:nth-child(2) { animation-delay: 0.42s; }
.project:nth-child(3) { animation-delay: 0.54s; }
.project.is-live .project-action { animation: neon-on 0.9s steps(1, end) 0.9s backwards; }
.credits { animation: fade 0.8s ease-out 0.7s both; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .project.is-live:hover,
  .project.is-live:focus-visible,
  .project.is-live:active {
    transform: none;
  }
}

/* The playable card: its Play sign runs the full width and stands taller */
.project.is-live .project-action {
  align-self: stretch;
  justify-content: center;
  min-height: 56px;
  font-size: 1.35rem;
}

/* not ready yet: unlit, not a link. "Work in progress" is a status tag, not a
   button: no frame, no fill, small lettering with a dim lamp before it. */
.project.is-soon .project-name {
  color: var(--text-3);
}
.project.is-soon .project-action {
  min-height: 0;
  padding: 0;
  gap: 8px;
  border: 0;
  background: none;
  color: var(--text-3);
  text-shadow: none;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
}
.project.is-soon .project-action::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffc46b;
  opacity: 0.55;
}

.credits {
  padding: 14px 16px 18px;
  color: var(--text-2);
  font-size: 0.76rem;
  line-height: 1.6;
}
.credits p {
  margin: 0;
}
.credits a {
  color: var(--text-1);
  font-weight: 700;
  text-underline-offset: 3px;
}
.credits .disclaimer {
  color: var(--text-3);
  font-size: 0.72rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Desktop: everything (title, cards with covers, footer) fits one screen, no
   scrolling. The title and the cover height follow the window height; the cover
   keeps its card width and shows the whole picture on black (contain). */
@media (min-width: 901px) {
  body {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
  }
  .home {
    padding: 0.6vh 0 1.2vh;
  }
  :root {
    /* title height and the space everything except the covers needs */
    --banner-h: clamp(84px, 21vh, 250px);
    --rest-h: 430px;
  }
  .banner {
    width: auto;
    height: var(--banner-h);
  }
  .tagline {
    margin: 1vh 0 4vh;
    font-size: clamp(0.8rem, 1.6vh, 1rem);
  }
  .project {
    gap: clamp(6px, 1.1vh, 12px);
    padding-top: clamp(14px, 2.2vh, 24px);
    padding-bottom: clamp(14px, 2vh, 22px);
  }
  .project-cover {
    aspect-ratio: auto;
    height: clamp(120px, calc(100vh - var(--banner-h) - var(--rest-h)), 340px);
    height: clamp(120px, calc(100dvh - var(--banner-h) - var(--rest-h)), 340px);
    margin-top: calc(-1 * clamp(14px, 2.2vh, 24px));
  }
  .project-name {
    font-size: clamp(1.3rem, 2.6vh, 1.7rem);
  }
  .credits {
    padding: 0.8vh 16px 1.4vh;
  }
}

/* Short desktop windows (a 1366x768 laptop browser is about 625px tall): the
   title gives its height to the covers, so they stay recognisable. */
@media (min-width: 901px) and (max-height: 760px) {
  :root {
    --banner-h: clamp(56px, 11vh, 96px);
    --rest-h: 345px;
  }
  .tagline {
    margin: 0.6vh 0 3vh;
  }
  .project-text {
    font-size: 0.88rem;
    line-height: 1.45;
  }
}

@media (max-width: 900px) {
  .projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .projects {
    grid-template-columns: 1fr;
  }
  .tagline {
    letter-spacing: 0.16em;
    text-wrap: balance;
  }
}
