/* GearToggle Studio: component styles. Colours, type and spacing come from theme.json presets. */

:root {
	--gt-radius: 14px;
	--gt-radius-small: 8px;
	--gt-base: var(--wp--preset--color--base);
	--gt-surface: var(--wp--preset--color--surface);
	--gt-surface-2: var(--wp--preset--color--surface-2);
	--gt-line: var(--wp--preset--color--line);
	--gt-text: var(--wp--preset--color--contrast);
	--gt-muted: var(--wp--preset--color--muted);
	--gt-accent: var(--wp--preset--color--accent);
	--gt-accent-ink: var(--wp--preset--color--accent-ink);
	--gt-display: var(--wp--preset--font-family--display);
}

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--gt-accent);
	outline-offset: 3px;
}

.gt-accent { color: var(--gt-accent); }

.gt-eyebrow {
	color: var(--gt-accent);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* Header ---------------------------------------------------------------- */

.gt-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: color-mix(in srgb, var(--gt-base) 88%, transparent);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--gt-line);
}

.admin-bar .gt-header { top: var(--wp-admin--admin-bar--height, 0); }

.gt-logo {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	color: var(--gt-text);
	text-decoration: none;
	white-space: nowrap;
}

.gt-logo__mark {
	position: relative;
	width: 2.1rem;
	height: 1.2rem;
	border-radius: 999px;
	background: var(--gt-accent);
	flex: none;
}

.gt-logo__knob {
	position: absolute;
	top: 0.2rem;
	right: 0.2rem;
	width: 0.8rem;
	height: 0.8rem;
	border-radius: 50%;
	background: var(--gt-accent-ink);
}

.gt-logo__word {
	font-family: var(--gt-display);
	font-weight: 700;
	font-size: 1.15rem;
	letter-spacing: -0.02em;
}

.gt-logo__tag {
	display: none;
	color: var(--gt-muted);
	font-size: var(--wp--preset--font-size--small);
}

/* The CTA would crowd the hamburger on phones; the hero has the same button. */
.gt-header .gt-header__cta { display: none; }   /* scoped: core's .wp-block-buttons display loads later */

@media (min-width: 600px) {
	.gt-logo__tag { display: inline; }
}

@media (min-width: 782px) {
	.gt-header .gt-header__cta { display: flex; }
}

.wp-block-navigation a:where(:not(.wp-element-button)) { color: var(--gt-text); text-decoration: none; }
.wp-block-navigation a:where(:not(.wp-element-button)):hover { color: var(--gt-accent); }

/* Buttons ------------------------------------------------------------------ */

.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--gt-text);
	border: 1px solid var(--gt-line);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	border-color: var(--gt-text);
	background: transparent;
}

/* Before/after slider ------------------------------------------------------ */

.gt-compare {
	position: relative;
	margin: 0;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border-radius: var(--gt-radius);
	border: 1px solid var(--gt-line);
	background: var(--gt-surface);
	touch-action: pan-y;   /* vertical page scroll still works on phones */
}

.gt-compare img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gt-compare__before { clip-path: inset(0 calc(100% - var(--gt-split)) 0 0); }

.gt-compare__handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--gt-split);
	width: 2px;
	background: var(--gt-accent);
	transform: translateX(-1px);
	pointer-events: none;
}

.gt-compare__handle::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: var(--gt-accent);
	transform: translate(-50%, -50%);
	box-shadow: 0 4px 16px rgb(0 0 0 / 0.35);
}

.gt-compare__label {
	position: absolute;
	top: 0.75rem;
	padding: 0.3rem 0.65rem;
	border-radius: 999px;
	background: rgb(13 15 18 / 0.75);
	color: var(--gt-text);
	font-size: 0.75rem;
	font-weight: 600;
	pointer-events: none;
}

.gt-compare__label--before { left: 0.75rem; }
.gt-compare__label--after { right: 0.75rem; }

/* The range input covers the whole image so a drag anywhere moves the split. */
.gt-compare__range {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: ew-resize;
}

.gt-compare:has(.gt-compare__range:focus-visible) {
	outline: 2px solid var(--gt-accent);
	outline-offset: 3px;
}

/* Media strip: stills and clips side by side, swipeable on phones ----------- */

.gt-strip {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 72%;
	gap: var(--wp--preset--spacing--30);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: var(--wp--preset--spacing--20);
	margin-top: var(--wp--preset--spacing--50);
}

.gt-strip > * { scroll-snap-align: start; }

@media (min-width: 782px) {
	.gt-strip {
		grid-auto-flow: row;
		grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
		overflow: visible;
		align-items: start;
	}
}

.gt-still,
.gt-clip { margin: 0; }

.gt-still img,
.gt-clip video {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--gt-radius-small);
	border: 1px solid var(--gt-line);
	background: var(--gt-surface);
}

.gt-still img { aspect-ratio: 4 / 5; object-fit: cover; }

/* Clips keep their full 9:16 frame: the hook opener sits in the top third, so cropping would cut it. */
.gt-clip video { aspect-ratio: 9 / 16; object-fit: cover; }

.gt-still figcaption,
.gt-clip figcaption {
	margin-top: 0.5rem;
	color: var(--gt-muted);
	font-size: var(--wp--preset--font-size--small);
}

/* Cards ---------------------------------------------------------------------- */

.gt-cards { margin-top: var(--wp--preset--spacing--50); }

.gt-card {
	padding: var(--wp--preset--spacing--40);
	border: 1px solid var(--gt-line);
	border-radius: var(--gt-radius);
	background: var(--gt-base);
}

/* What's in a pack ------------------------------------------------------------ */

.gt-pack {
	display: grid;
	gap: var(--wp--preset--spacing--30);
	margin: var(--wp--preset--spacing--50) 0 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 782px) {
	.gt-pack { grid-template-columns: repeat(4, 1fr); }
}

.gt-pack__item {
	display: grid;
	gap: 0.25rem;
	padding: var(--wp--preset--spacing--40);
	border: 1px solid var(--gt-line);
	border-radius: var(--gt-radius);
	background: var(--gt-surface);
}

.gt-pack__count {
	color: var(--gt-accent);
	font-family: var(--gt-display);
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 700;
	line-height: 1;
}

.gt-pack__what { font-weight: 600; font-size: var(--wp--preset--font-size--large); }
.gt-pack__spec { color: var(--gt-muted); font-size: var(--wp--preset--font-size--small); }

/* Prices ---------------------------------------------------------------------- */

.gt-prices {
	display: grid;
	gap: var(--wp--preset--spacing--30);
	margin-top: var(--wp--preset--spacing--50);
}

@media (min-width: 900px) {
	.gt-prices { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
}

.gt-price {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: var(--wp--preset--spacing--40);
	border: 1px solid var(--gt-line);
	border-radius: var(--gt-radius);
	background: var(--gt-base);
}

.gt-price > * { margin: 0; }

.gt-price--featured { border-color: var(--gt-accent); }

.gt-price__badge {
	align-self: flex-start;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	background: var(--gt-accent);
	color: var(--gt-accent-ink);
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.gt-price__name { font-size: var(--wp--preset--font-size--large); }

.gt-price__amount {
	font-family: var(--gt-display);
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 700;
	line-height: 1;
}

.gt-price__amount span {
	color: var(--gt-muted);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
}

.gt-price__note { color: var(--gt-muted); font-size: var(--wp--preset--font-size--small); }

.gt-price__list {
	display: grid;
	gap: 0.4rem;
	padding: 0;
	list-style: none;
	font-size: var(--wp--preset--font-size--small);
}

.gt-price__list li::before { content: "✓ "; color: var(--gt-accent); font-weight: 700; }

.gt-price__cta {
	margin-top: auto;   /* pin to the card bottom; this rule comes after the .gt-price > * reset, so it wins */
	padding: 0.75rem 1rem;
	border-radius: 999px;
	border: 1px solid var(--gt-line);
	color: var(--gt-text);
	text-align: center;
	font-weight: 600;
	text-decoration: none;
}

.gt-price--featured .gt-price__cta { background: var(--gt-accent); border-color: var(--gt-accent); color: var(--gt-accent-ink); }
.gt-price__cta:hover { border-color: var(--gt-text); }

/* Steps (home) and process (how it works) -------------------------------------- */

.gt-steps,
.gt-process {
	display: grid;
	gap: var(--wp--preset--spacing--30);
	margin: var(--wp--preset--spacing--40) 0;
	padding: 0;
	list-style: none;
	counter-reset: gt-step;
}

@media (min-width: 782px) {
	.gt-steps { grid-template-columns: repeat(4, 1fr); }
}

.gt-steps__item,
.gt-process__step {
	position: relative;
	padding: var(--wp--preset--spacing--40);
	padding-top: calc(var(--wp--preset--spacing--40) + 2.25rem);
	border: 1px solid var(--gt-line);
	border-radius: var(--gt-radius);
	counter-increment: gt-step;
}

.gt-steps__item { color: var(--gt-muted); }
.gt-steps__item strong { display: block; color: var(--gt-text); }

.gt-steps__item::before,
.gt-process__step::before {
	content: counter(gt-step, decimal-leading-zero);
	position: absolute;
	top: var(--wp--preset--spacing--40);
	left: var(--wp--preset--spacing--40);
	color: var(--gt-accent);
	font-family: var(--gt-display);
	font-weight: 700;
}

.gt-process__title { margin: 0 0 0.5rem; font-size: var(--wp--preset--font-size--x-large); }
.gt-process__step p { color: var(--gt-muted); max-width: 70ch; }

/* Case studies ------------------------------------------------------------------ */

.gt-hooks { color: var(--gt-muted); }

/* Concepts form (markup from the geartoggle-leads plugin) ------------------------- */

.gt-form { display: grid; gap: var(--wp--preset--spacing--30); }

@media (min-width: 600px) {
	.gt-form { grid-template-columns: 1fr 1fr; }
	.gt-form__field--wide,
	.gt-form__actions,
	.gt-form__notice { grid-column: 1 / -1; }
}

.gt-form__field { display: grid; gap: 0.35rem; }

.gt-form label { font-size: var(--wp--preset--font-size--small); font-weight: 600; }
.gt-form__optional { color: var(--gt-muted); font-weight: 400; }

.gt-form input,
.gt-form textarea {
	width: 100%;
	padding: 0.75rem 0.9rem;
	border: 1px solid var(--gt-line);
	border-radius: var(--gt-radius-small);
	background: var(--gt-base);
	color: var(--gt-text);
	font: inherit;
}

.gt-form input:focus,
.gt-form textarea:focus { border-color: var(--gt-accent); }

.gt-form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.gt-form__actions button {
	padding: 0.85rem 1.5rem;
	border: 0;
	border-radius: 999px;
	background: var(--gt-accent);
	color: var(--gt-accent-ink);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.gt-form__actions button:hover { background: var(--gt-text); }

.gt-form__notice {
	padding: 0.9rem 1rem;
	border-radius: var(--gt-radius-small);
	border: 1px solid var(--gt-accent);
	background: var(--gt-base);
}

.gt-form__notice--error { border-color: #ff8a7a; }

.gt-form__fineprint { color: var(--gt-muted); font-size: var(--wp--preset--font-size--small); }

html { scroll-padding-top: 5rem; }   /* anchors land below the sticky header */

@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}
