/*
Theme Name: Cosmos Coaching
Theme URI: https://cosmoscoaching.com.au/
Author: Cosmos Coaching Centre
Description: Lightweight, space-themed theme for Cosmos Coaching Centre, Parramatta. No page builder, no jQuery, built-in contact form.
Version: 1.10.4
Requires at least: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: cosmos
*/

@font-face {
	font-family: "Quicksand";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("assets/quicksand-700.woff2") format("woff2");
}

:root {
	--bg: #0a1633;
	--bg-2: #0f1f45;
	--panel: rgba(255, 255, 255, 0.04);
	--panel-border: rgba(255, 255, 255, 0.09);
	--text: #e8ecf6;
	--muted: #a7b3d1;
	--accent: #f26b1d;
	--accent-ink: #ffffff;
	--accent-2: #ff9a5c;
	--radius: 14px;
	--max: 1120px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

/* Starfield: pure CSS, no images */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.7), transparent 60%),
		radial-gradient(1px 1px at 27% 72%, rgba(255,255,255,.5), transparent 60%),
		radial-gradient(1.5px 1.5px at 44% 34%, rgba(255,255,255,.8), transparent 60%),
		radial-gradient(1px 1px at 58% 84%, rgba(255,255,255,.45), transparent 60%),
		radial-gradient(1px 1px at 69% 12%, rgba(255,255,255,.6), transparent 60%),
		radial-gradient(1.5px 1.5px at 81% 56%, rgba(255,255,255,.7), transparent 60%),
		radial-gradient(1px 1px at 92% 28%, rgba(255,255,255,.5), transparent 60%),
		radial-gradient(1px 1px at 6% 90%, rgba(255,255,255,.5), transparent 60%),
		radial-gradient(1px 1px at 36% 6%, rgba(255,255,255,.4), transparent 60%),
		radial-gradient(1px 1px at 75% 94%, rgba(255,255,255,.4), transparent 60%),
		radial-gradient(900px 600px at 85% -10%, rgba(242,107,29,.12), transparent 70%),
		radial-gradient(700px 500px at -10% 40%, rgba(80,130,255,.10), transparent 70%),
		var(--bg);
}

a { color: var(--accent-2); }
a:hover { color: #ffc29c; }
img, svg { max-width: 100%; height: auto; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); letter-spacing: 0; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(64px, 10vw, 112px) 0; scroll-margin-top: 40px; }
#contact { scroll-margin-top: 90px; }
.eyebrow {
	display: inline-block;
	font-size: 1.25rem;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 18px;
}
.lead { font-size: 1rem; color: var(--muted); max-width: 46ch; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head p { color: var(--muted); }

.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 12px; top: 12px; z-index: 100; background: #fff; color: #000; padding: 8px 14px; border-radius: 8px; }

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 12px 24px;
	border-radius: 999px;
	font: inherit;
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
	transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #ff7f36; color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: rgba(255,255,255,.22); }
.btn-ghost:hover { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: .92rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(5, 11, 28, .94);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--panel-border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; }
.brand:hover { color: #fff; }
.brand img { height: 42px; width: auto; display: block; flex: none; }
.brand small { display: block; font-family: "Quicksand", var(--font); font-weight: 700; font-size: 12.5px; letter-spacing: .26em; text-transform: uppercase; color: rgba(255,255,255,.78); line-height: 1; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.22); height: 22px; display: flex; align-items: center; }
@media (max-width: 600px) {
	.brand img { height: 32px; }
	.brand small { font-size: 10.5px; letter-spacing: .2em; padding-left: 10px; height: 18px; }
	.brand { gap: 10px; }
}

.nav { display: flex; align-items: center; gap: 28px; }
.nav > ul { list-style: none; display: flex; align-items: center; gap: 26px; margin: 0; padding: 0; }
.nav a:not(.btn) { color: #ffffff; text-decoration: none; font-size: 1rem; }
.nav a:not(.btn):hover { color: var(--accent); }


/* Resources dropdown (desktop) */
.has-menu { position: relative; }
.menu-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 8px 0; margin: 0; color: #fff; font: inherit; font-size: 1rem; cursor: pointer; }
.menu-btn svg { width: 14px; height: 14px; transition: transform .2s ease; }
.menu-btn:hover, .menu-btn[aria-expanded="true"] { color: var(--accent); }
.menu-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.mega { position: absolute; right: -16px; top: calc(100% + 16px); width: 460px; display: grid; grid-template-columns: 180px 1fr; background: #050b1c; border: 1px solid var(--panel-border); border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.55); overflow: hidden; }
.mega[hidden] { display: none; }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega-years { padding: 10px; border-right: 1px solid var(--panel-border); }
.nav .mega-year { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 8px; color: #fff; }
.mega-year svg { width: 14px; height: 14px; opacity: .6; }
.nav .mega-year:hover, .nav .mega-year.is-active { background: rgba(255,255,255,.06); color: var(--accent); }
.mega-subjects { padding: 10px; }
.mega-hint { color: var(--muted); margin: 10px 12px; }
.mega-hint[hidden], .mega-sub[hidden] { display: none; }
.mega-sub-title { padding: 10px 12px 6px; color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.nav .mega-sub a { display: block; padding: 10px 12px; border-radius: 8px; color: #fff; }
.nav .mega-sub a:hover { background: var(--accent); color: #fff; }

/* Resources accordion (mobile) */
.mobile-nav { max-height: calc(100vh - 64px); overflow-y: auto; }
.mobile-nav .m-acc > summary { margin: 0; list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; color: var(--text); padding: 12px 0; border-bottom: 1px solid var(--panel-border); }
.m-acc > summary::-webkit-details-marker { display: none; }
.mobile-nav .m-acc > summary svg { flex: none; width: 16px; height: 16px; transition: transform .2s ease; }
.m-acc[open] > summary svg { transform: rotate(180deg); }
.m-acc[open] > summary { color: var(--accent); }
.m-acc-body { padding-left: 16px; }
.mobile-nav .m-acc-body a { display: block; }

/* Resources pages */
.resources { padding: 48px 0 96px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); margin-bottom: 36px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--text); }
.resources h1 { margin-bottom: 36px; }
.res-grid a.tag { text-decoration: none; }
.res-grid ul a { color: var(--text); text-decoration: none; }
.res-grid ul a:hover { color: var(--accent); }
.res-card { display: block; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.25rem; transition: border-color .15s ease, transform .15s ease; }
.res-card:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.soon { max-width: 560px; }
.soon p { color: var(--text); margin-bottom: 20px; }

/* Mobile menu without JavaScript */
.menu-toggle { display: none; }
.menu-toggle summary { list-style: none; cursor: pointer; padding: 10px; margin: -10px; color: var(--text); }
.menu-toggle summary::-webkit-details-marker { display: none; }

@media (max-width: 820px) {
	.nav { display: none; }
	.menu-toggle { display: block; }
	.menu-toggle[open] .mobile-nav { display: flex; }
	.mobile-nav {
		display: none;
		position: absolute;
		left: 0; right: 0; top: 64px;
		flex-direction: column;
		gap: 4px;
		padding: 12px 20px 22px;
		background: #050b1c;
		border-bottom: 1px solid var(--panel-border);
	}
	.mobile-nav a:not(.btn) { color: var(--text); text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--panel-border); }
	.mobile-nav .btn { margin-top: 14px; }
}

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(72px, 12vw, 140px) 0 clamp(64px, 10vw, 120px); }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.hero h1 span { color: var(--accent); }
.hero .lead { margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--muted); font-size: .92rem; margin: 0; padding: 0; list-style: none; }
.hero-meta li { display: flex; align-items: center; gap: 8px; }
.hero-meta li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.system { width: 100%; max-width: 440px; margin-left: auto; }
.system .orbit { transform-origin: 200px 200px; animation: spin linear infinite; }
.system .orbit-1 { animation-duration: 14s; }
.system .orbit-2 { animation-duration: 26s; }
.system .orbit-3 { animation-duration: 44s; }
.system .orbit-4 { animation-duration: 70s; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .system .orbit { animation: none; } }

@media (max-width: 820px) {
	.hero-grid { grid-template-columns: 1fr; }
	.system { max-width: 300px; margin: 0 auto; }
}

/* Cards */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); max-width: 860px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
	background: var(--panel);
	border: 1px solid var(--panel-border);
	border-radius: var(--radius);
	padding: 26px;
}
.card p { color: var(--muted); margin: 0; font-size: .97rem; }
.card .tag { font-size: 1.25rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 700; display: block; margin-bottom: 8px; }
.card ul { margin: 10px 0 0; padding-left: 18px; color: var(--text); font-size: 1rem; }
.card li::marker { color: var(--accent); }
.card-icon { width: 40px; height: 40px; margin-bottom: 16px; color: var(--accent); }

/* Steps */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 58px; }
.step::before {
	counter-increment: step;
	content: "0" counter(step);
	position: absolute; top: 22px; left: 26px;
	font-size: .85rem; font-weight: 700; letter-spacing: .1em; color: var(--accent);
}

/* Trial band */
.band {
	border: 1px solid var(--panel-border);
	border-radius: 22px;
	padding: clamp(32px, 6vw, 64px);
	background:
		radial-gradient(600px 300px at 100% 0%, rgba(122,167,255,.16), transparent 70%),
		radial-gradient(500px 300px at 0% 100%, rgba(240,194,123,.10), transparent 70%),
		var(--bg-2);
}
.band .grid { margin-top: 36px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 48px; align-items: start; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }
#contact h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.contact-info dl { margin: 28px 0 0; }

.contact-info dt { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 20px; }
.contact-info dd { margin: 4px 0 0; }

.form { padding: clamp(22px, 4vw, 36px); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
	width: 100%;
	font: inherit;
	font-size: 16px; /* stops iOS zoom */
	color: var(--text);
	background: rgba(0,0,0,.25);
	border: 1px solid rgba(255,255,255,.16);
	border-radius: 10px;
	padding: 12px 14px;
	min-height: 48px;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { color: #000; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(242,107,29,.25); }
.choice { display: flex; gap: 10px; flex-wrap: wrap; }
.choice label { flex: 1 1 200px; display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; cursor: pointer; font-weight: 500; margin: 0; }
.choice input { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); flex: none; }
.choice label:has(input:checked) { border-color: var(--accent); background: rgba(242,107,29,.08); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form .btn { width: 100%; margin-top: 6px; }
.form-note { font-size: .82rem; color: var(--muted); margin: 14px 0 0; text-align: center; }
.notice { border-radius: 10px; padding: 14px 16px; margin-bottom: 20px; font-size: .95rem; }
.notice-ok { background: rgba(96, 211, 148, .12); border: 1px solid rgba(96, 211, 148, .4); }
.notice-err { background: rgba(255, 107, 107, .1); border: 1px solid rgba(255, 107, 107, .4); }

/* Footer */
.site-footer { background: #050b1c; border-top: 1px solid var(--panel-border); padding: 40px 0; color: var(--muted); font-size: 1rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer a { color: var(--muted); }
.site-footer .footer-loc { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; color: var(--text); text-decoration: none; transition: color .15s ease; }
.site-footer .footer-loc svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.site-footer .footer-loc:hover { color: var(--accent); }
.footer-inner > div:last-child { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.social { list-style: none; display: flex; gap: 10px; margin: 0; padding: 0; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); color: #fff; transition: background-color .15s ease, border-color .15s ease, transform .15s ease; }
.social a:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-2px); }
.social svg { width: 20px; height: 20px; flex: none; }
@media (max-width: 600px) { .footer-inner > div:last-child { align-items: flex-start; } }

/* Generic content (for future pages and posts) */
.content { max-width: 760px; padding: 64px 20px; margin: 0 auto; }
.content a { color: var(--accent-2); }

/* ---------------------------------------------------------------- */
/* Homepage spacing (tighter on desktop and phone)                   */
/* ---------------------------------------------------------------- */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 72px); }
.hero-actions { margin-bottom: 0; }
.section { padding: clamp(48px, 7vw, 88px) 0; }
.hero + .section { padding-top: 0; }
.section-head { margin-bottom: 20px; }
.section-head > :last-child { margin-bottom: 0; }

@media (max-width: 820px) {
	.hero { padding: 40px 0 36px; }
	.hero-grid { gap: 24px; }
	.system { max-width: 170px; }
}
@media (max-width: 600px) {
	.hero { padding: 32px 0 28px; }
	.hero .lead { margin-bottom: 24px; }
	.hero-grid { gap: 16px; }
	.system { max-width: 140px; }
	.section { padding: 40px 0; }
	.hero + .section { padding-top: 0; }
	.section-head { margin-bottom: 16px; }
	.grid { gap: 14px; }
	.card { padding: 22px; }
}

/* ---------------------------------------------------------------- */
/* Readability: brighter secondary text, white hero intro            */
/* ---------------------------------------------------------------- */
:root { --muted: #c6d0e8; }
.hero .lead { color: #ffffff; font-size: clamp(1.05rem, 1.6vw, 1.18rem); line-height: 1.6; max-width: 52ch; }

/* ---------------------------------------------------------------- */
/* Phone & tablet: star graphic sits large and faint behind the hero */
/* ---------------------------------------------------------------- */
@media (max-width: 820px) {
	.hero-grid { position: relative; }
	.hero-grid > div { position: relative; z-index: 1; }
	.hero .system { position: absolute; z-index: 0; top: 58%; left: 74%; width: min(560px, 135vw); max-width: none; margin: 0; transform: translate(-50%, -50%); opacity: .22; pointer-events: none; }
}
