/*
Theme Name:  Her Health
Theme URI:   https://herhealthwhattoknow.com
Description: Custom theme for Her Health — What To Know. No page builder: templates are PHP, content is ACF, styling is this file.
Author:      What To Know LLC
Version:     1.0.0
Text Domain: herhealth
*/

/* Texta — the same self-hosted files the network sites already use */
@font-face { font-family: 'Texta Light'; src: url('https://myweightwhattoknow.com/wp-content/uploads/sites/2/et-fonts/TextaLight.ttf') format('truetype'); font-weight: normal; font-display: swap; }
@font-face { font-family: 'Texta Book'; src: url('https://myweightwhattoknow.com/wp-content/uploads/sites/2/et-fonts/TextaBook.ttf') format('truetype'); font-weight: normal; font-display: swap; }
@font-face { font-family: 'Texta Medium'; src: url('https://myweightwhattoknow.com/wp-content/uploads/sites/2/et-fonts/TextaMedium.ttf') format('truetype'); font-weight: normal; font-display: swap; }


/* ============ Tokens (mobile-first, values from PSD) ============ */
:root {
	--hhwtk-lavender:      #9a9ed6;  /* CTA banner / blurb tiles            */
	--hhwtk-lavender-deep: #8e8fc3;  /* H1, hero copy, repeater headings    */
	--hhwtk-lavender-tint: #eceaf6;
	--hhwtk-plum:          #9e84b5;  /* buttons (text + border)             */
	--hhwtk-ink:           #3f3f46;
	--hhwtk-body:          #75757d;  /* topic/body copy gray                */
	--hhwtk-gray:          #d9d9de;  /* footer bg */
	/* Google Fonts stand-ins for the PSD fonts (loaded in functions.php):
	   Montserrat ≈ Proxima Nova · Mulish ≈ Texta · Rokkitt ≈ Eighties Comeback Condensed.
	   If the real fonts get licensed later, swap names here — nothing else changes. */
	--hhwtk-font-head:     'Texta Medium', 'Mulish', Helvetica, Arial, sans-serif;
	--hhwtk-font-body:     'Texta Book', 'Mulish', Helvetica, Arial, sans-serif;
	--hhwtk-font-topic:    'Lora', Georgia, serif;          /* repeater/topic headings */
	--hhwtk-serif:         'Lora', Georgia, serif;             /* CTA italic line (PSD: Lora Italic) */
	--hhwtk-max:           1200px;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--hhwtk-font-body); color: var(--hhwtk-body); font-size: 15px; line-height: 1.5; }
img { max-width: 100%; height: auto; }
a { color: var(--hhwtk-lavender-deep); }
.hhwtk-wrap { max-width: var(--hhwtk-max); margin: 0 auto; padding: 0 5%; }
.hhwtk-divider { width: 150px; height: 10px; background: #e3e8ee; border: 0; margin: 26px auto; }

/* ============ Buttons ============ */
.hhwtk-btn { display: inline-block; font-family: var(--hhwtk-font-head); font-size: 14px; /* PSD: 14.13pt */ line-height: 1; padding: 13px 40px; border-radius: 40px; text-decoration: none; transition: all .25s; cursor: pointer; }
.hhwtk-btn--solid { background: var(--hhwtk-plum); color: #fff !important; border: 1px solid var(--hhwtk-plum); }
.hhwtk-btn--solid:hover { opacity: .85; }
.hhwtk-btn--outline { background: transparent; color: var(--hhwtk-plum) !important; border: 1px solid var(--hhwtk-plum); }
.hhwtk-btn--outline:hover { background: var(--hhwtk-plum); color: #fff !important; }

/* ============ Header ============ */
.hhwtk-header { background: #fff; position: sticky; top: 0; z-index: 90; transition: box-shadow .25s, background-color .25s; }
.hhwtk-header.is-stuck { box-shadow: 0 2px 14px rgba(0,0,0,.08); }
.hhwtk-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 5%; max-width: var(--hhwtk-max); margin: 0 auto; }
.hhwtk-header__logo img { max-width: 102px; max-height: 75px; width: auto; height: auto; display: block; }
.hhwtk-header__right { display: flex; align-items: center; gap: 30px; }
.hhwtk-nav ul { display: flex; gap: 34px; list-style: none; margin: 0; padding: 0; }
.hhwtk-nav a { color: var(--hhwtk-body); text-decoration: none; font-family: var(--hhwtk-font-head); font-size: 16px; letter-spacing: .12em; text-transform: uppercase; transition: color .2s; }
.hhwtk-nav a:hover,
.hhwtk-nav .current-menu-item > a,
.hhwtk-nav .current_page_item > a { color: var(--hhwtk-plum); }

/* Search toggle + dropdown */
.hhwtk-search-toggle { background: none; border: 0; padding: 4px; cursor: pointer; color: var(--hhwtk-plum); display: flex; }
.hhwtk-search-toggle svg { width: 21px; height: 21px; }
.hhwtk-search-toggle:hover { opacity: .75; }
.hhwtk-search { position: absolute; top: 100%; right: 5%; background: #fff; border: 1px solid #e7e6f0; border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.12); padding: 14px; z-index: 60; }
.hhwtk-search form { display: flex; gap: 10px; }
.hhwtk-search input[type="search"] { font-family: var(--hhwtk-font-body); font-size: 16px; color: var(--hhwtk-ink); border: 1px solid #d9d8e4; border-radius: 24px; padding: 10px 18px; width: min(320px, 60vw); outline-color: var(--hhwtk-lavender-deep); }
@media (max-width: 860px) { .hhwtk-search { left: 5%; right: 5%; } .hhwtk-search input[type="search"] { width: 100%; } .hhwtk-search form { flex-wrap: wrap; } }
.hhwtk-socials { display: flex; gap: 10px; align-items: center; }
.hhwtk-socials a { display: flex; }
.hhwtk-socials img, .hhwtk-socials svg { width: 20px; height: 20px; }

/* Hamburger (mobile) */
.hhwtk-burger { display: none; background: none; border: 0; padding: 6px; cursor: pointer; }
.hhwtk-burger span { display: block; width: 28px; height: 3px; background: var(--hhwtk-lavender-deep); border-radius: 2px; margin: 5px 0; }

@media (max-width: 860px) {
	.hhwtk-burger { display: block; }
	/* Keep search icon in the bar next to the burger (Divi-style) */
	.hhwtk-header__right { display: flex; gap: 18px; }
	.hhwtk-socials { display: none; }
	/* Dropdown: full-width panel, left-aligned rows with separators */
	.hhwtk-nav { display: none; }
	.hhwtk-header.is-open .hhwtk-nav { display: block; position: absolute; top: 100%; left: 0; right: 0; background: #fff; box-shadow: 0 14px 24px rgba(0,0,0,.12); padding: 10px 28px 28px; }
	.hhwtk-header.is-open .hhwtk-nav ul { display: block; }
	.hhwtk-header.is-open .hhwtk-nav li { border-bottom: 1px solid #eee; }
	.hhwtk-header.is-open .hhwtk-nav a { display: block; padding: 20px 16px; font-size: 21px; letter-spacing: .04em; color: #666; }
	.hhwtk-header.is-open .hhwtk-nav .current-menu-item > a,
	.hhwtk-header.is-open .hhwtk-nav .current_page_item > a { background: #f5f5f7; color: #666; }
}

/* ============ Hero (front page) — text over background image ============
   Image set inline on the section as CSS vars: --hhwtk-hero-bg / --hhwtk-hero-bg-m */
.hhwtk-hero {
	position: relative;
	background-image: var(--hhwtk-hero-bg-m, var(--hhwtk-hero-bg));
	background-position: center right;
	background-size: cover;
	background-repeat: no-repeat;
	background-color: var(--hhwtk-lavender-tint);
	padding: 36px 6% 44px;
}
.hhwtk-hero__heading {
	font-family: var(--hhwtk-font-head);
	font-weight: 600;
	color: var(--hhwtk-lavender-deep);
	font-size: 24.5px;        /* PSD: 24.41pt mobile */
	line-height: 1.2;
	margin: 0 0 14px;
	max-width: 17ch;
}
.hhwtk-hero__copy {
	color: var(--hhwtk-lavender-deep);
	font-size: 15px;          /* PSD: 15pt / 16pt leading */
	line-height: 1.35;
	margin: 0 0 22px;
	max-width: 36ch;
}
@media (min-width: 768px) {
	/* Comp: transparent header floats over a tall hero; text vertically centered */
	.home .hhwtk-header { position: absolute; top: 0; left: 0; right: 0; background: transparent; z-index: 90; }
	.home .hhwtk-header.is-stuck { position: fixed; background: #fff; }
	.hhwtk-hero {
		background-image: var(--hhwtk-hero-bg);
		min-height: clamp(480px, 42vw, 760px);
		display: flex;
		align-items: center;
		padding: 120px 8% 72px;
		padding-left: max(8%, calc((100% - var(--hhwtk-max)) / 2));
	}
	.hhwtk-hero__heading { font-size: clamp(34px, 3.6vw, 60px); line-height: 1.15; max-width: 30ch; margin-bottom: 20px; }
	.hhwtk-hero__copy { font-size: clamp(17px, 1.5vw, 24px); line-height: 1.5; max-width: 46ch; }
}

/* ============ Topic sections (front page) ============ */
.hhwtk-topic { padding: 0 0 28px; text-align: center; background: #fff; }
.hhwtk-topic__body { padding: 0 6%; }
.hhwtk-topic--tint, .hhwtk-topics .hhwtk-topic:nth-child(even) { background: var(--hhwtk-lavender-tint); }
.hhwtk-topic__media img { width: 100%; max-width: none; border-radius: 0; display: block; margin: 0 0 24px; }
.hhwtk-topic__heading { font-family: var(--hhwtk-font-topic); color: var(--hhwtk-lavender-deep); font-size: 23px; /* PSD: 23.11pt */ font-weight: 500; margin: 0 0 12px; }
.hhwtk-topic__copy { color: var(--hhwtk-body); font-size: 14px; line-height: 1.55; /* PSD: 14.22pt / 22.05pt */ max-width: 62ch; margin: 0 auto 22px; }
@media (min-width: 981px) { .hhwtk-topic__heading { font-size: clamp(24px, 2.6vw, 32px); } .hhwtk-topic__copy { font-size: 15px; } }
@media (min-width: 981px) {
	/* full-bleed background; content centered to --hhwtk-max via dynamic side padding */
	.hhwtk-topic { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: stretch; text-align: center; padding: 0; }
	.hhwtk-topic__media { height: 100%; }
	.hhwtk-topic__media img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; margin: 0; }
	.hhwtk-topic__body { align-self: center; padding: 56px 10%; }
	.hhwtk-topic__copy { margin: 0 auto 24px; }
	.hhwtk-topic:nth-child(even) .hhwtk-topic__media { order: 2; }
}

/* ============ Icon blurbs ============ */
.hhwtk-blurbs { display: grid; grid-template-columns: repeat(3, auto); justify-content: center; gap: 28px; padding: 56px 6%; background: #fff; }
.hhwtk-blurb { text-align: center; text-decoration: none; width: clamp(92px, 26vw, 196px); }
.hhwtk-blurb__icon { display: block; width: 100%; aspect-ratio: 392 / 351; margin: 0 auto 16px; transition: opacity .25s; } /* tile shape is baked into the icon PNGs */
.hhwtk-blurb:hover .hhwtk-blurb__icon { opacity: .85; }
.hhwtk-blurb__icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hhwtk-blurb__label { display: inline-block; border: 1px solid var(--hhwtk-plum); border-radius: 20px; color: var(--hhwtk-plum); font-size: 14px; padding: 7px 26px; }

/* ============ CTA banner ============ */
.hhwtk-cta { background: var(--hhwtk-lavender); color: #fff; text-align: center; padding: 64px 8%; }
.hhwtk-cta__heading { font-family: 'Texta Light', var(--hhwtk-font-body); font-weight: 300; letter-spacing: .5px; text-transform: uppercase; font-size: 40.5px; line-height: 1.05; color: #fff; margin: 0 0 12px; }
@media (min-width: 768px) { .hhwtk-cta { padding: 45px 8% 30px; } .hhwtk-cta__heading { font-size: 42px; line-height: 0.95; } .hhwtk-cta__copy { font-size: 24px; } }
.hhwtk-cta__copy { font-family: var(--hhwtk-serif); font-style: italic; font-size: 24px; line-height: 1.4; }
.hhwtk-cta__copy p { margin: 0; }
.hhwtk-cta__copy a { color: #fff; }

/* ============ Topic landing (category archive) ============ */
.hhwtk-archive__head { text-align: center; padding: 56px 6% 8px; }
.hhwtk-archive__title { font-family: var(--hhwtk-serif); font-weight: 500; letter-spacing: .5px; color: var(--hhwtk-lavender-deep); font-size: clamp(34px, 5vw, 46px); line-height: 1.1; margin: 0; }
.hhwtk-archive__intro { color: var(--hhwtk-lavender-deep); font-size: 19px; max-width: 56ch; margin: 0 auto 28px; }
.hhwtk-archive__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; max-width: var(--hhwtk-max); margin: 24px auto 64px; padding: 0 5%; }
.hhwtk-card { background: #fff; border: 1px solid #e7e6f0; border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--hhwtk-ink); display: flex; flex-direction: column; transition: box-shadow .25s, transform .25s; }
.hhwtk-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.10); transform: translateY(-3px); }
.hhwtk-card__thumb img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.hhwtk-card__body { padding: 18px 20px 22px; }
.hhwtk-card__title { font-family: var(--hhwtk-font-topic); color: var(--hhwtk-lavender-deep); font-size: 21px; margin: 0 0 8px; font-weight: 500; }
.hhwtk-card__excerpt { font-size: 15px; margin: 0; }

/* ============ Resources hub ============ */
.hhwtk-resources { max-width: 820px; margin: 0 auto 64px; padding: 0 5%; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.hhwtk-resource-card { border: 1px solid #e3e2ee; border-radius: 24px; overflow: hidden; text-decoration: none; display: flex; flex-direction: column; transition: box-shadow .25s, transform .25s; background: #fff; }
.hhwtk-resource-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.10); transform: translateY(-3px); }
.hhwtk-resource-card__icon { padding: 44px 0; display: flex; justify-content: center; }
.hhwtk-resource-card__icon img { width: 140px; height: 140px; object-fit: contain; }
.hhwtk-resource-card__label { background: var(--hhwtk-lavender); color: #fff; text-align: center; font-size: 21px; padding: 14px 10px; }

/* ============ Single article / generic page ============ */
.hhwtk-article { max-width: 760px; margin: 0 auto; padding: 48px 5% 72px; }
.hhwtk-article__title { font-family: var(--hhwtk-font-topic); font-weight: 500; color: var(--hhwtk-lavender-deep); font-size: clamp(30px, 4vw, 44px); line-height: 1.2; margin: 0 0 18px; }
.hhwtk-article__hero img { border-radius: 10px; margin-bottom: 28px; }
.hhwtk-article__content h2, .hhwtk-article__content h3 { color: var(--hhwtk-lavender-deep); font-family: var(--hhwtk-serif); font-weight: 400; }
.hhwtk-article__back { display: inline-block; margin-top: 36px; font-size: 15px; }

/* ============ Footer ============ */
.hhwtk-footer { background: var(--hhwtk-gray); text-align: center; padding: 36px 6% 28px; }
.hhwtk-footer__links { display: flex; justify-content: center; gap: 44px; flex-wrap: wrap; margin-bottom: 20px; }
.hhwtk-footer__link { text-decoration: none; color: var(--hhwtk-ink); font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hhwtk-footer__link img { width: 34px; height: 34px; object-fit: contain; opacity: .55; }
.hhwtk-footer__socials { display: flex; justify-content: center; gap: 12px; margin-bottom: 18px; }
.hhwtk-footer__socials img { width: 26px; height: 26px; }
.hhwtk-footer__legal { font-family: 'Texta Light', 'Mulish', Helvetica, Arial, sans-serif; font-weight: 300; font-size: 11px; /* PSD says ~5px — bumped for legibility */ color: #77777f; line-height: 1.7; max-width: 640px; margin: 0 auto; }
.hhwtk-footer__legal a { color: #77777f; }

/* Footer at desktop scale (per Home_v2 comp) */
@media (min-width: 768px) {
	.hhwtk-footer { padding: 44px 6% 32px; }
	.hhwtk-footer__link { font-size: 15px; }
	.hhwtk-footer__link img { width: 64px; height: 64px; }
	.hhwtk-footer__socials img, .hhwtk-footer__socials svg { width: 30px; height: 30px; }
	.hhwtk-footer__legal { font-size: 14px; max-width: 820px; }
}

