/*
Theme Name: FirstVial Child
Theme URI: https://firstvial.com
Description: Custom Kadence child theme for FirstVial — a peptide research resource. Brand-colored design system with custom navigation and homepage.
Author: FirstVial
Template: kadence
Version: 1.0.5
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: firstvial-child
*/

/* ==========================================================================
   1. GLOBAL CSS VARIABLES  (exact FirstVial brand colors)
   ========================================================================== */
:root {
	--fv-bg-navy:        #060F1E;              /* Background (navy)  */
	--fv-primary-blue:   #5BB8F5;              /* Primary blue       */
	--fv-accent-teal:    #00D4B8;              /* Accent teal        */
	--fv-card-surface:   #0B1929;              /* Card surface       */
	--fv-border-subtle:  rgba(91,184,245,0.12);/* Border subtle      */
	--fv-text-primary:   #FFFFFF;              /* Text primary       */
	--fv-text-secondary: rgba(255,255,255,0.45);/* Text secondary    */

	/* Derived tokens (built from the brand palette only) */
	--fv-gradient-brand: linear-gradient(135deg, var(--fv-primary-blue) 0%, var(--fv-accent-teal) 100%);
	--fv-radius:         14px;
	--fv-maxwidth:       1180px;
	--fv-section-pad:    96px;
}

/* Map the brand palette onto Kadence's own global custom properties so
   core/Kadence blocks inherit the colors without per-element overrides. */
:root {
	--global-palette1: var(--fv-primary-blue);   /* Kadence "Accent" */
	--global-palette2: var(--fv-accent-teal);    /* Kadence "Accent - alt" */
	--global-palette3: var(--fv-text-primary);   /* strongest text */
	--global-palette4: var(--fv-text-primary);
	--global-palette5: var(--fv-text-secondary);
	--global-palette6: var(--fv-border-subtle);
	--global-palette7: var(--fv-card-surface);   /* card / surface */
	--global-palette8: var(--fv-card-surface);
	--global-palette9: var(--fv-bg-navy);        /* page background */
}

/* ==========================================================================
   2. GLOBAL / BASE STYLES
   ========================================================================== */
body,
.site,
.content-bg,
body.wp-singular .content-bg {
	background-color: var(--fv-bg-navy);
	color: var(--fv-text-primary);
}

body {
	color: var(--fv-text-primary);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
	color: var(--fv-text-primary);
}

p, li, span, dd, dt {
	color: var(--fv-text-secondary);
}

a {
	color: var(--fv-primary-blue);
	transition: color .2s ease, opacity .2s ease;
}
a:hover,
a:focus {
	color: var(--fv-accent-teal);
}

::selection {
	background: var(--fv-primary-blue);
	color: var(--fv-bg-navy);
}

hr,
.entry-content hr {
	border-color: var(--fv-border-subtle);
}

/* Shared button treatment */
.fv-btn {
	display: inline-block;
	padding: 14px 30px;
	border-radius: var(--fv-radius);
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.fv-btn--primary {
	background: var(--fv-gradient-brand);
	color: var(--fv-bg-navy);
	border: 1px solid transparent;
}
.fv-btn--primary:hover {
	color: var(--fv-bg-navy);
	transform: translateY(-2px);
	box-shadow: 0 10px 30px rgba(0,212,184,0.25);
}
.fv-btn--ghost {
	background: transparent;
	color: var(--fv-primary-blue);
	border: 1px solid var(--fv-border-subtle);
}
.fv-btn--ghost:hover {
	color: var(--fv-accent-teal);
	border-color: var(--fv-accent-teal);
}

/* Shared section label (small uppercase eyebrow) */
.fv-label {
	display: inline-block;
	color: var(--fv-primary-blue);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* ==========================================================================
   3. NAVIGATION
   ========================================================================== */
/* (3)(4) Force the header background to brand navy (#060F1E).
   Kadence outputs `#masthead{background:#fff}` and
   `.site-header-row-container-inner{background:#fff}` via the Customizer —
   those paint the white box behind the branding/logo. We override on #masthead
   and its inner wraps (plus the sticky-fixed state) with !important so the
   navy is not dependent on Customizer defaults. */
#masthead,
#masthead .site-header-wrap,
#masthead .site-header-inner-wrap,
#masthead .site-header-upper-wrap,
#masthead .site-header-row-container,
#masthead .site-header-row-container-inner,
#masthead .site-main-header-inner-wrap,
#masthead .site-header-row,
#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) > .site-header-row-container-inner,
#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start):not(.site-header-row-container):not(.site-main-header-wrap) {
	background-color: #060F1E !important;
	background-image: none !important;
}
#masthead {
	border-bottom: 1px solid var(--fv-border-subtle);
}

/* Primary nav links */
.site-header .header-navigation .menu > .menu-item > a,
.header-navigation .menu-item a {
	color: var(--fv-text-primary);
	font-weight: 500;
	transition: color .2s ease;
}
.site-header .header-navigation .menu > .menu-item > a:hover,
.site-header .header-navigation .menu > .menu-item.current-menu-item > a {
	color: var(--fv-primary-blue);
}

/* Animated underline on hover */
.header-navigation .menu > .menu-item > a {
	position: relative;
}
.header-navigation .menu > .menu-item > a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -4px;
	height: 2px;
	width: 0;
	background: var(--fv-gradient-brand);
	transition: width .25s ease;
}
.header-navigation .menu > .menu-item > a:hover::after,
.header-navigation .menu > .menu-item.current-menu-item > a::after {
	width: 100%;
}

/* Dropdown sub-menus */
.header-navigation .sub-menu,
.header-navigation ul ul {
	background-color: var(--fv-card-surface);
	border: 1px solid var(--fv-border-subtle);
	border-radius: var(--fv-radius);
	overflow: hidden;
}
.header-navigation .sub-menu .menu-item a {
	color: var(--fv-text-secondary);
}
.header-navigation .sub-menu .menu-item a:hover {
	color: var(--fv-text-primary);
	background-color: rgba(91,184,245,0.06);
}

/* Mobile toggle + slide-out menu */
.mobile-toggle-open-container .menu-toggle-open,
button.menu-toggle {
	color: var(--fv-text-primary);
}
.mobile-navigation,
.site-header .mobile-navigation ul {
	background-color: var(--fv-bg-navy);
}
.mobile-navigation .menu-item a {
	color: var(--fv-text-primary);
	border-bottom: 1px solid var(--fv-border-subtle);
}
.mobile-navigation .menu-item a:hover {
	color: var(--fv-primary-blue);
}

/* (3) Vial logo mark left of the wordmark */
/* (1)(2) Container + image must be fully transparent — no white box, no border/padding */
.brand .fv-logo-mark,
.brand .fv-logo-mark img,
img.custom-logo {
	background: transparent !important;
	border: none;
	padding: 0;
}
.brand .fv-logo-mark {
	display: inline-flex;
	align-items: center;
	margin-right: 10px;
	line-height: 0;
	vertical-align: middle;
}
.brand .fv-logo-mark img,
.brand .fv-logo-mark svg,
img.custom-logo {
	display: block;
	max-height: 36px; /* (2) scale logo by height */
	width: auto;
	object-fit: contain;
}
/* Keep mark + wordmark on one baseline */
.site-branding .brand {
	display: inline-flex;
	align-items: center;
}

/* ==========================================================================
   4. HOMEPAGE TEMPLATE  (front-page.php)
   ========================================================================== */
.fv-home {
	background-color: var(--fv-bg-navy);
	color: var(--fv-text-primary);
	overflow-x: hidden;
}
.fv-container {
	width: 100%;
	max-width: var(--fv-maxwidth);
	margin: 0 auto;
	padding-left: 24px;
	padding-right: 24px;
}

/* --- Hero --- */
.fv-hero {
	position: relative;
	padding: var(--fv-section-pad) 0 64px;
	background:
		radial-gradient(60% 80% at 80% -10%, rgba(0,212,184,0.10), transparent 60%),
		radial-gradient(50% 70% at 0% 0%, rgba(91,184,245,0.12), transparent 55%),
		var(--fv-bg-navy);
	text-align: center;
}
/* (7) Prevent the WordPress admin bar from overlapping the hero */
body.admin-bar .fv-hero {
	padding-top: calc(var(--fv-section-pad) + 32px);
}
.fv-hero__eyebrow {
	display: inline-block;
	margin-bottom: 22px;
	padding: 6px 16px;
	border: 1px solid var(--fv-border-subtle);
	border-radius: 999px;
	color: var(--fv-primary-blue);
	font-size: 0.8rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
/* (1) Two-line H1 */
.fv-hero__title {
	margin: 0 auto 22px;
	max-width: 22ch;
	font-size: clamp(2.4rem, 6vw, 4.25rem);
	line-height: 1.08;
	color: var(--fv-text-primary);
	font-weight: 800;
}
/* (1)(2) First line pure white; the base `span{}` rule would otherwise mute it */
.fv-hero__line {
	display: block;
	color: #FFFFFF;
}
.fv-hero__line--accent {
	color: #5BB8F5; /* primary blue */
}
/* (8) Hero supporting text — pure / near-pure white, not muted */
.fv-hero__subtitle {
	margin: 0 auto 36px;
	max-width: 60ch;
	font-size: clamp(1.05rem, 2vw, 1.3rem);
	line-height: 1.6;
	color: #FFFFFF;
}
.fv-hero__actions {
	display: flex;
	gap: 16px;
	justify-content: center;
	flex-wrap: wrap;
}

/* --- (2) Stats row: three horizontal cards --- */
.fv-stats {
	padding: 0 0 24px;
}
.fv-stats__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
.fv-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	background-color: var(--fv-card-surface);
	border: 1px solid var(--fv-border-subtle);
	border-radius: var(--fv-radius);
	padding: 36px 24px;
}
.fv-stat__num {
	font-size: clamp(2.4rem, 5vw, 3.4rem);
	font-weight: 800;
	line-height: 1;
	color: var(--fv-primary-blue); /* large numbers in primary blue */
}
.fv-stat__label {
	margin-top: 12px;
	color: var(--fv-text-secondary);
	font-size: 1rem;
	letter-spacing: 0.02em;
}

/* --- Section head --- */
.fv-section-head {
	text-align: center;
	margin-bottom: 44px;
}
.fv-section-head h2 {
	font-size: clamp(1.8rem, 4vw, 2.75rem);
	margin: 12px 0 0;
	color: var(--fv-text-primary);
}

/* --- (3) Goal cards: 4-col grid, tinted variants, tag-first --- */
.fv-goals {
	padding: var(--fv-section-pad) 0 calc(var(--fv-section-pad) / 2);
}
.fv-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
.fv-grid--4 {
	grid-template-columns: repeat(4, 1fr);
}
.fv-goal-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--fv-border-subtle);
	border-radius: var(--fv-radius);
	padding: 28px;
	text-decoration: none;
	transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.fv-goal-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 18px 40px rgba(6,15,30,0.6);
}
/* Tinted variants */
.fv-goal-card--blue {
	background:
		linear-gradient(160deg, rgba(91,184,245,0.12), rgba(91,184,245,0.03)),
		var(--fv-card-surface);
	border-color: rgba(91,184,245,0.35);
}
.fv-goal-card--blue:hover {
	border-color: var(--fv-primary-blue);
}
.fv-goal-card--teal {
	background:
		linear-gradient(160deg, rgba(0,212,184,0.12), rgba(0,212,184,0.03)),
		var(--fv-card-surface);
	border-color: rgba(0,212,184,0.35);
}
.fv-goal-card--teal:hover {
	border-color: var(--fv-accent-teal);
}
.fv-goal-card--neutral {
	background-color: var(--fv-card-surface);
	border-color: var(--fv-border-subtle);
}
.fv-goal-card--neutral:hover {
	border-color: var(--fv-primary-blue);
}
/* Colored tag label (first element in each card) */
.fv-goal-card__tag {
	align-self: flex-start;
	margin-bottom: 16px;
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.fv-goal-card--blue .fv-goal-card__tag {
	background: rgba(91,184,245,0.16);
	color: var(--fv-primary-blue);
}
.fv-goal-card--teal .fv-goal-card__tag {
	background: rgba(0,212,184,0.16);
	color: var(--fv-accent-teal);
}
.fv-goal-card--neutral .fv-goal-card__tag {
	background: rgba(255,255,255,0.06);
	color: var(--fv-text-secondary);
}
.fv-goal-card__title {
	margin: 0 0 8px;
	font-size: 1.45rem;
	font-weight: 700;
	color: var(--fv-text-primary);
}
.fv-goal-card__detail {
	color: var(--fv-text-secondary);
	font-size: 0.95rem;
	line-height: 1.5;
}
/* (5) "View ->" CTA pinned to the bottom of each card */
.fv-goal-card__cta {
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid var(--fv-border-subtle);
	color: var(--fv-primary-blue);
	font-size: 0.9rem;
	font-weight: 600;
	transition: gap .2s ease, color .2s ease;
}
.fv-goal-card--teal .fv-goal-card__cta {
	color: var(--fv-accent-teal);
}
.fv-goal-card:hover .fv-goal-card__cta {
	color: var(--fv-text-primary);
}

/* --- (4) Tools strip: pill / chip buttons --- */
.fv-tools {
	padding: calc(var(--fv-section-pad) / 2) 0 0;
}
/* Tighter label above the tools strip */
.fv-section-head--tools {
	margin-bottom: 24px;
}
.fv-tools__strip {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px;
}
.fv-tool {
	display: inline-flex;
	align-items: center;
	padding: 12px 22px;
	border: 1px solid var(--fv-border-subtle);
	border-radius: 999px;
	background-color: var(--fv-card-surface);
	color: var(--fv-text-primary);
	font-weight: 500;
	font-size: 0.95rem;
	text-decoration: none;
	transition: color .2s ease, border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.fv-tool:hover {
	color: var(--fv-accent-teal);
	border-color: var(--fv-accent-teal);
	background-color: rgba(0,212,184,0.06);
	transform: translateY(-2px);
}

/* --- (5) Member bar: distinct dark banner + lock + button --- */
/* (6) Tightened gap from the tools strip above */
.fv-memberbar {
	padding: 28px 0 16px;
}
.fv-memberbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	padding: 24px 32px;
	border: 1px solid var(--fv-border-subtle);
	border-radius: var(--fv-radius);
	/* Darker than the card surface so the band reads as distinct */
	background:
		linear-gradient(0deg, rgba(0,0,0,0.35), rgba(0,0,0,0.35)),
		var(--fv-card-surface);
}
.fv-memberbar__text {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: var(--fv-text-primary);
	font-size: 1.1rem;
	font-weight: 500;
}
.fv-lock {
	flex: none;
	color: var(--fv-primary-blue);
}
.fv-memberbar__btn {
	white-space: nowrap;
}

/* --- (6) Allure banner: teal-tinted, bottom --- */
.fv-allure {
	padding: 16px 0 var(--fv-section-pad);
}
.fv-allure__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	padding: 26px 32px;
	border: 1px solid rgba(0,212,184,0.35);
	border-radius: var(--fv-radius);
	background:
		linear-gradient(135deg, rgba(0,212,184,0.16), rgba(0,212,184,0.05)),
		var(--fv-card-surface);
}
.fv-allure__text {
	color: var(--fv-text-primary);
	font-size: 1.1rem;
	font-weight: 500;
}
.fv-allure__btn {
	background: var(--fv-accent-teal);
	color: var(--fv-bg-navy);
	white-space: nowrap;
}
.fv-allure__btn:hover {
	color: var(--fv-bg-navy);
	transform: translateY(-2px);
	box-shadow: 0 10px 30px rgba(0,212,184,0.3);
}

/* ==========================================================================
   5. MOBILE RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
	.fv-grid,
	.fv-grid--4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 782px) {
	/* Admin bar becomes 46px tall below 782px */
	body.admin-bar .fv-hero {
		padding-top: calc(var(--fv-section-pad) + 46px);
	}
}

@media (max-width: 768px) {
	:root {
		--fv-section-pad: 64px;
	}
	.fv-hero__actions {
		flex-direction: column;
		align-items: stretch;
	}
	.fv-hero__actions .fv-btn {
		width: 100%;
		text-align: center;
	}
	.fv-stats__grid {
		grid-template-columns: 1fr;
	}
	.fv-memberbar__inner,
	.fv-allure__inner {
		flex-direction: column;
		text-align: center;
	}
	.fv-memberbar__btn,
	.fv-allure__btn {
		width: 100%;
		text-align: center;
	}
}

@media (max-width: 600px) {
	.fv-grid,
	.fv-grid--4 {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	:root {
		--fv-section-pad: 48px;
	}
	.fv-container {
		padding-left: 18px;
		padding-right: 18px;
	}
	.fv-goal-card {
		padding: 22px;
	}
	.fv-tool {
		padding: 10px 18px;
		font-size: 0.9rem;
	}
}
