/* CardTap Studio theme
   Tokens, base, layout, header, hero (tap demo), sections, card templates, WooCommerce. */

:root {
	--paper: #f4f6f5;
	--tint: #e9efec;
	--ink: #0f1d1a;
	--board: #0c4a3e;
	--pulse: #ffd23f;
	--line: #d3ddd9;
	--muted: #4c5d58;
	--on-board: #cfe0da;
	--f-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--f-body: "Albert Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--max: 1160px;
	--panel: 18px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 1.0625rem/1.6 var(--f-body);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
	font-family: var(--f-display);
	font-weight: 750;
	letter-spacing: -0.02em;
	line-height: 1.12;
	margin: 0 0 0.6em;
}
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); letter-spacing: -0.025em; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }
a { color: var(--board); text-underline-offset: 0.18em; }

:focus-visible { outline: 3px solid var(--board); outline-offset: 3px; border-radius: 4px; }
.section--board :focus-visible,
.cta :focus-visible { outline-color: var(--pulse); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.skip {
	position: absolute; left: 1rem; top: -4rem;
	background: var(--ink); color: #fff;
	padding: 0.6rem 1rem; border-radius: 8px; z-index: 100;
}
.skip:focus { top: 1rem; }

.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

/* ---------- Buttons and chips ---------- */

.btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 0.85em 1.5em;
	border: 2px solid var(--ink);
	border-radius: 999px;
	background: var(--ink); color: #fff;
	font: 600 1rem/1.2 var(--f-body);
	text-decoration: none; cursor: pointer;
	transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--pulse { background: var(--pulse); border-color: var(--pulse); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: rgba(15, 29, 26, 0.06); }

.chip {
	border: 1.5px solid var(--ink);
	background: transparent; color: var(--ink);
	border-radius: 999px;
	padding: 0.45rem 1.1rem;
	font: 600 0.95rem/1.2 var(--f-body);
	cursor: pointer;
}
.chip.is-on { background: var(--ink); color: #fff; }

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

.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(244, 246, 245, 0.94);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.site-header__bar {
	display: flex; align-items: center; justify-content: space-between;
	min-height: 4rem; gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; }
.brand__mark { width: 2.2rem; color: var(--board); display: block; }
.brand__coil { width: 100%; height: auto; display: block; }
.brand__name { font: 750 1.2rem/1 var(--f-display); letter-spacing: -0.02em; }
.custom-logo { max-height: 2.6rem; width: auto; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav__list { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.nav__cart { display: inline-flex; align-items: center; gap: 0.4rem; }
.nav__cart svg { width: 1.3rem; height: 1.3rem; }
.cts-cart-count:not(:empty) {
	background: var(--pulse); color: var(--ink);
	border-radius: 999px; font-size: 0.75rem; font-weight: 700;
	padding: 0.05rem 0.45rem;
}

.menu-toggle {
	display: none; place-items: center;
	width: 2.75rem; height: 2.75rem;
	background: transparent; color: var(--ink);
	border: 1.5px solid var(--ink); border-radius: 12px; cursor: pointer;
}
.menu-toggle svg { width: 1.4rem; height: 1.4rem; }

@media (max-width: 819px) {
	.menu-toggle { display: grid; }
	.nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		flex-direction: column; align-items: flex-start;
		background: var(--paper); border-bottom: 1px solid var(--line);
		padding: 1rem 1rem 1.4rem;
	}
	.nav.is-open { display: flex; }
	.nav__list { flex-direction: column; gap: 0.9rem; }
}

/* ---------- Sections ---------- */

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--tint { background: var(--tint); }
.section--board { background: var(--board); color: var(--paper); }
.section--board a { color: var(--pulse); }

.section__head { max-width: 40rem; margin-bottom: 1.5rem; }
.section__head p { color: var(--muted); max-width: 52ch; }

.split { display: grid; gap: 2rem 4rem; }
@media (min-width: 880px) {
	.split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
}
.split__head p { color: var(--muted); max-width: 34ch; }
.section--board .split__head p { color: var(--on-board); }

.ruled { margin: 0; }
.ruled > div { display: grid; gap: 0.2rem 2rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.ruled > div:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .ruled > div { grid-template-columns: 12.5rem 1fr; } }
.ruled dt { font: 700 1.125rem/1.3 var(--f-display); letter-spacing: -0.01em; }
.ruled dd { margin: 0; color: var(--muted); max-width: 52ch; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
	counter-increment: step;
	display: grid; grid-template-columns: 3.4rem 1fr; column-gap: 1rem;
	padding: 1.3rem 0; border-top: 1px solid rgba(244, 246, 245, 0.28);
}
.steps li:last-child { border-bottom: 1px solid rgba(244, 246, 245, 0.28); }
.steps li::before {
	content: counter(step);
	grid-column: 1; grid-row: 1 / span 2;
	font: 750 2.6rem/1 var(--f-display); color: var(--pulse);
}
.steps h3 { grid-column: 2; margin: 0; }
.steps p { grid-column: 2; margin: 0.25rem 0 0; color: var(--on-board); max-width: 46ch; }

.faq details { border-top: 1px solid var(--line); padding: 0.2rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
	list-style: none; cursor: pointer;
	padding: 1rem 2rem 1rem 0; position: relative;
	font: 700 1.1rem/1.3 var(--f-display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.2rem; top: 0.8rem; font: 500 1.6rem/1 var(--f-body); color: var(--board); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 1.1rem; color: var(--muted); max-width: 56ch; }

.cta { background: var(--ink); color: var(--paper); padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.cta__inner { display: grid; gap: 0.4rem; justify-items: start; }
.cta h2 { margin: 0; }
.cta p { color: var(--on-board); max-width: 44ch; margin: 0 0 1.2rem; }

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

.hero { padding: clamp(2rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero__grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 3rem; } }

.hero h1 {
	font-size: clamp(2.6rem, 6.2vw, 4.7rem);
	font-weight: 750; line-height: 1.02; letter-spacing: -0.032em;
	max-width: 14ch; margin-bottom: 0.5em;
}
.lede { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.6rem 0 1.2rem; }
.hero__price { color: var(--muted); font-size: 0.98rem; }
.hero__price strong { color: var(--ink); }

.hero__stage { display: grid; justify-items: center; gap: 1rem; }

.stage {
	position: relative; container-type: inline-size;
	width: 100%; max-width: 540px; aspect-ratio: 1 / 1.06;
}
.stage__coil {
	position: absolute; right: -14%; top: -8%; width: 118%; height: auto;
	color: var(--board); opacity: 0.12; z-index: 0; pointer-events: none;
}

/* Default state = after the tap (also what you see with no JavaScript). */
.stage__card {
	position: absolute; z-index: 1; width: 64%; left: 6%; top: 30%;
	transform: rotate(-5deg);
	transition: left 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), top 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.stage.is-idle .stage__card { left: -4%; top: 60%; transform: rotate(-12deg); }

.phone {
	position: absolute; z-index: 2; left: 42%; top: 1%; width: 50%;
	aspect-ratio: 9 / 18.4;
	background: var(--ink); border-radius: 7cqw; padding: 1.5cqw;
	box-shadow: 0 30px 50px -28px rgba(15, 29, 26, 0.55);
}
.phone__screen {
	position: relative; height: 100%; overflow: hidden;
	border-radius: 5.6cqw; background: var(--paper);
	container-type: inline-size;
}
.phone__idle,
.phone__profile { position: absolute; inset: 0; }
.phone__idle {
	display: grid; place-content: center; justify-items: center; gap: 3cqw;
	text-align: center; color: var(--muted); font-size: 5.4cqw;
	opacity: 0; transition: opacity 0.4s ease 0.5s;
}
.phone__idle p { margin: 0; }
.phone__nfc { width: 16cqw; color: var(--board); }
.phone__nfc svg { display: block; width: 100%; height: auto; }
.stage.is-idle .phone__idle { opacity: 1; transition-delay: 0s; }

.phone__profile { background: #fff; opacity: 1; transition: opacity 0.5s ease 0.9s; }
.stage.is-idle .phone__profile { opacity: 0; transition-delay: 0s; transition-duration: 0.2s; }

.pf__top { height: 26%; background: var(--board); }
.pf__av {
	width: 26cqw; height: 26cqw; margin: -13cqw auto 0;
	display: grid; place-items: center;
	background: var(--pulse); color: var(--ink);
	border: 1.6cqw solid #fff; border-radius: 50%;
	font: 750 9cqw/1 var(--f-display);
}
.pf__name { margin: 2.4cqw 0 0; text-align: center; font: 750 8.4cqw/1.15 var(--f-display); letter-spacing: -0.02em; }
.pf__role { margin: 0; text-align: center; color: var(--muted); font-size: 4.4cqw; }
.pf__save {
	display: block; margin: 5cqw 7cqw 0; padding: 3cqw;
	border-radius: 999px; background: var(--board); color: #fff;
	text-align: center; font-weight: 600; font-size: 4.6cqw;
}
.pf__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4cqw; margin: 2.4cqw 7cqw 0; }
.pf__grid span {
	border: 1px solid var(--line); border-radius: 999px;
	padding: 2.4cqw; text-align: center; font-size: 4.2cqw; font-weight: 600;
}

.stage__ring {
	position: absolute; z-index: 3; left: 42%; top: 49%;
	width: 20%; aspect-ratio: 1; margin: -10% 0 0 -10%;
	border: 0.7cqw solid var(--pulse); border-radius: 50%;
	opacity: 0; transform: scale(0.3); pointer-events: none;
}
.stage:not(.is-idle) .stage__ring--a { animation: cts-ring 1.3s ease-out 0.75s forwards; }
.stage:not(.is-idle) .stage__ring--b { animation: cts-ring 1.3s ease-out 1s forwards; }
@keyframes cts-ring {
	0% { opacity: 0.95; transform: scale(0.3); }
	100% { opacity: 0; transform: scale(2.4); }
}

/* ---------- Template gallery ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.4rem 0 2rem; }
.tpl-group[hidden], .tpl[hidden] { display: none; }
.filters--use { margin-top: -1rem; }
.tpl-group + .tpl-group { margin-top: 3rem; }
.tpl-group__title { font: 700 1.2rem/1.2 var(--f-display); margin: 0 0 1.2rem; }
.tpl-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem 1.5rem; }
.tpl-grid--l { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.tpl-grid--p { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.tpl .ct { box-shadow: 0 1px 0 rgba(15, 29, 26, 0.1), 0 14px 26px -14px rgba(15, 29, 26, 0.4); }
.tpl__meta { padding-top: 0.9rem; }
.tpl__name { font: 700 1.05rem/1.2 var(--f-display); margin: 0; }
.tpl__about { color: var(--muted); font-size: 0.93rem; margin: 0.2rem 0 0.4rem; max-width: 30ch; }
.tpl__link { font-weight: 600; }

/* ---------- Product shelf ---------- */

.shelf { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .shelf { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .shelf { grid-template-columns: repeat(4, 1fr); } }
.shelf__media {
	display: block; padding: 1.4rem; background: var(--tint);
	border-radius: var(--panel); text-decoration: none;
}
.shelf__media .ct { box-shadow: 0 12px 22px -12px rgba(15, 29, 26, 0.45); }
.shelf__media img { display: block; border-radius: 10px; }
.shelf__body { padding-top: 0.9rem; }
.shelf__name { font-size: 1.2rem; margin: 0; }
.shelf__name a { color: var(--ink); text-decoration: none; }
.shelf__name a:hover { text-decoration: underline; }
.shelf__price { font: 700 1.15rem/1.3 var(--f-display); color: var(--board); margin: 0.2rem 0 0.5rem; }
.shelf__price del { color: var(--muted); font-weight: 500; }
.shelf__price ins { text-decoration: none; }
.shelf__text { color: var(--muted); font-size: 0.97rem; margin: 0 0 1rem; max-width: 34ch; }
.shelf__more { margin-top: 2rem; font-weight: 600; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 3rem 0 1.5rem; background: var(--paper); }
.site-footer__grid { display: grid; gap: 2rem; }
@media (min-width: 720px) { .site-footer__grid { grid-template-columns: 1fr auto; align-items: start; } }
.site-footer__brand { font: 750 1.3rem/1.1 var(--f-display); margin: 0 0 0.4rem; }
.site-footer__about { color: var(--muted); max-width: 40ch; margin: 0; }
.site-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.site-footer__list a { color: var(--ink); }
.site-footer__legal { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.site-footer__legal p { margin: 0; }

/* ---------- Inner pages ---------- */

.page { padding: clamp(2rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem); }
.page--narrow { max-width: 46rem; }
.page__title { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 0.6em; }
.entry__content { max-width: 68ch; }
.entry__content > * + * { margin-top: 1em; }
.entry__title { font-size: 1.6rem; }
.entry__title a { color: var(--ink); text-decoration: none; }
.entry__meta { color: var(--muted); }

/* ---------- WooCommerce ---------- */

.woocommerce .woocommerce-breadcrumb { color: var(--muted); font-size: 0.92rem; margin-bottom: 1.2rem; }
.woocommerce .woocommerce-breadcrumb a { color: var(--muted); }
.woocommerce-products-header__title.page-title,
.woocommerce div.product .product_title { font-family: var(--f-display); font-weight: 750; letter-spacing: -0.025em; }
.woocommerce-products-header__title.page-title { font-size: clamp(2rem, 4.5vw, 3rem); }

.woocommerce ul.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.woocommerce ul.products::before,
.woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product,
.woocommerce ul.products[class*="columns-"] li.product {
	width: auto; float: none; margin: 0;
	background: #fff; border: 1px solid var(--line); border-radius: var(--panel); padding: 1rem;
}
.woocommerce ul.products li.product a img { border-radius: 10px; margin-bottom: 0.8rem; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font: 700 1.1rem/1.25 var(--f-display); padding: 0; }
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price { color: var(--board); font-weight: 700; }
.woocommerce div.product p.price { font-size: 1.5rem; }
.woocommerce span.onsale { background: var(--pulse); color: var(--ink); border-radius: 999px; min-width: 0; min-height: 0; line-height: 1; padding: 0.5em 0.9em; font-weight: 700; }

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
	background: var(--ink); color: #fff;
	border-radius: 999px; font-weight: 600; padding: 0.8em 1.5em;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover { background: #24372f; color: #fff; }
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
	background: var(--pulse); color: var(--ink);
}
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover { background: #ffdc66; }
.woocommerce a.button.disabled,
.woocommerce button.button:disabled { opacity: 0.5; }

.woocommerce-message,
.woocommerce-info,
.woocommerce-error { background: #fff; border-top-color: var(--board); color: var(--ink); border-radius: 0 0 10px 10px; }
.woocommerce-message::before,
.woocommerce-info::before { color: var(--board); }

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce .quantity .qty,
.select2-container--default .select2-selection--single {
	border: 1px solid #b8c6c1; border-radius: 12px; padding: 0.7rem 0.8rem;
	font: inherit; background: #fff; color: var(--ink);
}
.select2-container--default .select2-selection--single { height: auto; min-height: 2.75rem; display: flex; align-items: center; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 1.4; padding-left: 0; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 100%; }

.woocommerce table.shop_table { background: #fff; border: 1px solid var(--line); border-radius: 14px; border-collapse: separate; overflow: hidden; }
.woocommerce table.shop_table th,
.woocommerce table.shop_table td { border-color: var(--line); }
.woocommerce-checkout #payment { background: var(--tint); border-radius: 14px; }
.woocommerce-checkout #payment div.payment_box { background: #fff; color: var(--ink); }
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: #fff; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { border-bottom-color: var(--paper); }

/* Region switch from the CardTap Studio Core plugin */
.cts-region-pill { background: var(--ink); }

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.btn { transition: none; }
	.btn:hover { transform: none; }
	.stage__card,
	.phone__idle,
	.phone__profile { transition: none; }
	.stage .stage__ring { animation: none !important; }
	.stage__btn { display: none; }
}
