/* Double Friday (/double-friday/): scripts/landing/offer-pages/double-friday.mjs.
   Every rule is prefixed dbf- because page CSS is global on this origin.
   Five sections: the top, the sum, the work, the plans, the answers with the
   last button. The world is the brand book's: one saturated sky, citron and
   the glass D. */
.dbf-page {
	--dbf-sky: #1f5dc0;
	--dbf-sky-low: #2d6dcf;
	--dbf-lime: #e2ff52;
	--dbf-ink: #1d1d1f;
	--dbf-night: #0f0f10;
	--dbf-soft: #a9a9b2;
	overflow-x: clip;
}
.dbf-page h2 {
	font-size: clamp(38px, 5.2vw, 80px);
	line-height: 0.98;
	letter-spacing: -0.06em;
	font-weight: 500;
	text-wrap: balance;
}
.dbf-head {
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	gap: 24px 48px;
	align-items: end;
	margin-bottom: clamp(32px, 5vw, 64px);
}
.dbf-head p {
	font-size: 17px;
	line-height: 1.55;
	color: var(--muted);
	max-width: 44ch;
}
.dbf-fine {
	font-size: 13px;
	line-height: 1.55;
	color: var(--muted);
	max-width: 80ch;
}
.dbf-clock {
	font-size: 14px;
	line-height: 1.4;
	font-variant-numeric: tabular-nums;
	margin-top: 22px;
}
/* What the offer is, before anything else: its occasion and its one figure. */
.dbf-offer {
	font-size: clamp(16px, 1.45vw, 22px);
	line-height: 1.2;
	letter-spacing: -0.02em;
	font-weight: 500;
	margin-bottom: clamp(14px, 1.6vw, 24px);
}
/* The badge, one pill in two parts: "×2" on ink, then the old figure struck
   and the new one beside it on citron. */
.dbf-badge {
	display: inline-flex;
	align-items: stretch;
	overflow: hidden;
	margin-top: clamp(20px, 2.2vw, 30px);
	padding: 0;
	border-radius: 999px;
	background: var(--dbf-lime);
	color: var(--dbf-ink);
	font-size: clamp(18px, 1.6vw, 23px);
	line-height: 1;
	letter-spacing: -0.03em;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.dbf-badge b {
	font-weight: 600;
}
.dbf-badge s {
	color: #1d1d1f80;
	text-decoration-thickness: 1.5px;
}
.dbf-x2 {
	display: inline-flex;
	align-items: center;
	padding: 0.5em 0.7em 0.54em 0.9em;
	background: var(--dbf-ink);
	color: var(--dbf-lime);
	font-weight: 600;
	letter-spacing: -0.02em;
}
.dbf-badge-t {
	display: inline-flex;
	align-items: baseline;
	gap: 0.42em;
	padding: 0.5em 0.95em 0.54em 0.7em;
}

/* ── 1. The top: the sky, the two Ds, the name ── */
.dbf-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: flex;
	align-items: flex-end;
	/* The top's height and the page's side margin, named because the name's
	   size is worked out from them: the picture covers the top from its
	   right edge, so the glass D starts at 100vw - max(60.3vw, 1.074 x
	   height), and the name has to end before it at every window size. */
	--dbf-hh: min(calc(100svh - 72px), 880px, 62vw);
	--dbf-side: calc((100vw - min(var(--wrap), 100vw - 112px)) / 2);
	min-height: var(--dbf-hh);
	background: var(--dbf-sky);
	color: #fff;
}
.dbf-hero-art {
	position: absolute;
	inset: 0;
	z-index: -1;
}
.dbf-hero-art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: right center;
}
.dbf-hero-in {
	padding-block: clamp(48px, 7vw, 92px);
}
.dbf-hero h1 {
	font-size: clamp(
		64px,
		min(10.4vw, calc((100vw - max(60.3vw, 1.074 * var(--dbf-hh)) - var(--dbf-side) - 36px) / 3)),
		176px
	);
	line-height: 0.86;
	letter-spacing: -0.068em;
	font-weight: 500;
}
/* Under the name, in order of weight: the badge, one quiet sentence, the
   button with the counter beside it. */
.dbf-hero-lede {
	font-size: clamp(16px, 1.25vw, 19px);
	line-height: 1.4;
	color: #ffffffd1;
	max-width: 36ch;
	margin: 14px 0 clamp(26px, 3vw, 40px);
}
.dbf-hero-go {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px 24px;
}
.dbf-hero .dbf-hero-timer {
	padding-left: 0;
	border-left: 0;
	font-size: 14px;
	color: #ffffffb8;
}
.dbf-hero .dbf-hero-timer i {
	color: #ffffff99;
}

/* ── 2. The sum: the sheet, the glass, three ways to pay ── */
.dbf-sum {
	padding-block: clamp(72px, 9vw, 128px);
	background: #fff;
}
.dbf-sheet {
	position: relative;
	--gh: clamp(200px, 30vw, 410px);
	--gw: calc(var(--gh) * 0.76);
	touch-action: pan-y;
}
.dbf-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px 24px;
	padding-block: clamp(12px, 1.8vw, 26px);
	border-top: 1px solid var(--line);
}
.dbf-rows .dbf-row:last-child {
	border-bottom: 1px solid var(--line);
}
.dbf-k {
	font-size: clamp(15px, 1.35vw, 20px);
	color: var(--muted);
}
.dbf-v {
	display: flex;
	align-items: baseline;
	gap: 0.18em;
	font-size: clamp(52px, 10.4vw, 164px);
	line-height: 0.95;
	letter-spacing: -0.066em;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.dbf-v b {
	font-weight: 500;
}
/* Without the script: the normal figure small and struck, the double large. */
.dbf-v1 {
	font-size: 0.3em;
	letter-spacing: -0.03em;
	color: var(--dbf-soft);
}
.dbf-same .dbf-v1 {
	display: none;
}
/* With it: the page holds the normal year, the glass holds the double. */
.dbf-sheet.is-live > .dbf-rows .dbf-v1 {
	font-size: 1em;
	letter-spacing: inherit;
	color: inherit;
	text-decoration: none;
}
.dbf-sheet.is-live > .dbf-rows .dbf-v2,
.dbf-glass-in .dbf-v1 {
	display: none;
}
.dbf-sheet.is-live > .dbf-rows .dbf-same .dbf-v1 {
	display: inline;
}
.dbf-glass-in .dbf-same .dbf-v2 {
	display: inline;
}
.dbf-glass {
	position: absolute;
	left: 0;
	top: 0;
	width: var(--gw);
	height: var(--gh);
	border-radius: 14px calc(var(--gh) / 2) calc(var(--gh) / 2) 14px;
	pointer-events: none;
	display: none;
	will-change: transform;
}
.dbf-sheet.is-live .dbf-glass {
	display: block;
}
.dbf-glass-a {
	z-index: 2;
	overflow: hidden;
	background: var(--dbf-lime);
	transform: translate3d(var(--gx, 0px), var(--gy, 0px), 0);
	box-shadow:
		0 34px 60px -26px #5b6b0a66,
		0 6px 14px -6px #5b6b0a40;
}
/* The glass's own light: a soft sweep, a bright rim, a hint of spectrum. */
.dbf-glass-a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	background: linear-gradient(112deg, #fff0 28%, #ffffff75 44%, #fff0 60%);
	box-shadow:
		inset 0 0 0 1.5px #ffffffd9,
		inset 3px 0 0 #7fd9ff8c,
		inset -3px -2px 0 #ffb45c73,
		inset 0 -18px 40px -10px #b6d42b99;
}
.dbf-glass-in {
	position: absolute;
	left: 0;
	top: 0;
	width: var(--sw, 100vw);
	height: var(--sh, 100%);
	transform: translate3d(calc(var(--gx, 0px) * -1), calc(var(--gy, 0px) * -1), 0);
}
.dbf-glass-in .dbf-row,
.dbf-glass-in .dbf-rows .dbf-row:last-child {
	border-color: #1d1d1f29;
}
.dbf-glass-in .dbf-k {
	color: #1d1d1fb3;
}
/* The second D: clear glass, a step behind the first. */
.dbf-glass-b {
	z-index: 1;
	transform: translate3d(var(--bx, 0px), var(--by, 0px), 0);
	background: linear-gradient(120deg, #ffffff40, #d7ecff26);
	-webkit-backdrop-filter: saturate(1.5) brightness(1.04);
	backdrop-filter: saturate(1.5) brightness(1.04);
	box-shadow:
		inset 0 0 0 1.5px #fff,
		inset 3px 0 0 #7fd9ffb3,
		inset -3px 0 0 #ffb45c99,
		inset 0 3px 0 #c9b0ff80,
		0 30px 56px -28px #1d3f8a73;
}
@media (hover: hover) and (pointer: fine) {
	.dbf-sheet.is-live {
		cursor: none;
	}
}
.dbf-ways-title {
	margin: clamp(48px, 6vw, 84px) 0 22px;
	font-size: clamp(22px, 2.2vw, 30px);
	line-height: 1.1;
	letter-spacing: -0.045em;
	font-weight: 500;
}
.dbf-ways {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
	margin-bottom: 22px;
}
.dbf-ways article {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: clamp(20px, 2.2vw, 30px);
	border-radius: 20px;
	background: var(--paper);
	min-width: 0;
}
.dbf-ways h4 {
	font-size: 15px;
	font-weight: 500;
	letter-spacing: -0.01em;
	margin: 0 0 clamp(20px, 3.4vw, 48px);
}
.dbf-ways b {
	font-size: clamp(40px, 4.6vw, 68px);
	line-height: 0.95;
	letter-spacing: -0.06em;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}
.dbf-ways p {
	font-size: clamp(18px, 1.7vw, 24px);
	letter-spacing: -0.035em;
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
}
.dbf-ways small {
	font-size: 14px;
	color: var(--muted);
	margin-top: 8px;
}
.dbf-ways .dbf-way-on {
	background: var(--dbf-lime);
}
.dbf-ways .dbf-way-on small {
	color: #3d4517;
}

/* ── 3. The work: the counts, then a wall of finished pieces ── */
.dbf-work {
	background: var(--dbf-night);
	color: #f5f5f7;
	padding-block: clamp(72px, 9vw, 128px);
}
.dbf-work .dbf-head p {
	color: #b9b9c1;
}
.dbf-counts {
	list-style: none;
	margin: 0 0 clamp(28px, 4vw, 52px);
	padding: 0;
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 14px 24px;
}
.dbf-counts li {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding-top: 16px;
	border-top: 1px solid #ffffff2e;
	min-width: 0;
}
.dbf-counts b {
	font-size: clamp(30px, 3.5vw, 54px);
	line-height: 1;
	letter-spacing: -0.055em;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	color: var(--dbf-lime);
}
.dbf-counts span {
	font-size: 15px;
	color: #e3e3e8;
}
.dbf-counts small {
	font-size: 13px;
	color: #8d8d96;
	font-variant-numeric: tabular-nums;
}
.dbf-wall {
	column-count: 4;
	column-gap: 12px;
}
.dbf-wall figure {
	margin: 0 0 12px;
	break-inside: avoid;
	border-radius: 14px;
	overflow: hidden;
	background: #1b1b1d;
}
.dbf-wall img,
.dbf-wall video {
	display: block;
	width: 100%;
	height: auto;
}
.dbf-month {
	margin: clamp(24px, 3vw, 40px) 0 16px;
	font-size: clamp(17px, 1.5vw, 21px);
	line-height: 1.5;
	letter-spacing: -0.02em;
	color: #d6d6dc;
	max-width: 70ch;
}
.dbf-month b {
	font-weight: 500;
	color: #fff;
}
.dbf-work .dbf-fine {
	color: #8d8d96;
}

/* ── 4. The two plans ── */
.dbf-plans {
	padding-block: clamp(72px, 9vw, 128px);
	background: #fff;
	scroll-margin-top: 60px;
}
.dbf-plan {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: clamp(24px, 4vw, 72px);
	align-items: end;
	padding: clamp(24px, 3.4vw, 52px);
	border-radius: 24px;
	background: var(--dbf-night);
	color: #f5f5f7;
	margin-bottom: 22px;
}
.dbf-plan-main {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
}
.dbf-plan h3 {
	font-size: 20px;
	font-weight: 500;
	letter-spacing: -0.03em;
}
.dbf-plan-price {
	font-size: 17px;
	color: #b9b9c1;
}
.dbf-plan-price b {
	font-size: clamp(48px, 6vw, 92px);
	line-height: 0.95;
	letter-spacing: -0.06em;
	font-weight: 500;
	color: #fff;
	margin-right: 8px;
}
.dbf-plan-credits {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.35em;
	font-size: clamp(22px, 2.3vw, 32px);
	letter-spacing: -0.04em;
	line-height: 1.1;
}
.dbf-plan-credits b {
	font-weight: 500;
	background: var(--dbf-lime);
	color: var(--dbf-ink);
	padding: 0.04em 0.22em 0.08em;
	border-radius: 6px;
	font-variant-numeric: tabular-nums;
}
.dbf-plan-credits s {
	color: var(--dbf-soft);
	font-size: 0.72em;
	margin-left: 4px;
}
.dbf-plan ul {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 16px;
	line-height: 1.45;
}
.dbf-plan li {
	padding-block: 13px;
	border-top: 1px solid #ffffff24;
}
.dbf-plan li:last-child {
	border-bottom: 1px solid #ffffff24;
}
.dbf-plan .button {
	align-self: flex-start;
	margin-top: 14px;
}

/* ── 5. The last button, after the answers ── */
.dbf-end {
	background: var(--dbf-lime);
	color: var(--dbf-ink);
	padding-block: clamp(48px, 6vw, 84px);
}
.dbf-end-in {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 28px 48px;
	flex-wrap: wrap;
}
.dbf-page .dbf-end h2 {
	font-size: clamp(34px, 4.4vw, 64px);
	max-width: 16ch;
}
.dbf-end-go {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}
.dbf-end .dbf-clock {
	margin-top: 14px;
	color: #3d4517;
}

/* ── The bar that follows down the page ── */
.dbf-dock {
	position: fixed;
	left: 50%;
	bottom: max(16px, env(safe-area-inset-bottom, 0px));
	z-index: 20;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 18px;
	width: max-content;
	max-width: calc(100% - 32px);
	padding: 8px 8px 8px 20px;
	border-radius: 12px;
	background: #0f0f10f2;
	color: #fff;
	font-size: 14px;
	line-height: 1.35;
	box-shadow: 0 18px 44px -18px #0009;
}
.dbf-dock > p > b {
	font-weight: 500;
	color: var(--dbf-lime);
}
/* The counter in the bar: the time left, ticking. */
.dbf-timer {
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding-left: 18px;
	border-left: 1px solid #ffffff33;
	color: #b9b9c1;
	white-space: nowrap;
}
.dbf-timer-n {
	display: inline-flex;
	align-items: baseline;
	color: #fff;
	font-variant-numeric: tabular-nums;
}
.dbf-timer-n b {
	font-size: 17px;
	font-weight: 500;
	letter-spacing: -0.02em;
	min-width: 1.25em;
	text-align: right;
}
.dbf-timer-n i {
	font-style: normal;
	font-size: 12px;
	color: #8d8d96;
	margin: 0 7px 0 2px;
}
.dbf-timer-n i:last-child {
	margin-right: 0;
}
/* After the last day the buy buttons lead to the normal plans. */
.dbf-ended .dbf-dock {
	display: none;
}

@media (max-width: 1240px) {
	.dbf-hero {
		display: block;
		min-height: 0;
		background: var(--dbf-sky-low);
	}
	.dbf-hero h1 {
		font-size: clamp(72px, 12vw, 132px);
	}
	.dbf-hero-art {
		position: relative;
		display: block;
		z-index: 0;
	}
	.dbf-hero-art img {
		height: min(58svh, 520px);
		object-position: 40% center;
	}
	.dbf-hero-art::after {
		content: "";
		position: absolute;
		inset: auto 0 0;
		height: 46%;
		background: linear-gradient(#2d6dcf00, var(--dbf-sky-low));
	}
	.dbf-hero-in {
		position: relative;
		margin-top: -120px;
		padding-block: 0 44px;
	}
}
@media (max-width: 980px) {
	.dbf-head,
	.dbf-plan,
	.dbf-ways {
		grid-template-columns: 1fr;
	}
	.dbf-ways h4 {
		margin-bottom: 14px;
	}
	.dbf-counts {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.dbf-wall {
		column-count: 3;
	}
}
@media (max-width: 640px) {
	.dbf-page .wrap {
		width: calc(100% - 40px);
	}
	.dbf-row {
		flex-direction: column;
		align-items: flex-start;
	}
	.dbf-v {
		font-size: clamp(56px, 19vw, 96px);
	}
	.dbf-sheet {
		--gh: 250px;
	}
	.dbf-counts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.dbf-wall {
		column-count: 2;
		column-gap: 8px;
	}
	.dbf-wall figure {
		margin-bottom: 8px;
		border-radius: 10px;
	}
	.dbf-dock {
		width: calc(100% - 24px);
		justify-content: space-between;
		padding-left: 14px;
		font-size: 13px;
	}
	.dbf-dock p {
		min-width: 0;
	}
	.dbf-dock-more,
	.dbf-dock .dbf-timer [data-dbf-timer-label] {
		display: none;
	}
	.dbf-dock .dbf-timer {
		padding-left: 12px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.dbf-glass {
		will-change: auto;
	}
}
