/* ==========================================================================
   Speech AI page — extends site.css with audio clips, stats and the
   results table. Peach appears once: on our row in the results table.
   ========================================================================== */

:root {
	--fa: "Vazirmatn", "Geeza Pro", Tahoma, ui-sans-serif, sans-serif;
}

/* labels: one named kicker system for this page */
.sp-label {
	display: block;
	margin-bottom: 14px;
	font-size: 14px;
	color: var(--muted);
}

/* ---------- hero ---------- */
.sp-hero {
	padding: calc(76px + clamp(48px, 7vw, 104px)) 0 clamp(64px, 8vw, 112px);
}
.sp-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	gap: clamp(40px, 5vw, 72px);
	align-items: center;
}
.sp-hero__copy {
	display: grid;
	gap: 24px;
	justify-items: start;
}
.sp-hero .display {
	font-size: clamp(44px, 1.6rem + 3.6vw, 76px);
}
.sp-hero .kicker {
	color: var(--muted);
}
.sp-hero .kicker:hover {
	color: var(--ink);
}
.sp-hero .kicker .arr {
	transition: transform 0.45s var(--ease-out);
}
.sp-hero .kicker:hover .arr {
	transform: translateX(3px);
}
.sp-hero__note {
	font-size: 14px;
	color: var(--muted);
}
.sp-frame {
	margin: 0;
	padding: 12px 12px 14px;
}
.sp-frame img {
	width: 100%;
	border-radius: 10px;
	box-shadow: 0 0 0 1px var(--line);
}
.sp-frame figcaption {
	display: block;
	margin-top: 10px;
	padding-inline: 4px;
}
.browser__bar {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 2px 4px 12px;
}
.browser__bar i {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--mist);
}
.browser__url {
	margin-left: 8px;
	flex: 1;
	padding: 4px 10px;
	border-radius: 9999px;
	background: var(--mist);
	font-size: 12px;
	color: var(--muted);
}

/* ---------- key numbers ---------- */
.sp-band {
	border-block: 1px solid var(--line);
	padding-block: clamp(32px, 4vw, 48px);
}
.sp-stats {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 24px;
}
.sp-stats dt,
.sp-facts dt {
	font-size: 13px;
	color: var(--muted);
	margin-bottom: 6px;
}
.sp-stats dd {
	font-family: var(--serif);
	font-size: clamp(28px, 1.2rem + 1.4vw, 40px);
	line-height: 1.1;
	letter-spacing: -0.015em;
}

/* ---------- sections ---------- */
.sp-section {
	padding-block: var(--section);
}
.sp-section--fog {
	background: var(--fog);
}
.sp-section--tight {
	padding-top: 0;
}

/* ---------- audio clips ---------- */
.clips {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}
.clips--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}
.clip {
	display: grid;
	grid-template-rows: auto 1fr auto;
	gap: 20px;
	padding: 24px;
	border-radius: 24px;
	background: var(--mist);
}
.clip--tts {
	grid-template-rows: auto auto 1fr auto;
	gap: 14px;
	background: var(--paper);
	box-shadow: 0 0 0 1px var(--line);
}
.clip__top {
	display: flex;
	align-items: center;
	gap: 14px;
}
.play {
	flex: none;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 9999px;
	background: var(--ink);
	color: var(--paper);
	display: grid;
	place-items: center;
	cursor: pointer;
	transition: background-color 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.play:hover {
	background: #33363b;
}
.play:active {
	transform: scale(0.94);
}
.play svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}
.play .i-pause {
	display: none;
}
.play.is-playing,
.play.is-playing:hover {
	background: var(--sienna);
	color: var(--peach);
}
.play.is-playing .i-play {
	display: none;
}
.play.is-playing .i-pause {
	display: block;
}
.play--quiet {
	background: var(--paper);
	color: var(--ink);
	box-shadow: inset 0 0 0 1px #d6d7da;
}
.play--quiet:hover {
	background: var(--mist);
}
.clip__meta {
	flex: 1;
	min-width: 0;
	display: grid;
	gap: 8px;
}
.clip__bar {
	height: 4px;
	border-radius: 9999px;
	background: rgba(23, 25, 28, 0.08);
	overflow: hidden;
}
.clip__bar i {
	display: block;
	height: 100%;
	width: 0;
	background: var(--sienna);
}
.clip__text {
	font-family: var(--fa);
	font-size: 22px;
	line-height: 1.9;
	direction: rtl;
	text-align: right;
}
.clip__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}
.clip__foot .chip {
	margin-top: 0;
	background: var(--paper);
}
.clip--tts .clip__foot .chip {
	background: var(--mist);
}
.footnote {
	margin-top: 20px;
	max-width: 62em;
	font-size: 13px;
	line-height: 1.55;
	color: var(--muted);
}

/* ---------- feature notes ---------- */
.sp-feats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(24px, 4vw, 48px);
	margin-top: clamp(56px, 7vw, 88px);
}
.sp-feats > div {
	padding-top: 22px;
	border-top: 1px solid var(--line);
}
.sp-feats h3 {
	font-size: 22px;
	font-weight: 450;
	letter-spacing: -0.009em;
	line-height: 1.25;
	margin-bottom: 10px;
}
.sp-feats p {
	color: var(--muted);
}
.sp-feats .sp-label {
	margin-bottom: 10px;
}

/* ---------- tts facts ---------- */
.sp-facts {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	margin-top: 32px;
}
.sp-facts > div {
	padding-top: 16px;
	border-top: 1px solid var(--line);
}
.sp-facts dd {
	font-family: var(--serif);
	font-size: 24px;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

/* ---------- results table ---------- */
.sp-table {
	padding: 0;
	overflow-x: auto;
}
.sp-table table {
	width: 100%;
	min-width: 680px;
	border-collapse: collapse;
}
.sp-table th,
.sp-table td {
	padding: 16px 22px;
	text-align: left;
	border-bottom: 1px solid var(--line);
	vertical-align: baseline;
	font-size: 16px;
}
.sp-table th {
	font-size: 13px;
	font-weight: 400;
	color: var(--muted);
	padding-block: 14px;
}
.sp-table tr:last-child td {
	border-bottom: 0;
}
.sp-table td small {
	display: block;
	margin-top: 2px;
	font-size: 13px;
	color: var(--muted);
}
.sp-table .num {
	font-family: var(--serif);
	font-size: 22px;
	letter-spacing: -0.01em;
	font-variant-numeric: proportional-nums;
	white-space: nowrap;
}
.sp-table .na {
	color: var(--muted);
}
.sp-table tr.ours td {
	background: var(--peach);
	color: var(--sienna);
}
.sp-table tr.ours td small {
	color: var(--sienna);
	opacity: 0.85;
}

/* ---------- uses ---------- */
.uses {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: clamp(32px, 6vw, 96px);
}
.uses li {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	gap: 24px;
	padding: 24px 0;
	border-top: 1px solid var(--line);
}
.uses h3 {
	font-family: var(--serif);
	font-weight: 400;
	font-size: 24px;
	line-height: 1.2;
	letter-spacing: -0.012em;
}
.uses p {
	color: var(--muted);
	font-size: 16px;
}

/* ---------- open models ---------- */
.sp-open {
	background: var(--mist);
	border-radius: 24px;
	padding: clamp(32px, 5vw, 72px);
}
.sp-open__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(32px, 5vw, 72px);
	margin-top: clamp(32px, 4vw, 48px);
}
.sp-open__item {
	padding-top: 24px;
	border-top: 1px solid #dcdde0;
}
.sp-open__item h3 {
	font-family: var(--serif);
	font-weight: 400;
	font-size: 32px;
	line-height: 1.15;
	letter-spacing: -0.015em;
	margin-bottom: 10px;
}
.sp-open__item p {
	color: var(--muted);
	max-width: 30em;
}
.sp-open__item .btn-row {
	margin: 22px 0 14px;
}
.sp-license {
	font-size: 13px;
	color: var(--muted);
}

/* ---------- about ---------- */
.sp-about {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: clamp(32px, 5vw, 64px);
	align-items: center;
}
.sp-about__photo {
	width: 220px;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 12px;
}
.sp-about .person__role {
	margin-bottom: 14px;
}
.sp-about__bio {
	max-width: 40em;
	font-size: 17px;
}
.sp-about__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 28px;
	margin-top: 18px;
}
.sp-credits {
	max-width: 70em;
	padding-bottom: 24px;
	font-size: 13px;
	color: var(--muted);
}

/* ---------- reveal (only when JS has claimed motion) ---------- */
html.sp-motion [data-reveal] {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out);
}
html.sp-motion [data-reveal].is-in {
	opacity: 1;
	transform: none;
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
	.sp-hero__grid {
		grid-template-columns: 1fr;
	}
	.clips--3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.sp-stats {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		row-gap: 28px;
	}
	.uses {
		grid-template-columns: 1fr;
	}
}
@media (max-width: 760px) {
	.sp-hero {
		padding-top: calc(68px + 40px);
	}
	.sp-hero .btn-row {
		width: 100%;
		flex-direction: column;
		align-items: stretch;
	}
	.clips,
	.clips--3,
	.sp-feats,
	.sp-open__grid {
		grid-template-columns: 1fr;
	}
	.clip {
		padding: 20px;
	}
	.clip__text {
		font-size: 20px;
	}
	.sp-stats,
	.sp-facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.uses li {
		grid-template-columns: 1fr;
		gap: 6px;
	}
	.sp-about {
		grid-template-columns: 1fr;
	}
	.sp-about__photo {
		width: 160px;
	}
}
