/*
Theme Name: Online Basketball Coach
Theme URI: https://onlinebasketballcoach.nl
Author: Online Basketball Coach
Description: Block theme for the Online Basketball Coach plugin: landing page, pricing and sign-up, news, contact and a page for the coach app. Follows the site language (Dutch or English) and uses the colours and fonts of the app.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.1
Version: 1.2.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: obc-coach
Domain Path: /languages
Tags: block-patterns, full-site-editing, one-column, custom-colors, editor-style, translation-ready, wide-blocks
*/

/* Most styling lives in theme.json. This file holds what theme.json cannot express. */

:root { --oc-court-line: rgba(255, 255, 255, .14); }

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(a, button, input, summary):focus-visible { outline: 2px solid var(--wp--preset--color--blue); outline-offset: 3px; border-radius: 4px; }
.wp-site-blocks > * + * { margin-block-start: 0; }

/* Skip link */
.skip-link.screen-reader-text:focus { background: var(--wp--preset--color--ink); color: #fff; padding: .75rem 1rem; z-index: 100000; }

/* Header */
.oc-header { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); background: rgba(245, 245, 245, .86); border-bottom: 1px solid var(--wp--preset--color--line); }
.admin-bar .oc-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .oc-header { top: 46px; } }
.oc-header--dark { background: rgba(18, 41, 59, .9); border-bottom-color: rgba(255, 255, 255, .08); color: #fff; }
.oc-header--dark .wp-block-navigation a, .oc-header--dark .wp-block-site-title a { color: #fff; }
.oc-logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; }
.oc-logo svg { flex: none; }
.oc-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--paper); color: var(--wp--preset--color--ink); }
.oc-header .wp-block-button__link { padding: .55rem 1.1rem; font-size: .95rem; }

/* Buttons */
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: currentColor; border: 1.5px solid currentColor; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: rgba(127, 127, 127, .1); }
.wp-block-button.is-style-ghost > .wp-block-button__link { background: transparent; color: currentColor; padding-left: .25rem; padding-right: .25rem; text-decoration: underline; text-underline-offset: 4px; }

/* Hero */
.oc-hero { position: relative; overflow: hidden; isolation: isolate; }
.oc-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("assets/img/court-lines.svg") right -120px center / 900px auto no-repeat; opacity: .9; pointer-events: none; }
.oc-hero .oc-eyebrow { color: var(--wp--preset--color--court); }
.oc-shot { border-radius: 14px; overflow: hidden; box-shadow: var(--wp--preset--shadow--lift); border: 1px solid rgba(255, 255, 255, .12); }
.oc-shot img { display: block; width: 100%; height: auto; }
.oc-stats { border-top: 1px solid rgba(255, 255, 255, .12); }
.oc-stat strong { display: block; font-family: var(--wp--preset--font-family--display); font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1; color: #fff; }

/* Eyebrow / kicker */
.oc-eyebrow { font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: var(--wp--preset--color--accent-text); }

/* Cards */
.oc-card { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); border-radius: 14px; box-shadow: var(--wp--preset--shadow--card); height: 100%; transition: transform .2s ease, box-shadow .2s ease; }
.oc-card:hover { transform: translateY(-2px); }
.oc-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--wp--preset--color--accent-soft); color: var(--wp--preset--color--accent-text); }
.oc-icon svg { width: 24px; height: 24px; }
.oc-icon--blue { background: var(--wp--preset--color--blue-soft); color: var(--wp--preset--color--blue); }

/* Steps */
.oc-step-num { width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; background: var(--wp--preset--color--ink); color: #fff; font-weight: 700; font-family: var(--wp--preset--font-family--display); }

/* Layers (Read & React) */
.oc-layers { counter-reset: layer; list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.oc-layers li { counter-increment: layer; display: flex; gap: .9rem; align-items: center; background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); border-radius: 10px; padding: .7rem .9rem; }
.oc-layers li::before { content: counter(layer); flex: none; width: 1.8rem; height: 1.8rem; border-radius: 8px; display: grid; place-items: center; background: var(--wp--preset--color--blue); color: #fff; font-weight: 700; font-size: .85rem; }

/* Diagram figure */
.oc-diagram { background: var(--wp--preset--color--court); border-radius: 14px; padding: 1rem; box-shadow: var(--wp--preset--shadow--card); }
.oc-diagram svg { display: block; width: 100%; height: auto; }

/* Pricing */
.oc-price { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: clamp(3rem, 6vw, 4.25rem); line-height: 1; letter-spacing: -.03em; }
.oc-price small { font-family: var(--wp--preset--font-family--body); font-size: 1rem; font-weight: 500; color: var(--wp--preset--color--muted); letter-spacing: 0; }
.oc-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.oc-checks li { padding-left: 1.75rem; position: relative; }
.oc-checks li::before { content: ""; position: absolute; left: 0; top: .3em; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--wp--preset--color--accent) 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='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 75% no-repeat; }
.oc-badge { display: inline-block; padding: .25rem .7rem; border-radius: 999px; background: var(--wp--preset--color--accent-soft); color: var(--wp--preset--color--accent-text); font-weight: 700; font-size: .8rem; }

/* FAQ */
.oc-faq .wp-block-details summary { font-weight: 600; font-size: 1.075rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.oc-faq .wp-block-details summary::-webkit-details-marker { display: none; }
.oc-faq .wp-block-details summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--wp--preset--color--accent); transition: transform .2s; }
.oc-faq .wp-block-details[open] summary::after { transform: rotate(45deg); }
.oc-faq .wp-block-details > :not(summary) { color: var(--wp--preset--color--ink-2); margin-top: .5rem; }

/* CTA band */
.oc-cta { border-radius: 20px; overflow: hidden; position: relative; isolation: isolate; }
.oc-cta::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 260px; height: 260px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); z-index: -1; }

/* Blog cards */
.oc-post-card { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); border-radius: 14px; overflow: hidden; height: 100%; }
.oc-post-card .wp-block-post-featured-image { margin: 0; }
.oc-post-card .wp-block-post-featured-image img { aspect-ratio: 16 / 9; object-fit: cover; }
.oc-post-card .wp-block-post-title a:hover { color: var(--wp--preset--color--accent-text); }
.oc-thumb-fallback .wp-block-post-featured-image:empty, .oc-post-card .wp-block-post-featured-image:not(:has(img)) { display: none; }

/* Single post */
.oc-single .wp-block-post-content > p:first-child { font-size: var(--wp--preset--font-size--large); color: var(--wp--preset--color--ink-2); }
.oc-single .wp-block-post-featured-image img { border-radius: 14px; }

/* Signup shortcode from the plugin: let it breathe inside the theme */
.oc-signup-wrap .obc-app--signup { background: transparent !important; min-height: 0 !important; }
.oc-signup-wrap .obc-guestwrap { padding: 0 !important; min-height: 0 !important; }
.oc-signup-wrap .obc-guest { box-shadow: var(--wp--preset--shadow--card); border-radius: 16px; }

/* App page with site header (template "Coach app with site header") */
.page-template-page-app .oc-app-host { min-height: calc(100vh - 72px); }
.page-template-page-app .oc-app-host > .wp-block-post-content > * { max-width: none; }

/* Footer */
.oc-footer a { color: inherit; text-decoration: none; }
.oc-footer a:hover { text-decoration: underline; }
.oc-footer .wp-block-heading { color: #fff; }

/* Language-neutral helpers */
.oc-muted { color: var(--wp--preset--color--muted); }
.oc-hide-mobile { }
@media (max-width: 781px) {
	.oc-hide-mobile { display: none !important; }
	.oc-hero::before { background-position: center bottom -80px; background-size: 700px auto; opacity: .5; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; }
}

/* Alignment helpers (in case core common styles are not loaded) */
.has-text-align-center { text-align: center; }
.has-text-align-right { text-align: right; }
.has-text-align-left { text-align: left; }

/* Hero headline: large but not overwhelming next to the screenshot */
.oc-hero h1 { font-size: clamp(2.6rem, 4.6vw, 4rem); }
.oc-faq .wp-block-details { border-bottom: 1px solid var(--wp--preset--color--line); padding: 1.1rem 0; margin: 0; }
.oc-faq .wp-block-details:first-of-type { border-top: 1px solid var(--wp--preset--color--line); }
.oc-layers, .oc-checks { margin-top: 1.25rem !important; }
@media (max-width: 781px) {
	.oc-stats { flex-wrap: wrap !important; row-gap: 1.25rem; }
	.wp-block-columns.oc-stats:not(.is-not-stacked-on-mobile) > .wp-block-column { flex-basis: calc(50% - 1rem) !important; }
}

.oc-card h3 { overflow-wrap: anywhere; }
.oc-plain { list-style: none; padding-left: 0; font-size: .95rem; }
.oc-plain li + li { margin-top: .3rem; }
.oc-shot img { aspect-ratio: 16 / 10; }
.oc-card .oc-icon { margin-left: 0 !important; margin-right: auto !important; }
.wp-site-blocks { min-height: 100vh; display: flex; flex-direction: column; }
.wp-site-blocks > main, .wp-site-blocks > .wp-block-group:is(main) { flex: 1 0 auto; }

/* ---------- contact form (website) ---------- */
.oc-contact { margin-top: var(--wp--preset--spacing--40); }
.oc-contact__form { display: flex; flex-direction: column; gap: .9rem; max-width: 560px; }
.oc-contact__form p { margin: 0; }
.oc-contact__form label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .3rem; color: var(--wp--preset--color--ink); }
.oc-contact__form input[type=text], .oc-contact__form input[type=email], .oc-contact__form textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem; padding: .7rem .85rem; border: 1px solid var(--wp--preset--color--line); border-radius: 10px; background: var(--wp--preset--color--surface); color: var(--wp--preset--color--ink); }
.oc-contact__form input:focus, .oc-contact__form textarea:focus { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 1px; border-color: transparent; }
.oc-contact__form textarea { resize: vertical; min-height: 9rem; }
.oc-contact__consent label { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .92rem; color: var(--wp--preset--color--ink-2); }
.oc-contact__consent input { margin-top: .25rem; width: 1.05rem; height: 1.05rem; flex: none; }
.oc-contact__opt { font-weight: 400; color: var(--wp--preset--color--muted); }
.oc-contact__hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.oc-contact__form .wp-block-button__link { cursor: pointer; border: 0; }
.oc-contact__ok, .oc-contact__error { padding: .9rem 1rem; border-radius: 10px; margin: 0 0 1rem; }
.oc-contact__ok { background: #e6f4ea; color: #1e5b2c; }
.oc-contact__error { background: #fdecea; color: #8a1f17; }
.oc-card--fit { height: auto; }

/* own logo (Appearance → Website pages) */
.oc-logo-img { display: block; height: auto; max-height: 44px; width: auto; max-width: 220px; object-fit: contain; }
.oc-footer .oc-logo-img { max-height: 40px; }
@media (max-width: 600px) { .oc-logo-img { max-height: 36px; max-width: 160px; } }

/* Social links in the footer (Theme settings → Footer). */
.oc-social { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.oc-social a { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; transition: background .15s; }
.oc-social a:hover, .oc-social a:focus-visible { background: var(--wp--preset--color--accent); text-decoration: none; }
