/* ==========================================================================
   D'amore Sitter — tema figlio di Astra
   ========================================================================== */

@font-face { font-family: "Baloo 2"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/baloo-2-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Baloo 2"; font-weight: 800; font-style: normal; font-display: swap; src: url(fonts/baloo-2-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/nunito-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/nunito-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-style: normal; font-display: swap; src: url(fonts/nunito-latin-800-normal.woff2) format("woff2"); }

:root {
	--ds-primary: #C0506F;
	--ds-dark: #3A2438;
	--ds-green: #2D7D46;
	--ds-sun: #FFB547;
	--ds-bg: #FFF8F3;
	--ds-ink: #2E2230;
	--ds-muted: #7A6672;
	--ds-line: #EAD9CF;
	--ds-head: "Baloo 2", "Nunito", system-ui, sans-serif;
	--ds-text: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Base ---------- */
body.ds-theme { font-family: var(--ds-text); color: var(--ds-ink); background: var(--ds-bg); -webkit-font-smoothing: antialiased; }
body.ds-theme .site-content, body.ds-theme #content { background: transparent; }
body.ds-theme h1, body.ds-theme h2, body.ds-theme h3, body.ds-theme h4,
body.ds-theme .entry-title, body.ds-theme .site-title { font-family: var(--ds-head); color: var(--ds-dark); letter-spacing: -.01em; }
body.ds-theme h1, body.ds-theme h2 { font-weight: 800; }
body.ds-theme h3, body.ds-theme h4 { font-weight: 600; }
body.ds-theme a { color: var(--ds-primary); }
body.ds-theme .arp-hero h1, body.ds-theme .arp-hero h2 { color: #fff; }
body.ds-theme .entry-content > .arp-hero:first-child { margin-top: 0; }
body.ds-theme .ast-container { max-width: 1200px; }
body.ds-theme :focus-visible { outline: 3px solid var(--ds-sun); outline-offset: 2px; }

/* Pagine a tutta larghezza: niente margini bianchi intorno agli hero */
body.ds-theme.ast-page-builder-template .entry-content > .arp-hero,
body.ds-theme .ast-full-width-layout .arp-hero { border-radius: 0 0 36px 36px; }

/* Bottoni Astra e blocchi con lo stesso stile arrotondato */
body.ds-theme .ast-button, body.ds-theme .button, body.ds-theme button[type=submit],
body.ds-theme input[type=submit], body.ds-theme .wp-block-button__link, body.ds-theme .ast-custom-button {
	font-family: var(--ds-text); font-weight: 800; border-radius: 999px; background: var(--ds-primary); border-color: var(--ds-primary); color: #fff;
}

/* ---------- Header ---------- */
.ds-topbar { background: var(--ds-dark); color: #fff; font-size: 13px; }
.ds-topbar__in { max-width: 1200px; margin: 0 auto; padding: 7px 20px; display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.ds-topbar__claim { display: inline-flex; align-items: center; gap: 6px; opacity: .92; }
.ds-topbar__claim svg { color: var(--ds-sun); }
.ds-topbar__nav { display: flex; gap: 14px; align-items: center; }
.ds-topbar a, body.ds-theme .ds-topbar a { color: #fff; text-decoration: none; font-weight: 700; }
.ds-topbar a:hover { text-decoration: underline; text-underline-offset: 3px; }
body.ds-theme .ds-topbar__cta { background: var(--ds-sun); color: var(--ds-dark) !important; padding: 3px 12px; border-radius: 999px; }
body.ds-theme .site-header { box-shadow: 0 6px 24px -18px rgba(58, 36, 56, .45); }
body.ds-theme .site-title a { color: var(--ds-dark); font-weight: 800; }
body.ds-theme .main-header-menu .menu-link, body.ds-theme .main-header-menu > li > a { font-weight: 700; color: var(--ds-dark); }
body.ds-theme .arp-news__title a, body.ds-theme .arp-post h3 a { color: var(--ds-dark); }
body.ds-theme .arp-news__title a:hover { color: var(--ds-primary); }
body.ds-theme .main-header-menu .menu-item:hover > .menu-link,
body.ds-theme .main-header-menu .current-menu-item > .menu-link { color: var(--ds-primary); }

/* ---------- Footer ecosistema ---------- */
.ds-footer { background: var(--ds-dark); color: #f3e7ee; padding: 48px 20px 20px; margin-top: 60px; position: relative; }
.ds-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -28px; height: 30px; background: radial-gradient(22px 16px at 22px 30px, var(--ds-dark) 98%, transparent) repeat-x; background-size: 44px 30px; }
.ds-footer__in { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.ds-footer__logo { font-family: var(--ds-head); font-weight: 800; font-size: 26px; color: #fff; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.ds-footer__logo svg { color: var(--ds-sun); width: 24px; height: 24px; }
body.ds-theme .ds-footer h2 { color: #fff; font-size: 17px; margin: 0 0 10px; }
.ds-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
body.ds-theme .ds-footer a { color: #f3e7ee; text-decoration: none; }
body.ds-theme .ds-footer a:hover { color: var(--ds-sun); }
.ds-footer__sign { max-width: 1200px; margin: 32px auto 0; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.14); font-size: 13px; opacity: .75; }

/* ---------- Mascotte: animazione di base ---------- */
.ds-svg { display: block; width: 100%; height: auto; overflow: visible; }
.ds-leg { transform-box: fill-box; transform-origin: 50% 8%; }
.is-running .ds-leg--a { animation: ds-leg-a .34s ease-in-out infinite alternate; }
.is-running .ds-leg--b { animation: ds-leg-b .34s ease-in-out infinite alternate; }
.is-running .ds-body, .is-running .ds-head { animation: ds-bob .17s ease-in-out infinite alternate; }
.is-running .ds-tail { animation: ds-tail-run .34s ease-in-out infinite alternate; }
.is-running .ds-ear { animation: ds-ear .17s ease-in-out infinite alternate; }
.is-idle .ds-tail { animation: ds-wag .45s ease-in-out infinite alternate; }
.ds-cat.is-idle .ds-tail, .is-idle .ds-cat .ds-tail { animation: ds-cat-tail 2.4s ease-in-out infinite alternate; }
.ds-tongue { opacity: 0; transition: opacity .2s; }
.is-running .ds-tongue, .is-idle .ds-tongue { opacity: 1; }
@keyframes ds-leg-a { from { transform: rotate(32deg); } to { transform: rotate(-32deg); } }
@keyframes ds-leg-b { from { transform: rotate(-32deg); } to { transform: rotate(32deg); } }
@keyframes ds-bob { from { transform: translateY(0); } to { transform: translateY(-3px); } }
@keyframes ds-tail-run { from { transform: rotate(-12deg); } to { transform: rotate(14deg); } }
@keyframes ds-wag { from { transform: rotate(-22deg); } to { transform: rotate(22deg); } }
@keyframes ds-cat-tail { from { transform: rotate(-8deg); } to { transform: rotate(10deg); } }
@keyframes ds-ear { from { transform: rotate(0); } to { transform: rotate(-10deg); } }

/* ---------- Parata in basso: corrono, si fermano, parlano ---------- */
.ds-parade { position: fixed; left: 0; right: 0; bottom: 0; height: 0; z-index: 9990; pointer-events: none; }
.ds-runner { position: fixed; bottom: 8px; left: 0; width: 118px; transform: translateX(-200px); will-change: transform; filter: drop-shadow(0 6px 6px rgba(58,36,56,.18)); }
.ds-runner--cat { width: 100px; bottom: 10px; }
.ds-runner.is-flipped .ds-svg { transform: scaleX(-1); }
.ds-bubble {
	position: fixed; bottom: 108px; left: 16px; width: min(340px, calc(100vw - 32px));
	background: #fff; color: var(--ds-ink); border: 3px solid var(--ds-dark); border-radius: 22px;
	padding: 14px 16px 12px; box-shadow: 6px 6px 0 var(--ds-dark); pointer-events: auto;
	font-size: 15px; line-height: 1.45; transform-origin: 30px 100%;
	animation: ds-pop .38s cubic-bezier(.2, 1.6, .4, 1) both;
}
.ds-bubble[hidden] { display: none; }
.ds-bubble::after { content: ""; position: absolute; left: var(--tail-x, 44px); bottom: -17px; width: 26px; height: 20px; background: #fff; border: 3px solid var(--ds-dark); border-top: 0; border-left: 0; transform: skewX(-28deg) rotate(12deg); border-bottom-right-radius: 8px; }
.ds-bubble.is-leaving { animation: ds-pop-out .22s ease-in both; }
.ds-bubble__who { margin: 0 0 4px; font-family: var(--ds-head); font-weight: 800; font-size: 15px; color: var(--ds-primary); padding-right: 24px; }
.ds-bubble__txt { margin: 0; }
.ds-bubble__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 0; font-size: 13px; }
.ds-bubble__more { font-weight: 800; color: var(--ds-primary); }
.ds-bubble__off { background: none !important; border: 0 !important; color: var(--ds-muted) !important; padding: 0 !important; font: inherit !important; font-size: 12px !important; text-decoration: underline; cursor: pointer; margin-left: auto; }
.ds-bubble__x { position: absolute; top: 6px; right: 8px; width: 28px; height: 28px; border-radius: 50% !important; background: var(--ds-bg) !important; color: var(--ds-dark) !important; border: 0 !important; font-size: 20px !important; line-height: 1 !important; padding: 0 !important; cursor: pointer; }
@keyframes ds-pop { from { opacity: 0; transform: scale(.4) translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes ds-pop-out { to { opacity: 0; transform: scale(.7) translateY(10px); } }

/* ---------- Prato negli hero: il cane insegue il gatto ---------- */
.arp-hero { position: relative; overflow: hidden; }
.arp-hero__in { position: relative; z-index: 2; }
.arp-hero.has-meadow { padding-bottom: clamp(120px, 16vw, 170px); }
.ds-meadow { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: 1; pointer-events: none; }
.ds-meadow__grass { position: absolute; left: 0; right: 0; bottom: 0; height: 26px; background:
	radial-gradient(14px 18px at 10px 26px, rgba(255,255,255,.14) 98%, transparent) repeat-x;
	background-size: 22px 26px; }
.ds-meadow__track { position: absolute; left: 0; bottom: 8px; width: 100%; height: 90px; }
.ds-meadow__cat, .ds-meadow__dog { position: absolute; bottom: 0; animation: ds-chase 14s linear infinite; }
.ds-meadow__cat { width: 84px; animation-delay: -1.2s; }
.ds-meadow__dog { width: 104px; }
@keyframes ds-chase { from { transform: translateX(-160px); } to { transform: translateX(calc(100vw + 60px)); } }

/* Nuvolette decorative nell'hero */
.arp-hero::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
	background:
		radial-gradient(60px 22px at 12% 22%, rgba(255,255,255,.14) 98%, transparent),
		radial-gradient(80px 26px at 82% 16%, rgba(255,255,255,.12) 98%, transparent),
		radial-gradient(50px 18px at 70% 40%, rgba(255,255,255,.08) 98%, transparent);
	animation: ds-clouds 30s linear infinite alternate; }
@keyframes ds-clouds { from { transform: translateX(-30px); } to { transform: translateX(30px); } }

/* Entrata morbida delle sezioni */
.ds-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.ds-reveal.is-in { opacity: 1; transform: none; }

/* ---------- Mobile ---------- */
@media (max-width: 921px) {
	.ds-footer__in { grid-template-columns: 1fr 1fr; }
	.ds-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
	.ds-topbar__claim { display: none; }
	.ds-topbar__in { justify-content: flex-end; }
	.ds-runner { width: 84px; }
	.ds-runner--cat { width: 72px; }
	.ds-bubble { bottom: 84px; font-size: 14px; }
	.ds-meadow__dog { width: 80px; }
	.ds-meadow__cat { width: 64px; }
	.ds-footer__in { grid-template-columns: 1fr; }
}

/* ---------- Chi preferisce meno movimento ---------- */
@media (prefers-reduced-motion: reduce) {
	.is-running .ds-leg--a, .is-running .ds-leg--b, .is-running .ds-body, .is-running .ds-head,
	.is-running .ds-tail, .is-idle .ds-tail, .ds-meadow__cat, .ds-meadow__dog, .arp-hero::before, .ds-bubble { animation: none !important; }
	.ds-meadow__cat { transform: translateX(62vw); }
	.ds-meadow__dog { transform: translateX(40vw); }
	.ds-reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Logo 3D animato nell'hero della home ---------- */
.ds-logo3d { position: relative; width: min(440px, 82vw); margin: 0 auto 18px; }
.ds-logo3d video { display: block; width: 100%; height: auto; }
.ds-logo3d__stage { position: relative; width: 78%; margin: 0 auto; animation: ds-logo-in .9s cubic-bezier(.2, 1.4, .4, 1) both, ds-logo-float 3.2s ease-in-out .9s infinite; transform-origin: 50% 90%; }
.ds-logo3d__chars { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .28)); }
.ds-logo3d__shine { position: absolute; inset: 0; pointer-events: none;
	-webkit-mask: var(--mask) center / contain no-repeat; mask: var(--mask) center / contain no-repeat;
	background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .55) 48%, rgba(255, 255, 255, .0) 58%) no-repeat;
	background-size: 250% 100%; background-position: 150% 0; animation: ds-logo-shine 3.2s ease-in-out 1.2s infinite; mix-blend-mode: soft-light; }
.ds-logo3d__wordwrap { position: relative; width: 100%; margin-top: 10px; animation: ds-word-in .7s cubic-bezier(.2, 1.5, .4, 1) .5s both; }
.ds-logo3d__word { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .3)); }
/* bagliore sull'impronta-cuore della "o" */
.ds-logo3d__glow { position: absolute; left: 44.5%; top: 50%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%) scale(.6); border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 181, 71, .75) 0%, rgba(255, 181, 71, .25) 45%, transparent 70%); mix-blend-mode: screen; pointer-events: none;
	animation: ds-paw-glow 3.2s ease-in-out 1.4s infinite; }
.arp-hero.has-logo .arp-kicker { margin-top: 4px; }
@keyframes ds-logo-in { from { opacity: 0; transform: translateY(30px) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes ds-word-in { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes ds-logo-float { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-6px) rotate(-1deg); } 50% { transform: translateY(0) scale(1.03); } 60% { transform: scale(1); } 75% { transform: translateY(-4px) rotate(1deg); } }
@keyframes ds-logo-shine { 0%, 55% { background-position: 150% 0; } 85%, 100% { background-position: -60% 0; } }
@keyframes ds-paw-glow { 0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(.5); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 45% { opacity: .2; transform: translate(-50%, -50%) scale(.9); } }
.ds-footer__logo img { display: block; width: min(260px, 100%); height: auto; }
@media (prefers-reduced-motion: reduce) {
	.ds-logo3d__stage, .ds-logo3d__wordwrap, .ds-logo3d__shine, .ds-logo3d__glow { animation: none !important; }
	.ds-logo3d__glow { opacity: 0; }
}
