/* The site's one stylesheet. No external fonts: Marcellus (SIL OFL 1.1, fonts/OFL.txt) is bundled
   for the titles, and Jost (SIL OFL 1.1, fonts/Jost-OFL.txt), the studio's lettering, for the bar,
   labels and the foot; the body text uses the reader's own serif. Colours are the game's: the
   logo's cream, amber and navy, and the keeper's house's red roof. */

@font-face {
	font-family: "Marcellus";
	src: url("../fonts/Marcellus-Regular.ttf") format("truetype");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Jost";
	src: url("../fonts/Jost-Variable.ttf") format("truetype");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	--navy: #1a2130;
	--navy-soft: #2a3348;
	--cream: #f1e6cc;
	--paper: #f8f3e7;
	--paper-deep: #efe6d2;
	--amber: #f5b854;
	--roof: #a33b27; /* a shade darker than the roof itself, for 5:1 contrast on both papers */
	--ink: #1a2130;
	--ink-soft: #4a5263;
	--rule: #d8ccb2;
	--measure: 38rem;
	--wide: 72rem;
	--title: "Marcellus", "Optima", "Candara", "Trebuchet MS", serif;
	--label: "Jost", "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
	--body: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
	color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--body);
	font-size: 1.125rem;
	line-height: 1.6;
}

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

/* The lighthouse mark: the tower takes the text colour; its door and window are cut out of it in
   the colour of whatever is behind (--mark-cut). */
.mark .cut, .mark-small .cut { fill: var(--mark-cut, #1a2130); }
.mark .cut-line { stroke: var(--mark-cut, #1a2130); }

a { color: var(--roof); text-underline-offset: 0.18em; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 2px; }

.skip {
	position: absolute; left: 1rem; top: -4rem; z-index: 10;
	background: var(--navy); color: var(--cream); padding: 0.6rem 1rem;
}
.skip:focus { top: 1rem; }

.visually-hidden {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* The bar along the top */
.bar {
	background: var(--navy); color: var(--cream);
}
.bar-inner {
	max-width: var(--wide); margin: 0 auto; padding: 0.35rem 1.25rem;
	display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.bar a { color: var(--cream); text-decoration: none; }
.bar a:hover, .bar a[aria-current="page"] { color: var(--amber); }
.brand {
	display: flex; align-items: center; gap: 0.6rem;
	font-family: var(--title); letter-spacing: 0.14em; text-transform: uppercase; font-size: 1rem;
}
.brand img { width: 10.5rem; height: auto; } /* the lock-up's own clear space is in the file; 160 px at least */
.bar nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }
.bar nav a { font-family: var(--label); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.85rem; }

/* The picture at the top of the home page, with the title in its sky */
.hero { position: relative; background: #e9d3d6; overflow: hidden; }
.hero img { width: 100%; height: min(86vh, 56.25vw); min-height: 22rem; object-fit: cover; object-position: 50% 62%; }
.hero::after {
	/* a soft lift of the sky behind the title, so the navy type keeps its contrast */
	content: ""; position: absolute; inset: 0 0 auto 0; height: 60%;
	background: linear-gradient(to bottom, rgba(248, 243, 231, 0.55), rgba(248, 243, 231, 0));
	pointer-events: none;
}
.hero-title {
	position: absolute; inset: 0 0 auto 0; z-index: 1; text-align: center;
	padding: clamp(1.5rem, 6vw, 5rem) 1rem 0; color: var(--navy);
}

.logo { margin: 0; font-weight: 400; }
.logo svg { width: clamp(9rem, 22vw, 15rem); height: auto; margin: 0 auto 0.4rem; display: block; color: var(--navy); --mark-cut: #e9d3d6; }
.logo .series {
	display: block; font-family: var(--title); text-transform: uppercase;
	font-size: clamp(2.2rem, 7vw, 5rem); letter-spacing: 0.16em; line-height: 1.05;
	padding-left: 0.16em; /* balances the letter-spacing after the last letter */
}
.logo .episode {
	display: inline-block; margin-top: 0.7rem; padding-top: 0.55rem;
	border-top: 2px solid currentColor; font-family: var(--title); text-transform: uppercase;
	font-size: clamp(0.85rem, 1.8vw, 1.25rem); letter-spacing: 0.3em; padding-left: 0.3em;
}

.actions {
	display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; margin: 0; padding: 1.6rem 1rem;
	background: var(--navy);
}
.button {
	display: inline-block; padding: 0.8rem 1.5rem; border-radius: 3px; text-decoration: none;
	font-family: var(--title); letter-spacing: 0.12em; text-transform: uppercase; font-size: 1rem;
	background: var(--amber); color: var(--navy); border: 2px solid var(--amber);
}
.button:hover { background: var(--cream); border-color: var(--cream); color: var(--navy); }
.button.quiet { background: transparent; color: var(--cream); border-color: var(--cream); }
.button.quiet:hover { background: var(--cream); color: var(--navy); }

/* Sections */
main { display: block; }
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 1.25rem; }
.section.alt { background: var(--paper-deep); }
.section > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.section > .wide { max-width: var(--wide); }

h1, h2, h3 { font-family: var(--title); font-weight: 400; line-height: 1.2; }
h2 {
	font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.22em;
	color: var(--roof); margin-top: 0; margin-bottom: 1.2rem;
}
h3 { font-size: 1.35rem; letter-spacing: 0.04em; margin: 0 0 0.4rem; }
.page-title { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: 0.08em; margin: 0 0 0.5rem; text-transform: uppercase; }
.lede { font-size: 1.3rem; line-height: 1.5; }
.signoff { font-style: italic; color: var(--ink-soft); }

/* "What it is" */
.points {
	list-style: none; padding: 0; margin: 0;
	display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.points li { border-top: 3px solid var(--navy); padding-top: 1rem; }
.points p { margin: 0; }

/* Pictures */
.shots {
	/* one, two or four across, so the eight pictures always fill their rows */
	list-style: none; padding: 0; margin: 0;
	display: grid; gap: 1.25rem; grid-template-columns: 1fr;
}
@media (min-width: 40rem) { .shots { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .shots { grid-template-columns: repeat(4, 1fr); } }
.shots figure { margin: 0; }
.shots a { display: block; }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 2px; box-shadow: 0 1px 0 var(--rule); }
.shots figcaption { font-size: 0.95rem; color: var(--ink-soft); margin-top: 0.45rem; }
.shots .download { font-size: 0.9rem; }

/* Press kit */
.factsheet { display: grid; grid-template-columns: max-content 1fr; gap: 0.45rem 1.25rem; margin: 0; }
.factsheet dt { font-family: var(--title); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.95rem; padding-top: 0.12rem; }
.factsheet dd { margin: 0; }
.section > .factsheet { margin: 0 auto 1.5rem; } /* centred in the column, like the text round it */
.two-col { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); align-items: start; }
.wordcount { color: var(--ink-soft); font-size: 0.9rem; font-family: var(--body); text-transform: none; letter-spacing: 0; }
.features { padding-left: 1.2rem; }
.features li { margin-bottom: 0.5rem; }
.logos { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.logos figure { margin: 0; }
.logos .swatch { display: block; padding: 1rem; border-radius: 2px; border: 1px solid var(--rule); }
.logos .swatch img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
.logos figcaption { font-size: 0.95rem; margin-top: 0.45rem; }
.logos .swatch.dark { background: var(--navy); }
.logos .swatch.light { background: var(--paper); }
.placeholder-note {
	border-left: 4px solid var(--amber); background: #fff8e6; padding: 0.8rem 1rem; font-size: 1rem;
}

/* The foot of every page */
.foot { background: var(--navy); color: var(--cream); padding: 2rem 1.25rem; font-size: 0.95rem; }
.foot-inner { max-width: var(--wide); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between; }
.foot a { color: var(--cream); }
.foot a:hover { color: var(--amber); }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.25rem; }
.foot p { margin: 0; }

@media (max-width: 34rem) {
	.factsheet { grid-template-columns: 1fr; }
	.factsheet dd { margin-bottom: 0.6rem; }
	.hero img { object-position: 52% 70%; }
	/* a smaller mark and less space above, so a long title stays in the sky above the island */
	.hero-title { padding-top: 1.1rem; }
	.logo svg { width: 7.5rem; margin-bottom: 0.2rem; }
	/* the four links on one line under the lock-up */
	.bar nav ul { gap: 0.4rem 0.85rem; }
	.bar nav a { font-size: 0.72rem; letter-spacing: 0.1em; }
}

@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; transition: none !important; }
}

@media print {
	.bar, .actions, .foot, .skip { display: none; }
	body { background: #fff; }
}

/* The game's page: "Coming soon", the platforms and the release under the picture */
.soon { text-align: center; font-family: var(--title); letter-spacing: 0.3em; text-transform: uppercase; font-size: 1.3rem; color: var(--navy); margin: 2.5rem 1.25rem 0; }
.soon-facts { text-align: center; margin: 0.6rem 1.25rem 0; color: var(--ink-soft); font-family: var(--label); letter-spacing: 0.06em; font-size: 1rem; }
.soon-action { text-align: center; margin: 1.4rem 1.25rem 0; }
.soon-action:empty { display: none; }

/* The teaser. Until the video files are made (tools/web_teaser.sh) the frame shows the key art */
.teaser { margin: 0; }
.teaser video {
	display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 2px;
	background: var(--navy) url("../img/shots/01-causeway-evening-960.webp") center / cover no-repeat;
}
.teaser figcaption { font-size: 0.95rem; color: var(--ink-soft); margin-top: 0.5rem; }

/* The studio's page (the root): the lock-up, then the game */
.studio-head { text-align: center; padding: clamp(2rem, 5vw, 3.5rem) 1.25rem clamp(1.25rem, 3vw, 2rem); }
.studio-head h1 { margin: 0; }
.studio-head img { width: clamp(15rem, 26vw, 20rem); margin: 0 auto; }
.feature { max-width: var(--wide); margin: 0 auto; padding: 0 1.25rem clamp(3rem, 7vw, 5rem); }
.feature-art { position: relative; overflow: hidden; border-radius: 3px; background: #e9d3d6; }
.feature-art img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 62%; }
.feature-art::after {
	content: ""; position: absolute; inset: 0 0 auto 0; height: 60%;
	background: linear-gradient(to bottom, rgba(248, 243, 231, 0.55), rgba(248, 243, 231, 0));
	pointer-events: none;
}
.feature-title { position: absolute; inset: 0 0 auto 0; z-index: 1; text-align: center; padding: clamp(0.9rem, 4.5vw, 3.5rem) 1rem 0; }
.feature h2.logo { color: var(--navy); margin: 0; }
.feature .logo svg { width: clamp(4.5rem, 13vw, 9rem); margin-bottom: 0.25rem; }
.feature .logo .series { font-size: clamp(1.45rem, 5.4vw, 4rem); }
.feature .logo .episode { font-size: clamp(0.62rem, 1.4vw, 1.05rem); margin-top: 0.5rem; padding-top: 0.4rem; }
.feature-title .kicker { margin: clamp(0.6rem, 1.6vw, 1.2rem) 0 0; font-size: clamp(0.7rem, 1.2vw, 0.95rem); }
@media (min-width: 64rem) {
	/* wider than the shot, the top of its sky kept for the title, the island under it */
	.feature-art img { aspect-ratio: 2 / 1; object-position: 50% 15%; }
	.feature-title { padding-top: 2.25rem; }
}
@media (max-width: 40rem) {
	/* taller on a phone, so the title has the sky and the island stays in sight under it */
	.feature-art img { aspect-ratio: 4 / 5; object-position: 50% 72%; }
	.feature .logo svg { width: 5.5rem; }
}
.feature-text { text-align: center; max-width: var(--measure); margin: 1.75rem auto 0; }
.feature-text p { margin: 0 0 1.25rem; text-wrap: balance; }
.kicker { font-family: var(--label); font-weight: 500; letter-spacing: 0.3em; padding-left: 0.3em; text-transform: uppercase; font-size: 0.95rem; color: var(--roof); }

/* The foot of every page: the lock-up, the address, the copyright line */
.foot-inner { align-items: center; }
.foot { font-family: var(--label); }
.foot .studio { width: 10.5rem; height: auto; display: block; }
