/* Shed Coders — everything theme.json cannot express.
   Order: type details, signature elements, components, accessibility floor. */

/* ---------------------------------------------------------
   1. Type details
   --------------------------------------------------------- */

/* The eyebrow: small orange label above a heading. Applied via the
   "shed-eyebrow" additional CSS class on a paragraph block. */
.shed-eyebrow {
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	line-height: 1.4;
	margin-bottom: 0.5rem;
}

/* Cap article body measure. Long lines are the commonest readability failure
   on dark backgrounds. */
.shed-article p,
.shed-article ul,
.shed-article ol {
	max-width: 68ch;
}

/* Inline code inside prose, distinct from full code blocks. */
:where(.entry-content) code:not(.wp-block-code code) {
	font-family: var(--wp--preset--font-family--code);
	font-size: 0.9em;
	background: var(--wp--preset--color--timber);
	border: 1px solid var(--wp--preset--color--bench);
	border-radius: 4px;
	padding: 0.1em 0.35em;
}

/* Code blocks get a lit left edge — the bulb catching the bench. */
.wp-block-code {
	border-left: 3px solid var(--wp--preset--color--bulb);
	border-radius: 0;
	overflow-x: auto;
}

/* ---------------------------------------------------------
   2. Signature elements
   --------------------------------------------------------- */

/* The pegboard. A shed wall is perforated board; this is where the tools hang,
   so it is reserved for the Learn section and used nowhere else.
   Apply via the "Pegboard" group block style. */
.is-style-pegboard {
	background-color: var(--wp--preset--color--timber);
	background-image: radial-gradient(circle, var(--wp--preset--color--bench) 1px, transparent 1px);
	background-size: 22px 22px;
	background-position: 11px 11px;
}

/* The bulb. One soft pool of light behind the hero, and nothing else glows. */
.shed-hero {
	position: relative;
	isolation: isolate;
}

.shed-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 106, 0, 0.09), transparent 65%);
	pointer-events: none;
}

/* ---------------------------------------------------------
   3. Components
   --------------------------------------------------------- */

/* Responsive embed for a student's browser game in the hero. */
.shed-embed {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	background: var(--wp--preset--color--timber);
	border: 1px solid var(--wp--preset--color--bench);
	border-radius: 10px;
	overflow: hidden;
}

.shed-embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

@media (max-width: 600px) {
	.shed-embed {
		aspect-ratio: 4 / 3;
	}
}

/* Cards. Used for build steps, projects and Learn articles. */
.shed-card {
	background: var(--wp--preset--color--timber);
	border: 1px solid var(--wp--preset--color--bench);
	border-radius: 10px;
	transition: border-color 160ms ease;
}

.shed-card:hover,
.shed-card:focus-within {
	border-color: var(--wp--preset--color--bulb);
}

/* Secondary buttons. Only one filled orange button per screen. */
.wp-block-button.is-style-quiet .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--chalk);
	border: 1px solid var(--wp--preset--color--bench);
}

.wp-block-button.is-style-quiet .wp-block-button__link:hover {
	background: transparent;
	color: var(--wp--preset--color--bulb);
	border-color: var(--wp--preset--color--bulb);
}

/* FAQ. core/details, styled to read as a list rather than a widget. */
.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--bench);
	padding: 1rem 0;
}

.wp-block-details summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 500;
	color: var(--wp--preset--color--chalk);
	list-style: none;
}

.wp-block-details summary::marker,
.wp-block-details summary::-webkit-details-marker {
	display: none;
	content: "";
}

.wp-block-details summary::after {
	content: "+";
	float: right;
	color: var(--wp--preset--color--bulb);
	font-weight: 500;
}

.wp-block-details[open] summary::after {
	content: "–";
}

/* Trust strip. Verdigris keeps safeguarding distinct from marketing copy. */
.shed-trust {
	color: var(--wp--preset--color--verdigris);
	font-size: 0.875rem;
}

/* Header navigation on mobile: the taster button must stay visible. */
.shed-header .wp-block-buttons {
	margin: 0;
}

/* ---------------------------------------------------------
   4. Accessibility floor
   --------------------------------------------------------- */

/* Dark themes hide default focus rings. This site will be used by children on
   school laptops, so keyboard focus must be unmistakable. */
:where(a, button, input, select, textarea, summary, .wp-block-button__link):focus-visible {
	outline: 2px solid var(--wp--preset--color--bulb-glow);
	outline-offset: 2px;
	border-radius: 3px;
}

/* Tap targets. */
.wp-block-navigation a,
.wp-block-button__link {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}

/* Skip link. */
.skip-link:not(:focus) {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.skip-link:focus {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 999;
	background: var(--wp--preset--color--bulb);
	color: var(--wp--preset--color--shed-night);
	padding: 0.6rem 1rem;
	border-radius: 6px;
	text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
