/* Entrance animations matching the original framer-motion settings */
.js [data-anim] {
	opacity: 0;
	transition-property: opacity, transform;
	transition-timing-function: cubic-bezier(0, 0, 0.58, 1); /* easeOut */
	transition-delay: var(--anim-delay, 0s);
}
.js [data-anim="hero"] { transform: translateY(30px); transition-duration: 0.8s; }
.js [data-anim="logo"] { transform: scale(0.9); transition-duration: 0.8s; transition-delay: 0.2s; }
.js [data-anim="up24"] { transform: translateY(24px); transition-duration: 0.5s; }
.js [data-anim="up20"] { transform: translateY(20px); transition-duration: 0.5s; }
.js .text-center[data-anim="up24"],
.js .flex-col[data-anim="up24"] { transition-duration: 0.6s; }
.js [data-anim].is-visible { opacity: 1; transform: none; }

/* Responsive <picture> wrappers must not affect layout */
picture { display: contents; }

/* Click-to-play YouTube facade */
.yt-facade { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; overflow: hidden; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .2s; }
.yt-facade-play { position: absolute; inset: 0; display: grid; place-items: center; }
.yt-facade-play svg { width: 68px; height: 48px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.5)); transition: transform .15s; }
.yt-facade:hover .yt-facade-play svg, .yt-facade:focus-visible .yt-facade-play svg { transform: scale(1.1); }
.yt-facade:hover img { opacity: .9; }
.yt-facade:focus-visible { outline: 3px solid hsl(var(--primary)); outline-offset: -3px; }

/* Never allow sideways scrolling on small screens; respect notches */
html, body { overflow-x: clip; }
header[role="banner"] > div { padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
@media (min-width: 640px) { header[role="banner"] > div { padding-left: max(1.5rem, env(safe-area-inset-left)); padding-right: max(1.5rem, env(safe-area-inset-right)); } }
@media (min-width: 1024px) { header[role="banner"] > div { padding-left: 2rem; padding-right: 2rem; } }
#mobile-menu { max-height: calc(100vh - 5rem); max-height: calc(100dvh - 5rem); overflow-y: auto; overscroll-behavior: contain; }
img { max-width: 100%; }
a, button { -webkit-tap-highlight-color: transparent; }
/* Keep the header brand name on one line on narrow phones */
@media (max-width: 400px) {
	header[role="banner"] .font-orbitron { font-size: clamp(1rem, 5.6vw, 1.5rem); letter-spacing: .08em; white-space: nowrap; }
}
/* Comfortable tap targets for the small footer links on touch screens */
@media (pointer: coarse) {
	footer[role="contentinfo"] .text-xs a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 6px; }
}
:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }

/* Animations switched off in the CMS */
.no-anim [data-anim] { opacity: 1 !important; transform: none !important; transition: none !important; }

/* Formatted text from the CMS rich-text editor */
.cms-rich > * + * { margin-top: 1em; }
.cms-rich a { color: hsl(var(--primary)); text-decoration: underline; text-underline-offset: 2px; }
.cms-rich ul { list-style: disc; padding-left: 1.5em; text-align: left; display: inline-block; }
.cms-rich ol { list-style: decimal; padding-left: 1.5em; text-align: left; display: inline-block; }
.cms-rich h3 { font-size: 1.5em; font-weight: 700; color: hsl(var(--foreground)); }
.cms-rich h4 { font-size: 1.2em; font-weight: 600; color: hsl(var(--foreground)); }
.cms-rich strong, .cms-rich b { color: hsl(var(--foreground)); font-weight: 700; }
.cms-rich blockquote { border-left: 3px solid hsl(var(--primary)); padding-left: 1em; font-style: italic; text-align: left; }

@media (prefers-reduced-motion: reduce) {
	.js [data-anim] { opacity: 1; transform: none; transition: none; }
}
