/*
Theme Name: Serieplanlegger
Theme URI: https://serieplanlegger.no/
Author: ZeehDesign
Author URI: https://zeeh.no/
Description: Blokktema for produktsiden til Serieplanlegger – terminlister for seriespill i alle idretter. Startsiden er satt sammen av mønstre (hero, video, problem, løsning, funksjoner, pris, spørsmål) som kan redigeres i nettstedsredigereren.
Requires at least: 6.6
Tested up to: 7.2
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: serieplanlegger
Tags: one-page, block-patterns, full-site-editing, custom-colors
*/

/* ---------- Grunnlag ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
:where(section, .wp-block-group)[id] { scroll-margin-top: 88px; }

/* Seksjonene ligger kant i kant – ingen luft mellom topp, innhold og bunn */
.wp-site-blocks > * + * { margin-block-start: 0; }
main > .alignfull + .alignfull { margin-block-start: 0; }

/* Klebrig topp */
.spl-header {
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: saturate(1.4) blur(8px);
	background: color-mix(in srgb, var(--wp--preset--color--paper) 92%, transparent) !important;
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.admin-bar .spl-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .spl-header { top: 46px; } }

.spl-logo a { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--wp--preset--color--ink); }
.spl-logo img { width: 36px; height: 36px; }
.spl-logo .spl-wordmark { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.45rem; letter-spacing: .01em; line-height: 1; }

.spl-header .wp-block-navigation a { text-decoration: none; }
.spl-header .wp-block-navigation a:hover { color: var(--wp--preset--color--accent-text); }

/* ---------- Knapper ---------- */
.wp-block-button__link { transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; }
.wp-block-button__link:hover { transform: translateY(-1px); }
.is-style-outline > .wp-block-button__link { border-width: 2px; }

/* ---------- Hero ---------- */
.spl-hero { position: relative; overflow: hidden; }
.spl-hero::before {
	/* svakt rutenett som et terminblad */
	content: "";
	position: absolute; inset: 0;
	background-image:
		linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px);
	background-size: 56px 56px;
	mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
	pointer-events: none;
}
.spl-hero > * { position: relative; }
.spl-kicker {
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	font-size: .85rem;
}
.spl-hero h1 { text-wrap: balance; }
.spl-hero .spl-shot img { border-radius: 14px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.55); }

/* Idrettsbrikker */
.spl-sports { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.spl-sports li {
	padding: .3rem .8rem;
	border: 1px solid rgba(255,255,255,.22);
	border-radius: 999px;
	font-size: .9rem;
	color: rgba(255,255,255,.85);
}

/* ---------- Video ---------- */
.spl-video video {
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 14px;
	background: var(--wp--preset--color--ink);
	box-shadow: 0 24px 48px -24px rgba(20,33,61,.45);
}
.spl-video-missing {
	aspect-ratio: 16 / 9;
	display: grid;
	place-items: center;
	text-align: center;
	padding: 2rem;
	border-radius: 14px;
	border: 2px dashed var(--wp--preset--color--line);
	color: var(--wp--preset--color--muted);
}

/* ---------- Kort ---------- */
.spl-card {
	height: 100%;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	background: var(--wp--preset--color--paper);
}
.spl-card h3 { margin-top: .4rem; }
.spl-icon {
	display: inline-grid;
	place-items: center;
	width: 44px; height: 44px;
	border-radius: 10px;
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--accent-text);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 1.15rem;
}
.spl-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Problem: rød-ish strek er unngått – vi bruker oransje kant */
.spl-pain { border-left: 3px solid var(--wp--preset--color--accent); padding-left: 1.1rem; }

/* Steg */
.spl-step-no {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 3.2rem;
	line-height: 1;
	color: var(--wp--preset--color--accent);
}

/* Funksjonsliste */
.spl-features .wp-block-column { min-width: 0; }

/* ---------- Pris ---------- */
.spl-price-card { border-radius: 16px; box-shadow: 0 30px 60px -30px rgba(20,33,61,.5); }
.spl-price { font-family: var(--wp--preset--font-family--heading); font-weight: 700; line-height: 1; }
.spl-check { list-style: none; padding-left: 0; }
.spl-check li { position: relative; padding-left: 1.8rem; margin: .45rem 0; }
.spl-check li::before {
	content: "";
	position: absolute; left: 0; top: .3em;
	width: 1.1rem; height: 1.1rem;
	border-radius: 50%;
	background: var(--wp--preset--color--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}
.spl-on-dark .spl-check li::before { background-color: var(--wp--preset--color--accent); }

/* ---------- FAQ ---------- */
.spl-faq .wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 1.1rem 0;
}
.spl-faq .wp-block-details summary {
	font-weight: 600;
	font-size: 1.1rem;
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}
.spl-faq .wp-block-details summary::-webkit-details-marker { display: none; }
.spl-faq .wp-block-details summary::after {
	content: "+";
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.5rem;
	line-height: 1;
	color: var(--wp--preset--color--accent-text);
	transition: transform .2s ease;
}
.spl-faq .wp-block-details[open] summary::after { transform: rotate(45deg); }
.spl-faq .wp-block-details > :not(summary) { margin-top: .6rem; color: var(--wp--preset--color--muted); }

/* ---------- Bunntekst ---------- */
.spl-footer ul { list-style: none; }
.spl-footer li { margin: .35rem 0; }
.spl-footer a { color: inherit; }
.spl-footer a:hover { color: var(--wp--preset--color--accent); }

/* ---------- Mobil ---------- */
@media (max-width: 781px) {
	.spl-hero .wp-block-columns { gap: 2.5rem; }
	.spl-step-no { font-size: 2.6rem; }
}
