/* ==========================================================================
   Sections — hero, device, sticky phone, install, paper stats, CTA
   ========================================================================== */

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

.hero {
	position: relative;
	padding-block: clamp(7rem, 16vh, 11rem) clamp(2rem, 5vh, 4rem);
	overflow: hidden;
}

/* Ambient backdrop: a faint coordinate grid plus one amber glow behind the
   device, so the dark has depth without a gradient wash. */
.hero__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.hero__grid {
	position: absolute;
	inset: -10% -10% 0;
	background-image:
		linear-gradient(to right, var(--hair-soft) 1px, transparent 1px),
		linear-gradient(to bottom, var(--hair-soft) 1px, transparent 1px);
	background-size: 84px 84px;
	mask-image: radial-gradient(120% 75% at 22% 18%, #000 0%, transparent 72%);
	opacity: 0.55;
}

.hero__glow {
	position: absolute;
	top: 6%;
	right: -6%;
	width: 46rem;
	height: 46rem;
	border-radius: 50%;
	background: radial-gradient(circle, color-mix(in srgb, var(--amber) 16%, transparent), transparent 62%);
	filter: blur(30px);
	animation: glow-breathe 9s var(--ease-io) infinite;
}

@keyframes glow-breathe {
	0%,
	100% {
		opacity: 0.75;
		scale: 1;
	}
	50% {
		opacity: 1;
		scale: 1.06;
	}
}

.hero__inner {
	position: relative;
	z-index: 1;
	display: grid;
	gap: clamp(2.5rem, 5vw, 4rem);
	align-items: center;
}

@media (min-width: 1000px) {
	.hero__inner {
		grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
	}
}

.hero__title {
	/* Sized to the copy column, not the viewport, so each written line
	   stays one rendered line. */
	font-size: clamp(2.35rem, 4.5vw, 4.6rem);
	font-variation-settings: "wdth" 122;
	font-weight: 800;
	line-height: 0.9;
	letter-spacing: -0.035em;
	text-wrap: initial;
}

.hero__lede {
	margin-top: clamp(1.5rem, 3vw, 2rem);
	max-width: 44ch;
	color: var(--text-2);
	font-size: var(--fs-lede);
	line-height: 1.55;
}

.hero__proof {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.75rem;
	margin-top: clamp(2rem, 4vw, 2.75rem);
	padding-top: 1.5rem;
	border-top: 1px solid var(--hair-soft);
	color: var(--text-3);
	font-family: var(--mono);
	font-size: var(--fs-mono);
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.hero__proof b {
	color: var(--paper);
	font-weight: 500;
}

/* The device, drawn rather than photographed: a dongle seated in the port. */
.device {
	position: relative;
	width: 100%;
	max-width: 36rem;
	margin-inline: auto;
}

.device__svg {
	width: 100%;
	height: auto;
	overflow: visible;
}

.device__shell {
	fill: url(#shellGrad);
	stroke: #3d4b4b;
	stroke-width: 1;
}

.device__face {
	fill: #263433;
	stroke: #3a4847;
	stroke-width: 1;
}

.device__pin {
	fill: #8a9897;
}

.device__socket {
	fill: #0a1312;
	stroke: #2f3f3d;
	stroke-width: 1.5;
}

.device__led {
	fill: var(--amber);
	animation: led-blink 2.4s steps(1, end) infinite;
}

@keyframes led-blink {
	0%,
	55% {
		opacity: 1;
	}
	56%,
	100% {
		opacity: 0.18;
	}
}

.device__led--net {
	fill: var(--signal);
	animation-delay: 0.8s;
}

.device__wave {
	fill: none;
	stroke: var(--amber);
	stroke-width: 1.5;
	stroke-linecap: round;
	opacity: 0;
	animation: wave-out 3s var(--ease-io) infinite;
}

.device__wave:nth-of-type(2) {
	animation-delay: 0.6s;
}

.device__wave:nth-of-type(3) {
	animation-delay: 1.2s;
}

@keyframes wave-out {
	0% {
		opacity: 0;
		scale: 0.6;
	}
	25% {
		opacity: 0.85;
	}
	100% {
		opacity: 0;
		scale: 1.35;
	}
}

.device__label {
	fill: var(--text-2);
	font-family: var(--mono);
	font-size: 9px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.device__leader {
	stroke: var(--hair);
	stroke-width: 1;
	fill: none;
}

.device__plate {
	fill: var(--amber);
}

.device__plate-text {
	fill: var(--ink);
	font-family: var(--display);
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   What the port knows
   -------------------------------------------------------------------------- */

.knows__head {
	display: grid;
	gap: clamp(1.25rem, 3vw, 2.5rem);
	align-items: end;
	margin-bottom: clamp(2.25rem, 4vw, 3.25rem);
}

@media (min-width: 900px) {
	.knows__head {
		grid-template-columns: 1fr 26rem;
	}
}

/* --------------------------------------------------------------------------
   The app — sticky phone against a scrolling column of steps
   -------------------------------------------------------------------------- */

.app {
	position: relative;
	background: linear-gradient(180deg, var(--ink), var(--ink-2) 40%, var(--ink));
}

.app__layout {
	display: grid;
	gap: clamp(2.5rem, 5vw, 4rem);
}

@media (min-width: 1000px) {
	.app__layout {
		grid-template-columns: 0.92fr 1.08fr;
		align-items: start;
	}

	.app__stage {
		position: sticky;
		top: calc(50vh - min(320px, 78vw) * 19.2 / 9 / 2);
	}
}

.app__stage {
	display: grid;
	justify-items: center;
	gap: 1.25rem;
}

/* Step dots under the phone double as controls. */
.app__dots {
	display: flex;
	gap: 0.5rem;
}

.app__dot {
	width: 2.25rem;
	height: 2px;
	padding: 0;
	border: 0;
	background: var(--hair);
	cursor: pointer;
	transition: background 0.35s var(--ease);
}

.app__dot[aria-current="true"] {
	background: var(--amber);
}

.app__steps {
	display: grid;
	gap: 0;
}

.app__step {
	padding-block: clamp(2.5rem, 7vh, 5rem);
	border-bottom: 1px solid var(--hair-soft);
	transition: opacity 0.5s var(--ease);
}

.app__step:last-child {
	border-bottom: 0;
}

@media (min-width: 1000px) {
	.app__step {
		min-height: 62vh;
		display: flex;
		flex-direction: column;
		justify-content: center;
		opacity: 0.38;
	}

	.app__step.is-current {
		opacity: 1;
	}
}

.app__step-label {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1rem;
	color: var(--amber);
	font-family: var(--mono);
	font-size: var(--fs-mono);
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.app__step-label::before {
	content: "";
	width: 1.75rem;
	height: 1px;
	background: currentColor;
}

.app__step-title {
	font-size: clamp(1.5rem, 2.8vw, 2.25rem);
}

.app__step-body {
	margin-top: 1.1rem;
	max-width: 44ch;
	color: var(--text-2);
	line-height: 1.6;
}

.app__step-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 1.5rem 0 0;
	padding: 0;
	list-style: none;
}

.app__step-meta li {
	padding: 0.35rem 0.6rem;
	border: 1px solid var(--hair);
	color: var(--text-3);
	font-family: var(--mono);
	font-size: 0.5625rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Install — a genuine three-step sequence, so it is numbered
   -------------------------------------------------------------------------- */

.install__grid {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
	counter-reset: step;
}

.step {
	position: relative;
	padding-top: 2.75rem;
	border-top: 1px solid var(--hair);
}

.step::before {
	counter-increment: step;
	content: counter(step, decimal-leading-zero);
	position: absolute;
	top: 1rem;
	left: 0;
	color: var(--amber);
	font-family: var(--mono);
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.1em;
}

.step__clock {
	position: absolute;
	top: 1rem;
	right: 0;
	color: var(--text-3);
	font-family: var(--mono);
	font-size: 0.5625rem;
	letter-spacing: 0.1em;
}

.step__title {
	font-size: 1.3125rem;
	font-variation-settings: "wdth" 112;
}

.step__body {
	margin-top: 0.85rem;
	color: var(--text-2);
	font-size: 0.9375rem;
	line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Chart-paper block — tachograph stock, the one light band on the page
   -------------------------------------------------------------------------- */

.paper {
	position: relative;
	overflow: hidden;
	background: var(--paper);
	color: var(--paper-ink);
	/* Radial hairlines, like the speed rings on a tachograph chart disc. */
	background-image:
		repeating-radial-gradient(circle at 12% 120%, transparent 0 46px, rgba(26, 21, 18, 0.09) 46px 47px),
		repeating-linear-gradient(90deg, transparent 0 63px, rgba(26, 21, 18, 0.055) 63px 64px);
}

.paper__inner {
	position: relative;
	z-index: 1;
}

.paper .stamp {
	color: color-mix(in srgb, var(--paper-ink) 55%, transparent);
}

.paper .stamp__time {
	color: #0f6b78;
}

.paper .stamp__event {
	color: #a8541a;
}

.paper__title {
	max-width: 24ch;
	color: var(--paper-ink);
}

.paper__lede {
	max-width: 42ch;
	margin-top: 1.25rem;
	color: color-mix(in srgb, var(--paper-ink) 72%, transparent);
	font-size: var(--fs-lede);
	line-height: 1.55;
}

.paper__head {
	display: grid;
	gap: clamp(1.5rem, 3vw, 2.5rem);
	align-items: end;
	margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

@media (min-width: 900px) {
	.paper__head {
		grid-template-columns: 1fr 24rem;
	}
}

.stats {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
	gap: 0;
	border-top: 1px solid rgba(26, 21, 18, 0.22);
}

.stat {
	padding: clamp(1.25rem, 2.5vw, 1.75rem) clamp(1rem, 2vw, 1.5rem) clamp(1.25rem, 2.5vw, 1.75rem) 0;
	border-bottom: 1px solid rgba(26, 21, 18, 0.22);
	border-right: 1px solid rgba(26, 21, 18, 0.22);
}

.stat:last-child {
	border-right: 0;
}

.stat__num {
	display: flex;
	align-items: baseline;
	gap: 0.15rem;
	font-family: var(--display);
	font-variation-settings: "wdth" 120;
	font-weight: 800;
	font-size: clamp(2.5rem, 5.5vw, 4rem);
	line-height: 0.88;
	letter-spacing: -0.04em;
	font-variant-numeric: tabular-nums;
}

.stat__suffix {
	font-size: 0.45em;
	letter-spacing: -0.01em;
}

.stat__label {
	margin-top: 0.85rem;
	max-width: 22ch;
	color: color-mix(in srgb, var(--paper-ink) 72%, transparent);
	font-size: 0.9375rem;
	line-height: 1.45;
}

.paper__foot {
	margin-top: clamp(1.75rem, 3vw, 2.5rem);
	color: color-mix(in srgb, var(--paper-ink) 55%, transparent);
	font-family: var(--mono);
	font-size: 0.5625rem;
	letter-spacing: 0.08em;
	line-height: 1.6;
	text-transform: uppercase;
	max-width: 70ch;
}

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

.tail {
	position: relative;
	overflow: hidden;
	border-top: 1px solid var(--hair-soft);
}

.tail__route {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.tail__route path {
	fill: none;
	stroke: color-mix(in srgb, var(--amber) 28%, transparent);
	stroke-width: 1.25;
}

.tail__inner {
	position: relative;
	z-index: 1;
	display: grid;
	gap: clamp(1.75rem, 4vw, 3rem);
	align-items: end;
}

@media (min-width: 900px) {
	.tail__inner {
		grid-template-columns: 1fr auto;
	}
}

.tail__title {
	font-size: clamp(2rem, 5vw, 4rem);
	max-width: 22ch;
}

.tail__note {
	margin-top: 1.25rem;
	max-width: 40ch;
	color: var(--text-2);
}
