/* Velarium — foglio di stile */

:root {
  --ink: #161616;
  --muted: #3A3A37;
  --muted-2: #5E5E5A;
  --night: #0F0B1A;
  --night-2: #1A1428;
  --night-line: #2A2340;
  --night-text: #C9C2DA;
  --lilla: #B9A3FF;
  --accent: #6B2BD9;
  --soft: #F3EEFD;
  --soft-2: #EFE9FB;
  --deep: #4C1D95;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Inter Tight', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .3s ease; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--lilla); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 12px; z-index: 20; background: #fff; color: #000; padding: 8px 14px; }
.skip:focus { left: 12px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.narrow { max-width: 1040px; margin: 0 auto; padding-left: clamp(24px, 8vw, 128px); padding-right: clamp(24px, 8vw, 128px); }
.section { padding-top: 112px; padding-bottom: 112px; }

/* ---------- Scene scure ---------- */
.dark { position: relative; overflow: hidden; background: var(--night); color: #F3EEFD; }
.dark a:hover { color: var(--lilla); }
.grain {
  position: absolute; inset: -50%;
  background-image: url(/assets/img/grana.png); background-size: 128px;
  opacity: .07; mix-blend-mode: overlay; pointer-events: none;
  animation: grain 1.2s steps(5) infinite;
}
.bar { position: absolute; left: 0; right: 0; height: 0; background: var(--night); z-index: 3; pointer-events: none; animation: bars 1.8s cubic-bezier(.7, 0, .2, 1) both; }
.bar.top { top: 0; }
.bar.bot { bottom: 0; }
.glow { position: absolute; top: -4%; right: -4%; width: min(720px, 56%); opacity: .9; pointer-events: none; animation: fadein 3s ease .2s both; }
.glow img { width: 100%; height: auto; animation: drift 24s ease-in-out infinite; transform-origin: 60% 40%; }

/* ---------- Header ---------- */
.hd {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 40px;
  padding-top: 24px; padding-bottom: 24px;
  border-bottom: 1px solid var(--night-line);
}
.brand { display: flex; align-items: center; gap: 14px; font-family: var(--serif); font-size: 32px; letter-spacing: .18em; line-height: 1; }
.brand img { height: 38px; width: auto; }
.hd nav { display: flex; flex-wrap: wrap; gap: 4px 28px; font-size: 15px; font-weight: 500; }
.hd nav a { padding: 8px 0; }
.hd nav a[aria-current="page"] { color: var(--lilla); }

/* ---------- Apertura homepage ---------- */
.hero { position: relative; z-index: 2; padding-top: 136px; padding-bottom: 120px; display: flex; flex-direction: column; gap: 28px; }
.hero h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 9vw, 132px); line-height: .98; letter-spacing: -.015em; }
.dark h1 em, .dark .hl { color: var(--lilla); }
.lede { margin: 0; font-family: var(--serif); font-size: clamp(24px, 2.4vw, 30px); line-height: 1.3; max-width: 30ch; }
.intro { margin: 0; font-size: 18px; line-height: 1.65; color: var(--night-text); max-width: 50ch; }
.scroll { margin: 64px 0 0; display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #8F86A8; }
.scroll span { width: 8px; height: 8px; border-radius: 50%; background: var(--lilla); animation: breathe 3.5s ease-in-out infinite; }

.rise { animation: rise 1.6s var(--ease) both; }
.d1 { animation-delay: .5s; } .d2 { animation-delay: .8s; } .d3 { animation-delay: 1.1s; } .d4 { animation-delay: 1.6s; }

/* ---------- Bottoni e link ---------- */
.pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  background: var(--lilla); color: var(--night) !important; font-weight: 500;
  padding: 14px 28px; border-radius: 999px;
  transition: transform .35s var(--ease), box-shadow .35s ease;
}
.pill:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -12px rgba(185, 163, 255, .7); }
.link { align-self: flex-start; font-weight: 500; border-bottom: 1px solid currentColor; padding: 10px 0; }
.arr { display: inline-block; transition: transform .35s var(--ease); }
a:hover .arr { transform: translateX(6px); }

/* ---------- Striscia delle rubriche ---------- */
.marquee { background: var(--accent); color: #FFFFFF; overflow: hidden; padding: 22px 0; font-family: var(--serif); font-size: 28px; line-height: 1; white-space: nowrap; }
.marquee .track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee .seq { display: flex; align-items: center; gap: 36px; padding-right: 36px; }
.marquee .dot { color: #C9B6F5; }

/* ---------- Titoli di sezione ---------- */
.sec-h {
  margin: 0 0 40px; display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 14px; font-weight: 500; letter-spacing: .04em;
  padding-bottom: 16px; border-bottom: 1px solid var(--ink);
}
.sec-h .n { color: var(--accent); }
.sec-h .ln { width: 28px; height: 1px; background: var(--accent); }
.dark .sec-h { border-color: var(--night-line); color: var(--night-text); }
.dark .sec-h .n { color: var(--lilla); }
.dark .sec-h .ln { background: var(--lilla); }
.sec-h.plain { border-bottom: 0; padding-bottom: 0; color: var(--muted-2); }

/* ---------- In evidenza ---------- */
.feature { display: flex; flex-direction: column; gap: 36px; }
.cine { position: relative; aspect-ratio: 2.39 / 1; overflow: hidden; background: var(--night-2); }
.cine img { width: 100%; height: 100%; object-fit: cover; }
.cine .tag { position: absolute; left: 20px; bottom: 16px; color: #F3EEFD; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.cine .soon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-style: italic; font-size: clamp(22px, 3vw, 34px); color: var(--lilla); }
.feature-body { display: flex; flex-wrap: wrap; gap: 24px 56px; align-items: flex-start; }
.feature-body h3 { flex: 1 1 380px; margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 3.6vw, 52px); line-height: 1.08; }
.feature-body > div { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.feature-body p { margin: 0; color: var(--muted); }
.tag { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }

.zoom { transition: transform 1.4s var(--ease); }
.feature:hover .zoom, .acard:hover .zoom { transform: scale(1.04); }

/* ---------- Rubriche ---------- */
.soft { background: var(--soft); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px 32px; }
.card { display: flex; flex-direction: column; gap: 10px; transition: transform .45s var(--ease); }
.card:hover { transform: translateY(-6px); color: inherit; }
.card .img { display: block; aspect-ratio: 3 / 2; overflow: hidden; margin-bottom: 6px; }
.card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.card:hover .img img { transform: scale(1.07); }
.card .t { font-family: var(--serif); font-size: 30px; line-height: 1; }
.card .q { font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.3; color: var(--accent); }
.card .d { font-size: 15px; line-height: 1.55; color: var(--muted); }

/* ---------- Cornice a mirino ---------- */
.frame { position: relative; padding: 14px; color: var(--accent); }
.dark .frame { color: var(--lilla); }
.frame .c { position: absolute; width: 26px; height: 26px; transition: transform .7s var(--ease); }
.frame .tl { top: 0; left: 0; border-top: 1px solid; border-left: 1px solid; }
.frame .tr { top: 0; right: 0; border-top: 1px solid; border-right: 1px solid; }
.frame .bl { bottom: 0; left: 0; border-bottom: 1px solid; border-left: 1px solid; }
.frame .br { bottom: 0; right: 0; border-bottom: 1px solid; border-right: 1px solid; }
.frame:hover .tl { transform: translate(7px, 7px); }
.frame:hover .tr { transform: translate(-7px, 7px); }
.frame:hover .bl { transform: translate(7px, -7px); }
.frame:hover .br { transform: translate(-7px, -7px); }
.frame .pic { position: relative; overflow: hidden; background: var(--soft-2); animation: reveal 1.8s cubic-bezier(.7, 0, .2, 1) .2s both; }
.dark .frame .pic { background: var(--night-2); }
.frame .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.frame:hover .pic img { transform: scale(1.04); }
.portrait { aspect-ratio: 4 / 5; }
figcaption { margin-top: 10px; font-family: var(--mono); font-size: 12px; color: var(--muted-2); }
.dark figcaption { color: #A79FBF; }

/* ---------- Due colonne ---------- */
.split { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px 72px; }
.split .side { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 36px; }
.split .main { flex: 3 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.split .main p { margin: 0; max-width: 60ch; }
.dark .split .main p { color: var(--night-text); }
.big { font-family: var(--serif); font-size: clamp(44px, 5vw, 72px); line-height: 1.02; margin: 0; }
.quote { font-family: var(--serif); font-size: 28px; line-height: 1.35; max-width: 38ch; }
.dark .split .main p.quote { color: #F3EEFD; }
.who { order: 2; flex: 0 1 260px; }
.name { margin: 0; font-family: var(--serif); font-size: clamp(34px, 3.4vw, 48px); line-height: 1.1; }
.role { margin: 4px 0 0; font-family: var(--mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.main p.body { color: var(--muted); }

/* ---------- Testata delle pagine interne ---------- */
.page-top { position: relative; z-index: 2; padding-top: 96px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 22px; }
.page-top h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(46px, 6.4vw, 92px); line-height: 1; letter-spacing: -.01em; }
.page-top .sub { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.3; color: var(--lilla); max-width: 34ch; }
.page-top .intro { font-size: 17px; }
.page-top .tag { color: var(--lilla); }
.page-top .meta { margin: 0; font-family: var(--mono); font-size: 13px; color: #A79FBF; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.chip { border: 1px solid #3B3352; border-radius: 999px; padding: 8px 18px; font-size: 14px; font-weight: 500; }
.chip[aria-current="page"] { background: var(--lilla); border-color: var(--lilla); color: var(--night) !important; }

/* ---------- Archivio ---------- */
.grid-a { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 56px 32px; }
.acard { display: flex; flex-direction: column; gap: 12px; }
.acard:hover { color: inherit; }
.acard .img { aspect-ratio: 3 / 2; overflow: hidden; background: var(--soft-2); }
.acard .img img { width: 100%; height: 100%; object-fit: cover; }
.acard .tag { color: var(--accent); }
.acard h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; transition: color .3s ease; }
.acard:hover h3 { color: var(--accent); }
.acard p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.acard .date { font-family: var(--mono); font-size: 12px; color: var(--muted-2); }
.empty { margin: 0; font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--muted-2); }

/* ---------- Articolo ---------- */
.cover { margin: -48px auto 0; position: relative; z-index: 3; max-width: 1040px; padding: 0 clamp(24px, 4vw, 48px); }
.cover .pic { aspect-ratio: 16 / 9; }
.cover figcaption { text-align: right; }
.prosa { max-width: 680px; margin: 0 auto; padding: 72px 24px 32px; font-size: 19px; line-height: 1.75; color: #24232A; }
.prosa > * { margin: 0; }
.prosa > * + * { margin-top: 1.1em; }
.prosa > h2, .prosa > h3, .prosa > h4 { font-family: var(--serif); font-weight: 400; color: var(--ink); line-height: 1.15; margin-top: 1.8em; }
.prosa > h2 + *, .prosa > h3 + *, .prosa > h4 + * { margin-top: .6em; }
.prosa h2 { font-size: 38px; }
.prosa h3 { font-size: 30px; }
.prosa h4 { font-size: 24px; }
.prosa a { color: var(--accent); border-bottom: 1px solid currentColor; }
.prosa strong { font-weight: 600; }
.prosa > blockquote { margin: 1.8em 0; }
.prosa blockquote { padding: 0 0 0 28px; border-left: 2px solid var(--accent); font-family: var(--serif); font-style: italic; font-size: 30px; line-height: 1.3; color: var(--deep); }
.prosa blockquote p + p { margin-top: .6em; }
.prosa ul, .prosa ol { padding-left: 1.2em; margin: 0; }
.prosa li + li { margin-top: .4em; }
.prosa hr { border: 0; height: 1px; background: #E3E1DC; margin: 2.4em 0; }
.prosa > figure { margin: 2em -40px; }
.prosa blockquote p { margin: 0; }
.prosa figure img, .prosa img { width: 100%; height: auto; }
.prosa .q-a { font-weight: 600; color: var(--ink); }
.end { max-width: 680px; margin: 0 auto; padding: 24px 24px 112px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; border-top: 1px solid #E3E1DC; }
.end p { margin: 14px 0 0; font-family: var(--mono); font-size: 12px; color: var(--muted-2); }

/* ---------- Pagine (Chi sono, Progetto) ---------- */
.pagina { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px 72px; }
.pagina .prosa { flex: 3 1 400px; min-width: 0; margin: 0; padding: 0; max-width: 680px; }
.pagina .aside { flex: 1 1 260px; max-width: 340px; }

/* ---------- Footer ---------- */
.ft { background: var(--deep); color: #F3EEFD; }
.ft a:hover { color: #C9B6F5; }
.ft .in { padding-top: 104px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 72px; }
.ft .top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px 72px; align-items: flex-end; }
.ft .call { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.ft .call p { margin: 0; color: #DDD0F7; max-width: 52ch; }
.ft .call .t { font-family: var(--serif); font-size: clamp(38px, 4.4vw, 60px); line-height: 1.05; color: #F3EEFD; }
.ft .links { display: flex; flex-direction: column; gap: 4px; font-size: 16px; }
.ft .links a { padding: 6px 0; }
.ft .bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 32px; padding-top: 24px; border-top: 1px solid #6D45B8; font-size: 14px; color: #D2C2F5; }
.ft .brand { font-size: 22px; gap: 12px; }
.ft .brand img { height: 26px; }

/* ---------- Animazioni ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes drift { 0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); } 50% { transform: translate3d(-2.5%, 2%, 0) rotate(-2deg) scale(1.05); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes breathe { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }
@keyframes reveal { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes bars { from { height: 50%; } to { height: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .bar { display: none; }
}

/* ---------- Telefono ---------- */
@media (max-width: 700px) {
  body { font-size: 16px; }
  .section { padding-top: 80px; padding-bottom: 80px; }
  .hero { padding-top: 88px; padding-bottom: 88px; }
  .brand { font-size: 26px; }
  .brand img { height: 32px; }
  .hd nav { gap: 2px 20px; font-size: 14px; }
  .glow { width: 90%; top: 6%; right: -30%; opacity: .55; }
  .marquee { font-size: 22px; padding: 18px 0; }
  .cine { aspect-ratio: 16 / 10; }
  .prosa { font-size: 17px; padding-top: 56px; }
  .prosa figure { margin-left: 0; margin-right: 0; }
  .prosa blockquote { font-size: 24px; }
  .cover { margin-top: -32px; }
  .who { order: 0; }
}
