/* The brand's faces, from the app's fonts (composeApp/.../font), cut to Latin; Newsreader at its display cut. */
@font-face { font-family: 'Newsreader'; src: url(font/newsreader.woff2) format('woff2'); font-weight: 300 500; font-style: normal; font-display: block; }
@font-face { font-family: 'Newsreader'; src: url(font/newsreader-italic.woff2) format('woff2'); font-weight: 300 400; font-style: italic; font-display: block; }
@font-face { font-family: 'Schibsted Grotesk'; src: url(font/schibsted-grotesk.woff2) format('woff2'); font-weight: 400 600; font-style: normal; font-display: swap; }

/* One stage pinned for the opening: the title opens like a curtain, the phone rises, giant words pass behind it; every change of scene is an arc rising from the bottom, as in the mark. */
:root {
  color-scheme: light;
  --paper: #F1F1EE;
  --ink: #16181C;
  --verde: #009246;
  --bianco: #DCDCD5;
  --rosso: #CE2B37;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'Schibsted Grotesk', ui-sans-serif, system-ui, sans-serif;
  --gl: max(16px, env(safe-area-inset-left, 0px));
  --gr: max(16px, env(safe-area-inset-right, 0px));
  --edge-l: calc(var(--gl) + 2.6vw);
  --edge-r: calc(var(--gr) + 2.6vw);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --si-fill: #008841;
  --no-fill: #CE2B37;
  /* The room the browser's bars take at the bottom when they show: what sits on the bottom edge stays above them. */
  --bar: 0px;
}
@supports (height: 100lvh) { :root { --bar: calc(100lvh - 100svh); } }
html, body { background: var(--paper); }
body {
  margin: 0; color: var(--ink); font-family: var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-kerning: normal; font-feature-settings: "kern", "liga", "calt";
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
::selection { background: var(--ink); color: var(--paper); }
/* Paper: a grain so faint it is felt more than seen. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0.05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1.2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Header: ink on paper, paper on ink. */
.top {
  position: fixed; z-index: 50; top: 0; left: 0; right: 0;
  padding: calc(22px + env(safe-area-inset-top, 0px)) var(--edge-r) 0 var(--edge-l);
  display: flex; justify-content: space-between; align-items: center; pointer-events: none;
  --c: var(--ink); --on: var(--paper);
}
.top.dark { --c: var(--paper); --on: var(--ink); }
/* Over the parts that scroll under it in the light (this week), a band of paper keeps the header off the rows. */
.top::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 0; height: calc(100% + 28px); background: linear-gradient(180deg, var(--paper) 62%, rgba(241, 241, 238, 0)); opacity: 0; transition: opacity 300ms var(--ease); pointer-events: none; }
.top.paper::before { opacity: 1; }
.top a { pointer-events: auto; text-decoration: none; }
/* The wordmark as in the app (QuorumTypography.brand): Newsreader 500, tracking −0.012 em. */
.brand { display: flex; align-items: center; gap: 10px; color: var(--c); font: 500 25px/1 var(--serif); letter-spacing: -0.012em; transition: color 400ms var(--ease); }
.brand img { width: 30px; height: 16px; display: block; }
.brand .dk { display: none; }
.top.dark .brand .lt { display: none; }
.top.dark .brand .dk { display: block; }
.get {
  font: 500 14px/1 var(--sans); letter-spacing: 0; padding: 12px 18px; border-radius: 999px;
  background: var(--c); color: var(--on); transition: background-color 400ms var(--ease), color 400ms var(--ease), transform 200ms var(--ease);
}
.get:hover { transform: translateY(-1px); }
.top a:focus-visible { outline: 2px solid var(--c); outline-offset: 4px; }

/* The pinned stage: the scroll runs through a tall section, the stage stays on screen. */
.run { position: relative; height: 780vh; margin-left: calc(-1 * var(--gl)); margin-right: calc(-1 * var(--gr)); }
/* As tall as the screen with the browser's bars hidden: when they hide, no strip of the page shows below. */
.stage { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; }
.fill { position: absolute; inset: 0; }

.headline {
  position: absolute; left: 0; right: 0; top: 41%; transform: translateY(-50%); margin: 0;
  font: 400 13.2vw/0.86 var(--serif); font-optical-sizing: auto; font-variation-settings: 'opsz' 72; letter-spacing: -0.058em; white-space: nowrap;
}
.headline .row { display: block; will-change: transform; }
/* The mark: its four tiers rise out of the bottom edge on arrival (the Onda of the app, in large). */
.rise { position: absolute; left: 50%; bottom: var(--bar); width: min(62vw, 104vh); aspect-ratio: 1616 / 848; transform: translate(-50%, 46%); will-change: transform; }
.rise img { display: block; width: 100%; height: 100%; clip-path: circle(0% at 50% 100%); animation: onda 1600ms 350ms var(--ease) forwards; }
@keyframes onda { to { clip-path: circle(75% at 50% 100%); } }
.headline .l1 { padding-left: calc(var(--edge-l) - 0.7vw); }
.headline .l2 { text-align: right; padding-right: var(--edge-r); }
.headline em { font-style: italic; font-weight: 300; letter-spacing: -0.05em; }
.mask { display: inline-block; overflow: hidden; padding: 0.08em 0.16em 0.24em; margin: -0.08em -0.16em -0.24em; vertical-align: top; }
.mask > span { display: inline-block; transform: translateY(108%); animation: rise 1100ms var(--ease) forwards; }
.l2 .mask > span { animation-delay: 120ms; }
@keyframes rise { to { transform: translateY(0); } }


.marquee {
  position: absolute; left: 0; top: 50%; margin: 0; white-space: nowrap;
  font: 400 min(44vh, 31vw)/0.8 var(--serif); font-variation-settings: 'opsz' 72; letter-spacing: -0.062em; transform: translate(100vw, -50%); will-change: transform;
}
.marquee em { font-style: italic; font-weight: 300; letter-spacing: -0.055em; }

/* The phone, to the measures of an iPhone 17 Pro Max (163.4 × 78.0 mm, screen 440 × 956 pt):
   continuous-curvature corners on frame, bezel and glass (the masks are drawn in script), the Dynamic Island
   at 126 × 37.33 pt in line with the status bar, the side buttons where they are. */
.stage { perspective: 1800px; }
.shadow { --y: 37vh; position: absolute; left: 50%; top: 50%; width: min(34vh, 74vw); height: 5vh; border-radius: 50%; background: radial-gradient(closest-side, rgba(22, 24, 28, 0.3), rgba(22, 24, 28, 0)); transform: translate(-50%, var(--y)); opacity: 0; filter: blur(6px); }
.phone {
  position: absolute; left: 50%; top: 50%; transform-style: preserve-3d;
  height: min(80vh, 172vw); aspect-ratio: 78 / 163.4; max-width: 100%;
  transform: translate(-50%, 120vh); will-change: transform; visibility: hidden;
  filter: drop-shadow(0 1px 1px rgba(22, 24, 28, 0.2)) drop-shadow(0 14px 18px rgba(22, 24, 28, 0.16)) drop-shadow(0 44px 54px rgba(22, 24, 28, 0.2));
}
.sq { position: absolute; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
/* Silver aluminium: light on the flats, darker where the edge turns away. */
.frame { inset: 0; background:
  linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 12%, rgba(255, 255, 255, 0) 88%, rgba(0, 0, 0, 0.12)),
  linear-gradient(90deg, #8d9095 0%, #dcdde0 4%, #c7c9cc 10%, #d6d7da 50%, #c2c4c7 90%, #e3e4e6 96%, #878a8f 100%); }
.bezel { background: #050506; }
.screen { overflow: hidden; background: var(--paper); }
.screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.screen .dim { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
/* Stack: question, its shade, home, its shade, result. */
#sc1 { z-index: 1; } #dim1 { z-index: 2; } #sc2 { z-index: 3; } #dim2 { z-index: 4; } #sc3 { z-index: 5; }
.phone { --hl: 0.18; --hr: 0.18; }
/* Edge light: the side turned towards the light catches it. */
.frame::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, var(--hl)) 0%, rgba(255, 255, 255, 0) 5%, rgba(255, 255, 255, 0) 95%, rgba(255, 255, 255, var(--hr)) 100%); }
.island { position: absolute; z-index: 10; top: 1.41%; left: 50%; width: 28.64%; height: 3.9%; transform: translateX(-50%); border-radius: 999px; background: #000; }
.island::after { content: ""; position: absolute; top: 50%; right: 8.5%; height: 40%; aspect-ratio: 1; transform: translateY(-50%); border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, rgba(90, 104, 140, 0.4), rgba(14, 16, 24, 0.95) 40%, #030304 70%); }
.btn { position: absolute; width: 0.9%; border-radius: 1.5px; background: linear-gradient(90deg, #7d8085, #d2d4d7 55%, #9a9da2); }
.btn.action { left: -0.6%; top: 18.6%; height: 3.9%; }
.btn.up { left: -0.6%; top: 24.6%; height: 6.4%; }
.btn.down { left: -0.6%; top: 32.6%; height: 6.4%; }
.btn.side { right: -0.6%; top: 25.6%; height: 10%; }
.btn.cam { right: -0.45%; top: 56%; height: 6.6%; width: 0.75%; background: linear-gradient(90deg, #3a3d42, #6f737a 55%, #44474c); }

/* The arc: two tricolour bands of the mark sweep outwards from the bottom, ink follows. Each is a disc centred on the
   bottom edge that grows by scale (a transform: no repaint while it opens); --r, --w and --hs come from the script.
   The last carries the photo in an inner layer scaled back by the inverse, so the photo stays still while the disc grows. */
.stage { --r: 100vh; --w: 100vw; --hs: 100vh; }
.arc { position: absolute; left: 50%; top: 100%; width: calc(2 * var(--r)); height: calc(2 * var(--r)); border-radius: 50%; overflow: hidden; transform: translate(-50%, -50%) scale(0.001); visibility: hidden; will-change: transform; }
.arcin { position: absolute; left: calc(var(--r) - var(--w) / 2); top: calc(var(--r) - var(--hs)); width: var(--w); height: var(--hs); transform-origin: 50% 100%; will-change: transform; }
.arc.tri { background: conic-gradient(from 270deg at 50% 50%, var(--verde) 0deg 60deg, var(--bianco) 60deg 120deg, var(--rosso) 120deg 180deg, var(--rosso) 180deg 360deg); }
.arc.ink { background: var(--ink); }
.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; transform-origin: 60% 40%; will-change: transform; }
/* On a tall screen the photo comes already cut around the girl (img/2-giugno-1946-verticale.webp). */
@media (max-aspect-ratio: 3/4) { .photo { object-position: 50% 40%; transform-origin: 50% 40%; } }

/* 2 June 1946, then the laws, sideways. The arc ends on the photo; this stage starts on the same frame. */
.hist { position: relative; height: 435vh; margin-left: calc(-1 * var(--gl)); margin-right: calc(-1 * var(--gr)); background: var(--ink); color: var(--paper); }
.hist .stage { background: var(--ink); }
.veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22, 24, 28, 0.5) 0%, rgba(22, 24, 28, 0) 16%, rgba(22, 24, 28, 0) 35%, rgba(22, 24, 28, 0.82) 100%); }
.inkfade { position: absolute; inset: 0; background: var(--ink); opacity: 0; }
.day { color: var(--paper); position: absolute; left: var(--edge-l); right: var(--edge-r); bottom: calc(52px + var(--bar) + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.day .ln { display: block; overflow: hidden; padding: 0.06em 0.16em 0.24em; margin: -0.06em -0.16em -0.24em; }
.day .ln > span { display: block; will-change: transform; }
.day h2 { margin: 0; font: 400 clamp(52px, 7.4vw, 128px)/0.9 var(--serif); font-variation-settings: 'opsz' 72; letter-spacing: -0.055em; text-shadow: 0 2px 40px rgba(0, 0, 0, 0.35); }
.day h2 em { font-style: italic; font-weight: 300; }

.track { position: absolute; inset: 0; display: flex; will-change: transform; }
.law { flex: none; width: 100vw; height: 100%; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 4vw; padding: 0 var(--edge-r) 0 var(--edge-l); box-sizing: border-box; }
.law .yr { margin: 0; font: 400 min(36vh, 22vw)/0.82 var(--serif); font-variation-settings: 'opsz' 72; letter-spacing: -0.065em; font-variant-numeric: lining-nums; will-change: transform; }
.law h3 { margin: 22px 0 0; font: italic 300 clamp(28px, 3vw, 48px)/1.08 var(--serif); letter-spacing: -0.02em; text-wrap: balance; }
.law .nums { margin: 20px 0 0; display: flex; gap: 28px; flex-wrap: wrap; font: 400 clamp(17px, 1.3vw, 20px)/1 var(--sans); color: #C9CCD1; font-variant-numeric: tabular-nums; }
.law .nums b { color: var(--paper); font-weight: 600; margin-right: 6px; }
.law .nums i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.law .nums i.s { background: var(--verde); }
.law .nums i.n { background: var(--rosso); }
.law canvas { width: 100%; height: auto; display: block; }
.cut { position: absolute; right: var(--edge-r); bottom: calc(48px + var(--bar) + env(safe-area-inset-bottom, 0px)); margin: 0; font: 400 clamp(28px, 3vw, 48px)/1 var(--serif); letter-spacing: -0.02em; opacity: 0; }
.cut em { font-style: italic; font-weight: 300; }

/* This week in the Aula: the real agenda, and the last results. */
.week { margin-left: calc(-1 * var(--gl)); margin-right: calc(-1 * var(--gr)); padding: 140px var(--edge-r) 120px var(--edge-l); background: var(--paper); }
.week h2 { margin: 0 0 64px; font: 400 clamp(52px, 7.6vw, 132px)/0.9 var(--serif); font-variation-settings: 'opsz' 72; letter-spacing: -0.055em; text-wrap: balance; }
.week h2 em { font-style: italic; font-weight: 300; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 6vw; }
.cols h3 { margin: 0 0 8px; font: 600 12px/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; }
.rows { margin: 0; padding: 0; list-style: none; }
.rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; padding: 26px 0; border-top: 1px solid rgba(22, 24, 28, 0.9); opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease), transform 900ms var(--ease); }
.rows li.in { opacity: 1; transform: none; }
.rows .when { grid-column: 1 / -1; font: 500 13px/1 var(--sans); letter-spacing: 0.01em; color: #4A4E55; }
.rows q { quotes: none; font: 400 clamp(22px, 1.9vw, 30px)/1.18 var(--serif); letter-spacing: -0.018em; text-wrap: pretty; }
.rows .tag { align-self: start; font: 600 13px/1 var(--sans); padding: 9px 12px; border-radius: 999px; border: 1px solid var(--ink); white-space: nowrap; }
.rows .tag.done { background: var(--ink); color: var(--paper); }
.rows .bar { grid-column: 1 / -1; display: block; width: 100%; height: 6px; border-radius: 3px; overflow: hidden; background: #E2E2DD; margin-top: 6px; }
.rows .bar .s { fill: var(--si-fill); } .rows .bar .a { fill: #B9B9B2; } .rows .bar .n { fill: var(--no-fill); }

.after {
  position: relative; overflow: hidden; margin-left: calc(-1 * var(--gl)); margin-right: calc(-1 * var(--gr)); background: var(--ink); color: var(--paper);
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 40px;
  padding: max(18vh, 128px) var(--edge-r) 0 var(--edge-l); box-sizing: border-box; text-align: center;
}
.after .ln { display: block; overflow: hidden; padding: 0.06em 0.16em 0.24em; margin: -0.06em -0.16em -0.24em; }
.after .ln > span { display: block; transform: translateY(110%); transition: transform 1100ms var(--ease); }
.after .ln + .ln > span { transition-delay: 120ms; }
.after.in .ln > span { transform: none; }
.after .stores { opacity: 0; transform: translateY(14px); transition: opacity 900ms 450ms var(--ease), transform 900ms 450ms var(--ease); }
.after.in .stores { opacity: 1; transform: none; }
.after .rise { position: relative; left: auto; bottom: auto; transform: none; margin-top: auto; flex: none; width: min(70vw, 980px, 118vh); aspect-ratio: 1616 / 560; overflow: hidden; }
.after .rise img { height: auto; aspect-ratio: 1616 / 848; }
/* The closing Aula opens like the first one, when it is on screen: it rises from the bottom edge as the arc sweeps out. */
.after .rise img { animation: none; transform: translateY(26%); transition: clip-path 2000ms 120ms var(--ease), transform 1700ms var(--ease); }
.after .rise.in img { clip-path: circle(75% at 50% 100%); transform: none; }
.after h2 { margin: 0; font: 400 clamp(54px, 8.8vw, 154px)/0.88 var(--serif); font-variation-settings: 'opsz' 72; letter-spacing: -0.058em; text-wrap: balance; }
.after h2 em { font-style: italic; font-weight: 300; }
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.store { display: block; border-radius: 9px; transition: transform 200ms var(--ease); }
.store img { display: block; height: 54px; width: auto; }
/* The Web, drawn like the two store badges: black, grey edge, two lines. */
.webbadge { display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 18px 0 13px; box-sizing: border-box; border-radius: 9px; border: 1px solid #A6A6A6; background: #000; color: #fff; text-decoration: none; text-align: left; }
.webbadge svg { width: 28px; height: 28px; flex: none; }
.webbadge span { display: flex; flex-direction: column; gap: 2px; line-height: 1; }
.webbadge small { font: 500 11px/1 var(--sans); letter-spacing: 0.01em; }
.webbadge b { font: 600 23px/1 var(--sans); letter-spacing: -0.02em; }
/* The Google Play image carries transparent space above and below the badge: drawn taller, it matches the App Store badge. */
.store img.gp { height: 72px; margin: -9px 0; }
.store:hover { transform: translateY(-2px); }
.store:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }

@media (max-width: 760px) {
  /* Two lines as on desktop: as large as "del Parlamento." (5.6 em wide) allows between the two edges. */
  .headline { font-size: calc((94.8vw - 32px) / 5.8); line-height: 0.88; }
  .get { padding: 15px 16px; font-size: 13px; }
  .phone { height: min(64vh, 134vw); }
  .shadow { --y: 31vh; }
  .marquee { font-size: min(34vh, 44vw); }
  .law { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 28px; }
  .law .yr { font-size: 30vw; }
  .day { bottom: calc(32px + var(--bar) + env(safe-area-inset-bottom, 0px)); }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .week { padding-top: 104px; padding-bottom: 88px; }
  .week h2 { margin-bottom: 44px; }
  .rise { width: 118vw; transform: translate(-50%, 40%); }
  .after .rise { width: 124vw; }
  .headline { top: 40%; }
}
/* Phones: no blended grain over the page, one soft shadow under the turning phone, no blur on the ground shadow. */
@media (pointer: coarse), (max-width: 760px) {
  body::after { display: none; }
  .phone { filter: drop-shadow(0 22px 26px rgba(22, 24, 28, 0.22)); }
  .shadow { filter: none; }
}
/* A phone on its side: the titles below the header, everything sized to the height. */
@media (max-height: 520px) and (min-width: 561px) {
  .top { padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
  .headline { font-size: min(13.2vw, 21vh); top: 47%; }
  .after { padding-top: 84px; gap: 24px; }
  .after h2 { font-size: min(8.8vw, 17vh); }
  .after .rise { width: min(70vw, 980px, 96vh); }
}
@media (prefers-reduced-motion: reduce) {
  .mask > span { animation: none; transform: none; }
  .rise img, .after .rise img { animation: none; clip-path: none; transform: none; transition: none; }
  .after .ln > span, .after .stores { transform: none; opacity: 1; transition: none; }
}
