/* Tanjiro — a gallery for anime art.

   The page is the clip. There is no headline, no button, no scrim: a wordmark,
   four links, and fourteen seconds of fire running edge to edge underneath.

   Taking the copy off resolves what the scrims were there to fix. Measured per
   pixel across the whole loop, only 8.1% of this frame stays below L=0.05 and
   the largest permanently dark rectangle is 0.5% of the picture, so anything
   set in the middle of it needed a plate to be legible and the plate was
   costing 44% of the picture. Nothing sits in the middle now.

   What is left is a single row along the top, and that row is the one thing
   still asking something of the plate. It gets a tight dark halo rather than a
   fade — a halo darkens the few pixels either side of a stroke instead of a
   nineteen-percent band across the top of the frame, which is the difference
   between type on film and type on a panel. */

:root {
  --night:  #140A07;    /* the plate's black, 29.1% of its pixel-time */
  --gold:   #F6A935;    /* the gold core of the fire, 12.8% */
  --flare:  #FBD667;    /* its brightest band short of blowout */
  --paper:  #FFF8EE;

  --rule: rgba(255, 248, 238, .18);

  /* One face at two weights. The plate is the maximalism here; the type's job
     is to be the one disciplined thing on the page. */
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: clamp(1.25rem, 4vw, 4rem);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 500;
}

:focus-visible {
  outline: 2px solid var(--flare);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- stage ---------- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  padding: clamp(1.1rem, 2.2vw, 1.75rem) var(--gutter) clamp(2rem, 6vh, 4rem);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--night);
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- topbar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--paper);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -.02em;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(20, 10, 7, .85), 0 0 14px rgba(20, 10, 7, .6);
}

.brand__mark { width: 25px; height: 25px; flex: none; }

.nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.nav a {
  color: var(--paper);
  text-decoration: none;
  font-size: .82rem;
  letter-spacing: .01em;
  padding: .3rem 0;
  border-bottom: 1px solid transparent;
  text-shadow: 0 1px 3px rgba(20, 10, 7, .9), 0 0 12px rgba(20, 10, 7, .65);
}

.nav a:hover { border-bottom-color: var(--gold); }

.burger {
  display: none;
  width: 40px; height: 40px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 16px; height: 1.5px;
  margin: 3px auto;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(20, 10, 7, .8);
}

/* ---------- load ---------- */

/* The row arrives after the first frame is up, so the clip is what you see
   first rather than a navbar waiting on one. */
@media (prefers-reduced-motion: no-preference) {
  .topbar { animation: settle .8s cubic-bezier(.2, .7, .3, 1) .2s both; }

  @keyframes settle { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
}

/* ---------- tablet and phone sideways ---------- */

@media (max-width: 900px) {
  .burger { display: block; }

  .topbar { position: relative; }

  /* The row becomes a panel under the burger. A menu is the one thing on this
     page that does get a fill — it is a surface you opened, not part of the
     picture, and the links inside it drop their halo because of it. */
  .nav {
    position: absolute;
    top: calc(100% + .5rem);
    right: 0;
    z-index: 2;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .3rem .2rem;
    min-width: 12rem;
    border-radius: 10px;
    background: rgba(20, 10, 7, .95);
    border: 1px solid var(--rule);
  }

  .nav[hidden] { display: none; }
  .nav a { padding: .62rem .75rem; font-size: .88rem; border-bottom: 0; text-shadow: none; }
  .nav a:hover { color: var(--gold); }
}

/* ---------- phone ---------- */

@media (max-width: 700px) {
  .brand { font-size: 1.15rem; }
  .brand__mark { width: 22px; height: 22px; }
}
