/*
Theme Name: Clydodyne
Description: Clydodyne's own block theme: logo navy with an automatic light version, Rajdhani + Exo 2, no theme JavaScript.
Author: Clydodyne LLC
Version: 1.1.0
Requires at least: 6.6
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: clydodyne
*/

/* Light version: same presets, lighter values, when the visitor's device prefers light mode.
   :root:root outranks the :root block printed by global styles. Contrast checked (AA) 2026-10-25. */
@media (prefers-color-scheme: light) {
	:root:root {
		--wp--preset--color--base: #F5F7F9;
		--wp--preset--color--surface: #FFFFFF;
		--wp--preset--color--border: #D5DBE1;
		--wp--preset--color--field-border: #7A8592;
		--wp--preset--color--contrast: #1B2838;
		--wp--preset--color--muted: #4A5563;
		--wp--preset--color--link: #0270A8;
		--wp--preset--color--accent: #0270A8;
		--wp--preset--color--on-accent: #FFFFFF;
		--wp--preset--color--green: #067A39;
		--wp--preset--color--red: #C02E2E;
		color-scheme: light;
	}
}
:root { color-scheme: dark; }

/* Keyboard focus: always visible, never colour alone. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--link);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Logo: dark lockup by default, light lockup in light mode (see patterns/site-logo.php). */
.clydodyne-logo { display: inline-flex; line-height: 0; }
.clydodyne-logo img { height: clamp(40px, 5vw, 56px); width: auto; }

/* Header and footer surfaces. */
.clydodyne-header { border-bottom: 1px solid var(--wp--preset--color--border); }
.clydodyne-footer { background: var(--wp--preset--color--surface); border-top: 1px solid var(--wp--preset--color--border); }
.clydodyne-footer a { color: var(--wp--preset--color--contrast); }
.clydodyne-footer .wp-block-navigation a { text-decoration: none; }
.clydodyne-footer .wp-block-navigation a:hover { text-decoration: underline; }
.clydodyne-eyebrow { text-transform: uppercase; letter-spacing: 0.12em; color: var(--wp--preset--color--muted); }

/* Cards (steps, price card). */
.clydodyne-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
}
.clydodyne-card img { border-radius: 8px; }
.clydodyne-step-number {
	font-family: var(--wp--preset--font-family--heading);
	color: var(--wp--preset--color--link);
	letter-spacing: 0.08em;
}

/* Starfield hero: two tiled layers of tiny CSS dots that drift and twinkle.
   Dark mode only; still for reduced-motion users. No images, no JavaScript. */
.clydodyne-starfield { position: relative; overflow: hidden; isolation: isolate; }
.clydodyne-starfield::before,
.clydodyne-starfield::after {
	content: "";
	position: absolute;
	inset: -50% 0 0 0;
	z-index: -1;
	pointer-events: none;
	background-repeat: repeat;
}
.clydodyne-starfield::before {
	background-image:
		radial-gradient(1px 1px at 20px 30px, #EEF1F4, transparent),
		radial-gradient(1px 1px at 90px 140px, #AAB3BD, transparent),
		radial-gradient(1.5px 1.5px at 160px 60px, #EEF1F4, transparent),
		radial-gradient(1px 1px at 230px 200px, #AAB3BD, transparent),
		radial-gradient(1px 1px at 290px 110px, #EEF1F4, transparent),
		radial-gradient(1.5px 1.5px at 50px 240px, #4DB5EA, transparent);
	background-size: 320px 280px;
	opacity: 0.8;
	animation: clydodyne-drift 140s linear infinite;
}
.clydodyne-starfield::after {
	background-image:
		radial-gradient(2px 2px at 70px 80px, #EEF1F4, transparent),
		radial-gradient(1.5px 1.5px at 260px 30px, #2FBF6E, transparent),
		radial-gradient(2px 2px at 420px 210px, #EEF1F4, transparent),
		radial-gradient(1.5px 1.5px at 330px 330px, #F27B7B, transparent),
		radial-gradient(2px 2px at 150px 380px, #EEF1F4, transparent);
	background-size: 520px 440px;
	animation: clydodyne-drift 90s linear infinite, clydodyne-twinkle 6s ease-in-out infinite alternate;
}
@keyframes clydodyne-drift { to { transform: translateY(50%); } }
@keyframes clydodyne-twinkle { from { opacity: 0.35; } to { opacity: 0.95; } }
@media (prefers-reduced-motion: reduce) {
	.clydodyne-starfield::before,
	.clydodyne-starfield::after { animation: none; }
}
@media (prefers-color-scheme: light) {
	.clydodyne-starfield::before,
	.clydodyne-starfield::after { display: none; }
}

/* Forms (Newsletter plugin, Starbeam order form in A5, comments, search). */
:where(input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"], [type="file"]), select, textarea) {
	font: inherit;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--field-border);
	border-radius: var(--wp--custom--radius);
	padding: 0.6em 0.8em;
	min-height: 44px;
	max-width: 100%;
}
:where(input[type="checkbox"], input[type="radio"]) { accent-color: var(--wp--preset--color--accent); width: 1.15em; height: 1.15em; }
:where(input[type="submit"], button[type="submit"], .tnp-submit) {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.1rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: var(--wp--preset--color--on-accent);
	background: var(--wp--preset--color--accent);
	border: 0;
	border-radius: var(--wp--custom--radius);
	padding: 0.65em 1.4em;
	min-height: 44px;
	cursor: pointer;
}
:where(input[type="submit"], button[type="submit"], .tnp-submit):hover {
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--contrast);
}
::placeholder { color: var(--wp--preset--color--muted); opacity: 1; }

/* Newsletter plugin forms. Selectors are specific enough to beat the plugin's own style.css. */
.tnp.tnp-subscription, .tnp.tnp-subscription-minimal { max-width: none; margin: 0; }
.tnp.tnp-subscription form, .tnp.tnp-subscription-minimal form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem; text-align: left !important; }
.tnp.tnp-subscription .tnp-field { margin: 0; }
.tnp.tnp-subscription .tnp-field-email { flex: 1 1 14rem; }
.tnp.tnp-subscription .tnp-privacy-field { order: 3; flex-basis: 100%; }
.tnp.tnp-subscription label { display: block; margin-bottom: 0.3rem; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); }
.tnp.tnp-subscription .tnp-privacy-field label { display: flex; gap: 0.5rem; align-items: center; color: var(--wp--preset--color--contrast); }
.tnp.tnp-subscription input.tnp-email, .tnp.tnp-subscription-minimal input.tnp-email {
	width: 100%;
	font: inherit;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--field-border);
	border-radius: var(--wp--custom--radius);
	padding: 0.6em 0.8em;
	min-height: 44px;
	margin: 0;
}
.tnp.tnp-subscription input.tnp-submit, .tnp.tnp-subscription-minimal input.tnp-submit {
	width: auto;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.1rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: var(--wp--preset--color--on-accent);
	background: var(--wp--preset--color--accent);
	border: 0;
	border-radius: var(--wp--custom--radius);
	padding: 0.65em 1.4em;
	min-height: 44px;
	margin: 0;
	cursor: pointer;
}
.tnp.tnp-subscription input.tnp-submit:hover, .tnp.tnp-subscription-minimal input.tnp-submit:hover {
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--contrast);
}

/* Notices (form errors and confirmations). */
.clydodyne-notice { border-radius: var(--wp--custom--radius); padding: 0.8rem 1rem; border: 1px solid; }
.clydodyne-notice.is-error { color: var(--wp--preset--color--red); border-color: currentColor; }
.clydodyne-notice.is-success { color: var(--wp--preset--color--green); border-color: currentColor; }
