/* ---- Brand font: Cinzel (SIL Open Font License, self-hosted) ----
   Used by .cs-brand (the logo). See assets/fonts/OFL-Cinzel.txt. */
@font-face {
	font-family: "Cinzel";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("../fonts/cinzel-latin-500-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Cinzel";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../fonts/cinzel-latin-600-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =========================================================
   Cosmicspill Shop — cosmic layer
   Tokens come from theme.json (var(--wp--preset--*)).
   This file adds the night-sky atmosphere, cosmic cards,
   eyebrows and the section treatments the patterns use.
   ========================================================= */

/* ---- Page atmosphere ---------------------------------- */
body {
	background-color: var(--wp--preset--color--base);
	background-image:
		radial-gradient(120% 80% at 82% -8%, rgba(124, 108, 255, 0.20), transparent 55%),
		radial-gradient(90% 70% at 8% 4%, rgba(196, 157, 255, 0.14), transparent 52%),
		radial-gradient(70% 60% at 50% 120%, rgba(233, 192, 121, 0.10), transparent 60%),
		linear-gradient(var(--wp--preset--color--base-2), var(--wp--preset--color--base));
	background-attachment: fixed;
}

/* Starfield canvas (injected by starfield.js) sits behind content. */
#cs-stars {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	pointer-events: none;
}
.wp-site-blocks { position: relative; z-index: 1; }

/* ---- Header ------------------------------------------- */
.cs-header {
	position: sticky;
	top: 0;
	z-index: 40;
	border-bottom: 1px solid var(--wp--preset--color--line);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	background: rgba(13, 11, 28, 0.55);
	padding-block: 0.75rem;
}
.cs-header__bar { align-items: center; }
/* Brand logo (replaces the site title). */
.cs-brand {
	font-family: var(--wp--preset--font-family--brand);
	font-size: clamp(1.35rem, 4.5vw, 1.6rem);
	font-weight: 600;
	letter-spacing: 0.06em;
	line-height: 1;
	margin: 0;
}
.cs-brand a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}
.cs-brand a::before {
	content: "\2726";
	font-family: var(--wp--preset--font-family--body);
	background: var(--wp--preset--gradient--cosmic);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}
.cs-nav a { color: var(--wp--preset--color--muted); font-size: 0.95rem; }

/* The header search is icon-only. Core hides its label with .screen-reader-text;
   this repeats it locally so the word "Search" can never leak into the header if
   the core block stylesheet is deferred or blocked. */
.cs-header .wp-block-search__label {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}
.cs-nav a:hover { color: var(--wp--preset--color--contrast); }

/* Fallback: if a saved header still uses the Site Title block, give it the
   same brand treatment as .cs-brand so the logo matches either way. */
header .wp-block-site-title {
	font-family: var(--wp--preset--font-family--brand);
	font-size: clamp(1.35rem, 4.5vw, 1.6rem);
	font-weight: 600;
	letter-spacing: 0.06em;
	line-height: 1;
	margin: 0;
}
header .wp-block-site-title a { color: var(--wp--preset--color--contrast); text-decoration: none; }
header .wp-block-site-title a::before {
	content: "\2726\00a0";
	font-family: var(--wp--preset--font-family--body);
	background: var(--wp--preset--gradient--cosmic);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

/* Mobile navigation toggle (hamburger) — force it visible on the dark header. */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--contrast);
}
.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg {
	fill: currentColor;
	width: 26px;
	height: 26px;
}
.wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--base-2);
	color: var(--wp--preset--color--contrast);
	padding-top: 4.5rem;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--contrast);
}

/* ---- Eyebrows & gradient text ------------------------- */
.cs-eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.72rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gold);
}
.cs-eyebrow.is-indigo { color: var(--wp--preset--color--indigo-2); }
.cs-eyebrow a { color: inherit; text-decoration: none; }

/* Unstyled lists (footer nav) — core has no "none" list style. */
.wp-block-list.is-style-none { list-style: none; margin: 0; padding-left: 0; }
.wp-block-list.is-style-none li { margin: 0 0 0.5rem; }
.cs-grad {
	background: var(--wp--preset--gradient--cosmic);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

/* ---- Buttons: cosmic + gold styles -------------------- */
.wp-block-button.is-style-cosmic .wp-block-button__link {
	background: var(--wp--preset--gradient--cosmic);
	color: #ffffff;
	box-shadow: 0 10px 26px -10px rgba(124, 108, 255, 0.75);
}
.wp-block-button.is-style-cosmic .wp-block-button__link:hover { filter: brightness(1.06); transform: translateY(-2px); }
.wp-block-button.is-style-gold .wp-block-button__link {
	background: var(--wp--preset--gradient--gold-grad);
	color: #241705;
	box-shadow: 0 10px 26px -12px rgba(233, 192, 121, 0.8);
}
.wp-block-button.is-style-gold .wp-block-button__link:hover { transform: translateY(-2px); }
.wp-block-button__link { transition: transform 0.18s ease, filter 0.18s ease; }

/* ---- Cards / groups ----------------------------------- */
.wp-block-group.is-style-glass,
.cs-card {
	background: rgba(24, 22, 48, 0.55);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 18px;
	box-shadow: 0 22px 60px -24px rgba(90, 70, 220, 0.55);
	overflow: hidden;
}
.wp-block-group.is-style-band,
.cs-band {
	background: var(--wp--preset--gradient--cosmic-soft);
	border: 1px solid rgba(180, 170, 255, 0.22);
	border-radius: 24px;
}

/* ---- Cosmic thumbnail (cover blocks / .cs-cos groups) - */
.wp-block-cover.is-style-cosmic-thumb,
.cs-cos {
	position: relative;
	overflow: hidden;
	background-color: #0b0a1c;
	isolation: isolate;
	border-radius: 16px;
	min-height: 200px;
}
.wp-block-cover.is-style-cosmic-thumb .wp-block-cover__background,
.cs-cos::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background:
		radial-gradient(85% 120% at 12% -5%, rgba(139, 123, 255, 0.75), transparent 58%),
		radial-gradient(95% 95% at 105% 108%, rgba(196, 157, 255, 0.60), transparent 55%),
		radial-gradient(60% 80% at 82% 8%, rgba(233, 192, 121, 0.35), transparent 55%),
		linear-gradient(135deg, #191333, #0c0a1e);
	opacity: 1;
}
.cs-cos::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background-image:
		radial-gradient(1.6px 1.6px at 18% 26%, #fff, transparent),
		radial-gradient(1.2px 1.2px at 62% 58%, #fff, transparent),
		radial-gradient(1.6px 1.6px at 82% 22%, #fff, transparent),
		radial-gradient(1.1px 1.1px at 38% 78%, rgba(255,255,255,0.85), transparent),
		radial-gradient(1.3px 1.3px at 72% 82%, #fff, transparent),
		radial-gradient(1px 1px at 48% 40%, rgba(255,255,255,0.70), transparent);
	opacity: 0.9;
}
.cs-cos > * { position: relative; z-index: 3; }
.cs-cos.hue-2::before { filter: hue-rotate(28deg); }
.cs-cos.hue-3::before { filter: hue-rotate(-32deg); }
.cs-cos.hue-4::before { filter: hue-rotate(60deg) saturate(1.1); }
.cs-cos.hue-5::before { filter: hue-rotate(-60deg); }
.cs-glyph {
	position: absolute;
	right: -0.4em;
	bottom: -0.35em;
	z-index: 2;
	font-family: "Apple Symbols", "Segoe UI Symbol", "Noto Sans Symbols2", var(--wp--preset--font-family--display);
	font-size: 7rem;
	line-height: 1;
	color: rgba(255, 255, 255, 0.16);
	margin: 0;
	pointer-events: none;
	font-variant-emoji: text;
}

/* cs-cos used as a filled card (hero + ranking cards).
   Padding / min-height / colors live here so the pattern markup
   stays attribute-light and can't drift out of block-validation. */
.cs-cos {
	min-height: 210px;
	padding: 2rem;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 0.4rem;
}
.cs-cos--hero { min-height: 420px; border-radius: 24px; }
.cs-cos :where(h2, h3) { color: #ffffff; }
.cs-cos--hero :where(h2) { font-size: 1.7rem; line-height: 1.15; }
.cs-cos p { color: rgba(255, 255, 255, 0.85); }
.cs-cos .cs-eyebrow { color: var(--wp--preset--color--gold); }
.cs-cos a { color: #f5d89e; }

/* Bands & boxes carry their own padding/border for the same reason. */
.cs-band { padding: clamp(1.5rem, 4vw, 3rem); border-radius: 24px; }
.cs-newsbox {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--indigo);
	border-radius: 16px;
	padding: 1.25rem;
}
.cs-section { margin-top: var(--wp--preset--spacing--60); }

/* Footer chrome. */
.cs-footer {
	background: var(--wp--preset--color--base-2);
	border-top: 1px solid var(--wp--preset--color--line);
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--50);
}
.cs-footer-base {
	border-top: 1px solid var(--wp--preset--color--line);
	margin-top: var(--wp--preset--spacing--50);
	padding-top: var(--wp--preset--spacing--30);
}

/* ---- Article prose ------------------------------------ */
.cs-prose { max-width: 68ch; }
/* Newsletter inline form (swap action for Mailchimp). */
.cs-form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cs-form input[type="email"] {
	flex: 1;
	min-width: 220px;
	max-width: 100%;
	box-sizing: border-box;
	background: var(--wp--preset--color--surface);
	border: 1px solid rgba(180, 170, 255, 0.22);
	border-radius: 999px;
	padding: 0.75rem 1.1rem;
	color: var(--wp--preset--color--contrast);
	font: inherit;
}
.cs-form input[type="email"]:focus { outline: 2px solid var(--wp--preset--color--indigo); }
.cs-form button {
	border: 0;
	border-radius: 999px;
	padding: 0.75rem 1.4rem;
	font-weight: 600;
	cursor: pointer;
	background: var(--wp--preset--gradient--gold-grad);
	color: #241705;
}

/* ---- Newsletter signup states (assets/js/signup.js) ---- */
.cs-form[hidden] { display: none !important; }
.cs-form button[disabled] { opacity: 0.7; cursor: wait; }
.cs-form .cs-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.cs-form-note { margin: 0.75rem 0 0; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.cs-form-msg {
	margin: 0.5rem 0 0;
	padding: 0.85rem 1.1rem;
	border-radius: 14px;
	border: 1px solid rgba(233, 192, 121, 0.35);
	background: rgba(233, 192, 121, 0.08);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}
.cs-form-msg.is-error { border-color: rgba(255, 120, 140, 0.45); background: rgba(255, 120, 140, 0.08); }

/* ---- Focus + motion ----------------------------------- */
:where(a, button, input, .wp-block-button__link):focus-visible {
	outline: 2px solid var(--wp--preset--color--indigo);
	outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
	body { background-attachment: scroll; }
}

/* ---- Small screens ------------------------------------ */
@media (max-width: 600px) {
	.cs-glyph { font-size: 4.5rem; }
	.cs-brand { font-size: 1.4rem; }

	/* Keep the header a single tidy row: brand left, hamburger + search right. */
	.cs-header__bar { flex-wrap: nowrap; }

}

/* ---- FAQ accordion (usable on any page) ---------------- */
.cs-faq { display: grid; gap: 0.6rem; }
.cs-faq details {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 14px;
	padding: 0.95rem 1.15rem;
}
.cs-faq details[open] { border-color: rgba(180, 170, 255, 0.3); }
.cs-faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	cursor: pointer;
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
	list-style: none;
}
.cs-faq summary::-webkit-details-marker { display: none; }
.cs-faq summary::after {
	content: "+";
	font-size: 1.25rem;
	line-height: 1;
	color: var(--wp--preset--color--indigo-2);
}
.cs-faq details[open] summary::after { content: "\2212"; }
.cs-faq p { margin: 0.75rem 0 0; color: var(--wp--preset--color--muted); font-size: 0.95rem; }

/* Signup forms sit in their own wrapper so a section heading and its copy
   survive even if the form itself is hidden. */
.cs-formwrap { width: 100%; }

/* ---- Static pages (FAQ, legal, thank you) -------------- */
.cs-page { padding-block: clamp(2rem, 5vw, 3.5rem); }
.cs-page .cs-prose > * + * { margin-top: 1.1rem; }
.cs-page h2 { margin-top: 2.2rem; }
.cs-page h3 { margin-top: 1.6rem; }
.cs-page ul:not(.is-style-none) { padding-left: 1.2rem; }
.cs-page li { margin-bottom: 0.5rem; }
.cs-lead { font-size: 1.12rem; color: var(--wp--preset--color--muted); }
.cs-note {
	border: 1px solid rgba(180, 170, 255, 0.22);
	border-left: 3px solid var(--wp--preset--color--gold);
	border-radius: 0 16px 16px 0;
	background: var(--wp--preset--gradient--cosmic-soft);
	padding: 1.1rem 1.3rem;
}
.cs-note p { margin: 0; }
.cs-note p + p { margin-top: 0.7rem; }
.cs-steps { counter-reset: cs-step; list-style: none; padding-left: 0; }
.cs-steps li {
	position: relative;
	padding-left: 2.4rem;
	margin-bottom: 1rem;
}
.cs-steps li::before {
	counter-increment: cs-step;
	content: counter(cs-step);
	position: absolute;
	left: 0;
	top: 0.1rem;
	width: 1.7rem;
	height: 1.7rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--wp--preset--gradient--cosmic);
	color: #1a1233;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.78rem;
	font-weight: 700;
}
.cs-updated {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--faint);
}
