/*
    localeok.it — frontend pubblico

    Direzione estetica: contemporanea e sobria. Superfici chiare e pulite, grotesque
    moderno, spaziatura generosa, un solo accento vivo usato con parsimonia sulle
    scadenze urgenti. Deve leggersi come uno strumento serio e attuale — non come
    modulistica, non come startup chiassosa.

    Nessuna dipendenza da Bootstrap: la griglia è scritta a mano.
*/

/* ------------------------------------------------------------------ token */

:root {
	/* --------------------------------------------------------------
	   Palette derivata dal marchio (templates/localeok/web/logo.png):
	   blu #3b5499 e verde #29b353, campionati dal file.
	   -------------------------------------------------------------- */
	--bg:          #fbfbfd;
	--bg-alt:      #f2f3f8;
	--surface:     #ffffff;

	--brand:       #3b5499;
	--brand-deep:  #2f4479;
	--brand-tint:  #ecf0f8;

	/* i titoli usano il blu del marchio, non una sua approssimazione */
	--ink:         #3b5499;
	--ink-soft:    #565a70;
	--ink-faint:   #8b90a6;
	--line:        #e5e7f0;
	--line-strong: #d0d4e2;

	/* --accent è il verde esatto del logo. Su fondo chiaro dà 2,65:1: perfetto
	   per il marchio e per gli elementi decorativi, insufficiente per il testo.
	   Le due varianti scurite mantengono la stessa tinta e superano la soglia. */
	--accent:        #29b353;
	--accent-text:   #1e813c;
	--accent-ontint: #196f33;
	--accent-tint:   #e6f7ec;
	--accent-light:  #7ede9c;

	--signal:      #b03a17;
	--signal-tint: #fdeee9;

	--sans: "Schibsted Grotesk", -apple-system, "Segoe UI", sans-serif;
	--mono: "JetBrains Mono", ui-monospace, monospace;

	--gutter: clamp(1.25rem, 4vw, 3.25rem);
	--maxw:   78rem;
	--r:      12px;
}

/* ------------------------------------------------------------------ reset */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.6;
	letter-spacing: -.005em;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
	margin: 0;
	font-weight: 600;
	line-height: 1.06;
	letter-spacing: -.035em;
	text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }

::selection { background: var(--accent); color: #fff; }

/* la barra è fissa in alto: senza questo le ancore finiscono sotto di essa */
[id] { scroll-margin-top: 5.5rem; }

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 3px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

.eyebrow {
	font-family: var(--mono);
	font-size: .7rem;
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--accent-text);
}

/* ------------------------------------------------------------------ nav */

.lok-nav {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(251,251,253,.84);
	backdrop-filter: saturate(180%) blur(14px);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid var(--line);
}
.lok-nav-inner {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 1.05rem var(--gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.lok-brand { display: inline-flex; align-items: center; }
.lok-brand img { display: block; height: 30px; width: auto; }
@media (max-width: 30rem) { .lok-brand img { height: 26px; } }
.lok-nav-links { display: flex; gap: 2rem; font-size: .89rem; }
.lok-nav-links a {
	text-decoration: none;
	color: var(--ink-soft);
	transition: color .18s;
}
.lok-nav-links a:hover { color: var(--ink); }
@media (max-width: 46rem) { .lok-nav-links { display: none; } }

/* ------------------------------------------------------------------ hero */

.hero {
	padding: clamp(3.5rem, 9vw, 7.5rem) 0 clamp(3rem, 6vw, 5.5rem);
	position: relative;
	overflow: hidden;
}
/* alone morbido: dà profondità senza texture */
.hero::after {
	content: "";
	position: absolute;
	top: -30%;
	right: -10%;
	width: 55rem;
	height: 55rem;
	background: radial-gradient(circle, rgba(59,84,153,.09) 0%, rgba(59,84,153,0) 62%);
	pointer-events: none;
	z-index: -1;
}
.hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: clamp(2.5rem, 6vw, 5.5rem);
	align-items: center;
}
@media (max-width: 62rem) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 {
	font-size: clamp(2.5rem, 6vw, 4.35rem);
	font-weight: 700;
	margin: 1.35rem 0 1.6rem;
}
.hero h1 em { font-style: normal; color: var(--accent); }

.hero-lead {
	font-size: clamp(1.02rem, 1.5vw, 1.15rem);
	color: var(--ink-soft);
	max-width: 33rem;
	margin-bottom: 1.15rem;
}
.hero-note {
	font-family: var(--mono);
	font-size: .76rem;
	color: var(--ink-faint);
	margin-top: 2rem;
	display: flex;
	align-items: center;
	gap: .6rem;
}
.hero-note::before {
	content: "";
	width: 1.6rem;
	height: 1px;
	background: var(--line-strong);
	flex: none;
}

/* scheda scadenze */
.card-deadline {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r);
	box-shadow: 0 1px 2px rgba(14,14,16,.04), 0 24px 48px -32px rgba(14,14,16,.28);
	overflow: hidden;
}
.card-deadline-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: .8rem 1.15rem;
	border-bottom: 1px solid var(--line);
	font-family: var(--mono);
	font-size: .67rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ink-faint);
}
.card-row {
	display: flex;
	gap: 1rem;
	padding: .9rem 1.15rem;
	border-bottom: 1px solid var(--line);
	align-items: center;
}
.card-row:last-child { border-bottom: 0; }
.card-date {
	font-family: var(--mono);
	font-size: .74rem;
	font-weight: 500;
	white-space: nowrap;
	min-width: 3.9rem;
	color: var(--ink);
}
.card-body-txt { font-size: .88rem; line-height: 1.35; }
.card-body-txt small {
	display: block;
	font-family: var(--mono);
	font-size: .67rem;
	color: var(--ink-faint);
	margin-top: .18rem;
}
.pill {
	font-family: var(--mono);
	font-size: .6rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: .22rem .5rem;
	border-radius: 100px;
	white-space: nowrap;
	margin-left: auto;
}
.pill-urgent { background: var(--signal-tint); color: var(--signal); }
.pill-ok     { background: var(--accent-tint); color: var(--accent-ontint); }

/* ------------------------------------------------------------------ nastro */

.ticker {
	background: var(--brand);
	color: var(--bg);
	padding: .8rem 0;
	overflow: hidden;
	white-space: nowrap;
	/* i bordi sfumano invece di tagliare le parole a metà */
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 5rem, #000 calc(100% - 5rem), transparent);
	mask-image: linear-gradient(90deg, transparent, #000 5rem, #000 calc(100% - 5rem), transparent);
}
.ticker-track { display: inline-flex; gap: 2.75rem; animation: slide 52s linear infinite; }
.ticker-track > span {
	font-family: var(--mono);
	font-size: .72rem;
	letter-spacing: .02em;
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	color: rgba(255,255,255,.7);
}
.ticker-track b { color: var(--accent-light); font-weight: 500; }
.ticker-track i { font-style: normal; color: rgba(255,255,255,.24); }
@keyframes slide { to { transform: translateX(-50%); } }
.ticker:hover .ticker-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ------------------------------------------------------------------ sezioni */

section { padding: clamp(3.75rem, 8vw, 7rem) 0; }
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 40rem; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }
.section-head h2 { font-size: clamp(1.85rem, 3.4vw, 2.65rem); margin: .85rem 0 1rem; }
.section-head p { color: var(--ink-soft); font-size: 1.03rem; }
.section-head--flush { margin-bottom: 0; max-width: none; }

/* ---- passi ---- */

.steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem;
}
@media (max-width: 54rem) { .steps { grid-template-columns: 1fr; } }
.step {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r);
	padding: 1.85rem 1.6rem 2rem;
	position: relative;
	overflow: hidden;
	transition: transform .28s cubic-bezier(.2,.7,.3,1), box-shadow .28s;
}
/* filo d'accento che entra da sinistra al passaggio */
.step::after {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 2px;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .35s cubic-bezier(.2,.7,.3,1);
}
.step:hover::after { transform: scaleX(1); }
.step:hover {
	transform: translateY(-3px);
	box-shadow: 0 18px 36px -26px rgba(14,14,16,.3);
}
.step-num {
	font-family: var(--mono);
	font-size: .68rem;
	color: var(--accent-text);
	letter-spacing: .1em;
	display: block;
	margin-bottom: 1rem;
}
.step h3 { font-size: 1.2rem; margin-bottom: .55rem; }
.step p { color: var(--ink-soft); font-size: .93rem; }

/* ---- verticali ---- */

.verticals { border-top: 1px solid var(--line); }
.vrow {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 1.5rem 2.5rem;
	padding: 1.55rem 0;
	border-bottom: 1px solid var(--line);
	transition: padding-left .25s cubic-bezier(.2,.7,.3,1);
}
.vrow:hover { padding-left: .75rem; }
@media (max-width: 54rem) {
	.vrow { grid-template-columns: 1fr; gap: .45rem; }
	.vrow:hover { padding-left: 0; }
}
.vrow h3 {
	font-size: 1.22rem;
	display: flex;
	align-items: baseline;
	gap: .85rem;
}
.vrow p { color: var(--ink-soft); font-size: .93rem; }
.vindex {
	font-family: var(--mono);
	font-size: .68rem;
	font-weight: 400;
	letter-spacing: .06em;
	color: var(--ink-faint);
	transition: color .25s;
}
.vrow:hover .vindex { color: var(--accent-text); }

/* nota sui limiti di copertura: deve leggersi come una precisazione, non come slogan */
.scope-note {
	margin-top: 2.25rem;
	padding: 1.25rem 1.4rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-left: 3px solid var(--accent);
	border-radius: 0 10px 10px 0;
	font-size: .89rem;
	line-height: 1.62;
	color: var(--ink-soft);
	max-width: 52rem;
}
.scope-note b { color: var(--ink); font-weight: 600; }

/* ---- fascicolo ---- */

.folder-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(2.5rem, 6vw, 5rem);
	align-items: center;
}
@media (max-width: 62rem) { .folder-grid { grid-template-columns: 1fr; } }

.folder { display: grid; gap: .7rem; }
.sheet {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 1.05rem 1.2rem;
	box-shadow: 0 1px 2px rgba(14,14,16,.03);
	transition: transform .28s cubic-bezier(.2,.7,.3,1), box-shadow .28s;
}
.sheet:hover {
	transform: translateX(5px);
	box-shadow: 0 14px 30px -24px rgba(14,14,16,.35);
}
.sheet-org {
	font-family: var(--mono);
	font-size: .63rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--brand);
	display: block;
	margin-bottom: .3rem;
}
.sheet strong { font-size: .93rem; font-weight: 600; display: block; }
.sheet em {
	font-family: var(--mono);
	font-style: normal;
	font-size: .68rem;
	color: var(--ink-faint);
}

.claim-list { list-style: none; padding: 0; margin: 1.75rem 0 0; }
.claim-list li {
	padding: .65rem 0 .65rem 1.7rem;
	border-bottom: 1px solid var(--line);
	position: relative;
	font-size: .94rem;
	color: var(--ink-soft);
}
.claim-list li:last-child { border-bottom: 0; }
.claim-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 1.2rem;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--accent);
}
.claim-list b { color: var(--ink); font-weight: 600; }

/* ---- chiusura ---- */

.closing { background: var(--brand); color: #fff; text-align: center; }
.closing h2 {
	font-size: clamp(1.95rem, 4.4vw, 3rem);
	max-width: 32rem;
	margin: 0 auto 1.2rem;
	color: #fff;
	text-wrap: balance;
}
.closing h2 em { font-style: normal; color: var(--accent-light); }
.closing p {
	color: rgba(255,255,255,.66);
	max-width: 31rem;
	margin: 0 auto;
	font-size: 1rem;
}
.closing .eyebrow { color: var(--accent-light); }
.closing-contact { margin-top: 1.9rem; }
.closing-contact a {
	display: inline-block;
	color: var(--brand);
	background: #fff;
	font-family: var(--mono);
	font-size: .85rem;
	text-decoration: none;
	padding: .7rem 1.35rem;
	border-radius: 100px;
	transition: transform .2s, box-shadow .2s;
}
.closing-contact a:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 24px -14px rgba(0,0,0,.55);
}

/* ------------------------------------------------------------------ footer */

.lok-footer { border-top: 1px solid var(--line); padding: 2.5rem 0; font-size: .84rem; color: var(--ink-faint); }
.lok-footer-inner {
	max-width: var(--maxw);
	margin: 0 auto;
	padding-inline: var(--gutter);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1.25rem;
	flex-wrap: wrap;
}
.lok-footer-brand img { display: block; height: 24px; width: auto; }
.lok-footer a { color: var(--ink-soft); text-decoration: none; }
.lok-footer a:hover { color: var(--accent-text); }

.fineprint {
	font-size: .72rem;
	line-height: 1.65;
	color: var(--ink-faint);
	max-width: 46rem;
	margin: 1.75rem auto 0;
	padding: 1.5rem var(--gutter) 0;
	border-top: 1px solid var(--line);
}

/* indirizzo email composto via JavaScript (anti-raccolta automatica) */
.mailto { white-space: nowrap; }

/* ------------------------------------------------------------------ ingresso */

.reveal {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .65s cubic-bezier(.2,.7,.3,1), transform .65s cubic-bezier(.2,.7,.3,1);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal { opacity: 1; transform: none; transition: none; }
	.step:hover, .sheet:hover, .closing-contact a:hover { transform: none; }
}
