/* Naruto — an archive of the series.

   The clip is the whole page. There is no band, no scrim and no panel: the
   picture runs edge to edge and a wordmark and four links sit straight on it.

   That is a deliberate trade and it is worth being exact about the cost. I
   measured the shipped cut per pixel across all 348 frames, keeping both the
   brightest and the darkest value each pixel ever shows. In the strip the nav
   sits in, the plate runs from L=0.000 to L=0.994 — the entire range. Light
   type measures 0.90:1 against the worst frame there and dark type 0.94:1, so
   neither colour clears even 1:1, and no placement along that strip is better
   than any other. 21% of this frame stays below L=0.05 and 12% stays above
   L=0.45, but never the same pixels, because the camera drags everything
   through both.

   What is left to hold the row is carried by the type itself: a tight dark
   halo, and the wordmark's own small tile under the mark. A halo darkens the
   two or three pixels either side of a stroke rather than a band across the
   top of the frame, so the row reads as type on film instead of type on a
   panel — which is the entire point of having no band.

   It does not reach 4.5:1, and against a white cloud it does not reach 3:1.
   Nothing short of an opaque surface would, on this plate. The row is short
   and set small for that reason: the less of it there is, the less of it is
   sitting on fire. */

:root {
  /* sampled off the plate by pixel-time, not picked */
  --pitch:  #140808;    /* the rock's black, 5.7% — the halo and the mark's tile */
  --chakra: #E8651C;    /* the bright chakra, 2.1% — the button and the rule */
  --amber:  #F7A64B;    /* its hot core, for hover */
  --ash:    #F4ECE4;    /* the smoke, and the type colour */
  --sky:    #5B9DD9;    /* the one cool note in the clip, for focus only */

  /* Bricolage Grotesque at 800, for the headline and the wordmark. It is cut
     with real ink traps and slightly irregular widths, which is what keeps it
     from reading as a weight of Helvetica at this size — and its counters stay
     open where a condensed poster face closes up against the fire behind it.
     Space Grotesk carries the links, where .78rem needs apertures more than it
     needs character. */
  --display: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --sans: 'Space Grotesk', 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(--pitch);
  color: var(--ash);
  font-family: var(--sans);
  font-weight: 500;
}

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

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

/* One row for the bar, one for everything under it. The copy centres itself
   in that second row, so it sits at the middle of the picture rather than the
   middle of the page — the difference is the height of the bar. */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

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

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

/* ---------- the row ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  flex-wrap: wrap;
  padding: clamp(1.1rem, 2.4vw, 1.75rem) var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--ash);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -.015em;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(20, 8, 8, .9), 0 0 16px rgba(20, 8, 8, .65);
}

/* No tile under it — on the picture a dark chip behind the mark reads as a
   sticker rather than part of the page. It takes the same halo the lettering
   does instead, as a drop-shadow, because text-shadow does not reach inside an
   <img>. The mark is chakra orange against chakra orange at its worst, so the
   halo is the only thing separating it; it is 26px and decorative, and the
   wordmark next to it carries the meaning. */
.brand__mark {
  width: 26px;
  height: 26px;
  flex: none;
  filter:
    drop-shadow(0 1px 2px rgba(20, 8, 8, .95))
    drop-shadow(0 0 7px rgba(20, 8, 8, .8));
}

/* No burger. Four short labels fit on one row down to 320px, and a menu you
   have to open is a worse trade than a row you can read. */
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem 1.5rem;
}

.nav a {
  color: var(--ash);
  text-decoration: none;
  font-size: .78rem;
  letter-spacing: .02em;
  padding: .2rem 0;
  border-bottom: 1px solid transparent;
  text-shadow: 0 1px 3px rgba(20, 8, 8, .95), 0 0 14px rgba(20, 8, 8, .7);
}

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

/* ---------- copy ---------- */

.hero__copy {
  grid-row: 2;
  align-self: center;
  justify-self: start;
  max-width: 30rem;
  padding: 0 var(--gutter);
}

.line {
  margin: 0 0 1.9rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 4.9vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -.02em;

  /* The same halo the row has, and the same caveat: it separates the stroke
     from the plate, it does not make 4.5:1 happen. Two tight rings do the
     work; the wide one only takes the edge off a blown highlight sitting
     directly behind a letter. */
  text-shadow:
    0 1px 2px rgba(20, 8, 8, .92),
    0 2px 10px rgba(20, 8, 8, .82),
    0 0 38px rgba(20, 8, 8, .55);
}

/* Glass, and a pill. The thing that makes glass hard here is that its fill is
   the plate: whatever is behind it is blurred and shown through, so the fill's
   luminance is not a number you chose, it is whatever the chakra is doing at
   that moment — and this plate reaches L=0.999.

   The tint is what fixes that. At 65% pitch over the backdrop, the fill can
   only range between L=0.002 (over black) and L=0.117 (over a blown highlight),
   because 65% of it is always the same near-black. That compresses a 0-to-1
   backdrop into a band an eighth that wide, and the label rides it at 5.37:1
   at its worst. Below about 60% tint the label drops under 4.5:1 against a
   white cloud, which is the whole reason the number is 65 and not 40.

   The edge needs two rings, and they have to be OPAQUE. A translucent rim is
   the obvious thing to reach for on glass and it does not work: it takes 58%
   of its colour from the backdrop, so it moves with whatever it is supposed to
   be separating from. Swept across the plate's whole range, a .42 rim and a .6
   outer ring both bottom out at 1.85:1 together, at L=0.078 — no better than
   no ring at all.

   Opaque, the pair cannot track anything. Against a plate at luminance L the
   pitch ring measures (L+.05)/.0534 and the ash ring .899/(L+.05); they cross
   at L=0.169 and that crossing is the floor, 4.10:1, at every value this plate
   reaches. The glass keeps its sheen from an inset highlight instead, which
   has no job to do and so is allowed to be translucent. */
.btn {
  display: inline-flex;
  align-items: center;
  padding: .95rem 2rem;
  border-radius: 999px;
  background: rgba(20, 8, 8, .65);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
  color: var(--ash);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .015em;
  box-shadow:
    inset 0 1px 0 rgba(244, 236, 228, .3),
    0 0 0 1.5px var(--pitch),
    0 0 0 2.5px var(--ash),
    0 16px 34px rgba(20, 8, 8, .5);
}

.btn:hover { background: rgba(58, 22, 9, .65); }

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

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

  .btn { transition: background .2s, transform .2s, box-shadow .2s; }
  .btn:hover {
    transform: translateY(-2px);
    box-shadow:
      inset 0 1px 0 rgba(244, 236, 228, .45),
      0 0 0 1.5px var(--pitch),
      0 0 0 2.5px var(--ash),
      0 20px 42px rgba(20, 8, 8, .55);
  }
  .btn:active { transform: translateY(0); }

  @keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

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

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

@media (max-width: 700px) {
  .hero__copy { max-width: none; }
  .line { font-size: clamp(1.95rem, 9vw, 2.7rem); margin-bottom: 1.6rem; }
  .btn { padding: .92rem 1.75rem; }

  .brand { font-size: 1.3rem; }
  .brand__mark { width: 23px; height: 23px; }
  .nav { gap: .35rem 1.1rem; }
  .nav a { font-size: .74rem; }
}
