/*
 * SUBDERMA brand stylesheet.
 *
 * Loaded ONLY on pages moldova_store_is_subderma() identifies as SUBDERMA
 * (see inc/brand-detection.php + inc/enqueue.php) — never enqueue this
 * globally, and never let its selectors reach outside .brand-subderma-main.
 *
 * Color tokens below were sampled directly from
 * reference/skinovative/screenshots/sections/desktop1440-00-*.png (navy
 * headline/button fill, marquee band) rather than guessed; see the homepage
 * audit (reference/skinovative/home-sections.md,
 * reference/skinovative/responsive-notes.md) for the layout/behavior this
 * file implements.
 *
 * This file covers the Hero and Protocol Picker (see
 * templates/brands/subderma/home.php and
 * components/brands/subderma/{hero,protocol-picker}.php) plus shared
 * design tokens used by every other SUBDERMA file. Every other page/
 * section's styling lives in assets/brands/subderma/css/subderma-site.css
 * (shared components: split-section, accordion, carousel, cards, etc. —
 * see that file's own header comment) to keep this one from growing
 * unmanageably large, per CLAUDE.md's "split if too large, keep brand-
 * scoped" allowance. LTR by design: this is a Romanian/LTR adaptation of
 * the source RTL layout, not a mirror done via `direction: rtl` — see
 * each component file's header comment for the specific left/right
 * adaptation made.
 */

.brand-subderma-main {
	--sd-navy: #0d273b;
	--sd-navy-soft: #24384a;
	--sd-ink: var(--sd-navy);
	--sd-muted: #5b6a77;
	--sd-bg-soft: #c9ced3;
	--sd-card-bg: #eceef0;
	--sd-beige: #f2ebe1;
	--sd-grey-panel: #f4f5f6;
	--sd-blue-light: #eaf1fb;
	--sd-content-max-width: var(--moldova-store-content-max-width, 1400px);

	/* Measured reference container/rhythm (Phase 1 spec, home-spec.md /
	   faq-spec.md): standard "page-width" side gutter is a fixed 75px from
	   768px up and a fluid ~3.84vw below (15px @390, 16.5px @430); the
	   homepage inter-section gap is a fixed 80px from 768 up and fluid
	   ~12.82vw below (50px @390, 55px @430). */
	--sd-gutter: 3.84vw;
	--sd-section-gap: 12.82vw;

	font-family: 'Prompt', sans-serif;
	color: var(--sd-ink);
}

@media (min-width: 768px) {
	.brand-subderma-main {
		--sd-gutter: 75px;
		--sd-section-gap: 80px;
	}
}

/* Homepage vertical rhythm: reference measures a uniform gap between all
   10 top-level sections at every breakpoint (home-spec.json sweep) — the
   gap belongs to the page flow, not to any one section's padding.
   Scoped to the home template only: About/Science/FAQ measured different
   (mostly zero) top-level gaps and manage their own spacing. */
.page-template-home .brand-subderma-main > * + * {
	margin-block-start: var(--sd-section-gap);
}

.brand-subderma-main a:not(.subderma-btn) {
	color: inherit;
}

/* Minimal placeholder styling for the new foundation-only SUBDERMA
   templates (products/about/science/faq — see
   templates/brands/subderma/*.php). Deliberately plain: real layouts for
   these pages are a later task, this just keeps them from rendering as
   completely unstyled text. */
.brand-subderma-placeholder {
	max-width: var(--sd-content-max-width);
	margin-inline: auto;
	padding: 64px 24px;
}

.brand-subderma-placeholder h1 {
	margin: 0 0 12px;
	font-family: 'Prompt', sans-serif;
	font-weight: 700;
	color: var(--sd-navy);
}

.brand-subderma-placeholder p {
	margin: 0;
	color: var(--sd-muted);
}

/* ---------------------------------------------------------------------
 * Hero (Skinovative homepage section 0)
 * ------------------------------------------------------------------- */

/* Transplanted from the live reference's actual banner/mercury_slider
   DOM+CSS (reference/local-comparisons/home-transplant/extract/) rather
   than reconstructed from computed-style measurements. Source (RTL):
   text/CTAs at reading-start (right), photo at reading-end (left),
   marquee along the bottom edge. LTR: mirrored — text/CTAs left, photo
   right, marquee flows left-to-right. */
.subderma-hero {
	position: relative;
	overflow: hidden;
	background: #ccd1d5;
}

/* Reference sizes this section via its own aspect-ratio placeholder
   (banner--adapt_image: padding-bottom 48.6111% desktop / 179.4872%
   mobile — the exact ratio of the source photos, 2160×1050 and
   780×1400) rather than a fixed-height or vw guess. */
.subderma-hero__row {
	position: relative;
	aspect-ratio: 2160 / 1050;
}

.subderma-hero__media,
.subderma-hero__content {
	position: absolute;
	inset: 0;
}

.subderma-hero__media picture {
	display: block;
	width: 100%;
	height: 100%;
}

.subderma-hero__content {
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding-inline: 35px;
}

.subderma-hero__box {
	box-sizing: border-box;
	width: 643px;
	padding: 10px;
}

/* Measured reference heading (home-spec.md section 0): 58px/60px @1440,
   30px/36px @390, weight 400. The reference's computed text-transform is
   "uppercase", but the source text is caseless Hebrew — the visible
   rendering is NOT uppercase, so the Romanian adaptation deliberately
   keeps sentence case (visual fidelity over a computed value that never
   painted). */
.subderma-hero__heading {
	margin: 0;
	width: 623px;
	font-family: 'Prompt', sans-serif;
	font-weight: 400;
	font-size: 58px;
	line-height: 60px;
	text-align: start;
	color: var(--sd-navy);
	filter: drop-shadow(0px 3px 6px #00000026); /* reference: .banner__heading */
}

.subderma-hero__ctas {
	display: flex;
	align-items: center;
	gap: 16px; /* measured: .banner__buttons gap 16px */
	margin-block-start: 50px;
}

.subderma-hero .subderma-btn {
	box-sizing: border-box;
	height: 41px;
	min-height: 41px;
	padding: 0 20px;
	font-size: 16px;
	line-height: 16px;
}

.subderma-hero .subderma-btn:first-child {
	width: 182px;
}

.subderma-hero .subderma-btn:last-child {
	width: 232px;
}

/* Measured reference button (home-spec.md, hero buttons — the same
   .button style repeats site-wide): 41px total height = 10px block
   padding + 21px line box, 20px inline padding, 40px radius, 1px border,
   16px/400 type. */
.subderma-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	padding-block: 10px;
	padding-inline: 20px;
	border-radius: 40px;
	font-family: 'Prompt', sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 21px;
	text-decoration: none;
	border: 1px solid var(--sd-navy);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.subderma-btn--outline {
	background: transparent;
	color: var(--sd-navy);
}

.subderma-btn--outline:hover {
	background: var(--sd-navy);
	color: #ffffff;
}

.subderma-btn--solid {
	background: var(--sd-navy);
	color: #ffffff;
}

.subderma-btn--solid:hover {
	background: var(--sd-navy-soft);
}

/* Transplanted from the reference's own .button--white (used on both dark
   sections' CTAs — science block + guarantee block): semi-transparent
   white pill with backdrop blur, uppercase. */
.subderma-btn--white {
	background: rgba(255, 255, 255, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(20px);
	color: #ffffff;
	border-radius: 50px;
	text-transform: uppercase;
}

.subderma-btn--white:hover {
	background: rgba(255, 255, 255, 0.75);
	color: var(--sd-navy);
}

.subderma-hero__media {
	position: absolute;
	inset: 0;
}

.subderma-hero__image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

@media (min-width: 750px) {
	.subderma-hero__image {
		transform: scaleX(-1);
	}
}

/* mercury_slider (marquee) — reference: absolute, bottom:-1px of the hero,
   translucent blurred band, direction mirrored to LTR (source: rtl). */
.subderma-marquee {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	z-index: 10;
	overflow: hidden;
	padding-block: 13px;
	background: rgba(216, 236, 250, 0.35);
	backdrop-filter: blur(20px);
}

.subderma-marquee__track {
	display: flex;
	align-items: center;
	gap: 16px;
	width: max-content;
	animation: subderma-marquee 32s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
	.subderma-marquee__track {
		animation: none;
	}
}

.subderma-marquee__item {
	white-space: nowrap;
	font-size: 16px;
	line-height: 24px;
	font-weight: 400;
	color: var(--sd-navy);
}

.subderma-marquee__dot {
	color: var(--sd-navy);
	opacity: 0.45;
}

.subderma-hero__marquee-group {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
}

.subderma-hero__marquee-cell {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-inline-start: 16px;
	white-space: nowrap;
	min-height: 24px;
}

.subderma-hero__marquee-cell svg {
	display: block;
	flex: 0 0 auto;
	color: var(--sd-navy);
}

/* LTR adaptation: source marquee scrolls right-to-left; ours flows
   left-to-right (content shifts from -50% toward 0%). */
@keyframes subderma-marquee {
	from {
		transform: translateX(-50%);
	}
	to {
		transform: translateX(0%);
	}
}

/* Measured tablet/mobile state (probe-ref-mobile.js @768, confirmed by
   direct reference DOM inspection): the hero becomes an OVERLAY banner,
   not a two-column split — full-bleed cover image at a fixed 550px
   section height, heading + stacked 232×41 buttons rendered over it.
   Mobile (@390) is the same overlay model at 179.5vw section height
   using the dedicated mobile asset. */
@media (max-width: 989px) {
	.subderma-hero__row {
		aspect-ratio: auto;
		height: 550px;
	}

	.subderma-hero__media {
		position: absolute;
		inset: 0;
	}

	.subderma-hero__media .subderma-hero__image {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center top;
	}

	.subderma-hero__content {
		justify-content: center;
		padding: 0;
	}

	.subderma-hero__box {
		width: 450px;
		height: 328px;
		padding: 110px 0 0;
	}

	.subderma-hero__heading {
		width: 450px;
		font-size: 30px;
		line-height: 36px;
		text-align: start;
	}

	.subderma-hero__ctas {
		flex-direction: column;
		align-items: flex-start;
		gap: 24px; /* measured: 24px between the stacked buttons */
		margin-block-start: 40px;
	}

	.subderma-hero__ctas .subderma-btn {
		width: 232px;
	}

	.subderma-hero__marquee {
		padding-block: 10px;
	}

	.subderma-hero__marquee .subderma-marquee__item {
		font-size: 12px;
		line-height: 24px;
	}

	.subderma-hero__marquee-cell {
		gap: 12px;
		margin-inline-start: 12px;
	}
}

@media (min-width: 750px) and (max-width: 989px) {
	.subderma-hero__content {
		justify-content: flex-start;
		padding-inline: 35px;
	}
}

@media (max-width: 749px) {
	.subderma-hero__row {
		height: auto;
		aspect-ratio: 780 / 1400;
	}

	.subderma-hero__content {
		align-items: flex-start;
	}

	.subderma-hero__box {
		width: min(77.82vw, 334.65px);
		height: 100%;
		padding-top: 28.16vw;
	}

	.subderma-hero__heading {
		width: 100%;
		font-size: 7.692vw;
		line-height: 9.216vw;
		text-align: center;
	}

	.subderma-hero__ctas {
		align-items: center;
	}
}


/* ---------------------------------------------------------------------
 * Protocol picker (Skinovative homepage section 1)
 * ------------------------------------------------------------------- */

/* Transplanted from the live reference's actual .protocol-result-content
 * / .protocol-item-* markup (reference/local-comparisons/home-transplant/
 * extract/html/section-1-*.html) rather than reconstructed from computed
 * styles alone. Reference rem base is 10px (html{font-size:62.5%}); all
 * rem values below are transcribed as their px equivalent. */
.subderma-protocol {
	background: #ffffff;
}

.subderma-protocol__inner {
	box-sizing: border-box;
	width: 100%;
	max-width: 1440px;
	margin-inline: auto;
	padding-inline: var(--sd-gutter);
}

.subderma-protocol__heading {
	margin: 0 0 24px;
	text-align: center;
	font-family: 'Prompt', sans-serif;
	font-weight: 400;
	font-size: clamp(24px, 21.8px + 0.572vw, 30px);
	line-height: clamp(36px, 32.7px + 0.858vw, 45px);
	color: var(--sd-navy);
}

.subderma-protocol__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px; /* measured: fixed 30px at every grid breakpoint */
}

.subderma-protocol-card {
	min-width: 0;
}

.subderma-protocol-card__anchor {
	display: block;
	text-decoration: none;
	color: inherit;
}

/* Measured: card images render 410×410 @1440 — exactly square. */
.subderma-protocol-card__icon {
	display: block;
	position: relative;
	aspect-ratio: 1 / 1;
	border-radius: 15px;
	overflow: hidden;
	background: #f4f4f5;
}

.subderma-protocol-card__icon img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Reference: price tag pinned to the reading-start corner (right in RTL)
   — mirrored here to the LTR reading-start corner (left). */
.subderma-protocol-card__tag {
	position: absolute;
	left: 16px;
	top: 16px;
}

.subderma-protocol-card__tag p {
	margin: 0;
	background: #ffffff;
	border-radius: 50px;
	font-size: 12px;
	line-height: 24px;
	font-weight: 400;
	padding: 2px 13px;
}

.subderma-protocol-card__corner {
	display: none;
	position: absolute;
	left: 12px;
	bottom: 12px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #F2FAFF;
	border: 1px solid #ffffff;
	align-items: center;
	justify-content: center;
	color: var(--sd-navy);
	padding: 0;
}

.subderma-protocol-card__corner svg,
.subderma-protocol-card__hover button svg {
	display: block;
}

.subderma-protocol-card__content {
	display: block;
	padding: 16px 0 0;
	position: relative;
}

.subderma-protocol-card__title {
	text-align: center;
}

.subderma-protocol-card__title h3 {
	margin: 0;
	font-family: 'Prompt', sans-serif;
	font-weight: 400;
	font-size: 24px;
	line-height: 36px;
	color: var(--sd-navy);
}

.subderma-protocol-card__link {
	margin-block-start: 12px;
}

.subderma-protocol-card__link span {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	font-size: 16px;
	line-height: 24px;
	color: var(--sd-blue-link, #0069b5);
}

.subderma-protocol-card__link svg {
	width: 5px;
	height: 9px;
}

/* Hover-reveal glass panel — reference: .protocol-item-hover, sits ABOVE
   the image, opacity 0 -> 1 on :hover (desktop only). Always visible on
   mobile (see the max-width:749px override below), where only the body
   copy shows. */
.subderma-protocol-card__hover {
	box-sizing: border-box;
	position: absolute;
	left: 15px;
	right: 15px;
	bottom: calc(100% + 15px);
	background: rgba(255, 255, 255, 0.6);
	border: 1px solid rgba(221, 221, 221, 0.1);
	backdrop-filter: blur(45px);
	border-radius: 15px;
	padding: 20px 20px 26px;
	text-align: start;
	display: block;
	opacity: 0;
	visibility: hidden;
	transform: translateY(15px);
	transition: all 0.2s ease-in-out;
}

.subderma-protocol-card:hover .subderma-protocol-card__hover {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.subderma-protocol-card__hover h3 {
	margin: 0;
	font-size: 16px;
	line-height: 24px;
	font-weight: 400;
}

.subderma-protocol-card__hover p {
	margin: 10px 0 0;
	padding-inline-end: 30px;
	font-size: 14px;
	line-height: 21px;
	font-weight: 200;
	color: var(--sd-muted);
}

.subderma-protocol-card__hover button {
	position: absolute;
	left: 10px;
	bottom: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid #ffffff;
	border-radius: 50%;
	background: #f2faff;
	color: #0069b5;
}

/* Measured (probe-ref-mobile.js): the 3-column grid HOLDS at 768
   (186px images, 30px gap, 75px gutters — section 424 tall); only below
   750 does it stack. */
@media (min-width: 750px) and (max-width: 989px) {
}

@media (max-width: 749px) {
	.subderma-protocol__grid {
		display: flex;
		flex-direction: column;
		gap: 30px;
	}

	.subderma-protocol-card__icon {
		aspect-ratio: 360 / 185;
	}

	.subderma-protocol-card__content {
		display: flex;
		flex-direction: column;
		gap: 10px;
	}

	.subderma-protocol-card__title {
		text-align: center;
		font-size: 24px;
		line-height: 36px;
	}

	.subderma-protocol-card__corner {
		display: flex;
	}

	/* mobile: hover panel is always visible, showing only its body copy
	   (reference: .protocol-item-hover h3,button { display:none } here) */
	.subderma-protocol-card__hover {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		padding: 0;
		border: 0;
		backdrop-filter: none;
		background: transparent;
	}

	.subderma-protocol-card__hover h3,
	.subderma-protocol-card__hover button {
		display: none;
	}

	.subderma-protocol-card__hover p {
		padding: 0;
		text-align: center;
		font-size: 16px;
		line-height: 24px;
		margin-top: 0;
		color: var(--sd-ink);
	}

	.subderma-protocol-card__link {
		margin-block-start: 0;
	}
}
