/* Rubik and Lilita One are the two faces Parcore itself uses, so the site reads as the same hand as the game. */
@font-face {
	font-family: "Rubik";
	src: url("/assets/fonts/rubik-latin.woff2") format("woff2");
	font-weight: 300 900;
	font-display: swap;
}
@font-face {
	font-family: "Lilita One";
	src: url("/assets/fonts/lilita-one-latin.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}

:root {
	/* The studio card's ink, and Parcore's scorecard paper, greens, flag red and gold, as the game defines them. */
	--ink: #1e1e2b;
	--ink-soft: #4b4c5e;
	--page: #f3f4f7;
	--surface: #ffffff;
	--line: #d9dbe3;
	--paper: #fbf6e9;
	--paper-dark: #efe6cf;
	--green: #1f6b45;
	--green-dark: #123f29;
	--red: #e2493b;
	--gold: #f4b731;
	--gold-dark: #b9821a;
	--focus: var(--ink);

	--font: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-game: "Lilita One", "Rubik", system-ui, sans-serif;
	--wrap: 1180px;
	--gutter: clamp(20px, 4vw, 40px);
}

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

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

body {
	margin: 0;
	background: var(--page);
	color: var(--ink);
	font-family: var(--font);
	font-size: 1.125rem;
	line-height: 1.55;
	font-kerning: normal;
}

img, video, svg { display: block; max-width: 100%; height: auto; }
video { background: #000; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

/* A dashed ring, the same broken line as the D in the studio mark. */
:focus-visible {
	outline: 3px dashed var(--focus);
	outline-offset: 4px;
	border-radius: 4px;
}

.wrap {
	width: 100%;
	max-width: calc(var(--wrap) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.skip {
	position: absolute;
	left: var(--gutter);
	top: -100px;
	z-index: 10;
	padding: 10px 16px;
	background: var(--ink);
	color: var(--paper);
	border-radius: 8px;
}
.skip:focus { top: 12px; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; text-wrap: balance; }
p { margin: 0 0 1em; }
p, li { text-wrap: pretty; }

.lede { font-size: 1.3125rem; line-height: 1.45; }

/* ---------- Masthead ---------- */

.masthead-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-block: 22px;
}
.studio {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	font-weight: 600;
	font-size: 1.0625rem;
	letter-spacing: 0.01em;
	white-space: nowrap;
}
.studio-mark { width: 54px; fill: currentColor; }
.nav {
	display: flex;
	gap: clamp(16px, 3vw, 32px);
	list-style: none;
	margin: 0;
	padding: 0;
	font-weight: 500;
}
.nav a { text-decoration: none; padding-block: 6px; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.35em;
}

/* ---------- Buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.btn {
	display: inline-block;
	padding: 13px 22px 12px;
	border-radius: 12px;
	font-weight: 600;
	font-size: 1.0625rem;
	line-height: 1.3;
	text-decoration: none;
	border: 2px solid transparent;
}
/* The chunky bottom edge is the game's own button style. */
.btn-gold { background: var(--gold); color: var(--green-dark); box-shadow: 0 4px 0 var(--gold-dark); }
.btn-green { background: var(--green); color: var(--paper); box-shadow: 0 4px 0 var(--green-dark); }
.btn-gold:hover, .btn-green:hover { transform: translateY(1px); box-shadow: 0 3px 0 var(--gold-dark); }
.btn-green:hover { box-shadow: 0 3px 0 var(--green-dark); }
.btn-ghost { color: var(--paper); border-color: rgba(251, 246, 233, 0.55); }
.btn-ghost:hover { border-color: var(--paper); }

/* ---------- Fairway: the dark green bands that carry Parcore ---------- */

.fairway {
	--focus: var(--gold);
	background: var(--green-dark);
	color: var(--paper);
}
.fairway a:not(.btn) { color: var(--paper); }

.logo-heading { margin: 0; line-height: 0; }
.logo-heading img { width: min(440px, 100%); }

/* ---------- Home ---------- */

.intro { padding-block: clamp(40px, 8vw, 104px) clamp(36px, 6vw, 72px); }
.intro h1 {
	max-width: 21ch;
	font-size: clamp(2.125rem, 1.2rem + 3.6vw, 3.75rem);
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1.08;
	margin: 0;
}

.feature-art { display: block; background: var(--green-dark); }
.feature-art img { width: 100%; }

.feature-grid {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: clamp(32px, 5vw, 72px);
	align-items: start;
	padding-block: 0 clamp(56px, 7vw, 96px);
}
/* The logo steps up onto the art, the way it sits on the game's capsule. */
.feature-text { margin-top: clamp(-88px, -6vw, -40px); position: relative; }
.feature-text .logo-heading { margin-bottom: 28px; }
.feature-text .logo-heading img { filter: drop-shadow(0 6px 0 rgba(18, 63, 41, 0.9)); }
.feature-text p { max-width: 36ch; }
.feature-clip { margin: clamp(32px, 4vw, 56px) 0 0; }

/* ---------- Video loops ---------- */

figure { margin: 0; }
figure video { border-radius: 12px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
figcaption { margin-top: 12px; font-size: 0.9375rem; line-height: 1.45; color: var(--ink-soft); }
.fairway figcaption { color: rgba(251, 246, 233, 0.82); }

/* The button sits on the video, not the caption below it. */
.loop-wrap { position: relative; }
.loop-toggle {
	position: absolute;
	right: 12px;
	bottom: 12px;
	padding: 6px 12px;
	border: 0;
	border-radius: 8px;
	background: rgba(30, 30, 43, 0.78);
	color: #fff;
	font: 500 0.875rem/1.2 var(--font);
	cursor: pointer;
}
.loop-toggle:hover { background: var(--ink); }
.loop-toggle:focus-visible { outline-color: var(--gold); }

/* ---------- Parcore page ---------- */

.game-h {
	font-family: var(--font-game);
	font-weight: 400;
	font-size: clamp(2rem, 1.5rem + 1.6vw, 2.75rem);
	letter-spacing: 0.005em;
	color: var(--green-dark);
}

.game-hero { padding-block: clamp(32px, 5vw, 64px) clamp(150px, 16vw, 220px); }
.game-hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(28px, 5vw, 72px);
	align-items: center;
}
.game-hero .logo-heading img { width: min(560px, 100%); }
.game-hero-text .lede { max-width: 40ch; }
.availability { color: rgba(251, 246, 233, 0.85); margin: 0; }

.trailer { margin-top: clamp(-200px, -14vw, -120px); }
.trailer video {
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 16px;
	box-shadow: 0 24px 48px -16px rgba(18, 63, 41, 0.55);
}

.section { padding-block: clamp(56px, 7vw, 96px) 0; }
.section:last-child { padding-bottom: clamp(64px, 8vw, 112px); }
.section-intro { max-width: 62ch; }

.how-row {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: clamp(24px, 5vw, 64px);
	align-items: center;
	padding-block: clamp(20px, 3vw, 32px);
}
.how-row > p { font-size: 1.3125rem; line-height: 1.5; max-width: 34ch; margin: 0; }
.how-row:nth-child(odd of .how-row) > p { order: 2; }
.how-row + .how-row { border-top: 1px solid var(--line); }

/* The course list is set as the game's own scorecard: paper card, green rule, green header row. */
.scorecard-scroll { overflow-x: auto; margin-top: 28px; }
.scorecard {
	width: 100%;
	min-width: 560px;
	border-collapse: separate;
	border-spacing: 0;
	background: var(--paper);
	border: 3px solid var(--green-dark);
	border-radius: 16px;
	overflow: hidden;
	font-size: 1.0625rem;
}
.scorecard th, .scorecard td {
	padding: 14px 18px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--paper-dark);
}
.scorecard thead th {
	background: var(--green);
	color: var(--paper);
	font-family: var(--font-game);
	font-weight: 400;
	font-size: 1.125rem;
	letter-spacing: 0.01em;
	border-bottom: 0;
}
.scorecard tbody th {
	font-family: var(--font-game);
	font-weight: 400;
	font-size: 1.375rem;
	color: var(--green-dark);
	white-space: nowrap;
}
.scorecard .num, .scorecard thead th:nth-child(1), .scorecard thead th:nth-child(3) {
	text-align: center;
	width: 1%;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}
.scorecard tbody .num { font-weight: 600; color: var(--green-dark); }
.scorecard tfoot th, .scorecard tfoot td {
	background: var(--paper-dark);
	border-bottom: 0;
	font-weight: 600;
	color: var(--green-dark);
}
.scorecard tfoot th { font-family: var(--font-game); font-weight: 400; font-size: 1.375rem; }
.total-phone { display: none; }
.scorecard tfoot .num { font-family: var(--font-game); font-size: 1.375rem; font-weight: 400; }

.features {
	list-style: none;
	padding: 0;
	margin: 28px 0 0;
	columns: 2 320px;
	column-gap: 56px;
}
.features li {
	break-inside: avoid;
	position: relative;
	padding: 12px 0 12px 32px;
	border-bottom: 1px solid var(--line);
}
/* A flag on a pole, the marker the game uses for every hole. */
.features li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: 0.55em;
	width: 2px;
	height: 1.15em;
	background: var(--ink);
}
.features li::after {
	content: "";
	position: absolute;
	left: 6px;
	top: 0.55em;
	width: 12px;
	height: 9px;
	background: var(--red);
	clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.shots {
	list-style: none;
	padding: 0;
	margin: 28px 0 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px 20px;
}
.shots a { display: block; border-radius: 10px; }
.shots img { border-radius: 10px; aspect-ratio: 16 / 9; width: 100%; background: var(--line); }
.shots p { margin: 10px 0 0; font-size: 0.9375rem; color: var(--ink-soft); }
.shots .size { white-space: nowrap; }

.facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 0 40px;
	margin: 24px 0 0;
}
.facts > div { padding: 14px 0; border-top: 1px solid var(--line); }
.facts dt { font-size: 0.9375rem; font-weight: 600; color: var(--ink-soft); }
.facts dd { margin: 2px 0 0; }

.more-links {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 32px;
	list-style: none;
	padding: 0;
	margin: 32px 0 0;
	font-weight: 500;
}

/* ---------- Text pages ---------- */

.prose { max-width: calc(68ch + 2 * var(--gutter)); }
.doc .prose { padding-block: clamp(32px, 6vw, 72px) clamp(64px, 8vw, 112px); }
.prose h1 { font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3rem); font-weight: 600; letter-spacing: -0.015em; }
.prose h2 { font-size: 1.5rem; font-weight: 600; margin-top: 2em; }
.prose ul { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.5em; }
.prose code { font-size: 0.9em; background: var(--surface); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }
.meta { color: var(--ink-soft); }

/* ---------- Press kit ---------- */

.press-head { padding-block: clamp(32px, 6vw, 72px) 8px; }
.press-head h1 { font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3rem); font-weight: 600; letter-spacing: -0.015em; }
.press-head .lede { max-width: 52ch; }

.press-grid {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
	gap: clamp(32px, 5vw, 80px);
	padding-top: clamp(32px, 5vw, 56px);
	align-items: start;
}
.press-grid h2, .press .section h2 { font-size: 1.5rem; font-weight: 600; }
.press-facts .facts { grid-template-columns: 1fr; margin-top: 8px; }
.press-about { max-width: none; }
.press-about h2 + p { margin-top: 0; }
.press-about h2 { margin-top: 1.6em; }
.press-about h2:first-child { margin-top: 0; }

.downloads {
	list-style: none;
	padding: 0;
	margin: 24px 0 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 28px 20px;
}
.downloads a:has(.dl-thumb) { display: block; font-weight: 600; }
.downloads a span { display: block; margin-top: 10px; }
.dl-thumb {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 10px;
	background: var(--surface);
	border: 1px solid var(--line);
}
.dl-thumb-logo, .dl-thumb-icon { object-fit: contain; padding: 22px; }
.dl-thumb-studio { object-fit: contain; padding: 22% 14%; background: var(--ink); border-color: var(--ink); }
.downloads p { margin: 4px 0 0; font-size: 0.9375rem; color: var(--ink-soft); }

/* ---------- 404 ---------- */

.notfound-body { padding-block: clamp(40px, 8vw, 96px) clamp(72px, 10vw, 128px); }
.notfound-body h1 { font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3rem); font-weight: 600; letter-spacing: -0.015em; }
/* A jump that falls short: the game's dotted flight line, ending in the ball. */
.notfound-arc { width: min(420px, 80%); margin-bottom: 24px; }
.notfound-arc path {
	fill: none;
	stroke: var(--ink);
	stroke-width: 6;
	stroke-linecap: round;
	stroke-dasharray: 0 22;
}
.notfound-arc circle { fill: var(--surface); stroke: var(--ink); stroke-width: 5; }

/* ---------- Footer ---------- */

.footer {
	--focus: var(--gold);
	background: var(--ink);
	color: var(--paper);
	padding-block: 56px 28px;
	font-size: 1rem;
}
.footer-grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: 32px 48px;
}
.footer-wordmark { width: 240px; margin-bottom: 16px; }
.footer-studio p { color: rgba(251, 246, 233, 0.78); max-width: 34ch; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li + li { margin-top: 10px; }
.footer-links a { overflow-wrap: anywhere; }
.footer-small { margin-top: 40px; font-size: 0.875rem; color: rgba(251, 246, 233, 0.7); }
.footer-small p { margin: 0; }

/* ---------- Small screens ---------- */

@media (max-width: 860px) {
	.feature-grid, .game-hero-grid, .how-row, .press-grid { grid-template-columns: minmax(0, 1fr); }
	.how-row:nth-child(odd of .how-row) > p { order: 0; }
	.feature-clip { margin-top: 0; }
	.shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.footer-studio { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
	body { font-size: 1.0625rem; }
	.lede, .how-row > p { font-size: 1.1875rem; }
	.shots { gap: 20px 14px; }
	.shots p { font-size: 0.875rem; }
	/* Every course has 18 holes, so on a phone that column gives way to the description. */
	.scorecard { min-width: 0; font-size: 1rem; }
	.scorecard th, .scorecard td { padding: 12px 10px; }
	.scorecard .col-holes { display: none; }
	.total-phone { display: inline; }
	.footer-grid { grid-template-columns: minmax(0, 1fr); }
	.actions .btn { flex: 1 1 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
	.btn-gold:hover, .btn-green:hover { transform: none; }
}
