/* Names Day Australia — same look as the original site, moved into one cacheable file. */
/* Self-hosted fonts (from @fontsource, latin subset) */
@font-face { font-family: 'Amaranth'; font-style: normal; font-weight: 400; font-display: swap; src: url(/public/fonts/amaranth-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Amaranth'; font-style: normal; font-weight: 700; font-display: swap; src: url(/public/fonts/amaranth-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(/public/fonts/open-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(/public/fonts/open-sans-latin-700-normal.woff2) format('woff2'); }

:root {
	--teal: #00adb5;
	--orange: #FFA01C;
	--dark: #222831;
	--dark-2: #393e46;
	--shadow: #0000009c;
	--logoFontSz: 1.6em;
	--navLinkFontSz: 1.2em;
	--mainPadding: 0 16px 20px;
	--linkPadding: 8px 22px;
	--cardPadding: 20px 20px 25px 20px;
}

html {
	padding: var(--mainPadding);
	min-height: 100vh;
	background-attachment: fixed;
	font-size: 12px;
}
body { margin: 0; font-family: 'Open Sans', sans-serif; color: var(--dark); }
body * { box-sizing: border-box; }
p, ul, ol, label, li { font-family: 'Open Sans', sans-serif; }
p, h3, li { color: var(--dark); }
a { color: inherit; }

.font-amaranth, h1, h2, .q { font-family: 'Amaranth', sans-serif; }
.font-open { font-family: 'Open Sans', sans-serif; }
.color-1 { color: var(--dark); }
.color-2 { color: var(--dark-2); }
.tac { text-align: center; }
.ttu { text-transform: uppercase; }
.bg-w { background-color: white; }
.muted { color: #5c636e; }
.small { font-size: 0.9em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; }
@media (min-width: 786px) { .container { width: 700px; margin: 0 auto; } }
@media (min-width: 1200px) { .container { width: 1024px; margin: 0 auto; } }

/* Cards */
.card, .small-card {
	border: 1px solid var(--teal);
	border-radius: 2px;
	box-shadow: 8px 8px 0 var(--shadow);
	margin-bottom: 30px;
	overflow: hidden;
	position: relative;
	background: white;
}
.card { padding: var(--cardPadding); }
.small-card { padding: 10px 16px; }

/* Navigation */
.navbar { padding: 20px 6px 10px; }
.links a { margin-bottom: 12px; }
.logo, .nav-link {
	display: inline-block;
	margin-right: 8px;
	padding: var(--linkPadding);
	text-decoration: none;
	font-weight: bold;
	box-shadow: 6px 6px 0 var(--shadow);
	transform: skewX(-15deg);
	border: 2px solid black;
}
.logo { background: white; color: var(--dark-2); font-size: var(--logoFontSz); }
.nav-link { color: white; background: var(--teal); font-size: var(--navLinkFontSz); }
.nav-link:hover, .nav-link.active { background: var(--orange); }

/* Headings */
.heading-big {
	border-bottom: 5px solid var(--teal);
	display: inline-block;
	margin: 0 auto;
	font-size: 3em;
	line-height: 1.15;
}
.section-title, .q {
	font-size: 1.8em;
	margin: 0 0 8px;
	border-bottom: 3px solid var(--teal);
	display: inline-block;
	font-weight: 700;
}
.eyebrow { text-transform: uppercase; letter-spacing: 1px; color: var(--orange); font-weight: 700; margin: 0 0 6px; }
.lead { font-size: 1.4em; }

/* Date pill */
.date-wrapper { display: flex; justify-content: flex-end; }
.date-wrapper .date-string { margin: 0; font-size: 1.6em; }

/* Today's names */
.today-names { text-align: center; }
.today-names .names { font-size: 2.4em; margin: 0.4em 0 0.2em; font-family: 'Open Sans', sans-serif; font-weight: 700; }
.name-link { text-decoration: none; border-bottom: 3px solid transparent; }
.name-link:hover { border-bottom-color: var(--orange); }

/* Buttons */
.button, .search-button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 30px;
	font-weight: bold;
	color: white;
	background: var(--teal);
	box-shadow: 6px 6px 0 black;
	transform: skewX(-15deg);
	cursor: pointer;
	font-size: 1.3em;
	border: 0;
	text-decoration: none;
	font-family: 'Open Sans', sans-serif;
	margin: 6px 12px 12px 0;
}
.button:hover, .search-button:hover { background: var(--orange); }
.button.secondary { background: white; color: var(--dark); border: 2px solid black; }
.button.secondary:hover { background: var(--orange); color: white; }
.button svg, .search-button svg { width: 18px; height: 18px; fill: currentColor; }
.button-row { display: flex; flex-wrap: wrap; justify-content: center; }

/* Search */
.search-form { display: flex; flex-direction: column; align-items: center; }
.search-form input[type=search], .form-control {
	width: 100%;
	max-width: 320px;
	outline: none;
	font-size: 1.3em;
	padding: 10px 16px;
	border: 1px solid #ccc;
	margin-bottom: 14px;
	font-family: 'Open Sans', sans-serif;
}
.search-form input[type=search]:focus, .form-control:focus { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal); }

/* Lists of names */
.name-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 10px 0; list-style: none; justify-content: center; }
.name-chips a {
	display: inline-block;
	padding: 6px 14px;
	border: 2px solid var(--dark);
	text-decoration: none;
	font-weight: 700;
	background: white;
	box-shadow: 3px 3px 0 var(--shadow);
}
.name-chips a:hover { background: var(--orange); color: white; }
.name-chips.left { justify-content: flex-start; }

.upcoming { list-style: none; padding: 0; margin: 0; }
.upcoming li { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid #e3e4e5; align-items: baseline; flex-wrap: wrap; }
.upcoming li:last-child { border-bottom: 0; }
.upcoming .when { min-width: 150px; font-weight: 700; }
.upcoming .when a { text-decoration: none; }

/* Name page */
.big-date { font-size: 2.6em; font-family: 'Amaranth', sans-serif; margin: 6px 0; }
.countdown { font-size: 1.3em; margin: 0 0 10px; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 10px 0; }
.share-row a, .share-row button {
	font-size: 1.1em; padding: 8px 16px; border: 2px solid black; background: white; color: var(--dark);
	text-decoration: none; font-weight: 700; cursor: pointer; font-family: 'Open Sans', sans-serif;
	box-shadow: 3px 3px 0 var(--shadow);
}
.share-row a:hover, .share-row button:hover { background: var(--orange); color: white; }
.note-box { background: #f5f6f7; border-left: 4px solid var(--teal); padding: 10px 16px; }

/* Day page prev/next */
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pager a:nth-child(2) { text-align: center; }
.pager a:last-child { text-align: right; }
.pager a { font-weight: 700; text-decoration: none; color: var(--teal); font-size: 1.2em; }
.pager a:hover { color: var(--orange); }

/* Calendar */
.month-selector { display: flex; justify-content: space-between; gap: 10px; }
.month-selector .button { justify-content: center; }
.cal-grid { margin-top: 10px; }
.cal-head, .cal-blank { display: none; }
/* Phones: a list, one row per day */
.calendar-day { display: flex; gap: 12px; align-items: baseline; padding: 8px 4px; border-bottom: 1px solid #e3e4e5; }
.calendar-day.is-today { background: #fff6e8; }
.calendar-day .date { flex: 0 0 64px; font-size: 14px; }
.calendar-day .date a { text-decoration: none; color: var(--teal); font-weight: 700; font-size: 1.2em; }
.cal-wd { display: inline-block; width: 2.3em; color: #5c636e; font-weight: 700; }
.calendar-names { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 10px; }
.calendar-names li { font-weight: 700; font-size: 15px; line-height: 1.5; }
.calendar-names a { text-decoration: none; }
.calendar-names a:hover { color: var(--orange); }

/* A–Z */
.letter-nav { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin: 16px 0; }
.letter-nav a { font-weight: 700; text-decoration: none; padding: 3px 7px; border: 2px solid var(--dark); text-align: center; }
.letter-nav a:hover { background: var(--orange); color: white; }
.letter-card { margin-bottom: 22px; scroll-margin-top: 16px; }
.letter-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.letter-heading { font-size: 2.4em; margin: 0 0 4px; border-bottom: 4px solid var(--teal); display: inline-block; line-height: 1.1; }

/* Forms */
.inline-form { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.form-status { font-weight: 700; color: #2e7d32; min-height: 1.4em; }

/* API docs */
.keywords { padding: 1px 6px; border-radius: 2px; color: brown; background-color: #ebeced; font-family: Monaco, Consolas, monospace; }
.code { white-space: pre; overflow-x: auto; background: #f6f6f7; border-radius: 8px; margin: 12px 0; padding: 16px 20px; font-family: Monaco, Consolas, monospace; font-size: 1.05em; }
table.fields { border: 1px solid #e3e4e5; border-collapse: collapse; width: 100%; font-family: 'Open Sans', sans-serif; }
table.fields th, table.fields td { border-bottom: 1px solid #e3e4e5; padding: 8px; text-align: left; vertical-align: top; }
table.fields thead { background: #f5f6f7; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 12px 0; }
.plan { border: 2px solid var(--dark); padding: 12px; text-align: center; box-shadow: 4px 4px 0 var(--shadow); }
.plan .price { font-size: 1.6em; font-weight: 700; }
details.code-samples summary { cursor: pointer; font-weight: 700; margin: 8px 0; }

/* Footer */
.footer { text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 14px; }
.footer-links a { font-weight: 700; text-decoration: none; color: var(--teal); }
.footer-links a:hover { color: var(--orange); }
.social-wrapper { display: flex; justify-content: center; gap: 24px; }
.social-wrapper a { display: block; width: 52px; height: 52px; }
.social-wrapper svg, .social-wrapper img { width: 100%; height: 100%; }

.text-link { color: var(--teal); text-decoration: underline; }
.text-link:hover { color: var(--orange); }

@media (min-width: 800px) {
	/* Tablets and up: a real Monday-first month grid */
	.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: #ddd; border: 1px solid #ddd; }
	.cal-head { display: block; background: #f5f6f7; text-align: center; font-weight: 700; padding: 6px 0; font-size: 14px; }
	.cal-blank { display: block; background: #fafafa; }
	.calendar-day { display: block; background: white; border: 0; padding: 0 0 16px; min-height: 96px; }
	.calendar-day.is-today { background: #fff6e8; }
	.calendar-day .date { text-align: right; padding: 4px 6px; }
	.calendar-day .date a { font-size: 1em; }
	.cal-wd { display: none; }
	.calendar-names { display: block; text-align: center; padding: 0 4px; }
	.calendar-names li { font-size: 14px; overflow-wrap: anywhere; }
}

@media (min-width: 850px) {
	html { font-size: 16px; }
	:root {
		--mainPadding: 0 50px 50px;
		--linkPadding: 10px 40px;
		--cardPadding: 30px 30px 35px 30px;
	}
	/* Alternating tilt on desktop, content kept straight */
	.skew:nth-child(2n) { transform: skewX(-4deg); }
	.skew:nth-child(2n) > div { transform: skewX(4deg); padding: 10px 20px; }
	.skew:nth-child(2n + 1) { transform: skewX(4deg); }
	.skew:nth-child(2n + 1) > div { transform: skewX(-4deg); padding: 10px 20px; }
}

/* Phones: tighter nav so it fits in two rows, stacked day pager */
@media (max-width: 600px) {
	.navbar { padding: 14px 4px 6px; }
	.logo { font-size: 1.35em; padding: 6px 16px; margin-right: 4px; }
	.nav-link { font-size: 1.05em; padding: 6px 13px; margin-right: 4px; }
	.links a { margin-bottom: 10px; }
	.month-selector .button { font-size: 1.1em; padding: 8px 16px; margin-right: 6px; }
	.pager { flex-direction: column; }
	.pager a:nth-child(2) { order: 3; }
	.pager a, .pager a:last-child { text-align: center; }
}

@media (prefers-reduced-motion: no-preference) {
	.button, .nav-link, .name-chips a { transition: background 0.15s; }
}

/* Space before headings that follow other content */
* + .section-title { margin-top: 22px; }
