/*
	Tour Manager website — page styles.

	Values come from tokens.css; no raw colour appears below the import
	(tests/website/test_site_integrity.py fails on one). Gold is an accent:
	the logomark, rules, icons, the fill behind navy button labels, and text
	on navy only — never text on a light ground.
*/
@import url('tokens.css');

/* ---------- Base ---------- */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: var(--site-header-height);
}

body {
	margin: 0;
	background: var(--site-color-page);
	color: var(--site-color-text);
	font-family: var(--site-font-family);
	font-size: var(--site-font-body);
	font-weight: var(--site-weight-body);
	line-height: var(--site-leading-body);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img,
svg {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

h1,
h2,
h3 {
	margin: 0;
	font-weight: var(--site-weight-heading);
	line-height: var(--site-leading-heading);
	letter-spacing: var(--site-tracking-heading);
	text-transform: uppercase;
	text-wrap: balance;
}

h1 {
	font-size: var(--site-font-display);
}

h2 {
	font-size: var(--site-font-h2);
}

h3 {
	font-size: var(--site-font-h3);
}

p {
	margin: 0;
	max-width: var(--site-measure);
}

a {
	color: inherit;
}

button {
	font: inherit;
}

:focus-visible {
	outline: var(--site-focus-width) solid var(--site-color-focus);
	outline-offset: var(--site-focus-offset);
}

.section--navy :focus-visible,
.site-footer :focus-visible {
	outline-color: var(--site-color-focus-on-dark);
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: var(--site-space-2);
	left: var(--site-space-2);
	z-index: 100;
	padding: var(--site-space-3) var(--site-space-4);
	background: var(--site-color-navy);
	color: var(--site-color-white);
	border-radius: var(--site-radius-sm);
	font-weight: var(--site-weight-medium);
	text-decoration: none;
	transform: translateY(-200%);
}

.skip-link:focus {
	transform: none;
	outline-color: var(--site-color-focus-on-dark);
}

/* ---------- Layout ---------- */

.container {
	width: 100%;
	max-width: var(--site-width);
	margin-inline: auto;
	padding-inline: var(--site-gutter);
}

.container--narrow {
	max-width: var(--site-width-narrow);
}

.section {
	padding-block: var(--site-space-9);
}

.section--surface {
	background: var(--site-color-surface);
}

.section--navy {
	background: var(--site-color-navy);
	color: var(--site-color-white);
}

.section--gold {
	background: var(--site-color-gold);
	color: var(--site-color-navy);
}

.section__title {
	margin-bottom: var(--site-space-7);
}

.section__title--center {
	text-align: center;
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: var(--site-space-3);
	margin-bottom: var(--site-space-5);
	color: var(--site-color-gold-ink);
	font-size: var(--site-font-eyebrow);
	font-weight: var(--site-weight-heading);
	letter-spacing: var(--site-tracking-eyebrow);
	text-transform: uppercase;
}

.eyebrow::before {
	content: '';
	width: var(--site-space-6);
	height: var(--site-rule-height);
	background: var(--site-color-gold);
	border-radius: var(--site-radius-pill);
}

.eyebrow--on-dark {
	color: var(--site-color-gold);
}

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

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--site-tap);
	padding: var(--site-space-3) var(--site-space-5);
	border: var(--site-border-strong) solid transparent;
	border-radius: var(--site-radius-pill);
	font-size: var(--site-font-body);
	font-weight: var(--site-weight-heading);
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition:
		background-color var(--site-motion-fast) ease,
		color var(--site-motion-fast) ease,
		box-shadow var(--site-motion-fast) ease,
		transform var(--site-motion-fast) ease;
}

.btn:hover {
	transform: translateY(-1px);
	box-shadow: var(--site-shadow-card);
}

.btn--primary {
	background: var(--site-color-gold);
	color: var(--site-color-navy);
}

.btn--secondary {
	border-color: var(--site-color-navy);
	color: var(--site-color-navy);
}

.btn--secondary:hover {
	background: var(--site-color-navy);
	color: var(--site-color-white);
}

.btn--dark {
	background: var(--site-color-navy);
	color: var(--site-color-white);
}

.button-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--site-space-3);
}

/* ---------- Header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--site-color-header-glass);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	transition: box-shadow var(--site-motion-fast) ease;
}

.site-header.is-compact {
	box-shadow: var(--site-shadow-header);
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: var(--site-space-5);
	max-width: var(--site-width);
	min-height: var(--site-header-height);
	margin-inline: auto;
	padding-inline: var(--site-gutter);
	transition: min-height var(--site-motion-fast) ease;
}

.site-header.is-compact .site-header__inner {
	min-height: var(--site-header-height-compact);
}

.site-logo {
	display: flex;
	align-items: center;
	flex: none;
	min-height: var(--site-tap);
	margin-right: auto;
	padding-block: var(--site-space-2);
}

.site-logo img {
	width: auto;
	height: var(--site-logo-height);
	transition: height var(--site-motion-fast) ease;
}

.site-header.is-compact .site-logo img {
	height: var(--site-logo-height-compact);
}

.site-nav__list {
	display: flex;
	align-items: center;
	gap: var(--site-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav__link {
	display: inline-flex;
	align-items: center;
	min-height: var(--site-tap);
	padding: var(--site-space-2) var(--site-space-3);
	border: 0;
	border-radius: var(--site-radius-sm);
	background: none;
	color: var(--site-color-navy);
	font-size: var(--site-font-small);
	font-weight: var(--site-weight-medium);
	letter-spacing: var(--site-tracking-heading);
	text-decoration: none;
	cursor: pointer;
}

.site-nav__link:hover {
	text-decoration: underline;
	text-decoration-color: var(--site-color-gold);
	text-decoration-thickness: var(--site-rule-height);
	text-underline-offset: 0.4em;
}

.site-header__cta {
	font-size: var(--site-font-small);
}

.site-menu-button {
	display: none;
	flex: none;
	align-items: center;
	justify-content: center;
	width: var(--site-tap);
	height: var(--site-tap);
	padding: 0;
	border: var(--site-border) solid var(--site-color-line);
	border-radius: var(--site-radius-sm);
	background: var(--site-color-surface);
	cursor: pointer;
}

.site-menu-button__bars,
.site-menu-button__bars::before,
.site-menu-button__bars::after {
	display: block;
	width: 1.25rem;
	height: 2px;
	background: var(--site-color-navy);
	border-radius: var(--site-radius-pill);
	transition: transform var(--site-motion-fast) ease, opacity var(--site-motion-fast) ease;
}

.site-menu-button__bars {
	position: relative;
}

.site-menu-button__bars::before,
.site-menu-button__bars::after {
	content: '';
	position: absolute;
	left: 0;
}

.site-menu-button__bars::before {
	top: -6px;
}

.site-menu-button__bars::after {
	top: 6px;
}

.site-header.is-menu-open .site-menu-button__bars {
	background: transparent;
}

.site-header.is-menu-open .site-menu-button__bars::before {
	transform: translateY(6px) rotate(45deg);
}

.site-header.is-menu-open .site-menu-button__bars::after {
	transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Log In panel ---------- */

.login-panel {
	position: absolute;
	top: 100%;
	right: var(--site-gutter);
	width: min(26rem, calc(100% - 2 * var(--site-gutter)));
	padding: var(--site-space-5);
	background: var(--site-color-surface);
	border: var(--site-border) solid var(--site-color-line);
	border-radius: var(--site-radius);
	box-shadow: var(--site-shadow-frame);
}

.login-panel[hidden] {
	display: none;
}

.login-panel__title {
	margin-bottom: var(--site-space-4);
	padding-right: var(--site-space-7);
	font-size: var(--site-font-small);
	font-weight: var(--site-weight-heading);
	letter-spacing: var(--site-tracking-eyebrow);
	text-transform: uppercase;
}

.login-panel__row {
	display: flex;
	gap: var(--site-space-2);
}

.login-panel__field {
	display: flex;
	flex: 1;
	min-width: 0;
	min-height: var(--site-tap);
	border: var(--site-border) solid var(--site-color-text-soft);
	border-radius: var(--site-radius-sm);
	background: var(--site-color-surface);
	overflow: hidden;
}

.login-panel__field:focus-within {
	outline: var(--site-focus-width) solid var(--site-color-focus);
	outline-offset: var(--site-focus-offset);
}

.login-panel__input {
	flex: 1;
	min-width: 0;
	padding: var(--site-space-2) var(--site-space-3);
	border: 0;
	background: none;
	color: var(--site-color-text);
	font: inherit;
	font-size: max(1rem, var(--site-font-body));
}

.login-panel__input:focus-visible {
	outline: none;
}

.login-panel__suffix {
	display: flex;
	align-items: center;
	padding-inline: var(--site-space-2) var(--site-space-3);
	color: var(--site-color-text-soft);
	font-size: var(--site-font-small);
	white-space: nowrap;
}

.login-panel__message {
	margin-top: var(--site-space-3);
	color: var(--site-color-error);
	font-size: var(--site-font-small);
}

.login-panel__message:empty {
	display: none;
}

.login-panel__close {
	position: absolute;
	top: var(--site-space-2);
	right: var(--site-space-2);
	width: var(--site-tap);
	height: var(--site-tap);
	border: 0;
	border-radius: var(--site-radius-sm);
	background: none;
	color: var(--site-color-text-soft);
	font-size: var(--site-font-h3);
	line-height: 1;
	cursor: pointer;
}

/* ---------- Hero ---------- */

.hero {
	padding-block: var(--site-space-8) var(--site-space-9);
}

.hero__inner {
	text-align: center;
}

.hero__text {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--site-space-5);
}

.hero__text .eyebrow {
	margin-bottom: 0;
}

.hero__title {
	max-width: 20ch;
}

.hero__lead {
	max-width: 40rem;
	color: var(--site-color-text-soft);
	font-size: var(--site-font-lead);
}

.hero__shot {
	max-width: 64rem;
	margin: var(--site-space-8) auto 0;
}

/* ---------- Browser frame ---------- */

.browser-frame {
	overflow: hidden;
	background: var(--site-color-surface);
	border: var(--site-border) solid var(--site-color-line);
	border-radius: var(--site-radius-lg);
	box-shadow: var(--site-shadow-frame);
}

.browser-frame__bar {
	display: flex;
	align-items: center;
	gap: var(--site-space-2);
	padding: var(--site-space-3) var(--site-space-4);
	border-bottom: var(--site-border) solid var(--site-color-line);
	background: var(--site-color-page);
}

.browser-frame__dot {
	width: 0.7rem;
	height: 0.7rem;
	border-radius: 50%;
	background: var(--site-color-navy-soft);
}

.browser-frame__address {
	flex: 0 1 22rem;
	margin-inline: auto;
	padding: var(--site-space-1) var(--site-space-4);
	overflow: hidden;
	border-radius: var(--site-radius-pill);
	background: var(--site-color-surface);
	color: var(--site-color-text-soft);
	font-size: var(--site-font-small);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.browser-frame__screen {
	aspect-ratio: 16 / 9;
}

.browser-frame__screen img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top left;
}

/* ---------- Built for golf ---------- */

.statement {
	text-align: center;
}

.statement__title {
	margin-bottom: var(--site-space-7);
}

.statement__list {
	display: grid;
	gap: var(--site-space-5);
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--site-font-lead);
}

.statement__list li {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--site-space-3);
}

.statement__list li::before {
	content: '';
	width: var(--site-rule-width);
	height: var(--site-rule-height);
	border-radius: var(--site-radius-pill);
	background: var(--site-color-gold);
}

/* ---------- Feature blocks ---------- */

.features {
	display: grid;
	gap: var(--site-space-8);
	max-width: var(--site-width-features);
	margin-inline: auto;
}

.feature {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	align-items: center;
	gap: var(--site-space-7);
}

.feature:nth-child(even) .feature__media {
	order: 2;
}

.feature__media {
	display: grid;
	place-items: center;
	overflow: hidden;
	aspect-ratio: 3 / 2;
	max-width: var(--site-feature-media-width);
	width: 100%;
	justify-self: center;
	border-radius: var(--site-radius-lg);
	background: var(--site-color-navy);
	box-shadow: var(--site-shadow-card);
}

.feature__media img {
	width: 100%;
	height: 100%;
	border-radius: inherit;
	object-fit: cover;
}

/* A phone still sits whole on the navy ground instead of filling the frame. */
/* The box is 3:2 of the media width, and a percentage height does not resolve */
/* against an aspect-ratio box, so the height comes from the same token. */
.feature__media--phone img {
	box-sizing: border-box;
	width: auto;
	height: calc(var(--site-feature-media-width) * 2 / 3);
	padding: var(--site-space-4) 0;
	object-fit: contain;
}

.feature__text {
	display: grid;
	gap: var(--site-space-4);
}

.feature__text p {
	color: var(--site-color-text-soft);
}

/* ---------- Phones ---------- */

.phones {
	display: flex;
	justify-content: center;
	gap: var(--site-space-8);
}

.phone {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--site-space-5);
	margin: 0;
}

.phone-frame {
	position: relative;
	width: var(--site-phone-width);
	padding: 0.6rem;
	border-radius: var(--site-radius-phone);
	background: var(--site-color-navy-deep);
	box-shadow: var(--site-shadow-frame);
}

.phone-frame::before {
	content: '';
	position: absolute;
	top: 1.1rem;
	left: 50%;
	z-index: 1;
	width: 28%;
	height: 1.1rem;
	border-radius: var(--site-radius-pill);
	background: var(--site-color-navy-deep);
	transform: translateX(-50%);
}

/* The screen, not the frame, takes the phone's shape (390 x 844 points), so a */
/* still captured at that size fills it with nothing trimmed from its sides. */
.phone-frame__screen {
	aspect-ratio: 390 / 844;
	overflow: hidden;
	border-radius: calc(var(--site-radius-phone) - 0.6rem);
	background: var(--site-color-page);
}

.phone-frame__screen img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}

.phone__caption {
	max-width: var(--site-phone-width);
	color: var(--site-color-text-soft);
	text-align: center;
}

/* ---------- How setup works ---------- */

.section__title--on-dark {
	color: var(--site-color-white);
}

.steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--site-space-7);
	margin: 0;
	padding: 0;
	list-style: none;
}

.step {
	display: grid;
	align-content: start;
	gap: var(--site-space-3);
	padding-top: var(--site-space-5);
	border-top: var(--site-border) solid var(--site-color-navy-line);
}

.step__number {
	color: var(--site-color-gold);
	font-size: var(--site-step-numeral);
	font-weight: var(--site-weight-heading);
	line-height: 1;
}

.step__title {
	color: var(--site-color-white);
}

.step p {
	color: var(--site-color-navy-soft);
}

/* ---------- Closing call to action ---------- */

.closing {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--site-space-5);
	text-align: center;
}

.closing .section__title {
	margin-bottom: 0;
}

.closing__lead {
	font-size: var(--site-font-lead);
}

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

.site-footer {
	padding-block: var(--site-space-8);
	background: var(--site-color-navy-deep);
	color: var(--site-color-white);
}

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--site-space-6);
}

.site-footer__logo {
	display: flex;
	align-items: center;
	min-height: var(--site-tap);
}

.site-footer__logo img {
	width: auto;
	height: var(--site-logo-height-footer);
}

.site-footer__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--site-space-1) var(--site-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__link {
	display: inline-flex;
	align-items: center;
	min-height: var(--site-tap);
	padding: var(--site-space-2) var(--site-space-3);
	border: 0;
	background: none;
	color: var(--site-color-white);
	font-size: var(--site-font-small);
	text-decoration: none;
	cursor: pointer;
}

.site-footer__link:hover {
	text-decoration: underline;
	text-decoration-color: var(--site-color-gold);
	text-underline-offset: 0.4em;
}

.site-footer__copy {
	width: 100%;
	color: var(--site-color-navy-soft);
	font-size: var(--site-font-small);
}

/* ---------- Reveal on scroll ---------- */

/*
	The hidden starting state applies only once reveal.js adds .js-reveal, so
	with JavaScript off (or reduced motion) everything is simply shown.
*/
.js-reveal [data-reveal] {
	transition:
		opacity var(--site-motion-reveal) var(--site-ease-out),
		transform var(--site-motion-reveal) var(--site-ease-out);
	transition-delay: calc(var(--reveal-index, 0) * var(--site-motion-stagger));
}

.js-reveal [data-reveal]:not(.is-revealed) {
	opacity: 0;
	transform: translateY(var(--site-motion-rise));
}

.js-reveal [data-reveal='settle'] {
	transition-duration: var(--site-motion-settle);
}

.js-reveal [data-reveal='settle']:not(.is-revealed) {
	transform: translateY(calc(var(--site-motion-rise) * 2)) scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
	}

	[data-reveal] {
		opacity: 1 !important;
		transform: none !important;
	}
}

/* ---------- Phone layout ---------- */

@media (max-width: 47.4375em) {
	.site-menu-button {
		display: inline-flex;
	}

	.site-header__inner {
		gap: var(--site-space-2);
	}

	.site-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		display: none;
		padding: var(--site-space-2) var(--site-gutter) var(--site-space-4);
		background: var(--site-color-page);
		box-shadow: var(--site-shadow-header);
	}

	.site-header.is-menu-open .site-nav {
		display: block;
	}

	.site-nav__list {
		flex-direction: column;
		align-items: stretch;
	}

	.site-nav__link {
		width: 100%;
		font-size: var(--site-font-body);
	}

	.site-header__cta {
		padding-inline: var(--site-space-4);
	}

	.feature {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--site-space-5);
	}

	.feature:nth-child(even) .feature__media {
		order: 0;
	}

	.phones {
		flex-direction: column;
		align-items: center;
	}

	.steps {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--site-space-5);
	}

	.site-footer__inner {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 25em) {
	.site-logo img,
	.site-header.is-compact .site-logo img {
		height: var(--site-logo-height-compact);
	}

	.site-header__cta {
		padding-inline: var(--site-space-3);
	}

	.browser-frame__dot {
		display: none;
	}
}
