/*
Theme Name: FirstDay Studio
Theme URI: https://firstdaystudio.app/
Author: First Day Studio LLC
Description: Block theme for the FirstDay Studio website. Every section is a block pattern you can add, move, edit or remove in the WordPress Site Editor (Appearance > Editor). Includes the FirstDay logo family, Poppins (bundled, no Google Fonts call) and ready-made sections for FirstDay Display Pro, FirstDay Display Lite, pricing, add-ons and the coming FirstDay Sites and mobile apps.
Version: 1.0.31
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Text Domain: firstday-studios
Tags: block-patterns, full-site-editing, wide-blocks, one-column, custom-logo
*/

/* ---------- Header ---------- */
/* The sticky part is the template-part wrapper: .fd-header is the same height as
   its wrapper, so making .fd-header itself sticky does nothing. */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 46px; } }
@media (max-width: 600px) { .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 0; } }
/* Links to a section (#faq, #compare, /help/#videos) stop below the sticky header, not under it.
   These are fallbacks; a small script in functions.php sets the exact header height. */
html { scroll-padding-top: 112px; }
@media (max-width: 781px) { html { scroll-padding-top: 96px; } }
html:has(body.admin-bar) { scroll-padding-top: 144px; }
@media (max-width: 781px) { html:has(body.admin-bar) { scroll-padding-top: 96px; } }
/* Reserve each video's space before it loads, so the page doesn't shift after jumping to a section. */
.wp-block-video video { width: 100%; aspect-ratio: 16 / 9; background: var(--wp--preset--color--navy); }
.fd-header {
	position: relative;
	isolation: isolate;
	border-bottom: 1px solid var(--wp--preset--color--line);
}
/* The frosted background lives on a pseudo-element. A backdrop-filter on .fd-header
   itself traps the mobile menu overlay inside the 95px header. */
.fd-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(255, 255, 255, 0.94);
	-webkit-backdrop-filter: saturate(160%) blur(10px);
	backdrop-filter: saturate(160%) blur(10px);
}

/* ---------- Block styles (registered in functions.php) ---------- */
.is-style-fd-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--medium);
	box-shadow: var(--wp--custom--shadow--card);
}
.is-style-fd-card-dark {
	border-radius: var(--wp--custom--radius--medium);
	box-shadow: var(--wp--preset--shadow--lift);
}
p.is-style-fd-badge {
	display: inline-block;
	width: auto;
	margin-bottom: 0;
	padding: 0.25em 0.85em;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.6;
}
p.is-style-fd-badge:not(.has-background) {
	background: var(--wp--preset--color--sand);
}
p.is-style-fd-eyebrow {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.wp-block-image.is-style-fd-tile img {
	border-radius: 22%;
	box-shadow: var(--wp--custom--shadow--card);
}
ul.is-style-fd-checks {
	list-style: none;
	padding-left: 0;
}
ul.is-style-fd-checks li {
	position: relative;
	padding-left: 1.9em;
	margin-bottom: 0.55em;
}
ul.is-style-fd-checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 1.15em;
	height: 1.15em;
	border-radius: 50%;
	background: var(--wp--preset--color--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4l2.6 2.6L12.2 5' fill='none' stroke='%23172A4D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}

/* ---------- Cards that lift a little on hover ---------- */
@media (prefers-reduced-motion: no-preference) {
	.is-style-fd-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
	.is-style-fd-card:hover { transform: translateY(-3px); }
}

/* ---------- Pricing ---------- */
.fd-price {
	font-size: clamp(2.4rem, 5vw, 3.25rem);
	font-weight: 700;
	line-height: 1;
	color: var(--wp--preset--color--navy);
	margin-bottom: 0;
}
.fd-price small, .fd-price sub { font-size: 0.35em; font-weight: 500; color: var(--wp--preset--color--slate); }
.fd-featured { outline: 3px solid var(--wp--preset--color--gold); outline-offset: -3px; }

/* ---------- Comparison table ---------- */
.fd-compare table { border-collapse: collapse; width: 100%; }
.fd-compare th, .fd-compare td { border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding: 0.85rem 0.75rem; text-align: left; }
.fd-compare thead th { color: var(--wp--preset--color--navy); font-weight: 700; border-bottom: 2px solid var(--wp--preset--color--navy); }
.fd-compare td:not(:first-child), .fd-compare th:not(:first-child) { text-align: center; }
.fd-compare tbody tr:hover { background: var(--wp--preset--color--cream); }

/* ---------- FAQ ---------- */
.wp-block-details summary { font-weight: 700; color: var(--wp--preset--color--navy); cursor: pointer; }
.wp-block-details summary:focus-visible { outline: 3px solid var(--wp--preset--color--gold); outline-offset: 3px; }

/* ---------- Footer ---------- */
.fd-footer a { color: inherit; text-decoration: none; }
.fd-footer a:hover, .fd-footer a:focus { text-decoration: underline; color: var(--wp--preset--color--gold-light); }

/* Keep the focus ring visible everywhere */
:where(a, button, summary, input, select, textarea):focus-visible {
	outline: 3px solid var(--wp--preset--color--gold);
	outline-offset: 2px;
}

/* ---------- Briefs, whitepaper and survey: easy to find ---------- */
/* "Resources" in the header: a gold pill on wide screens; a plain item in the phone menu. */
@media (min-width: 600px) {
	.fd-header .wp-block-navigation-item.fd-nav-resources {
		border: 2px solid var(--wp--preset--color--gold);
		border-radius: 999px;
		padding: 0.25em 0.8em 0.25em 0.95em;
		font-weight: 500;
	}
	.fd-header .fd-nav-resources .wp-block-navigation__submenu-container {
		border: 1px solid var(--wp--preset--color--line) !important;
		border-radius: 12px;
		box-shadow: var(--wp--custom--shadow--card);
		padding: 0.4em 0;
		min-width: 230px !important;
	}
	.fd-header .fd-nav-resources .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 0.55em 1.1em; }
}
/* With Resources added the menu has eight items, so tablets and small laptops get a tighter menu. */
@media (min-width: 600px) and (max-width: 1180px) {
	.fd-header .wp-block-navigation { font-size: 0.88rem; }
	.fd-header .wp-block-navigation .wp-block-navigation__container { gap: 0.85em; }
	.fd-header .wp-block-image img { width: 160px !important; }
}
/* The featured card (the whitepaper on the home page) gets a gold frame. */
.is-style-fd-card.fd-card-featured { border: 3px solid var(--wp--preset--color--gold); }
/* The four brief buttons sit side by side in one card, so they're a little smaller. */
.fd-brief-links .wp-block-button__link { padding: 0.55em 1.1em; font-size: 0.9rem; }

/* ---------- Small screens ---------- */
.fd-header .wp-block-button__link { white-space: nowrap; }
.fd-footer-list { list-style: none; padding-left: 0; }
.fd-footer-list li { margin-bottom: 0.4em; }
@media (max-width: 600px) {
	.fd-header .wp-block-button__link { padding: 0.5em 1em; font-size: 0.9rem; }
	.fd-header .wp-block-image img { width: 150px !important; }
}
@media (max-width: 360px) {
	.fd-header .wp-block-buttons { display: none; }
}

/* Header, page and footer sit flush (no white strip between sections and the footer). */
.wp-site-blocks > * + * { margin-block-start: 0; }

/* ---------- Readable contrast (WCAG AA) ----------
   The brand amber and coral are too light for small text and white button text.
   Darker shades are used only where text sits on them or is drawn in them. */
p.is-style-fd-eyebrow.has-amber-color { color: #965A0C !important; }
p.is-style-fd-eyebrow.has-coral-color { color: #B5402B !important; }
.wp-block-button__link.has-coral-background-color { background-color: #C2462F !important; }

/* ---------- Bigger tap targets ---------- */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close { padding: 10px; margin: -10px; }
.fd-footer-list a { display: inline-block; padding: 0.3em 0; }

/* Read by screen readers and search engines, not shown (used for the page h1 on product pages). */
.screen-reader-text {
	border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; width: 1px; word-wrap: normal !important;
}
