/* ==========================================================================
   Self — News page  (Figma "News", 4576:29503, the 1728px frame)
   Laid out like the other pages: every desktop size is N * var(--u), with --u = 1/1728 of the window width, and below 800px the mobile adaptation
   takes over (the file has no mobile frame for this page).

   A heading in the H1 style (Aguzzo 90, tracking -3 %, a 87 pitch) of two lines: "Selfish News", and under it the season switch - "Autumn2026", at 30 % - which
   opens, when it is pointed at, into all four seasons and the year (news.js) - and is frozen for now: it stays as it rests, and nothing in it reacts. 90 under its baseline the news in five columns of 314.8 (at 1728; the columns are as many as fit at
   a least width, and fluid, like Pinterest's - news.js) with 19 between them: a picture
   (4 corners), 9 under it a line with who (100 %) and when (40 %, 12 apart) and 3 under that what happened, all in the Technical Read style (14, tracking 6 %), the cards
   32 apart. The next card goes into the shortest column (news.js), so the newest come first along the top. 150 of air under the last card, then the footer.
   The ground is #dbdbdb (the "Useful info" grey of the Tech page); white type in "difference" over it, as in the design, is the dark #242424 here.
   ========================================================================== */

.view--news { background: #dbdbdb; color: #0f0f0f; }
body[data-view="news"] { background: #dbdbdb; }

.n-main { display: block; overflow-x: clip; padding: calc(150 * var(--u)) calc(39 * var(--u)) calc(150 * var(--u)); }

/* ---------- Heading: cap-top of the first line at 150, baseline of the second at 306 (Aguzzo: ascent .80, descent .26, cap .765; see tech.css) ---------- */
.n-head { margin: calc(1.05 * var(--u)) 0 calc(-19.2 * var(--u)); }
.n-title, .n-switch {
  font-weight: 400;
  font-size: calc(90 * var(--u));
  line-height: calc(87 * var(--u));
  letter-spacing: -.03em;
  font-feature-settings: "ordn" 1, "ss01" 1, "ss02" 1, "ss03" 1, "dlig" 1;                    /* the H1 style's stylistic sets, as in the design (the same as the Home statement) */
  color: #242424;
}
.n-title { margin: 0; height: calc(87 * var(--u)); }

/* ---------- The season switch (Figma "Switch", 4722:10153) ----------
   At rest it reads "Autumn2026" (the season on show and the year, set against each other as the design's Default variant has them: no space), at 30 %. Pointed at - anywhere on its
   box, which is as wide as the open line - it opens in 0.3 s, ease-in (Figma: Smart Animate; news.js runs it and sets --p from 0 to 1): the year slides out to the end of the line,
   and the three other seasons come up from nothing to 30 % where they will stand (they do not slide, they appear in place); then it reads Autumn, Spring, Summer, Winter and the
   year, 13 apart, all at 30 %, and the word the pointer is on goes to 100 % at once. Shutting is the same run the other way. Before news.js has laid it out, it is just the resting line. */
.n-switch { position: relative; display: flex; align-items: flex-start; gap: calc(13 * var(--u)); height: calc(87 * var(--u)); }
.n-tok {
  display: block; padding: 0; margin: 0; background: none; border: 0; border-radius: 0;
  font: inherit; letter-spacing: inherit; font-feature-settings: inherit; text-transform: none; text-align: left; white-space: nowrap; color: inherit;
  opacity: .3; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.n-tok:not([aria-pressed="true"]):not(.n-tok--year) { display: none; }
.n-tok:focus-visible { outline: 1px solid rgba(0, 0, 0, .55); outline-offset: calc(4 * var(--u)); }
.n-tok[aria-disabled="true"] { cursor: default; }
/* Frozen (news.js, SWITCH = false; 28 Oct 2026): the line stays as it rests, a label and not a control - nothing in it can be pointed at (no hover, no cursor of a button), focused or opened. */
.n-switch.is-frozen { pointer-events: none; -webkit-user-select: none; user-select: none; }
.n-switch.is-frozen .n-tok { cursor: default; }

.n-switch.is-live { display: block; width: var(--w, auto); }                  /* --w: the open line's width, shut or open - the pointer's field, as the Figma instance's box is */
.n-switch.is-live .n-tok {
  display: block; position: absolute; left: 0; top: 0;
  transform: translateX(calc(var(--x0) + (var(--x1) - var(--x0)) * var(--p)));
}
.n-switch.is-live .n-tok.is-away { opacity: calc(.3 * var(--p)); }            /* the seasons that are not on show come up out of nothing, in place */
.n-switch.is-live.is-shut .n-tok.is-away { visibility: hidden; }              /* (and cannot be reached while they are away) */
.n-switch.is-live.is-open .n-tok:hover, .n-switch.is-live.is-open .n-tok:focus-visible { opacity: 1; }
.n-switch.is-live.is-open .n-tok[aria-disabled="true"]:hover { opacity: .3; }

/* ---------- The cards ---------- */
.n-board { margin-top: calc(90 * var(--u)); --gu: min(var(--u), 1px); }      /* --gu: the page's unit, but at most the design's 1px (the size at 1728): past that width the grid does not make its cards, gaps and type bigger, it fits more columns */
.n-grid { display: flex; align-items: flex-start; gap: calc(19 * var(--gu)); transition: opacity .18s ease; }
.n-grid.is-out { opacity: 0; }
.n-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: calc(32 * var(--gu)); }
.n-card { transform-origin: 0 0; }                                     /* (news.js glides a card to its new place, from where it was, by a transform that starts at its top left corner) */

.n-card__in { display: flex; flex-direction: column; gap: calc(9 * var(--gu)); color: inherit; }
.n-card__in:focus-visible { outline: 1px solid rgba(0, 0, 0, .55); outline-offset: calc(4 * var(--gu)); }
.n-card__pic { position: relative; display: block; container-type: inline-size; }
.n-card__img {
  display: block; width: 100%; height: auto; aspect-ratio: var(--ar, 1); object-fit: cover;
  border-radius: calc(4 * var(--gu)); background: var(--bg, transparent);
}
/* A film (news.js: the items that are films on the Home block): it lies over the card's still, which is its first frame, and fades in when it has data - the one into the other without a jump.
   It never takes the pointer (the card is the link). Under the hover blur it gives way like the still, and the blur's copies are painted from it (canvases, news.js). */
.n-card__vid {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; object-fit: cover;
  border-radius: calc(4 * var(--gu)); opacity: 0; transition: opacity .5s ease-out; pointer-events: none;
}
.n-card__vid.is-ready { opacity: 1; }
.n-card__cap { display: flex; flex-direction: column; gap: calc(3 * var(--gu)); color: #000; line-height: calc(17 / 14); word-break: break-word; }
@media (min-width: 801px) { .n-card__cap { font-size: max(12px, calc(14 * var(--gu))); } }         /* Technical Read, 14 at 1728 and no bigger on a wider screen (--t14 would go on growing) */
.n-card__meta { display: flex; flex-wrap: wrap; column-gap: calc(12 * var(--gu)); }
.n-card__meta > * { margin-right: calc(-1 * var(--tls)); }          /* (the design's text boxes end at the last glyph: the letter-spacing after it is not part of the 12) */
.n-card__meta time { opacity: .4; }                                   /* who is at 100 %, only when is at 40 % */

/* Hover (Figma "Item of News", 4726:10232: the card swaps to its second variant, smart animate, Slow, 0.625 s): the picture gets a PROGRESSIVE layer blur - Start 0 at its
   top edge, End 44.5 at its bottom edge - so it stays sharp at the top and melts towards the bottom, spilling softly out of its frame. CSS has no progressive blur, so
   news.js lays nine copies of the picture over each other (.n-card__blur), the same way as the Tech cards do (see tech.css): copy i is blurred by i/8 of the full amount
   and is shown through a band of the picture's height that is centred on i/8 of the way down, so neighbouring copies cross-fade into one another (the bands add up to
   exactly 1, which is what "plus-lighter" adds). All the blurs are scaled by --k, which runs from 0 to 1 on hover with the spring. */
@property --k { syntax: "<number>"; inherits: true; initial-value: 0; }
.n-card__in { --k: 0; --sig: calc(22.25 * var(--gu)); transition: --k .625s var(--spring); }
.n-card__blur {
  --m: calc(var(--sig) * 3.2);                                         /* room for the blur to spill out sideways and below */
  --h: calc(100cqw / var(--ar, 1));                                    /* the picture's height */
  --band: calc(var(--h) / 8);                                          /* one step: where a copy hands over to the next */
  position: absolute; left: calc(-1 * var(--m)); top: 0;
  width: calc(100cqw + 2 * var(--m)); height: calc(var(--h) + var(--m));
  isolation: isolate; pointer-events: none;
  visibility: hidden; transition: visibility 0s linear .625s;           /* shown while the pointer is on the card, and until the blur has settled after it leaves */
}
.n-card__lay {
  position: absolute; inset: 0; mix-blend-mode: plus-lighter;
  -webkit-mask-image: linear-gradient(to bottom, transparent calc((var(--i) - 1) * var(--band)), #000 calc(var(--i) * var(--band)), transparent calc((var(--i) + 1) * var(--band)));
          mask-image: linear-gradient(to bottom, transparent calc((var(--i) - 1) * var(--band)), #000 calc(var(--i) * var(--band)), transparent calc((var(--i) + 1) * var(--band)));
}
.n-card__lay:first-child {                                             /* the sharp copy: the top of the picture */
  -webkit-mask-image: linear-gradient(to bottom, #000 0, transparent var(--band));
          mask-image: linear-gradient(to bottom, #000 0, transparent var(--band));
}
.n-card__lay:last-child {                                              /* the fully blurred copy: the bottom, and everything that spills below it */
  -webkit-mask-image: linear-gradient(to bottom, transparent calc((var(--i) - 1) * var(--band)), #000 var(--h));
          mask-image: linear-gradient(to bottom, transparent calc((var(--i) - 1) * var(--band)), #000 var(--h));
}
.n-card__lay img, .n-card__lay canvas {
  position: absolute; left: var(--m); top: 0; max-width: none;
  width: 100cqw; height: var(--h);
  border-radius: calc(4 * var(--gu)); object-fit: cover; user-select: none; -webkit-user-drag: none;
  filter: blur(calc(var(--k) * var(--i) * var(--sig) / 8));
}
.n-card__lay:first-child img, .n-card__lay:first-child canvas { filter: none; }
.n-card__in.has-blur .n-card__img { transition: visibility 0s linear .625s; }
.n-card__in.has-blur .n-card__vid { transition: opacity .5s ease-out, visibility 0s linear .625s; }
@media (hover: hover) {
  .n-card__in:hover, .n-card__in:focus-visible { --k: 1; }
  .n-card__in.has-blur:hover .n-card__blur, .n-card__in.has-blur:focus-visible .n-card__blur { visibility: visible; transition-delay: 0s; }
  .n-card__in.has-blur:hover .n-card__img, .n-card__in.has-blur:focus-visible .n-card__img,
  .n-card__in.has-blur:hover .n-card__vid, .n-card__in.has-blur:focus-visible .n-card__vid { visibility: hidden; transition-delay: 0s; }     /* the stack takes over from the plain picture and the film (they match at --k: 0) */
}
@supports not (mix-blend-mode: plus-lighter) {                         /* no way to add the copies up: an even blur instead */
  @media (hover: hover) { .n-card__in:hover .n-card__img, .n-card__in:hover .n-card__vid { filter: blur(var(--sig)); } }
  .n-card__img { transition: filter .625s var(--spring); }
  .n-card__vid { transition: opacity .5s ease-out, filter .625s var(--spring); }
}
@media (prefers-reduced-motion: reduce) { .n-card__in, .n-card__img, .n-card__vid { transition: none !important; } }

/* ---------- A season without news ---------- */
.n-empty { margin: 0; color: #000; line-height: calc(17 / 14); }
.n-empty button { display: block; margin-top: calc(3 * var(--u)); text-align: left; letter-spacing: inherit; text-transform: inherit; opacity: .4; }
.n-empty button:hover, .n-empty button:focus-visible { opacity: 1; }
.n-empty button:focus-visible { outline: 1px solid rgba(0, 0, 0, .55); outline-offset: 4px; }

/* ---------- Footer (the other pages', on #f0f0f0) ---------- */
.view--news .footer { background: #f0f0f0; padding-top: calc(60 * var(--u)); overflow: hidden; overflow: clip; }

/* ---------- The bars over the grey: the dark fades stay (they are what the white type stands on in the design); over the footer nav.js turns them to ink ---------- */
body[data-view="news"].is-past-hero .topbar::before { background: linear-gradient(to bottom, rgba(0, 0, 0, calc(.2 * var(--tn-fade, 1))), transparent); }
body[data-view="news"].is-past-hero .dock::before { background: linear-gradient(to top, rgba(0, 0, 0, calc(.2 * var(--tn-fade, 1))), transparent); }

/* ==========================================================================
   Mobile (<= 800px): two columns; the switch is a line that wraps, and opens with a tap
   ========================================================================== */
@media (max-width: 800px) {
  .n-main { padding: 112px 20px 72px; }
  .n-head { margin: 0; }
  .n-title, .n-switch { font-size: clamp(34px, 10.6vw, 64px); line-height: .97; }
  .n-title { height: auto; }
  .n-switch, .n-switch.is-live { display: flex; flex-wrap: wrap; align-items: flex-start; width: auto; height: auto; gap: 0 .14em; }
  .n-switch.is-live .n-tok { position: static; transform: none; display: block; opacity: .3; visibility: visible; }
  .n-switch.is-live .n-tok:not([aria-pressed="true"]):not(.n-tok--year) { display: none; }
  .n-switch.is-fold .n-tok { display: block !important; animation: n-tok-in .5s var(--ease) both; }
  .n-switch.is-live.is-fold .n-tok.is-away { opacity: .3; }
  .n-board { margin-top: 44px; }
  .n-grid { gap: 12px; }
  .n-col { gap: 20px; }
  .n-card__in { gap: 8px; }
  .n-card__img, .n-card__vid { border-radius: 3px; }
  .n-card__cap { gap: 2px; }
  .n-card__meta { column-gap: 12px; }
  .view--news .footer { margin-top: 0; padding-top: 36px; }
}
@media (max-width: 800px) and (hover: hover) { .n-switch .n-tok:hover { opacity: 1; } }
@keyframes n-tok-in { from { opacity: 0; } }
