/* Arccos App Demo landing page.
   Brand values from arccosgolf/arccos-theme (config/settings_data.json), matching the
   AI Strategy demo page. Phone frame proportions are the AI Strategy page's iPhone frame
   (428x899, 13px bezel, 70px outer radius). */

@font-face {
	font-family: 'Antonio';
	src: url('/demo/fonts/antonio.woff2') format('woff2');
	font-weight: 100 700;
	font-display: swap;
}
@font-face {
	font-family: 'Montserrat';
	src: url('/demo/fonts/montserrat.woff2') format('woff2');
	font-weight: 100 900;
	font-display: swap;
}

:root {
	--text: #3d3f44;
	--muted: #6b6d72;
	--bg: #ffffff;
	--border: #e2e1dc;
	--field-bg: #f2f2f2;
	--accent: #252628;
	--accent-text: #ffffff;
	--green: #56c271;
	--spring-ease: cubic-bezier(0.5, 1.5, 0.5, 1);
	--phone-scale: 0.8;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: 'Montserrat', system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.site-header {
	padding: 20px 32px;
	border-bottom: 1px solid var(--border);
}
.site-header__logo {
	display: block;
	height: 22px;
	width: auto;
}

.demo-layout {
	max-width: 1200px;
	margin: 0 auto;
	padding: 32px 16px 48px;
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.eyebrow {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--green);
}
h1 {
	margin: 0 0 12px;
	font-size: clamp(28px, 4vw, 42px);
	line-height: 1.12;
	font-weight: 700;
	color: var(--accent);
}
.lede {
	margin: 0 0 24px;
	font-size: 16px;
	line-height: 1.55;
	max-width: 46ch;
}

.live-banner {
	margin: 0 0 20px;
	padding: 12px 14px;
	border-radius: 10px;
	background: #fff6e5;
	border: 1px solid #f2d08a;
	font-size: 13px;
	line-height: 1.5;
}

.picker {
	display: flex;
	flex-direction: column;
	gap: 18px;
	max-width: 460px;
}
.picker__group {
	margin: 0;
	padding: 0;
	border: 0;
}
.picker__group legend {
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--accent);
}

.segmented {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 4px;
	padding: 4px;
	border-radius: 12px;
	background: var(--field-bg);
}
.segmented label {
	position: relative;
	cursor: pointer;
}
.segmented input {
	position: absolute;
	opacity: 0;
	inset: 0;
	margin: 0;
	cursor: pointer;
}
.segmented span {
	display: block;
	padding: 11px 6px;
	border-radius: 9px;
	text-align: center;
	font-size: 15px;
	font-weight: 600;
	color: var(--muted);
	transition:
		background 0.15s,
		color 0.15s,
		box-shadow 0.15s;
}
.segmented input:checked + span {
	background: #ffffff;
	color: var(--accent);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.segmented input:focus-visible + span {
	outline: 2px solid var(--green);
	outline-offset: 1px;
}

.persona-card {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 16px;
	border: 1px solid var(--border);
	border-radius: 14px;
}
.persona-card__avatar {
	flex: 0 0 48px;
	height: 48px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--accent);
	color: #fff;
	font-weight: 700;
	font-size: 16px;
}
.persona-card__name {
	margin: 0 0 2px;
	font-size: 17px;
	font-weight: 700;
	color: var(--accent);
}
.persona-card__meta {
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--green);
}
.persona-card__story {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
}

.cta {
	appearance: none;
	border: 0;
	border-radius: 999px;
	padding: 15px 24px;
	background: var(--accent);
	color: var(--accent-text);
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
}
.cta:hover {
	background: #000;
}
.cta:focus-visible {
	outline: 3px solid var(--green);
	outline-offset: 2px;
}
.fineprint {
	margin: -6px 0 0;
	min-height: 1.2em;
	font-size: 12px;
	color: var(--muted);
}

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

#phone-stage-section {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	height: calc(899px * var(--phone-scale));
}

.iphone-frame {
	position: relative;
	flex: 0 0 auto;
	width: 428px;
	height: 899px;
	padding: 13px;
	background: linear-gradient(160deg, #3a3b3d, #111214 45%, #3a3b3d);
	border-radius: 70px;
	box-shadow:
		0 0 0 2px #050505,
		0 30px 70px rgba(0, 0, 0, 0.35);
	transform: scale(var(--phone-scale));
	transform-origin: top center;
}
.iphone-frame__side-btn {
	position: absolute;
	width: 4px;
	background: #2a2b2d;
	border-radius: 2px;
}
.iphone-frame__side-btn--mute {
	left: -4px;
	top: 150px;
	height: 32px;
}
.iphone-frame__side-btn--vol-up {
	left: -4px;
	top: 210px;
	height: 62px;
}
.iphone-frame__side-btn--vol-down {
	left: -4px;
	top: 286px;
	height: 62px;
}
.iphone-frame__side-btn--power {
	right: -4px;
	top: 240px;
	height: 98px;
}

.iphone-frame__screen {
	position: relative;
	width: 100%;
	height: 100%;
	border-radius: 57px;
	overflow: hidden;
	background: #000;
	display: flex;
	flex-direction: column;
	/* Keep the app's own dark theme from being affected by the page. */
	color-scheme: dark;
}

.status-bar {
	position: relative;
	flex: 0 0 54px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 30px 0 44px;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
}
.status-bar__icons {
	display: flex;
	gap: 6px;
	align-items: center;
}
.status-bar__icons svg {
	fill: currentColor;
}
.iphone-frame__dynamic-island {
	position: absolute;
	left: 50%;
	top: 11px;
	width: 125px;
	height: 37px;
	transform: translateX(-50%);
	border-radius: 20px;
	background: #000;
}

.app-viewport {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
}
.app-viewport iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	background: #000;
}
.app-placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	color: rgba(255, 255, 255, 0.7);
	font-size: 15px;
	text-align: center;
	padding: 24px;
}
.app-placeholder p {
	margin: 0;
}

.app-viewport iframe[hidden],
.start-round[hidden] {
	display: none;
}

/* ---------- Native tab bar (AGTabBarController, iOS 6.44.0) ----------
   UITabBarAppearance.configureWithOpaqueBackground(), background DarkGrey #252628,
   selected tint #FFFFFF, unselected MG_3 #D1D6DA, shadow (0,-2) r7 a0.22, icons redrawn
   at 28x28pt, system label font (~10pt medium), standard 49pt bar. */
.tab-bar {
	position: relative;
	z-index: 1;
	flex: 0 0 49px;
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	background: #252628;
	box-shadow: 0 -2px 7px rgba(0, 0, 0, 0.22);
}
.tab-bar[hidden] {
	display: none;
}
.tab-bar__item {
	appearance: none;
	border: 0;
	background: none;
	padding: 5px 0 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	color: #d1d6da;
	cursor: pointer;
	font-family: -apple-system, 'SF Pro Text', system-ui, sans-serif;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.01em;
}
.tab-bar__item.is-active {
	color: #ffffff;
}
.tab-bar__icon {
	width: 28px;
	height: 28px;
	background: currentColor;
	-webkit-mask: var(--icon-off) center / contain no-repeat;
	mask: var(--icon-off) center / contain no-repeat;
}
.tab-bar__item.is-active .tab-bar__icon {
	-webkit-mask-image: var(--icon-on);
	mask-image: var(--icon-on);
}
.tab-bar__item:focus-visible {
	outline: 2px solid #56c271;
	outline-offset: -4px;
	border-radius: 8px;
}

/* ---------- Start Round (demo stand-in) ----------
   Header styling follows AGStartRoundViewController (black, Montserrat SemiBold 20 white,
   24pt below the safe area, 16pt sides); the body is the demo's call to action. */
.start-round {
	position: absolute;
	inset: 0;
	background: #000;
	color: #fff;
	display: flex;
	align-items: center;
	padding: 24px 16px;
}
.start-round__body {
	width: 100%;
	text-align: center;
}
.start-round__eyebrow {
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #56c271;
}
.start-round h2 {
	margin: 0 0 14px;
	font-size: 30px;
	font-weight: 700;
}
.start-round p {
	margin: 0 auto 32px;
	max-width: 30ch;
	font-size: 15px;
	line-height: 1.5;
	color: #b2bec6;
}
.start-round__cta {
	display: block;
	padding: 20px 24px;
	border-radius: 999px;
	background: #56c271;
	color: #0b1a10;
	font-size: 18px;
	font-weight: 700;
	text-decoration: none;
}
.start-round__cta:hover {
	background: #6bd184;
}
.start-round__cta--ghost {
	margin-top: 12px;
	background: transparent;
	color: #fff;
	box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.6);
}
.start-round__cta--ghost:hover {
	background: rgba(255, 255, 255, 0.1);
	box-shadow: inset 0 0 0 1.5px #fff;
}
.start-round__cta:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

/* iOS draws the opaque tab bar colour under the home indicator, so the strip matches the
   bar while the tabs are showing. */
.home-indicator {
	flex: 0 0 34px;
	position: relative;
	background: #000;
}
.tab-bar:not([hidden]) + .home-indicator {
	background: #252628;
}
.home-indicator::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 21px;
	width: 134px;
	height: 5px;
	border-radius: 3px;
	background: #fff;
	transform: translateX(-50%);
}

/* --phone-scale is set by main.js from the viewport (CSS can't divide a length by a
   length in every browser yet): fit the height on desktop, the width (16px gutters) on
   phones. */

/* Desktop: 50/50 split, copy left, phone right, like the AI Strategy page. */
@media (min-width: 960px) {
	.demo-layout {
		flex-direction: row;
		align-items: flex-start;
		padding-top: 48px;
		gap: 48px;
	}
	.demo-layout__left,
	#phone-stage-section {
		flex: 1 1 50%;
	}
	.demo-layout__left {
		padding-top: 24px;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.iphone-frame {
		animation: phone-in 0.5s var(--spring-ease) both;
	}
	@keyframes phone-in {
		from {
			opacity: 0;
			transform: scale(calc(var(--phone-scale) * 0.94)) translateY(10px);
		}
	}
}
