/*
Theme Name: The Sharkstream
Theme URI: https://thesharkstream.com
Description: Child theme of Twenty Twenty-Five for thesharkstream.com. Dark, bold, broadcast look in the logo's colors (shark blue, teal, felt maroon). Colors and fonts live in theme.json; this file holds the few touches theme.json can't express.
Template: twentytwentyfive
Version: 1.6.1
Requires at least: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sharkstream
*/

/* ---------- Header ---------- */
.ss-header {
	border-top: 4px solid var(--wp--preset--color--accent-5);
	border-bottom: 1px solid var(--wp--preset--color--accent-4);
}

/* ---------- Hero ---------- */
.ss-hero {
	position: relative;
	overflow: hidden;
	background:
		repeating-linear-gradient(
			-45deg,
			transparent 0 22px,
			rgb(255 255 255 / 0.025) 22px 23px
		),
		radial-gradient(ellipse at 50% 0%, var(--wp--preset--color--accent-3) 0%, var(--wp--preset--color--base) 70%);
	border-bottom: 1px solid var(--wp--preset--color--accent-4);
}

/* Hero logo: centred above the text on phones, beside it on wide screens. */
.ss-hero-art {
	max-width: min(380px, 70vw);
	margin: 0 auto;
}

.ss-hero-art img {
	display: block;
	width: 100%;
	height: auto;
	filter: drop-shadow(0 10px 30px rgb(0 0 0 / 0.6));
}
/* Visually hidden, still read by screen readers and search engines. */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Logo and text side by side on wide screens; logo stacks above the text on phones. */
.ss-hero-grid {
	display: grid;
	gap: var(--wp--preset--spacing--50);
	align-items: center;
}

.ss-hero-grid h1 {
	margin-top: 0.2em;
}

@media (min-width: 782px) {
	.ss-hero-grid {
		grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	}
}

/* ---------- Sharkstream TV band (home page) ---------- */
.ss-tv-band {
	background:
		radial-gradient(ellipse at 85% 20%, rgb(173 216 229 / 0.18) 0%, transparent 55%),
		linear-gradient(135deg, var(--wp--preset--color--accent-3) 0%, #062a30 60%, var(--wp--preset--color--base) 100%);
	border-block: 4px solid var(--wp--preset--color--accent-5);
}

.ss-tv-grid {
	display: grid;
	gap: var(--wp--preset--spacing--50);
	align-items: center;
}

@media (min-width: 782px) {
	.ss-tv-grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}
}

.ss-tv-band h2 {
	margin-top: 0.2em;
	color: var(--wp--preset--color--contrast);
}

.ss-tv-price {
	font-family: var(--wp--preset--font-family--oswald);
	font-size: var(--wp--preset--font-size--x-large);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.ss-tv-price strong {
	color: var(--wp--preset--color--accent-1);
	font-weight: 700;
}

.ss-tv-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ss-tv-list li {
	position: relative;
	padding: 0.7em 0 0.7em 2.1em;
	border-bottom: 1px solid rgb(173 216 229 / 0.2);
}

.ss-tv-list li:last-child {
	border-bottom: 0;
}

/* Little cue-ball bullet in shark blue. */
.ss-tv-list li::before {
	content: "";
	position: absolute;
	left: 0.2em;
	top: 1.05em;
	width: 0.9em;
	height: 0.9em;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, #fff 0 20%, var(--wp--preset--color--accent-1) 60%);
}

.ss-tv-list strong {
	color: var(--wp--preset--color--accent-1);
}

/* Small uppercase label above headings, with a felt-maroon bar (maroon is
   too dark for text on black, so it is used for bars and borders only). */
.ss-kicker {
	font-family: var(--wp--preset--font-family--oswald);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-1);
	border-left: 4px solid var(--wp--preset--color--accent-5);
	padding-left: 0.6em;
}

/* ---------- Buttons: slanted broadcast edge ---------- */
.wp-element-button,
.wp-block-button__link {
	clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

/* Outline buttons: the slant would clip a normal border at two corners, so
   hide it and draw a 1px slanted frame instead (outer shape minus inner). */
.wp-block-button.is-style-outline > .wp-block-button__link {
	position: relative;
	border-color: transparent;
}

.wp-block-button.is-style-outline > .wp-block-button__link::before {
	content: "";
	position: absolute;
	inset: -1px;
	background: var(--wp--preset--color--accent-1);
	clip-path: polygon(evenodd,
		10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%, 10px 0,
		10.8px 1px, 1.2px calc(100% - 1px), calc(100% - 10.8px) calc(100% - 1px), calc(100% - 1.2px) 1px, 10.8px 1px);
	pointer-events: none;
}

/* Fill in on hover (core's outline hover left dark text on a clear button). */
.wp-block-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-button.is-style-outline > .wp-block-button__link:focus-visible {
	background-color: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--base);
}

/* ---------- Tables: dark stripes (core's are light grey, meant for white pages) ---------- */
.wp-block-table table {
	font-size: var(--wp--preset--font-size--small);
}

.wp-block-table thead {
	border-bottom: 2px solid var(--wp--preset--color--accent-5);
}

.wp-block-table th {
	font-family: var(--wp--preset--font-family--oswald);
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-align: left;
	color: var(--wp--preset--color--accent-1);
}

.wp-block-table td,
.wp-block-table th {
	padding: 0.75em 1em;
	vertical-align: top;
}

.wp-block-table.is-style-stripes {
	border-bottom: 1px solid var(--wp--preset--color--accent-4);
}

.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background-color: var(--wp--preset--color--accent-3);
}

/* Let columns size to their content so a short "Year" column doesn't take a third of a phone screen. */
.wp-block-table table.has-fixed-layout {
	table-layout: auto;
}

.wp-block-table td:first-child,
.wp-block-table th:first-child {
	width: 1%;
	white-space: nowrap;
}

/* ---------- Episode / post cards ---------- */
.ss-cards .wp-block-post {
	background: var(--wp--preset--color--accent-3);
	border: 1px solid var(--wp--preset--color--accent-4);
	padding: 0 0 var(--wp--preset--spacing--30);
	transition: transform 0.15s ease, border-color 0.15s ease;
}

.ss-cards .wp-block-post > :not(.wp-block-post-featured-image) {
	padding-inline: var(--wp--preset--spacing--30);
}

.ss-cards .wp-block-post:hover {
	transform: translateY(-3px);
	border-color: var(--wp--preset--color--accent-1);
}

/* Silver dates are too faint on the teal cards; use shark blue there. */
.ss-cards .wp-block-post-date {
	color: var(--wp--preset--color--accent-1);
}

@media (prefers-reduced-motion: reduce) {
	.ss-cards .wp-block-post { transition: none; }
	.ss-cards .wp-block-post:hover { transform: none; }
}

/* ---------- Forms (WPForms) on the dark background ---------- */
div.wpforms-container-full {
	--wpforms-field-background-color: var(--wp--preset--color--accent-3);
	--wpforms-field-border-color: var(--wp--preset--color--accent-4);
	--wpforms-field-border-color-spare: var(--wp--preset--color--accent-2);
	--wpforms-field-text-color: var(--wp--preset--color--contrast);
	--wpforms-field-border-radius: 0;
	--wpforms-label-color: var(--wp--preset--color--accent-1);
	--wpforms-label-sublabel-color: var(--wp--preset--color--accent-2);
	--wpforms-label-error-color: #ff7a7a;
	--wpforms-button-background-color: var(--wp--preset--color--accent-1);
	--wpforms-button-text-color: var(--wp--preset--color--base);
	--wpforms-button-border-radius: 0;
	--wpforms-button-background-color-alt: var(--wp--preset--color--accent-6);
	--wpforms-field-size-font-size: 1rem;
	--wpforms-label-size-font-size: 1rem;
}

div.wpforms-container-full .wpforms-form button[type="submit"] {
	font-family: var(--wp--preset--font-family--oswald);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

div.wpforms-container-full .wpforms-confirmation-container-full {
	background: var(--wp--preset--color--accent-3);
	border: 1px solid var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--contrast);
}

/* ---------- Email signup band (footer) ---------- */
.ss-signup {
	padding-bottom: var(--wp--preset--spacing--50);
	margin-bottom: var(--wp--preset--spacing--50);
	border-bottom: 1px solid var(--wp--preset--color--accent-4);
}

/* Beats WPForms' own "margin: auto" (which centred the form) by specificity. */
.ss-footer .ss-signup div.wpforms-container-full:not(:empty) {
	margin: 0;
	max-width: 36rem;
}

/* Email box and button on one line where there's room. */
@media (min-width: 600px) {
	.ss-signup .wpforms-form {
		display: flex;
		flex-wrap: wrap;
		align-items: flex-start;
		gap: 0.75rem;
	}

	/* Turnstile check goes on its own row under the email box and button. */
	.ss-signup .wpforms-recaptcha-container {
		order: 3;
		flex-basis: 100%;
		padding: 0 !important;
	}

	.ss-signup .wpforms-field-container {
		flex: 1;
	}

	.ss-signup .wpforms-field,
	.ss-signup .wpforms-submit-container {
		padding: 0 !important;
		margin: 0 !important;
	}
}

/* ---------- Footer ---------- */
.ss-footer {
	border-top: 4px solid var(--wp--preset--color--accent-5);
	background: linear-gradient(to bottom, var(--wp--preset--color--accent-3), var(--wp--preset--color--base) 60%);
}

/* Copyright line: plain, no maroon bar. */
.ss-footer .ss-copyright {
	border-left: 0;
	padding-left: 0;
	color: var(--wp--preset--color--accent-2);
}

/* Visible keyboard focus on the dark background */
:where(a, button, input, .wp-element-button):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-1);
	outline-offset: 3px;
}

/* WPForms "thanks" message after submitting: readable on the dark theme
   (WPForms' default is dark text on a pale box, washed out by our colours). */
div.wpforms-container-full .wpforms-confirmation-container-full,
div[submit-success] > .wpforms-confirmation-container-full:not(.wpforms-redirection-message) {
	background: var(--wp--preset--color--accent-3);
	border: 1px solid var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--contrast);
}

div.wpforms-container-full .wpforms-confirmation-container-full p,
div[submit-success] > .wpforms-confirmation-container-full p {
	color: var(--wp--preset--color--contrast);
}

div.wpforms-container-full .wpforms-confirmation-container-full strong {
	color: var(--wp--preset--color--accent-1);
}
