/* ==========================================================================
   FASHION EDITORIAL — 001 COVER, rebuilt (2026-09-30).
   Load after x-fashion-editorial.css.

   The cover as a magazine opener: one photograph bled edge to edge, the
   title set large in the serif down its dark left side, an italic dek, and
   mono apparatus in the four corners (issue, story, register, folio).
   Faces are the page's own: Newsreader for the title and dek, DM Mono for
   the apparatus. The photograph is an Aesthetary specimen and says so on
   the right edge, as before.

   The cover is drawn in one unit, --u (1/1594 of the cover's width), so the
   type keeps its place against the photograph at every desktop and tablet
   width. Below 640px it becomes a portrait cover.

   Art direction, not canon (see the header of x-fashion-editorial.css).
   ========================================================================== */

.fec { --u: calc(100cqi / 1594); --fec-cream: #F2EAD8; }

.fec__stage {
  position: relative; overflow: hidden;
  aspect-ratio: 1594 / 987;
  background: #0B1416;
  color: var(--fec-cream);
}
.fec__stage > * { position: absolute; margin: 0 !important; z-index: 2; }

/* The photograph, and a scrim on its dark left side so the type holds 4.5:1
   over the street lights (the page's own rule for text on a photograph). */
.fec__stage > .fec__photo { inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.fec__stage::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6, 12, 14, 0.55) 0%, rgba(6, 12, 14, 0.38) 30%, rgba(6, 12, 14, 0) 46%),
    linear-gradient(0deg, rgba(6, 12, 14, 0.5) 0%, rgba(6, 12, 14, 0) 22%);
}

/* ---- apparatus: DM Mono, tracked, in the corners ---------------------- */
.fec__meta, .fec__tags, .fec__folio {
  font: 400 max(calc(12 * var(--u)), 11px)/1 var(--m);
  letter-spacing: 0.3em; text-transform: uppercase;
}
.fec__meta { top: calc(53 * var(--u)); transform: translateY(-50%); }
.fec__meta--l { left: calc(62 * var(--u)); }
.fec__meta--r { right: calc(62 * var(--u)); letter-spacing: 0.3em; margin-right: -0.3em !important; }

/* ---- the title: cap height and baselines taken from the reference ------ */
.fec__h {
  left: calc(58 * var(--u)); top: calc(218 * var(--u));
  font: 300 calc(196 * var(--u))/calc(161 * var(--u)) var(--s);
  font-variation-settings: "opsz" 72;
  letter-spacing: -0.055em;
  white-space: nowrap;
}
.fec__h > span { display: block; }

.fec__dek {
  left: calc(64 * var(--u)); top: calc(537 * var(--u));
  font: italic 300 max(calc(41 * var(--u)), 18px)/1.2 var(--s);
  font-variation-settings: "opsz" 72;
  letter-spacing: -0.01em;
}

.fec__tags { left: calc(62 * var(--u)); top: calc(876 * var(--u)); display: grid; row-gap: calc(9.5 * var(--u)); letter-spacing: 0.2em; }
.fec__tags::before {
  content: ""; position: absolute; left: 0; top: calc(-25 * var(--u));
  width: calc(28 * var(--u)); height: 1px; background: currentColor;
}

/* The folio runs to the last page of the issue. */
.fe-cover .fec__folio {
  left: auto; right: calc(64 * var(--u)); top: calc(924 * var(--u)); bottom: auto;
  transform: translateY(-50%);
  display: flex; align-items: center;
  font: 300 max(calc(18.6 * var(--u)), 13px)/1 var(--m); letter-spacing: 0.08em;
}
.fec__folio span { display: inline-flex; align-items: center; }
.fec__folio i { width: calc(28 * var(--u)); height: 1px; margin: 0 calc(16 * var(--u)); background: currentColor; }

/* Evidence class: vertical on the right edge, over the dark pillar. The tag
   stays visible; its sentence moves to the provenance card it opens (and to
   screen readers), because at cover scale it wrapped into three columns. */
.fe-cover .fec__ec { right: calc(24 * var(--u)); top: calc(250 * var(--u)); max-height: none; color: #d8ccb0; }
.fec__ec .fe-cover__ect { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ================================================================ PHONE */
/* A portrait cover: the title on the night sky above the photograph, not over
   it, so the face is never behind the type. */
@container fe (max-width: 639px) {
  .fec__stage { aspect-ratio: auto; display: flex; flex-direction: column; padding-top: 52px; }
  .fec__stage > * { position: static; }
  .fec__stage::before { display: none; }
  .fec__h { order: 1; padding: 0 14px; font-size: 23.5cqi; line-height: 19.5cqi; }
  .fec__dek { order: 2; padding: 12px 16px 0; font-size: 20px; }
  .fec__stage > .fec__photo { order: 3; position: relative; inset: auto; width: 100%; height: auto; margin-top: 20px !important; aspect-ratio: 4 / 5; object-position: 61% 18%; }
  .fec__stage::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34%; z-index: 1; pointer-events: none;
    background: linear-gradient(0deg, rgba(6, 12, 14, 0.72), rgba(6, 12, 14, 0));
  }
  .fec__meta { position: absolute; top: 24px; font-size: 11px; letter-spacing: 0.22em; }
  .fec__meta--l { left: 16px; }
  .fec__meta--r { right: 16px; }
  .fec__tags { position: absolute; left: 16px; top: auto; bottom: 24px; font-size: 11px; row-gap: 6px; }
  .fec__tags::before { top: -16px; width: 22px; }
  .fe-cover .fec__folio { display: none; }
  .fe-cover .fec__ec { position: absolute; writing-mode: horizontal-tb; transform: none; top: auto; bottom: 24px; right: 16px; }
  .fe-cover .fec__ec .fe-ec { writing-mode: horizontal-tb; }
}

/* The mock nav (founder, 2026-09-30: every redesigned hero reads as a home page):
   the issue's sections, set in the cover's own tracked mono, centred on the top
   line between the issue and the story. */
.fec__nav {
  top: calc(53 * var(--u)); left: 50%; transform: translate(-50%, -50%);
  display: flex; gap: calc(44 * var(--u));
  font: 400 max(calc(12 * var(--u)), 11px)/1 var(--m); letter-spacing: 0.3em; text-transform: uppercase;
}
.fec__nav a { color: var(--fec-cream); text-decoration: none; }
.fec__nav a:hover, .fec__nav a:focus-visible { text-decoration: underline; text-underline-offset: 5px; }
@container fe (max-width: 639px) { .fec__stage > .fec__nav { display: none; } }

/* Tap area (audit 2026-10-01): the links were 11–16px tall. Padding grows
   the hit area, the matching negative margin keeps the line where it was. */
.fec__nav a { padding-block: 10px; margin-block: -10px; }

/* The AI line crosses lit tiles: a dark ground behind it (audit 2026-10-01: 1.0:1 at its worst). */
.fe-cover .fec__ec { background: rgba(18, 14, 10, .62); padding: 8px 4px; }
@container fe (max-width: 639px) { .fe-cover .fec__ec { padding: 4px 8px; } }
/* Phone: the tag line steps up so the standard AI line fits beneath it (2026-10-01). */
@container fe (max-width: 639px) { .fec__tags { bottom: 40px; } }

/* NAV ON TOP (founder, 2026-10-01): on desktop the hero rises behind the empty top bar, as
   the other Aesthetic heroes do, so its own nav runs along the top of the page and the
   action bar sits under it. */
@media (min-width: 60.0625rem) {
  .fe-page .fec { margin-top: -48px; }
  /* The empty top bar stays above the hero (it holds the action bar) but no longer paints
     over it or takes the nav's clicks. */
  .fe-page main .topbar { background: none; pointer-events: none; }
  .fe-page main .topbar > * { pointer-events: auto; }
}
