/*
Theme Name: Michele Scalini Editoriale
Theme URI: https://michelescalini.it
Author: Michele Scalini
Description: Tema editoriale scuro per il sito ufficiale di Michele Scalini. Compatibile con Gutenberg e con i contenuti WordPress esistenti.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: michele-scalini-editoriale
*/

:root {
  --ms-ink: #f5f2e9;
  --ms-muted: #a9abb5;
  --ms-night: #07080d;
  --ms-panel: #0e1119;
  --ms-line: rgba(255,255,255,.12);
  --ms-acid: #e8f23d;
  --ms-violet: #795cff;
  --ms-serif: Georgia, "Times New Roman", serif;
  --ms-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ms-night); }
body { margin: 0; background: var(--ms-night); color: var(--ms-ink); font-family: var(--ms-sans); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.ms-shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.ms-narrow { width: min(820px, calc(100% - 48px)); margin-inline: auto; }
.ms-section { padding-block: 108px; }
.ms-eyebrow { color: var(--ms-acid); font-size: .72rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--ms-serif); font-weight: 500; letter-spacing: -.035em; }

.ms-header { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--ms-line); background: rgba(7,8,13,.86); backdrop-filter: blur(18px); }
.admin-bar .ms-header { top: 32px; }
.ms-header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.ms-brand { display: inline-flex; align-items: center; gap: 12px; }
.ms-brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(232,242,61,.6); color: var(--ms-acid); font-size: .75rem; font-weight: 800; letter-spacing: .08em; transform: rotate(-4deg); }
.ms-brand-copy { display: grid; gap: 2px; }
.ms-brand-copy strong { font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; }
.ms-brand-copy small { color: var(--ms-muted); font-size: .68rem; }
.ms-nav { display: flex; align-items: center; gap: 30px; }
.ms-nav a { color: #d8d9de; font-size: .78rem; font-weight: 700; letter-spacing: .04em; }
.ms-nav a:hover, .ms-nav a:focus { color: var(--ms-acid); }

.ms-hero { min-height: calc(100vh - 82px); display: grid; align-items: center; position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid rgba(49,216,232,.25); background: #030a11; }
.ms-hero::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(2,8,14,.96) 0%, rgba(2,8,14,.82) 32%, rgba(2,8,14,.2) 68%, rgba(2,8,14,.08) 100%), linear-gradient(0deg, rgba(2,8,14,.38), transparent 44%); }
.ms-hero::after { content: ""; position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 78%, rgba(3,10,17,.78)); }
.ms-hero-backdrop { position: absolute; z-index: -2; inset: 0; }
.ms-hero-backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: center; animation: ms-hero-drift 18s ease-in-out infinite alternate; }
.ms-hero-grid { position: relative; z-index: 3; width: min(1320px, calc(100% - 112px)); display: grid; grid-template-columns: minmax(0,760px) 1fr; align-items: center; padding-block: 96px 132px; }
.ms-hero-copy { max-width: 760px; }
.ms-hero h1 { margin: 28px 0; font-size: clamp(4rem,5.25vw,5.2rem); line-height: .96; white-space: nowrap; text-shadow: 0 4px 40px rgba(0,0,0,.5); }
.ms-hero h1 span { display: block; }
.ms-hero h1 span { color: var(--ms-ink); }
.ms-statement h2 span { color: var(--ms-muted); }
.ms-hero-intro-title { margin: 0 0 8px; color: #eef0f2; font: 500 1.22rem/1.5 var(--ms-sans); }
.ms-lead { max-width: 640px; color: #b8c4cc; font-size: 1.02rem; line-height: 1.7; }
.ms-actions { display: flex; align-items: center; gap: 30px; margin-top: 38px; }
.ms-button { min-height: 54px; padding: 0 27px; display: inline-flex; align-items: center; justify-content: center; background: rgba(3,10,17,.56); color: var(--ms-ink); border: 1px solid var(--ms-acid); box-shadow: -1px 0 0 #19d9ff, 0 0 30px rgba(25,217,255,.08); font-size: .78rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; transition: .25s ease; }
.ms-button:hover { transform: translateY(-2px); color: #080b0e; background: var(--ms-acid); box-shadow: 0 14px 42px rgba(216,255,47,.16); }
.ms-text-link { font-size: .82rem; font-weight: 800; letter-spacing: .04em; border-bottom: 1px solid var(--ms-line); padding-bottom: 7px; }
.ms-text-link span { color: var(--ms-acid); margin-left: 7px; }
.ms-hero-orbit { position: absolute; z-index: 2; pointer-events: none; border: 1px solid rgba(49,216,232,.16); border-radius: 50%; }
.ms-hero-orbit-one { width: 780px; height: 780px; left: -380px; top: 6%; }
.ms-hero-orbit-two { width: 110px; height: 110px; right: 17%; top: 10%; border-color: rgba(216,255,47,.34); }
.ms-hero-coordinates { position: absolute; z-index: 3; left: max(56px,calc((100vw - 1320px)/2)); bottom: 42px; display: grid; gap: 6px; color: rgba(116,198,219,.72); font: 600 .62rem/1 var(--ms-sans); letter-spacing: .2em; }
.ms-count { position: absolute; right: max(56px,calc((100vw - 1320px)/2)); bottom: 44px; z-index: 3; padding: 13px 0 13px 20px; background: rgba(3,10,17,.46); border-left: 2px solid #19d9ff; }
.ms-count small { color: var(--ms-ink); font: 500 1.12rem var(--ms-serif); }
@keyframes ms-hero-drift { from { transform: scale(1.01) translate3d(0,0,0); } to { transform: scale(1.035) translate3d(-.4%,-.3%,0); } }

.ms-statement { display: grid; grid-template-columns: 1fr; border-bottom: 1px solid var(--ms-line); }
.ms-section-index { color: var(--ms-acid); font: 500 1.1rem var(--ms-serif); }
.ms-statement h2, .ms-section-heading h2 { margin: 10px 0 24px; font-size: clamp(2.4rem,4.6vw,4.7rem); line-height: 1.02; }
.ms-statement-copy { max-width: 1020px; }
.ms-statement-copy > p { max-width: 960px; color: #dedfe4; font: 500 clamp(1.25rem,2vw,1.5rem)/1.65 var(--ms-serif); }
.ms-statement-copy h2 { margin-top: 38px; }
.ms-collections { background: #0a0c12; }
.ms-section-heading { display: grid; grid-template-columns: 1fr 390px; gap: 60px; align-items: end; margin-bottom: 56px; }
.ms-section-heading > p { color: var(--ms-muted); line-height: 1.7; }
.ms-collections .ms-section-heading > p { color: var(--ms-ink); font: 500 clamp(1.15rem,1.8vw,1.32rem)/1.6 var(--ms-serif); }
.ms-section-heading-single { grid-template-columns: 1fr; }
.ms-collection-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.ms-collection-card { min-height: 340px; position: relative; overflow: hidden; border: 1px solid var(--ms-line); padding: 26px; display: flex; align-items: flex-end; transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease; }
.ms-collection-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.55) brightness(.68); transition: .6s ease; }
.ms-collection-card:hover { transform: translateY(-6px); border-color: rgba(49,216,232,.45); box-shadow: 0 24px 60px rgba(0,0,0,.36), 0 0 34px rgba(49,216,232,.08); }
.ms-collection-card:hover img { transform: scale(1.055); filter: saturate(.9) brightness(.76); }
.ms-card-scrim { position: absolute; inset: 0; background: linear-gradient(180deg,rgba(7,8,13,.05),rgba(7,8,13,.96)); }
.ms-card-number { position: absolute; top: 24px; left: 26px; z-index: 2; color: var(--ms-acid); font-size: .75rem; font-weight: 800; }
.ms-card-copy { position: relative; z-index: 2; display: grid; gap: 9px; max-width: 82%; }
.ms-card-copy strong { font: 500 clamp(1.55rem,2.7vw,2.55rem)/1.06 var(--ms-serif); letter-spacing: -.035em; }
.ms-card-copy strong span { display: block; }
.ms-card-copy small { color: #c7c8ce; font-size: .86rem; }
.ms-card-arrow { position: absolute; right: 26px; bottom: 26px; z-index: 2; color: var(--ms-acid); font-size: 1.5rem; }

.ms-book-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 44px 24px; }
.ms-book-card { min-width: 0; }
.ms-book-cover { display: block; aspect-ratio: 2/3; overflow: hidden; background: var(--ms-panel); box-shadow: 0 18px 46px rgba(0,0,0,.35); }
.ms-book-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.ms-book-card:hover img { transform: scale(1.025); }
.ms-book-card h3 { margin: 20px 0 12px; font: 500 1.35rem/1.18 var(--ms-serif); }
.ms-book-link { color: var(--ms-muted); font-size: .73rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.ms-closing { text-align: center; }
.ms-closing h2 { margin: 10px 0 12px; font-size: clamp(2.4rem,4.6vw,4.7rem); }
.ms-closing p:not(.ms-eyebrow) { max-width: 820px; margin-inline: auto; color: #d8d9df; font: italic clamp(1.2rem,2vw,1.45rem)/1.65 var(--ms-serif); }
.ms-idea-section { border-bottom: 1px solid var(--ms-line); }
.ms-idea-section > h2 { max-width: 860px; margin: 16px 0 34px; font-size: clamp(2.4rem,4.6vw,4.7rem); line-height: 1.02; }
.ms-idea-points { display: grid; gap: 13px; margin: 0 0 54px; padding: 0; list-style: none; }
.ms-idea-points li { color: #d9dae0; font-size: 1.08rem; }
.ms-idea-points li::before { content: "→"; margin-right: 14px; color: var(--ms-acid); }
.ms-idea-copy { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; padding-top: 44px; border-top: 1px solid var(--ms-line); }
.ms-idea-copy p { color: var(--ms-ink); font: italic 1.45rem/1.55 var(--ms-serif); }

.ms-content-main { min-height: 65vh; padding-block: 100px; }
.ms-page-title, .ms-entry-title { margin: 12px 0 36px; font-size: clamp(3.2rem,7vw,6.5rem); line-height: .96; }
.ms-entry-content { color: #c8cad1; font-size: 1.05rem; line-height: 1.82; }
.ms-entry-content h1, .ms-entry-content h2, .ms-entry-content h3 { color: var(--ms-ink); }
.ms-entry-content h1 { font-size: clamp(2.5rem,5vw,4.5rem); }
.ms-entry-content h2 { font-size: clamp(1.8rem,3vw,2.7rem); }
.ms-entry-content a { color: var(--ms-acid); text-decoration: underline; text-underline-offset: 4px; }
.ms-entry-content .wp-block-button__link { color: #0a0b0d; background: var(--ms-acid); text-decoration: none; border-radius: 0; font-weight: 800; }
.ms-entry-content .wp-block-image img { box-shadow: 0 22px 70px rgba(0,0,0,.45); }
.ms-single-header { padding-bottom: 42px; border-bottom: 1px solid var(--ms-line); margin-bottom: 56px; }
.ms-back { display: inline-block; margin-top: 50px; color: var(--ms-muted); font-size: .8rem; }

.ms-footer { padding-top: 80px; border-top: 1px solid var(--ms-line); background: #05060a; }
.ms-footer-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 100px; }
.ms-footer-grid > div { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.ms-footer-grid > div > strong { color: var(--ms-acid); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; }
.ms-footer-grid a:not(.ms-brand), .ms-footer-grid p { color: var(--ms-muted); font-size: .84rem; }
.ms-footer-grid .ms-footer-contact { min-height: 46px; margin-top: 12px; padding: 0 18px; display: inline-flex; align-items: center; color: var(--ms-acid); border: 1px solid rgba(232,242,61,.55); font-size: .74rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.ms-footer-bottom { margin-top: 70px; min-height: 72px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--ms-line); color: #777a86; font-size: .72rem; }

@media (max-width: 980px) {
  .ms-hero-grid { grid-template-columns: 1fr; }
  .ms-hero { min-height: 760px; }
  .ms-hero-grid { width: min(100% - 48px,1180px); padding-block: 88px 150px; }
  .ms-book-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 760px) {
  .admin-bar .ms-header { top: 46px; }
  .ms-shell, .ms-narrow { width: min(100% - 30px,1180px); }
  .ms-section { padding-block: 76px; }
  .ms-header-inner { min-height: 72px; }
  .ms-hero h1 { white-space: normal; }
  .ms-hero { min-height: 780px; }
  .ms-hero-grid { width: min(100% - 30px,1180px); padding-block: 82px 170px; }
  .ms-hero h1 { font-size: clamp(3.15rem,12vw,4.3rem); }
  .ms-hero-backdrop img { object-position: 66% center; }
  .ms-hero::before { background: linear-gradient(90deg,rgba(2,8,14,.96),rgba(2,8,14,.68)),linear-gradient(0deg,rgba(2,8,14,.48),transparent); }
  .ms-hero-coordinates { display: none; }
  .ms-count { right: 15px; bottom: 30px; }
  .ms-brand-copy small { display: none; }
  .ms-nav { gap: 16px; }
  .ms-nav a { font-size: .7rem; white-space: nowrap; }
  .ms-statement, .ms-section-heading { grid-template-columns: 1fr; gap: 18px; }
  .ms-idea-copy { grid-template-columns: 1fr; gap: 20px; }
  .ms-collection-grid { grid-template-columns: 1fr; }
  .ms-collection-card { min-height: 280px; }
  .ms-book-grid { grid-template-columns: repeat(2,1fr); gap: 36px 16px; }
  .ms-footer-grid { grid-template-columns: 1fr; gap: 54px; }
  .ms-footer-grid > div:first-child { grid-column: auto; }
}
@media (max-width: 480px) {
  .ms-brand-copy { display: none; }
  .ms-actions { align-items: flex-start; flex-direction: column; }
  .ms-hero h1 { font-size: 3.1rem; }
  .ms-hero-intro-title { font-size: 1.05rem; }
  .ms-book-card h3 { font-size: 1.08rem; }
}
