/*
 * Oryx demo home page.
 *
 * A live booking form as the hero, the eight demos as an index,
 * a ledger of what is included and a dark closing band.
 */

.oryx-demo-home {
	--ox-accent: #b91c1c;
	--ox-stage: #f4f2ee;
	--ox-stage-ink: #141414;
	background: #fff;
}

.oryx-demo-home .wp-block-columns {
	margin-bottom: 0;
}

.oryx-demo-home .wp-block-column > * {
	margin-block: 0;
}

/* Section headings */

.ox-h2 {
	margin: 0;
	color: #141414;
	font-family: var(--ox-serif);
	font-size: clamp(40px, 5.4vw, 68px);
	font-weight: 400;
	line-height: 0.98;
	letter-spacing: -0.01em;
}

.ox-h2 em {
	font-style: italic;
	color: rgb(20 20 20 / 62%);
}

.oryx-demo-home .wp-block-column > .ox-meta {
	margin-bottom: 22px;
}

.oryx-demo-home .wp-block-column > .ox-lead + .ox-actions {
	margin-top: 28px;
}

.oryx-demo-home .ox-spec__intro > .ox-lead {
	margin-top: 24px;
}

/* Buttons */

.ox-actions {
	gap: 10px;
}

.oryx-demo-home .ox-actions .wp-block-button.ox-btn .wp-block-button__link {
	display: inline-flex;
	gap: 10px;
	align-items: center;
	min-height: 50px;
	padding: 0 24px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	border: 1px solid transparent;
	border-radius: 999px;
	box-shadow: none;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.oryx-demo-home .ox-actions .wp-block-button.ox-btn--solid .wp-block-button__link {
	color: #fff;
	background: #141414;
}

.oryx-demo-home .ox-actions .wp-block-button.ox-btn--solid .wp-block-button__link:hover,
.oryx-demo-home .ox-actions .wp-block-button.ox-btn--solid .wp-block-button__link:focus-visible {
	color: #fff;
	background: #000;
}

.oryx-demo-home .ox-actions .wp-block-button.ox-btn--quiet .wp-block-button__link {
	color: #141414;
	background: transparent;
	border-color: rgb(20 20 20 / 18%);
}

.oryx-demo-home .ox-actions .wp-block-button.ox-btn--quiet .wp-block-button__link:hover,
.oryx-demo-home .ox-actions .wp-block-button.ox-btn--quiet .wp-block-button__link:focus-visible {
	color: #141414;
	border-color: #141414;
}

.oryx-demo-home .ox-actions .wp-block-button.ox-btn--light .wp-block-button__link {
	color: #141414;
	background: #f5f3ef;
}

.oryx-demo-home .ox-actions .wp-block-button.ox-btn--light .wp-block-button__link:hover,
.oryx-demo-home .ox-actions .wp-block-button.ox-btn--light .wp-block-button__link:focus-visible {
	color: #141414;
	background: #fff;
}

.oryx-demo-home .ox-actions .wp-block-button.ox-btn--solid .wp-block-button__link::after,
.oryx-demo-home .ox-actions .wp-block-button.ox-btn--light .wp-block-button__link::after {
	content: "\2192";
	font-weight: 400;
	transition: transform 0.2s;
}

.oryx-demo-home .ox-actions .wp-block-button.ox-btn .wp-block-button__link:hover::after {
	transform: translateX(3px);
}

/* Live form */

.ox-home-stage.ox-stage--overlap {
	background-size: 100% calc(100% - 320px), 100% 100%;
}

.ox-try {
	position: relative;
	z-index: 1;
}

.ox-try__bar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: 18px;
	padding-top: 22px;
	border-top: 1px solid rgb(20 20 20 / 12%);
}

.ox-try__label {
	display: inline-flex;
	gap: 10px;
	align-items: center;
	margin: 0;
	color: #141414;
	font-size: 14px;
	font-weight: 500;
}

.ox-try__dot {
	position: relative;
	width: 8px;
	height: 8px;
	background: #16a34a;
	border-radius: 50%;
}

.ox-try__dot::after {
	content: "";
	position: absolute;
	inset: -4px;
	border: 1px solid rgb(22 163 74 / 50%);
	border-radius: 50%;
	animation: ox-pulse 2.4s ease-out infinite;
}

@keyframes ox-pulse {

	0% {
		opacity: 1;
		transform: scale(0.6);
	}

	100% {
		opacity: 0;
		transform: scale(1.6);
	}
}

.ox-try__tabs {
	display: flex;
	gap: 4px;
	max-width: 100%;
	padding: 4px;
	overflow-x: auto;
	background: rgb(20 20 20 / 5%);
	border-radius: 999px;
	scrollbar-width: none;
}

.ox-try__tabs::-webkit-scrollbar {
	display: none;
}

.ox-try__tabs button {
	flex: none;
	min-height: 38px;
	padding: 0 16px;
	color: #52525b;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	background: transparent;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.ox-try__tabs button:hover {
	color: #141414;
}

.ox-try__tabs button[aria-selected="true"] {
	color: #141414;
	background: #fff;
	box-shadow: 0 1px 2px rgb(20 20 20 / 8%), 0 0 0 1px rgb(20 20 20 / 6%);
}

.ox-try__tabs button:focus-visible {
	outline: 2px solid #141414;
	outline-offset: 2px;
}

.ox-try:not(.is-ready) .ox-try__tabs {
	visibility: hidden;
}

.ox-try:not(.is-ready) .ox-try__panel ~ .ox-try__panel,
.ox-try__panel[hidden] {
	display: none;
}

.ox-try__panel {
	animation: ox-fade 0.35s ease-out;
}

@keyframes ox-fade {

	from {
		opacity: 0;
		transform: translateY(6px);
	}
}

.ox-try__note {
	margin: 18px 0 0;
	color: #71717a;
	font-size: 13.5px;
	text-align: center;
}

/* Demo index */

.ox-index .ox-head,
.ox-spec .ox-head {
	margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.ox-cases + .ox-cases {
	margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

/* Index of demos: three per row. */
.ox-cases--grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(2.5rem, 4.5vw, 3.75rem) clamp(1.25rem, 2.2vw, 2rem);
}

.ox-cases--grid > .ox-case {
	min-width: 0;
	margin: 0;
}

.ox-cases--grid .ox-case__caption {
	display: grid;
	grid-template-columns: 30px minmax(0, 1fr);
	gap: 3px 10px;
	align-items: baseline;
	font-size: 16.5px;
}

.ox-cases--grid .ox-case__num {
	grid-row: span 2;
}

.ox-cases--grid .ox-case__meta {
	grid-column: 2;
	margin-left: 0;
	font-size: 13.5px;
	white-space: normal;
}

.ox-case--yours {
	display: flex;
}

.ox-case__yours {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 14px;
	min-height: 100%;
	margin: 0;
	padding: clamp(22px, 2.6vw, 32px);
	color: #52525b;
	font-size: 15px;
	line-height: 1.55;
	background: var(--ox-stage);
	border: 1px dashed rgb(20 20 20 / 18%);
	border-radius: 14px;
	box-sizing: border-box;
}

.ox-case__yours strong {
	color: #141414;
	font-family: var(--ox-serif);
	font-size: clamp(34px, 3.2vw, 46px);
	font-weight: 400;
	line-height: 1;
}

.ox-case__yours em {
	color: var(--ox-red);
}

.ox-case__yours a {
	margin-top: auto;
	color: #141414;
	font-weight: 600;
	text-decoration: none;
}

.ox-case__yours a:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

@media (max-width: 1024px) {

	.ox-cases--grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {

	.ox-cases--grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.ox-case__yours {
		min-height: 0;
	}
}

.ox-case__image {
	margin: 0;
}

.ox-case__image a {
	display: block;
	overflow: hidden;
	border: 1px solid rgb(20 20 20 / 8%);
	border-radius: 14px;
}

.ox-case__image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	object-position: top center;
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ox-case:hover .ox-case__image img {
	transform: scale(1.025);
}

.ox-case__caption {
	display: flex;
	gap: 14px;
	align-items: baseline;
	margin: 18px 0 0;
	color: #141414;
	font-size: 17px;
	font-weight: 500;
}

.ox-case__num {
	color: rgb(20 20 20 / 60%);
	font-family: var(--ox-serif);
	font-size: 20px;
	font-style: italic;
	font-weight: 400;
}

.ox-case__caption a {
	color: inherit;
	text-decoration: none;
}

.ox-case__caption a:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 1px;
}

.ox-case__meta {
	margin-left: auto;
	color: #71717a;
	font-size: 14px;
	font-weight: 400;
	white-space: nowrap;
}

/* What is included */

.ox-spec {
	background: var(--ox-stage);
}

.ox-spec__intro {
	position: sticky;
	top: 104px;
	align-self: flex-start;
}

.ox-ledger,
.ox-ledger ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ox-ledger li {
	display: grid;
	grid-template-columns: minmax(150px, 0.38fr) 1fr;
	gap: 24px;
	margin: 0;
	padding: 24px 0;
	border-top: 1px solid rgb(20 20 20 / 12%);
}

.ox-ledger li:last-child {
	border-bottom: 1px solid rgb(20 20 20 / 12%);
}

.ox-ledger strong {
	color: #141414;
	font-size: 17px;
	font-weight: 500;
	line-height: 1.4;
}

.ox-ledger span {
	color: #52525b;
	font-size: 16px;
	line-height: 1.6;
}

/* Close */

.ox-close {
	--ox-stage-ink: #f5f3ef;
	color: rgb(245 243 239 / 66%);
	background: #0d0d0f;
}

.ox-close .ox-display em {
	color: rgb(245 243 239 / 62%);
}

/* Responsive */

@media (max-width: 781px) {

	.ox-home-stage.ox-stage--overlap {
		background-size: 100% calc(100% - 200px), 100% 100%;
	}

	.oryx-demo-home .wp-block-columns {
		gap: 24px;
	}

	.ox-spec__intro {
		position: static;
		margin-bottom: 24px;
	}

	.ox-ledger li {
		grid-template-columns: 1fr;
		gap: 6px;
		padding: 18px 0;
	}

	.ox-try__bar {
		align-items: flex-start;
		flex-direction: column;
	}

	.ox-try__tabs {
		width: calc(100% + 2 * var(--ox-gutter));
		margin-inline: calc(-1 * var(--ox-gutter));
		padding-inline: var(--ox-gutter);
		background: transparent;
		border-radius: 0;
	}

	.ox-try__tabs button {
		background: rgb(20 20 20 / 5%);
	}

	.ox-case__caption {
		flex-wrap: wrap;
		gap: 4px 12px;
	}

	.ox-case__meta {
		flex-basis: 100%;
		margin-left: 0;
		padding-left: 0;
	}

	.ox-cases + .ox-cases {
		margin-top: 2.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {

	.ox-try__dot::after,
	.ox-try__panel {
		animation: none;
	}

	.ox-case__image img {
		transition: none;
	}
}

.ox-ledger code {
	padding: 2px 6px;
	color: #141414;
	font-size: 0.88em;
	background: rgb(20 20 20 / 6%);
	border-radius: 6px;
}

/* Secondary call to action on dark closing bands */
.oryx-demo-home .ox-actions .wp-block-button.ox-btn--outline-light .wp-block-button__link {
	color: #f5f3ef;
	background: transparent;
	border-color: rgb(245 243 239 / 32%);
}

.oryx-demo-home .ox-actions .wp-block-button.ox-btn--outline-light .wp-block-button__link:hover,
.oryx-demo-home .ox-actions .wp-block-button.ox-btn--outline-light .wp-block-button__link:focus-visible {
	color: #fff;
	border-color: #f5f3ef;
}
