/* Quillspire Games: one stylesheet for every page. */

@font-face {
	font-family: "Berkshire Swash";
	src: url("fonts/BerkshireSwash-Regular.ttf") format("truetype");
	font-display: swap;
}
@font-face {
	font-family: "Fredoka";
	src: url("fonts/Fredoka-Variable.ttf") format("truetype");
	font-weight: 300 700;
	font-display: swap;
}

:root {
	--ink: #16234a;      /* the night sky of the games */
	--ink-soft: #2a3a6b;
	--snow: #f5f8fd;
	--frost: #d7e7f6;
	--gold: #f2b632;     /* the drawn path */
	--berry: #d23b3b;
	--pine: #436a41;   /* the logo green */
	--text: #1d2747;
	--muted: #4a5578;
	--measure: 36rem;
	--display: "Berkshire Swash", Georgia, serif;
	--body: "Fredoka", ui-rounded, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--snow);
	color: var(--text);
	font-family: var(--body);
	font-size: 1.125rem;
	line-height: 1.6;
	font-weight: 400;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ink-soft); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--berry); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--gold); color: var(--ink); padding: 0.5rem 1rem; z-index: 10; }

.wrap { width: min(72rem, 100% - 2.5rem); margin-inline: auto; }

/* Header: sits on the night sky on every page. */
.site-head { background: var(--ink); color: var(--snow); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--snow); text-decoration: none; font-family: var(--display); font-size: 1.6rem; line-height: 1; }
.brand:hover { color: var(--gold); }
.brand img { width: 3rem; height: auto; flex: none; }
.site-nav { display: flex; gap: 1.4rem; font-weight: 500; }
.site-nav a { color: var(--frost); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--gold); }

/* Hero: the quill draws a gold path across the night sky. */
.hero { background: var(--ink); color: var(--snow); position: relative; overflow: hidden; padding-block: 3.5rem 0; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1.05; margin: 0 0 1.25rem; max-width: 12ch; }
.hero p { max-width: var(--measure); font-size: 1.25rem; color: var(--frost); margin: 0; }
.hero .path { display: block; width: 100%; height: clamp(5rem, 14vw, 10rem); margin-top: 1.5rem; }
.path-line { fill: none; stroke: var(--gold); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 16 18; }
.stars circle { fill: var(--snow); opacity: 0.8; }
.hero .snowline { display: block; width: 100%; height: 3rem; color: var(--snow); }

.path-reveal { fill: none; stroke: #fff; stroke-width: 16; stroke-linecap: round; }
/* The line draws itself once, like a child's finger in Sky Path. */
@media (prefers-reduced-motion: no-preference) {
	.path-reveal { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s ease-out 0.3s forwards; }
	@keyframes draw { to { stroke-dashoffset: 0; } }
}

/* Sections */
main section { padding-block: 3.5rem; }
h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 4.5vw, 2.8rem); line-height: 1.15; margin: 0 0 1rem; color: var(--ink); }
h3 { font-size: 1.35rem; font-weight: 600; margin: 0 0 0.35rem; color: var(--ink); }
.lede { max-width: var(--measure); color: var(--muted); margin: 0 0 2rem; }

/* The game feature: one icon, one title, the games as a strip of screenshots. */
.feature-head { display: flex; gap: 1.25rem; align-items: center; margin-bottom: 1.5rem; }
.feature-head img { width: 5.5rem; border-radius: 1.4rem; box-shadow: 0 0.35rem 0 var(--frost); }
.feature-head h2 { margin: 0; }
.feature-head .status { margin: 0.2rem 0 0; color: var(--pine); font-weight: 600; }

.games { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 2rem 1.75rem; }
.games figure { margin: 0; }
.games img { border-radius: 0.6rem; border: 3px solid var(--ink); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: var(--frost); }
.games figcaption { margin-top: 0.7rem; }
.games figcaption strong { display: block; font-size: 1.2rem; font-weight: 600; color: var(--ink); }
.games figcaption span { color: var(--muted); font-size: 1rem; }

/* Promises to parents: a plain list with check marks, not cards. */
.promises { background: var(--frost); }
.promise-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem 2.5rem; }
.promise-list li { padding-left: 2.2rem; position: relative; }
.promise-list li::before { content: ""; position: absolute; left: 0; top: 0.35rem; width: 1.3rem; height: 0.7rem; border-left: 4px solid var(--pine); border-bottom: 4px solid var(--pine); transform: rotate(-45deg); }
.promise-list strong { display: block; color: var(--ink); font-weight: 600; }
.promise-list span { color: var(--muted); font-size: 1rem; }

.button { display: inline-block; background: var(--berry); color: #fff; text-decoration: none; font-weight: 600; padding: 0.8rem 1.4rem; border-radius: 0.8rem; box-shadow: 0 0.3rem 0 #9e2525; }
.button:hover { color: #fff; background: #c13434; }
.button:active { transform: translateY(0.2rem); box-shadow: 0 0.1rem 0 #9e2525; }

/* Long text pages (privacy policy). */
.prose { max-width: 42rem; }
.prose h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.1; color: var(--ink); margin: 0 0 0.5rem; }
.prose h2 { font-family: var(--body); font-weight: 600; font-size: 1.4rem; margin: 2.2rem 0 0.6rem; }
.prose .updated { color: var(--muted); margin: 0 0 2rem; }
.prose ul { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.35rem; }
.summary { background: var(--frost); border-left: 6px solid var(--pine); padding: 1rem 1.4rem; border-radius: 0 0.6rem 0.6rem 0; }
.summary ul { margin: 0.4rem 0 0; }

/* Footer */
.site-foot { background: var(--ink); color: var(--frost); padding-block: 2.5rem; font-size: 1rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; justify-content: space-between; }
.site-foot a { color: var(--gold); }
.site-foot p { margin: 0.2rem 0; }

@media (max-width: 40rem) {
	.site-nav { gap: 1rem; font-size: 1rem; }
	.feature-head img { width: 4.2rem; border-radius: 1rem; }
}
.more { margin-top: 2.5rem; }
.town { border-radius: 0.8rem; border: 3px solid var(--ink); margin-bottom: 2.5rem; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem 3rem; }
.two-col ul { padding-left: 1.3rem; margin: 0; }
.two-col li { margin-bottom: 0.4rem; }
.page-title { font-family: var(--display); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.1; color: var(--ink); margin: 0; }
.hero-grid { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2rem 3rem; }
.hero-logo { width: clamp(12rem, 24vw, 19rem); }
@media (max-width: 40rem) {
	.hero-grid { grid-template-columns: 1fr; }
	.hero-logo { order: -1; width: 10rem; }
}
.showcase { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2rem 3rem; align-items: center; }
.showcase img { border-radius: 0.8rem; border: 3px solid var(--ink); width: 100%; }
.showcase p { max-width: var(--measure); }
.showcase ul { padding-left: 1.3rem; }
.showcase li { margin-bottom: 0.4rem; }
.note { color: var(--muted); font-size: 1rem; }
@media (max-width: 48rem) { .showcase { grid-template-columns: 1fr; } }
