/**
 * Front-page scroll-story: one chapter per screen via CSS scroll-snap,
 * with GSAP/Lenis (assets/js/scroll-story.js) driving the cascade
 * reveals, parallax and the dot-nav active state on top of it.
 *
 * Enqueued only on the front page — see functions.php.
 *
 * @package ProfHairClub_shop
 */

/* -------------------------------------------------------------
   Story frame
   ------------------------------------------------------------- */
.phc-story-main {
	padding: 0;
	margin: 0;
	max-width: none;
}

.phc-story {
	scroll-snap-type: y proximity;
}

/* Was `min-height: 100vh` on every chapter — client's ask, 2026-09-25:
   "too much empty space between sections". With short, text-only
   chapters (manifesto's own statement + one line of lede, for one)
   centered via `justify-content: center` inside a full-viewport-tall
   box, that centering put real, visible dead space both above AND
   below the actual content on every such chapter — confirmed live
   (manifesto's content measured ~334px tall inside a 768px slide).
   Dropping the floor to auto lets each chapter's own padding + content
   define its real height; chapters with enough content to fill (or
   exceed) a screen anyway — hero, categories, bestsellers — are
   unaffected, since `min-height` is a floor, never a cap. Hero keeps
   its own explicit 100vh below: it's the one chapter meant to read as
   a full-bleed opening moment on purpose. */
.phc-story__slide {
	position: relative;
	min-height: auto;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-block: calc(var(--phc-header-h) + 2.5rem) 3.5rem;
	background: var(--phc-paper);
	color: var(--phc-ink);
}

/* -------------------------------------------------------------
   Dot navigation
   ------------------------------------------------------------- */
.phc-story-dots {
	position: fixed;
	right: clamp(14px, 2.4vw, 34px);
	top: 50%;
	transform: translateY(-50%);
	z-index: 55;
	display: none;
	flex-direction: column;
	gap: 14px;
}

.phc-story-dots a {
	width: 9px;
	height: 9px;
	border-radius: 999px;
	border: 1px solid var(--phc-stone);
	transition: background-color 0.3s var(--phc-ease), transform 0.3s var(--phc-ease), border-color 0.3s var(--phc-ease);
}

.phc-story-dots a.is-active {
	background: var(--phc-yellow-hover);
	border-color: var(--phc-yellow-deep);
	transform: scale(1.4);
}

@media (min-width: 960px) {
	.phc-story-dots {
		display: flex;
	}
}

/* -------------------------------------------------------------
   Hero
   ------------------------------------------------------------- */
.phc-hero {
	/* The one chapter that keeps the full-viewport treatment on purpose
	   (see the note on .phc-story__slide above, which now defaults to
	   auto) — this is the opening moment, meant to read as a full-bleed
	   screen regardless of how short its own text is. */
	min-height: 100vh;
	background: var(--phc-black);
	color: var(--phc-paper);
	overflow: hidden;
}

.phc-hero__field {
	position: absolute;
	inset: -10%;
	background:
		radial-gradient(60% 50% at 82% 12%, rgba(224, 203, 174, 0.26), transparent 60%),
		radial-gradient(45% 45% at 8% 88%, rgba(224, 203, 174, 0.13), transparent 65%);
	will-change: transform;
}

/* Optional Customizer-uploaded photo (template-parts/story/hero.php) —
   the accent glow above dims itself so it reads as a light wash over the
   photo instead of competing with it. The photo + scrim pair itself
   (.phc-cover-photo / .phc-cover-scrim) is a shared component defined
   in style.css, not here — the shop archive's category hero
   (woocommerce/archive-product.php) reuses the exact same markup. */
.phc-hero.has-photo .phc-hero__field {
	opacity: 0.55;
	mix-blend-mode: soft-light;
}

.phc-hero__inner {
	position: relative;
	z-index: 1;
}

.phc-hero__eyebrow {
	color: var(--phc-yellow);
}

.phc-hero__eyebrow::before {
	background: var(--phc-yellow);
}

.phc-hero__title {
	/* style.css sets a global `h1 { color: var(--phc-ink) }` for headings
	   on light/paper sections — a direct match beats the inherited paper
	   color from .phc-hero, so this h1 needs its own explicit override or
	   it renders near-black on the hero's dark background. */
	color: var(--phc-paper);
	margin-top: 1.4rem;
	font-size: clamp(1.6rem, 7vw, 5rem);
	line-height: 1.1;
	overflow: hidden;
}

.phc-hero__line {
	display: block;
	overflow: hidden;
}

.phc-hero__line--accent {
	color: var(--phc-yellow);
	font-style: italic;
}

.phc-hero__foot {
	margin-top: clamp(2rem, 5vw, 3.4rem);
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.6rem;
}

.phc-hero__lede {
	color: rgba(247, 245, 239, 0.72);
}

.phc-scroll-cue {
	position: absolute;
	left: 50%;
	bottom: clamp(20px, 3vw, 40px);
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	background: none;
	border: none;
	color: rgba(247, 245, 239, 0.6);
	font-size: 0.72rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	cursor: pointer;
}

.phc-scroll-cue__line {
	width: 1px;
	height: 34px;
	background: currentColor;
	position: relative;
	overflow: hidden;
}

.phc-scroll-cue__line::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--phc-yellow);
	transform: translateY(-100%);
	animation: phc-scroll-cue 2.2s var(--phc-ease) infinite;
}

@keyframes phc-scroll-cue {
	0% { transform: translateY(-100%); }
	50% { transform: translateY(0); }
	100% { transform: translateY(100%); }
}

/* -------------------------------------------------------------
   Manifesto
   ------------------------------------------------------------- */
.phc-manifesto__inner {
	max-width: 920px;
}

.phc-manifesto__statement {
	margin-top: 1.6rem;
	font-family: var(--phc-font-display);
	font-size: clamp(1.9rem, 4.6vw, 3.4rem);
	line-height: 1.22;
}

.phc-manifesto__statement span {
	display: inline;
}

.phc-manifesto__accent {
	color: var(--phc-yellow-deep);
	font-style: italic;
}

.phc-manifesto__note {
	margin-top: 2rem;
}

/* -------------------------------------------------------------
   Formula
   ------------------------------------------------------------- */
.phc-formula__grid {
	margin-top: 2.6rem;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(1.6rem, 4vw, 3rem);
}

.phc-formula__n {
	display: block;
	font-family: var(--phc-font-display);
	font-size: 2.6rem;
	color: var(--phc-yellow-deep);
	margin-bottom: 0.8rem;
}

.phc-formula__item h3 {
	font-size: 1.2rem;
	margin-bottom: 0.5rem;
}

.phc-formula__item p {
	color: var(--phc-graphite);
	max-width: 34ch;
}

@media (max-width: 760px) {
	.phc-formula__grid {
		grid-template-columns: 1fr;
	}
}

/* -------------------------------------------------------------
   Categories
   ------------------------------------------------------------- */
.phc-categories__head,
.phc-bestsellers__head,
.phc-testimonials__head,
.phc-journal__head {
	margin-bottom: clamp(1.6rem, 3.4vw, 2.6rem);
}

.phc-categories__head h2,
.phc-bestsellers__head h2,
.phc-testimonials__head h2,
.phc-journal__head h2 {
	margin-top: 0.5rem;
	font-size: clamp(1.7rem, 3.4vw, 2.5rem);
}

.phc-categories__grid {
	padding-inline: var(--phc-gutter);
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.4rem;
}

.phc-category-tile {
	position: relative;
	display: flex;
	align-items: flex-end;
	aspect-ratio: 4 / 5;
	border-radius: var(--phc-radius-m);
	overflow: hidden;
	text-decoration: none;
	color: var(--phc-paper);
	background: linear-gradient(155deg, #2a271f, var(--phc-ink));
}

.phc-category-tile__media {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	transition: transform 0.7s var(--phc-ease);
}

.phc-category-tile::after {
	/* Same two-layer scrim as .phc-hero__scrim — full-height darkening
	   (not just a bottom vignette) so a bright photo doesn't wash out the
	   top of the tile, plus a side gradient for a bit of depth. */
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(10, 10, 8, 0.32) 0%, rgba(10, 10, 8, 0.5) 55%, rgba(10, 10, 8, 0.86) 100%),
		linear-gradient(90deg, rgba(10, 10, 8, 0.45), transparent 55%);
}

.phc-category-tile:hover .phc-category-tile__media {
	transform: scale(1.06);
}

.phc-category-tile__label {
	position: relative;
	z-index: 1;
	padding: 1.4rem;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.phc-category-tile__name {
	font-family: var(--phc-font-display);
	font-size: 1.3rem;
}

.phc-category-tile__count {
	font-size: 0.78rem;
	opacity: 0.7;
}

@media (max-width: 900px) {
	.phc-categories__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.phc-categories__grid {
		grid-template-columns: 1fr;
	}
}

/* -------------------------------------------------------------
   Bestsellers rail
   ------------------------------------------------------------- */
.phc-bestsellers__rail {
	overflow-x: auto;
	scrollbar-width: none;
	padding-inline: var(--phc-gutter);
}

.phc-bestsellers__rail::-webkit-scrollbar {
	display: none;
}

.phc-bestsellers__track {
	display: flex;
	gap: 1.4rem;
}

.phc-bestsellers__track .phc-product-card {
	flex: 0 0 auto;
	width: min(280px, 74vw);
}

/* -------------------------------------------------------------
   Professionals (B2B)
   ------------------------------------------------------------- */
.phc-pro {
	background: var(--phc-ink);
	color: var(--phc-paper);
}

.phc-pro__grid {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: clamp(2rem, 5vw, 4rem);
	align-items: center;
}

.phc-pro__copy h2 {
	margin-top: 0.6rem;
	font-size: clamp(1.8rem, 3.6vw, 2.7rem);
	color: var(--phc-paper);
}

.phc-pro__copy .phc-lede {
	color: rgba(247, 245, 239, 0.68);
	margin-top: 1rem;
	margin-bottom: 1.8rem;
}

.phc-pro__ctas {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.phc-pro__stats {
	display: grid;
	gap: 1.6rem;
	border-left: 1px solid var(--phc-fog);
	padding-left: clamp(1.4rem, 3vw, 2.4rem);
}

.phc-pro__stats strong {
	display: block;
	font-family: var(--phc-font-display);
	font-size: 2.4rem;
	color: var(--phc-yellow);
}

.phc-pro__stats span {
	color: rgba(247, 245, 239, 0.6);
	font-size: 0.9rem;
}

@media (max-width: 820px) {
	.phc-pro__grid {
		grid-template-columns: 1fr;
	}

	.phc-pro__stats {
		border-left: none;
		border-top: 1px solid var(--phc-fog);
		padding-left: 0;
		padding-top: 1.6rem;
		grid-auto-flow: column;
		grid-template-columns: repeat(3, 1fr);
	}
}

/* -------------------------------------------------------------
   Testimonials
   ------------------------------------------------------------- */
.phc-testimonials__grid {
	/* Same missing-padding issue as .phc-journal__grid — no .phc-container
	   wrapper here either. */
	padding-inline: var(--phc-gutter);
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.4rem;
}

.phc-testimonial {
	background: var(--phc-white);
	border-radius: var(--phc-radius-m);
	padding: 1.8rem;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 220px;
}

.phc-testimonial blockquote p {
	font-family: var(--phc-font-display);
	font-size: 1.1rem;
	line-height: 1.45;
}

.phc-testimonial figcaption {
	margin-top: 1.4rem;
	display: flex;
	flex-direction: column;
	font-size: 0.85rem;
}

.phc-testimonial__name {
	font-weight: 700;
}

.phc-testimonial__place {
	color: var(--phc-stone);
}

@media (max-width: 900px) {
	.phc-testimonials__grid {
		grid-template-columns: 1fr;
	}
}

/* -------------------------------------------------------------
   Journal
   ------------------------------------------------------------- */
.phc-journal__grid {
	/* Unlike .phc-categories__grid this one has no .phc-container
	   wrapper around it, so it needs its own side padding — was
	   missing, which let cards sit flush against the viewport edge. */
	padding-inline: var(--phc-gutter);
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.2rem;
}

.phc-journal-card {
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.phc-journal-card__media {
	display: block;
	aspect-ratio: 3 / 4;
	border-radius: var(--phc-radius-m);
	overflow: hidden;
	background: var(--phc-mist);
}

.phc-journal-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s var(--phc-ease);
}

.phc-journal-card:hover .phc-journal-card__media img {
	transform: scale(1.05);
}

.phc-journal-card__eyebrow {
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--phc-stone);
}

.phc-journal-card__title {
	font-family: var(--phc-font-display);
	font-size: 1.05rem;
	line-height: 1.35;
}

@media (max-width: 900px) {
	.phc-journal__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* -------------------------------------------------------------
   Newsletter (final chapter)
   ------------------------------------------------------------- */
.phc-newsletter {
	background: var(--phc-yellow-wash);
	text-align: center;
	align-items: center;
}

.phc-newsletter__inner {
	max-width: 640px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.phc-newsletter__title {
	margin-top: 0.6rem;
	font-size: clamp(1.7rem, 3.6vw, 2.6rem);
}

.phc-newsletter__lede {
	margin-top: 1rem;
}

.phc-newsletter__cta {
	margin-top: 2rem;
}

.phc-newsletter__contact {
	margin-top: 2.4rem;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.6rem;
	color: var(--phc-graphite);
}

.phc-newsletter__contact a {
	text-decoration: none;
	font-weight: 600;
}

.phc-newsletter__sep {
	color: var(--phc-stone);
}

/* -------------------------------------------------------------
   Chapter 2 — «Подарок за регистрацию» (template-parts/story/samples.php)
   Approved design «Вариант 2 — карточка «Подарок»», 2026-10-10:
   photo of the set on the yellow wash, offer + three steps + button.
   ------------------------------------------------------------- */
.phc-samples {
	padding-block: calc(var(--phc-header-h) + 1.5rem) clamp(2.5rem, 5vw, 4rem);
}

.phc-samples .phc-samples__card {
	display: grid;
	grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
	max-width: 1080px;
	margin-inline: auto;
	border: 1px solid var(--phc-mist);
	border-radius: 22px;
	overflow: hidden;
	background: var(--phc-white);
}

.phc-samples .phc-samples__pic {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 340px;
	padding: clamp(8px, 1.5vw, 16px);
	background: var(--phc-yellow-wash);
}

.phc-samples .phc-samples__img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 420px;
	mix-blend-mode: multiply;
	-webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent), linear-gradient(to bottom, transparent, #000 5%, #000 95%, transparent);
	-webkit-mask-composite: source-in;
	mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent), linear-gradient(to bottom, transparent, #000 5%, #000 95%, transparent);
	mask-composite: intersect;
}

.phc-samples .phc-samples__tag {
	position: absolute;
	top: 18px;
	left: 18px;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--phc-ink);
	color: var(--phc-yellow);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.phc-samples .phc-samples__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	padding: clamp(26px, 4vw, 52px);
}

.phc-samples .phc-samples__title {
	margin: 0.35em 0 0;
	color: var(--phc-ink);
	font-family: var(--phc-font-display);
	font-size: clamp(27px, 3.1vw, 40px);
	line-height: 1.08;
	text-wrap: balance;
}

.phc-samples .phc-samples__lede {
	max-width: 46ch;
	margin: 12px 0 0;
	color: var(--phc-graphite);
	font-size: clamp(15px, 1.2vw, 17px);
}

.phc-samples .phc-samples__steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
	margin: 24px 0 28px;
	padding: 0;
	list-style: none;
	counter-reset: phc-samples-step;
}

.phc-samples .phc-samples__steps li {
	padding-top: 10px;
	border-top: 1px solid var(--phc-mist);
	color: var(--phc-graphite);
	font-size: 14px;
	line-height: 1.35;
	counter-increment: phc-samples-step;
}

.phc-samples .phc-samples__steps li::before {
	content: counter(phc-samples-step);
	display: block;
	margin-bottom: 6px;
	color: var(--phc-yellow-deep);
	font-family: var(--phc-font-display);
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
}

.phc-samples .phc-samples__cta {
	align-self: flex-start;
}

@media (max-width: 720px) {
	.phc-samples .phc-samples__card {
		grid-template-columns: minmax(0, 1fr);
		border-radius: 18px;
	}

	.phc-samples .phc-samples__pic {
		min-height: 0;
		padding: 34px 20px 20px;
	}

	.phc-samples .phc-samples__img {
		max-height: 300px;
	}

	.phc-samples .phc-samples__steps {
		grid-template-columns: minmax(0, 1fr);
		gap: 8px;
		margin: 18px 0 22px;
	}

	.phc-samples .phc-samples__steps li {
		display: flex;
		align-items: baseline;
		gap: 10px;
		padding-top: 0;
		border-top: 0;
	}

	.phc-samples .phc-samples__steps li::before {
		margin: 0;
		font-size: 18px;
	}

	.phc-samples .phc-samples__cta {
		align-self: stretch;
		text-align: center;
	}
}


/* Category tiles: light labels on the photo. The tile is an <a> inside
   .site-main, so a bare .phc-category-tile colour loses to style.css's
   `.site-main a:not(...)` accent rule — hence the extra ancestor class. */
.site-main .phc-category-tile {
	color: #fff;
}

.site-main .phc-category-tile .phc-category-tile__name {
	color: #fff;
	text-shadow: 0 1px 14px rgba(10, 10, 8, 0.55);
}

.site-main .phc-category-tile .phc-category-tile__count {
	color: #fff;
	opacity: 0.88;
	text-shadow: 0 1px 10px rgba(10, 10, 8, 0.55);
}
