/* FORMA site parts: the tokens, the menu bar and the footer. Loaded on every page, including the
   FORMA Videos pages, which bring their own styles for everything else. Breakpoints: tablet ≤1024px,
   phone ≤767px. */

/* ── Tokens ─────────────────────────────────────────────────────────── */
:root {
	--night: #0B0B0C;
	--night-deep: #060607;
	--panel: #141416;
	--line: #2C2C2F;
	--text: #EDEDEF;
	--dim: #9A9AA0;
	/* Buttons, links and small accents are ink, as in the app: color on FORMA means structure. On the
	   night background ink is the bright text color; on the light bands it is --light-accent. */
	--accent: #EDEDEF;
	--accent-hover: #FFFFFF;
	/* Gold has one job: membership (the members badge and the way in to members' videos). */
	--member: #F2C94C;
	--member-hover: #FFDD73;
	--center: #E05D44;
	--center-dark: #B8432E;
	--serif: "EB Garamond", Georgia, "Times New Roman", serif;
	--sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	--light-text: #111113;
	--light-dim: #4A4A50;
	--light-accent: #111113;
	--space: 1; /* Appearance → Site style: tighter .8, roomier 1.2 */
	/* The space between the menu and the start of a page's content, and between the end of the
	   content and the footer, on every page unless that page sets its own (Home and About open and
	   end in full-width bands; the 404, sign-in and Read in FORMA pages are centered blocks). The menu
	   bar has no edge, so the top reads from the logo, which ends 21px above the bar's bottom; the
	   bottom is about that much more, so the two look alike. */
	--page-start: 48px;
	--page-end: 68px;
}
@media (max-width: 767px) {
	:root { --page-start: 40px; --page-end: 60px; }
}

/* ── Pieces shared with the rest of the site ───────────────────────── */
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto !important; clip-path: none; display: block; width: auto; height: auto;
	left: 5px; top: 5px; z-index: 100000; padding: 12px 24px;
	background-color: #eee; color: #333; font-size: 1rem; line-height: normal;
}

.button {
	display: inline-block;
	padding: 15px 28px;
	border: 1px solid #3A3A3F;
	border-radius: 999px;
	font-family: var(--sans);
	font-weight: 600;
	font-size: 16px;
	line-height: 1.5;
	text-align: center;
	cursor: pointer;
}
.button--small { padding: 10px 18px; font-size: 14px; }
.button--ghost { color: var(--text); background-color: transparent; transition: border-color .2s, background-color .2s; }
.button--ghost:hover, .button--ghost:focus-visible { border-color: var(--accent); background-color: color-mix(in srgb, var(--accent) 8%, transparent); }
.button--main, .button--gold { color: var(--night); border-color: var(--accent); background-color: var(--accent); transition: opacity .2s; }
.button--main:hover, .button--main:focus-visible, .button--gold:hover, .button--gold:focus-visible { opacity: .88; }

/* ── Site menu ──────────────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 100; }
.site-nav { display: flex; justify-content: center; padding: 0 32px; background-color: var(--night); }
.site-nav__inner { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 1180px; height: 72px; }
.site-nav__logo { display: flex; align-items: center; gap: 9px; }
.site-nav__mark { width: 30px; height: 30px; }
.site-nav__wordmark { width: 126px; height: 27px; }
.site-nav__right { display: flex; align-items: center; gap: 24px; }

/* Over a picture at the top of the page (the homepage hero, the video library's and a playlist's
   header picture) the menu starts see-through and fills in over the first 160px of scrolling.
   Browsers without scroll-linked animation keep it solid. */
@keyframes forma-nav-fade { from { background-color: rgba(11, 11, 12, 0); } to { background-color: rgb(11, 11, 12); } }
@supports (animation-timeline: scroll()) {
	.home .site-nav, .fv-page:has(.fv-head-art) .site-nav {
		animation: forma-nav-fade linear both;
		animation-timeline: scroll(root block);
		animation-range: 0px 160px;
	}
}

/* ── Sign-up form (the homepage's two and the footer newsletter) ───── */
.signup {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-content: start;
	align-items: flex-start;
	gap: 10px;
	width: 100%;
	max-width: 560px;
}
.signup__input {
	flex: 1 1 240px;
	min-width: 0;
	height: 58px;
	padding: 0 20px;
	border: 1px solid #3A3A3F;
	border-radius: 14px;
	outline: none;
	background-color: #17171A;
	font-family: var(--sans);
	font-size: 16px;
	color: var(--text);
	transition: border-color .2s;
}
.signup__input::placeholder { color: #9DA5AE; }
.signup__input:focus { border-color: var(--accent); }
.signup__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 58px;
	padding: 0 30px;
	border: 0;
	border-radius: 14px;
	background-color: var(--accent);
	font-family: var(--sans);
	font-weight: 600;
	font-size: 16px;
	color: var(--night);
	white-space: nowrap;
	cursor: pointer;
	user-select: none;
	transition: background-color .2s, transform .2s;
}
.signup__submit:hover, .signup__submit:focus-visible { background-color: var(--accent-hover); transform: translate3d(0, -2px, 0); }
.signup__submit:disabled { cursor: default; }
.signup__trap { display: none !important; }
.signup__note { display: block; width: 100%; margin-top: 6px; font-family: var(--sans); font-size: 13px; color: #6B6B70; }
.signup__message {
	display: none;
	width: 100%;
	padding: 16px 20px;
	border-radius: 14px;
	font-family: var(--sans);
	font-size: 15px;
	text-align: left;
}
.signup__message--success { background-color: var(--accent); color: var(--night); }
.signup__message--error { background-color: #7A2A22; color: #FFFFFF; }
.signup.is-success .signup__message--success, .signup.is-error .signup__message--error { display: block; }
.signup__message:focus { outline: none; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer {
	/* The gap above the newsletter matches the side padding */
	padding: 32px 32px 40px;
	background-color: var(--night); /* the menu bar's color */
	font-family: var(--sans);
	color: var(--dim);
}

/* The newsletter: a panel across the top, its title in the serif */
.site-footer__news {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
	align-items: center;
	gap: 24px 56px;
	max-width: 1180px;
	margin: 0 auto 64px;
	padding: 40px 44px;
	border: 1px solid var(--line);
	border-radius: 20px;
	background-color: var(--panel);
}
.site-footer__news-copy { position: relative; }
.site-footer__news-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1.1; letter-spacing: -0.01em; color: var(--text); }
.site-footer__news-title em { font-style: italic; color: var(--accent); }
.site-footer__news-text { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--dim); }
.site-footer__form { position: relative; justify-self: end; max-width: 480px; }
.site-footer__form .signup__input, .site-footer__form .signup__submit { height: 52px; }
.site-footer__form .signup__input { flex-basis: 200px; background-color: var(--night); }
.site-footer__form .signup__submit { padding: 0 26px; font-size: 15px; }
.site-footer__form .signup__note { margin-top: 2px; font-size: 12px; }

/* Brand, two link columns, the app */
.site-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
	align-items: start;
	gap: 40px;
	max-width: 1180px;
	margin-inline: auto;
}
.site-footer__grid--no-apps { grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); }
.site-footer__logo { display: flex; align-items: center; gap: 11px; width: fit-content; margin-bottom: 8px; }
.site-footer__mark { width: 38px; height: 38px; }
.site-footer__wordmark { width: 159px; height: 34px; }
/* Set as in the app's home screen: EB Garamond semibold italic, a little narrower than the logo above it. */
.site-footer__tagline { max-width: 320px; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 17.5px; line-height: 1.3; color: var(--text); }

.site-footer__heading { margin: 4px 0 18px; font-family: var(--sans); font-weight: 600; font-size: 11px; line-height: 1.5; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text); }
.site-footer__list { display: grid; gap: 4px; }
/* Each link is a block a little taller than its text, so a thumb doesn't miss it. */
.site-footer__list a { position: relative; display: inline-block; padding-block: 4px; font-size: 15px; color: var(--dim); transition: color .2s; }
.site-footer__list a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 1px;
	height: 1px;
	background-color: var(--accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .25s;
}
.site-footer__list a:focus-visible { color: var(--text); }
.site-footer__list a:focus-visible::after { transform: scaleX(1); }
/* The underline slides in on hover only where there is a real pointer: on a phone, a tap that
   reveals something counts in Safari as "show the hover", and the link needs a second tap. */
@media (hover: hover) and (pointer: fine) {
	.site-footer__list a:hover { color: var(--text); }
	.site-footer__list a:hover::after { transform: scaleX(1); }
}

/* Store buttons, shaped like the stores' own badges, with no heading: on wider screens they start on
   the link columns' heading line and fill the column to the footer's edge; on phones they sit side
   by side across the full width */
.site-footer__stores { display: grid; gap: 12px; justify-items: stretch; }
.store {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-width: 0;
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-radius: 11px;
	color: var(--text);
	transition: color .2s, background-color .2s, border-color .2s;
}
.store__icon { width: 25px; height: 25px; flex: none; }
.store__text { display: grid; line-height: 1.15; }
.store__small { font-size: 12px; letter-spacing: 0.02em; color: var(--dim); white-space: nowrap; }
.store__name { font-weight: 600; font-size: 18px; white-space: nowrap; }
a.store:hover, a.store:focus-visible { color: var(--night); background-color: var(--accent); border-color: var(--accent); }
a.store:hover > *, a.store:focus-visible > * { opacity: 1; }
a.store:hover .store__small, a.store:focus-visible .store__small { color: var(--night); }
.store--soon { color: var(--dim); }

.social { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.social__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--dim);
	transition: all .3s;
}
.social__link svg { width: 19px; height: 19px; }
.social__link:hover, .social__link:focus-visible { color: var(--night); background-color: var(--accent); border-color: var(--accent); opacity: .9; }

/* The bottom line, under the app's badges A B C ✦ C′ B′ A′: copyright, links */
.site-footer__bottom {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	max-width: 1180px;
	margin: 56px auto 0;
	padding-top: 40px;
	border-top: 1px solid transparent;
}
.site-footer__bottom::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -14px;
	height: 28px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='208' height='28' viewBox='0 0 208 28'%3E%3Ccircle cx='14' cy='14' r='13' fill='%230B0B0C'/%3E%3Ccircle cx='14' cy='14' r='10.5' fill='%233F7CAC'/%3E%3Ctext x='14' y='18.6' text-anchor='middle' fill='%23fff' font-family='EB Garamond,Georgia,Times New Roman,serif' font-weight='700' font-size='13'%3EA%3C/text%3E%3Ccircle cx='44' cy='14' r='13' fill='%230B0B0C'/%3E%3Ccircle cx='44' cy='14' r='10.5' fill='%23C2557A'/%3E%3Ctext x='44' y='18.6' text-anchor='middle' fill='%23fff' font-family='EB Garamond,Georgia,Times New Roman,serif' font-weight='700' font-size='13'%3EB%3C/text%3E%3Ccircle cx='74' cy='14' r='13' fill='%230B0B0C'/%3E%3Ccircle cx='74' cy='14' r='10.5' fill='%236BA04F'/%3E%3Ctext x='74' y='18.6' text-anchor='middle' fill='%23fff' font-family='EB Garamond,Georgia,Times New Roman,serif' font-weight='700' font-size='13'%3EC%3C/text%3E%3Ccircle cx='104' cy='14' r='13' fill='%230B0B0C'/%3E%3Ccircle cx='104' cy='14' r='10.5' fill='%23E05D44'/%3E%3Cpath transform='translate%2898.5 8.5%29 scale%28.4583%29' fill='%23fff' d='M12 0C12.9 7.6 16.4 11.1 24 12 16.4 12.9 12.9 16.4 12 24 11.1 16.4 7.6 12.9 0 12 7.6 11.1 11.1 7.6 12 0Z'/%3E%3Ccircle cx='134' cy='14' r='13' fill='%230B0B0C'/%3E%3Ccircle cx='134' cy='14' r='10.5' fill='%236BA04F'/%3E%3Ctext x='134' y='18.6' text-anchor='middle' fill='%23fff' font-family='EB Garamond,Georgia,Times New Roman,serif' font-weight='700' font-size='12'%3EC%E2%80%B2%3C/text%3E%3Ccircle cx='164' cy='14' r='13' fill='%230B0B0C'/%3E%3Ccircle cx='164' cy='14' r='10.5' fill='%23C2557A'/%3E%3Ctext x='164' y='18.6' text-anchor='middle' fill='%23fff' font-family='EB Garamond,Georgia,Times New Roman,serif' font-weight='700' font-size='12'%3EB%E2%80%B2%3C/text%3E%3Ccircle cx='194' cy='14' r='13' fill='%230B0B0C'/%3E%3Ccircle cx='194' cy='14' r='10.5' fill='%233F7CAC'/%3E%3Ctext x='194' y='18.6' text-anchor='middle' fill='%23fff' font-family='EB Garamond,Georgia,Times New Roman,serif' font-weight='700' font-size='12'%3EA%E2%80%B2%3C/text%3E%3C/svg%3E") center / 208px 28px no-repeat,
		linear-gradient(90deg, transparent, var(--line) 12%, var(--line) 88%, transparent) center / 100% 1px no-repeat;
	pointer-events: none;
}
.site-footer__copy { font-family: var(--sans); font-size: 11px; color: var(--dim); letter-spacing: 0.12em; white-space: nowrap; }
.site-footer__links { display: flex; align-items: center; gap: 24px; font-size: 11px; line-height: 1.5; }
.site-footer__links a { white-space: nowrap; font-family: var(--sans); font-size: 11px; color: var(--dim); letter-spacing: 0.12em; text-transform: uppercase; transition: color .2s; }
.site-footer__links a:hover, .site-footer__links a:focus-visible { color: var(--text); }

/* The menu bar and footer reset only themselves (at zero specificity), so they look the same inside
   pages styled by something else. */
:where(.site-header, .site-footer), :where(.site-header, .site-footer) *, :where(.site-header, .site-footer) ::before, :where(.site-header, .site-footer) ::after { box-sizing: border-box; }
:where(.site-header, .site-footer) { font-family: var(--sans); line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
:where(.site-header, .site-footer) :is(p, ul, ol, li) { margin: 0; padding: 0; list-style: none; }
:where(.site-header, .site-footer) a { color: inherit; text-decoration: none; }
:where(.site-header, .site-footer) :is(img, svg) { display: block; max-width: 100%; height: auto; }

@media (max-width: 1024px) {
	.site-footer__news { grid-template-columns: 1fr; }
	.site-footer__form { justify-self: start; }
	.site-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.site-footer__grid--no-apps { grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); }
	.site-footer__grid:not(.site-footer__grid--no-apps) .site-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
	.site-nav { padding: 0 20px; }
	.signup__submit { width: 100%; }
	.signup__input { flex: 0 1 100%; }
	.site-footer { padding: 28px 20px 32px; }
	.site-footer__news { grid-template-columns: 1fr; margin-bottom: 48px; padding: 28px 22px; }
	.site-footer__news-title { font-size: 36px; }
	.site-footer__form { justify-self: stretch; }
	.site-footer__form .signup__input { flex: 0 1 100%; }
	.site-footer__form .signup__note { text-align: center; }
	.site-footer__grid, .site-footer__grid--no-apps { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
	.site-footer__brand, .site-footer__apps { grid-column: 1 / -1; }
	.site-footer__brand { display: flex; flex-direction: column; align-items: center; text-align: center; }
	.site-footer__brand .social { justify-content: center; }
	.site-footer__col { text-align: center; }
	.site-footer__stores { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); justify-items: stretch; gap: 10px; }
	.store { padding: 13px 10px; }
	.store__icon { width: 24px; height: 24px; }
	.store__small { font-size: 11.5px; }
	.store__name { font-size: 17px; }
	.site-footer__bottom { flex-wrap: nowrap; gap: 12px; }
	.site-footer__links { gap: 16px; }
}

/* The narrowest phones: the two store buttons tighten up to stay side by side */
@media (max-width: 360px) {
	.store { gap: 8px; padding: 12px 8px; }
	.store__icon { width: 20px; height: 20px; }
	.store__small { font-size: 10px; }
	.store__name { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
	.site-nav { animation: none !important; background-color: var(--night); }
	.site-header *, .site-footer * { transition: none !important; }
}
