/* Brainscooter brand layer: dark night-sky styling on top of Sky Pilot. */

/* Metric-matched fallback so headings don't jump when Cormorant finishes loading. */
@font-face {
	font-family: "Cormorant Fallback";
	src: local("Georgia"), local("Times New Roman");
	size-adjust: 86%;
	ascent-override: 107%;
	descent-override: 33%;
	line-gap-override: 0%;
}

:root {
	color-scheme: dark;
	--bs-radius: 12px;
}

body {
	background-color: var(--wp--preset--color--base);
}

::selection {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

/* Full-width page sections */
.bs-section {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding: clamp(56px, 9vw, 104px) var(--wp--preset--spacing--30);
}
.bs-section > * + * {
	margin-block-start: var(--wp--preset--spacing--20);
}
.bs-section > .wp-block-columns,
.bs-section > .wp-block-buttons {
	margin-block-start: var(--wp--preset--spacing--40);
}
.bs-section > .wp-block-columns + .wp-block-columns {
	margin-block-start: var(--wp--preset--spacing--10);
}

/* Cards */
.bs-card {
	background: var(--wp--preset--color--dark-grey);
	border: 1px solid rgba(74, 71, 128, 0.55);
	border-radius: var(--bs-radius);
	padding: clamp(20px, 2.4vw, 28px);
	height: 100%;
	box-sizing: border-box;
}
.bs-card > * { margin-block: 0; }
.bs-card > * + * { margin-block-start: 8px; }
.bs-card h3 { margin-block-start: 6px; }
.bs-card--small {
	padding: 14px 16px;
	border-radius: 10px;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}
.bs-card--small:hover {
	background: var(--wp--preset--color--hover);
	border-color: var(--wp--preset--color--contrast-lightest);
}
.bs-card--small p { line-height: 1.45; }
.bs-card--small strong { color: var(--wp--preset--color--heading); }

.bs-accent-primary,
.bs-accent-secondary,
.bs-accent-tertiary,
.bs-accent-horizon {
	border-left-width: 4px;
	border-left-style: solid;
}
.bs-accent-primary { border-left-color: var(--wp--preset--color--primary); }
.bs-accent-secondary { border-left-color: var(--wp--preset--color--secondary); }
.bs-accent-tertiary { border-left-color: var(--wp--preset--color--tertiary); }
.bs-accent-horizon { border-left-color: var(--wp--preset--color--horizon); }

/* Vertical card stacks */
.bs-stack {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-block-start: 14px !important;
}
.bs-stack > .bs-card { height: auto; }

/* Headings: tighter on the dark layout */
.bs-section h1,
.bs-section h2 {
	line-height: 1.08;
	letter-spacing: -0.01em;
}
.bs-section h1 { max-width: 14ch; }

/* Buttons */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border-width: 2px;
}
.wp-element-button:focus-visible,
a:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
}

/* Smooth jump to #this-week and #how */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

/* Mobile: small rising-sign cards go two across instead of one */
@media (max-width: 781px) {
	.bs-section .wp-block-columns:has(> .wp-block-column > .bs-card--small) {
		display: grid !important;
		grid-template-columns: 1fr 1fr;
		gap: 10px;
	}
}

/* ------------------------------------------------------------------
   Accessibility helpers
------------------------------------------------------------------- */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/* ------------------------------------------------------------------
   Hero + starfield
------------------------------------------------------------------- */
.bs-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
}
.bs-hero::before,
.bs-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background-repeat: repeat;
}
.bs-hero::before {
	background-image:
		radial-gradient(1px 1px at 20px 30px, rgba(243, 238, 226, 0.55), transparent 60%),
		radial-gradient(1px 1px at 140px 90px, rgba(159, 166, 217, 0.5), transparent 60%),
		radial-gradient(1.5px 1.5px at 260px 40px, rgba(243, 238, 226, 0.45), transparent 60%),
		radial-gradient(1px 1px at 330px 170px, rgba(243, 238, 226, 0.4), transparent 60%),
		radial-gradient(1px 1px at 80px 210px, rgba(159, 166, 217, 0.45), transparent 60%);
	background-size: 360px 240px;
	opacity: 0.8;
}
.bs-hero::after {
	background-image:
		radial-gradient(1.5px 1.5px at 60px 120px, rgba(230, 207, 151, 0.7), transparent 60%),
		radial-gradient(1px 1px at 210px 20px, rgba(243, 238, 226, 0.6), transparent 60%),
		radial-gradient(2px 2px at 300px 200px, rgba(230, 207, 151, 0.5), transparent 60%);
	background-size: 420px 300px;
	background-position: 40px 60px;
	opacity: 0.35;
}
@media (prefers-reduced-motion: no-preference) {
	.bs-hero::after { animation: bs-twinkle 6s ease-in-out infinite alternate; }
}
@keyframes bs-twinkle {
	from { opacity: 0.15; }
	to { opacity: 0.6; }
}
.bs-hero__cols { gap: clamp(32px, 5vw, 72px) !important; }

/* ------------------------------------------------------------------
   Live sky wheel
------------------------------------------------------------------- */
.bs-wheel {
	width: 100%;
	max-width: 500px;
	margin-inline: auto;
	aspect-ratio: 1 / 1.1;
}
.bs-wheel__fig {
	position: relative;
	margin: 0;
}
.bs-wheel__svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}
.bs-wheel__fig.is-animated .bs-wheel__svg {
	animation: bs-wheel-in 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
	transform-origin: 50% 50%;
}
@keyframes bs-wheel-in {
	from { opacity: 0; transform: rotate(-24deg) scale(0.94); }
	to { opacity: 1; transform: none; }
}
.bs-w-ring { fill: var(--wp--preset--color--dark-grey); stroke: var(--wp--preset--color--contrast-lightest); stroke-width: 2; }
.bs-w-ring2 { fill: none; stroke: var(--wp--preset--color--contrast-lightest); stroke-width: 2; }
.bs-w-seg { stroke: var(--wp--preset--color--contrast-lightest); stroke-width: 2; cursor: pointer; transition: fill 0.15s ease; outline: none; }
.bs-w-sign { fill: var(--wp--preset--color--dark-grey); }
.bs-w-house { fill: var(--wp--preset--color--dusk); }
.bs-w-seg:hover { fill: var(--wp--preset--color--hover); }
.bs-w-sign.is-now { fill: var(--wp--preset--color--tertiary-darker); }
.bs-w-sign.is-now:hover { fill: #75603a; }
.bs-w-house.is-now { fill: var(--wp--preset--color--secondary-darker); }
.bs-w-house.is-now:hover { fill: #454889; }
.bs-w-seg:focus-visible { stroke: var(--wp--preset--color--primary); stroke-width: 5; }
.bs-w-glyph {
	fill: var(--wp--preset--color--secondary);
	font-size: 30px;
	text-anchor: middle;
	pointer-events: none;
}
.bs-w-glyph.is-now { fill: var(--wp--preset--color--primary-darkest); }
.bs-w-num {
	fill: var(--wp--preset--color--contrast-lighter);
	font-size: 24px;
	font-family: var(--wp--preset--font-family--open-sans);
	text-anchor: middle;
	pointer-events: none;
}
.bs-w-num.is-now { fill: var(--wp--preset--color--heading); font-weight: 700; }
.bs-w-core { fill: var(--wp--preset--color--base); stroke: var(--wp--preset--color--contrast-lightest); stroke-width: 2; pointer-events: none; }
.bs-w-horizon { stroke: var(--wp--preset--color--horizon); stroke-width: 2; stroke-dasharray: 6 8; pointer-events: none; }
.bs-w-orbit { fill: none; stroke: var(--wp--preset--color--secondary); stroke-width: 2; stroke-dasharray: 4 8; opacity: 0.8; pointer-events: none; }
.bs-w-sight { stroke: var(--wp--preset--color--primary); stroke-width: 3; stroke-dasharray: 2 8; stroke-linecap: round; pointer-events: none; }
.bs-w-dot { fill: var(--wp--preset--color--primary); pointer-events: none; }
.bs-w-earth { fill: #3f6fa8; stroke: #7fb2e0; stroke-width: 2; pointer-events: none; }
.bs-w-label {
	fill: var(--wp--preset--color--contrast);
	font-size: 22px;
	font-family: var(--wp--preset--font-family--open-sans);
	text-anchor: middle;
	pointer-events: none;
}
.bs-w-moon { pointer-events: none; filter: drop-shadow(0 0 10px rgba(230, 207, 151, 0.45)); }
.bs-w-moon-dark { fill: var(--wp--preset--color--hover); }
.bs-w-moon-lit { fill: var(--wp--preset--color--tertiary); }

.bs-wheel__cap {
	margin-top: 14px;
	text-align: center;
	font-size: var(--wp--preset--font-size--16);
	color: var(--wp--preset--color--contrast-medium);
}
.bs-wheel__live {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-right: 6px;
	color: var(--wp--preset--color--primary);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 2px;
	font-size: 13px;
}
.bs-wheel__live::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
}
@media (prefers-reduced-motion: no-preference) {
	.bs-wheel__live::before { animation: bs-pulse 2.4s ease-in-out infinite; }
}
@keyframes bs-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(217, 179, 106, 0.6); }
	50% { box-shadow: 0 0 0 6px rgba(217, 179, 106, 0); }
}

.bs-wheel__tip {
	position: absolute;
	top: 0;
	left: 0;
	width: min(260px, 80%);
	padding: 12px 14px;
	background: var(--wp--preset--color--dark-grey);
	border: 1px solid var(--wp--preset--color--contrast-lightest);
	border-left: 4px solid var(--wp--preset--color--primary);
	border-radius: 10px;
	box-shadow: 0 14px 34px rgba(8, 7, 22, 0.6);
	color: var(--wp--preset--color--contrast);
	font-size: 15px;
	line-height: 1.45;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.12s ease;
	z-index: 3;
}
.bs-wheel__tip.is-on { opacity: 1; }
.bs-wheel__tip strong {
	display: block;
	font-family: var(--wp--preset--font-family--cormorant);
	font-size: 24px;
	font-weight: 600;
	color: var(--wp--preset--color--heading);
	line-height: 1.1;
}
.bs-wheel__tip span { display: block; }
.bs-wheel__tip .bs-tip-meta { color: var(--wp--preset--color--contrast-lighter); font-size: 13px; margin: 2px 0 6px; }
.bs-wheel__tip em { display: block; margin-top: 6px; font-style: normal; color: var(--wp--preset--color--primary); }

/* ------------------------------------------------------------------
   Rising-sign picker
------------------------------------------------------------------- */
.bs-rising__set {
	border: 0;
	margin: 8px 0 20px;
	padding: 0;
	min-inline-size: 0;
}
.bs-rising__legend {
	padding: 0;
	margin-bottom: 12px;
	font-weight: 700;
	color: var(--wp--preset--color--heading);
}
.bs-rising__grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 8px;
}
@media (max-width: 781px) {
	.bs-rising__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
	.bs-rising__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.bs-rising__opt {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	min-height: 64px;
	padding: 8px 4px;
	border: 1px solid var(--wp--preset--color--contrast-lightest);
	border-radius: 10px;
	background: var(--wp--preset--color--dark-grey);
	color: var(--wp--preset--color--contrast);
	font-size: 14px;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.bs-rising__opt:hover { background: var(--wp--preset--color--hover); }
.bs-rising__opt input {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}
.bs-rising__glyph { font-size: 22px; line-height: 1; color: var(--wp--preset--color--secondary); }
.bs-rising__opt:has(input:checked) {
	background: var(--wp--preset--color--tertiary-darker);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--heading);
}
.bs-rising__opt:has(input:checked) .bs-rising__glyph { color: var(--wp--preset--color--primary-darker); }
.bs-rising__opt:has(input:focus-visible) {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
	.bs-rising__opt:has(input:checked) { transform: translateY(-2px); }
}
.bs-rising__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	margin-top: 10px;
}
.bs-rising__note { margin: 0; font-size: 14px; color: var(--wp--preset--color--contrast-lighter); }
.bs-rising__clear {
	min-height: 40px;
	padding: 6px 14px;
	border: 1px solid var(--wp--preset--color--contrast-lightest);
	border-radius: 8px;
	background: transparent;
	color: var(--wp--preset--color--contrast-medium);
	font: inherit;
	font-size: 14px;
	cursor: pointer;
}
.bs-rising__clear:hover { background: var(--wp--preset--color--hover); }
.bs-rising__clear:focus-visible { outline: 2px solid var(--wp--preset--color--primary); outline-offset: 2px; }
.bs-rising__result { margin: 12px 0 0; font-size: 18px; color: var(--wp--preset--color--contrast); }
.bs-rising__result:empty { display: none; }
.bs-rising__result strong { color: var(--wp--preset--color--primary); }

/* Highlight "your" card */
.bs-has-rising .bs-card--small { opacity: 0.6; }
.bs-has-rising .bs-card--small.is-you {
	opacity: 1;
	background: var(--wp--preset--color--tertiary-darker);
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 1px var(--wp--preset--color--primary), 0 8px 24px rgba(217, 179, 106, 0.15);
}

/* ------------------------------------------------------------------
   "Get your chart" call to action
------------------------------------------------------------------- */
.bs-cta {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	padding: clamp(28px, 5vw, 56px);
	border: 1px solid rgba(217, 179, 106, 0.45);
	border-radius: 20px;
	background:
		radial-gradient(circle at 88% 12%, rgba(217, 179, 106, 0.2), transparent 50%),
		radial-gradient(circle at 8% 100%, rgba(159, 166, 217, 0.14), transparent 45%),
		linear-gradient(150deg, var(--wp--preset--color--dark-grey), var(--wp--preset--color--dusk));
	box-shadow: 0 24px 60px rgba(8, 7, 22, 0.55);
}
.bs-cta::after {
	/* a faint orbit ring in the corner */
	content: "";
	position: absolute;
	right: -120px;
	top: -120px;
	width: 320px;
	height: 320px;
	border: 1px dashed rgba(217, 179, 106, 0.3);
	border-radius: 50%;
	z-index: -1;
	pointer-events: none;
}
.bs-cta .wp-block-columns { gap: clamp(28px, 4vw, 56px); margin: 0; }
.bs-cta .wp-block-column > * + * { margin-block-start: 16px; }
.bs-cta h2 { line-height: 1.05; }
.bs-cta__btn .wp-block-button__link {
	font-size: 18px;
	padding: 16px 30px;
	box-shadow: 0 8px 24px rgba(217, 179, 106, 0.25);
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.bs-cta__btn .wp-block-button__link:hover { box-shadow: 0 10px 30px rgba(217, 179, 106, 0.4); }
@media (prefers-reduced-motion: no-preference) {
	.bs-cta__btn .wp-block-button__link:hover { transform: translateY(-2px); }
}
.bs-cta__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 12px;
}
.bs-cta__list li {
	position: relative;
	padding: 14px 16px 14px 48px;
	border: 1px solid rgba(74, 71, 128, 0.7);
	border-radius: 12px;
	background: rgba(21, 20, 44, 0.55);
	color: var(--wp--preset--color--contrast-medium);
	font-size: 16px;
	line-height: 1.45;
}
.bs-cta__list li strong { color: var(--wp--preset--color--heading); }
.bs-cta__list li::before {
	content: "✦" / "";
	position: absolute;
	left: 18px;
	top: 14px;
	color: var(--wp--preset--color--primary);
	font-size: 18px;
}

/* ------------------------------------------------------------------
   Wheel caption: general "where the Moon is" info
------------------------------------------------------------------- */
.bs-wheel__cap { display: grid; justify-items: center; gap: 4px; line-height: 1.45; }
.bs-wheel__now {
	font-family: var(--wp--preset--font-family--cormorant);
	font-size: 26px;
	font-weight: 600;
	color: var(--wp--preset--color--heading);
	line-height: 1.15;
}
.bs-wheel__mood { color: var(--wp--preset--color--contrast-medium); }
.bs-wheel__meta { color: var(--wp--preset--color--contrast-lighter); font-size: 14px; }
.bs-wheel__you {
	margin-top: 6px;
	padding: 4px 12px;
	border: 1px solid var(--wp--preset--color--primary);
	border-radius: 999px;
	color: var(--wp--preset--color--primary);
	font-size: 14px;
}
.bs-wheel { aspect-ratio: 1 / 1.25; }

/* ------------------------------------------------------------------
   Tablet and mobile
------------------------------------------------------------------- */
@media (max-width: 1024px) {
	/* Hero stacks earlier so the headline and wheel both get room */
	.bs-hero__cols { flex-wrap: wrap !important; }
	.bs-hero__cols > .wp-block-column { flex-basis: 100% !important; }
	.bs-hero h1 { max-width: 16ch; }
	.bs-wheel { max-width: 440px; }

	/* Four-across card rows become 2 × 2 (the small rising cards stay 4-up) */
	.bs-section .wp-block-columns:has(> .wp-block-column:nth-child(4)):not(:has(.bs-card--small)) {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}
	.bs-cta .wp-block-columns { flex-wrap: wrap !important; }
	.bs-cta .wp-block-column { flex-basis: 100% !important; }
}
@media (max-width: 600px) {
	.bs-section { padding-inline: 20px; }
	.bs-section .wp-block-columns:has(> .wp-block-column:nth-child(4)):not(:has(.bs-card--small)) {
		grid-template-columns: 1fr;
	}
	.bs-wheel { max-width: 360px; }
	.bs-wheel__now { font-size: 22px; }
	.bs-hero .wp-block-buttons { flex-direction: column; align-items: stretch; }
	.bs-hero .wp-block-button__link,
	.bs-cta__btn .wp-block-button__link { width: 100%; text-align: center; }
	.bs-cta { border-radius: 16px; }
}

/* Comfortable tap targets for links inside text on touch screens */
@media (pointer: coarse) {
	.bs-section p a { padding-block: 4px; }
}
