/*
Theme Name: OpenFelt
Theme URI: https://openfelt.network
Description: OpenFelt site theme. Child of Twenty Twenty-Five.
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
Text Domain: openfelt
*/

/* ---------- Base ---------- */
:root {
	--of-paper: var(--wp--preset--color--base);
	--of-ink: var(--wp--preset--color--contrast);
	--of-felt: var(--wp--preset--color--accent-1);
	--of-brass: var(--wp--preset--color--accent-2);
	--of-felt-deep: var(--wp--preset--color--accent-3);
	--of-mist: var(--wp--preset--color--accent-4);
	--of-line: var(--wp--preset--color--accent-5);
	--of-gutter: clamp(16px, 4vw, 40px);
	--of-section: clamp(56px, 9vw, 120px);
}

body {
	font-feature-settings: "kern", "liga";
}

:where(h1, h2, h3) {
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
.wp-block-button__link:focus-visible {
	outline: 3px solid var(--of-brass);
	outline-offset: 3px;
	border-radius: 4px;
}

/* ---------- Header ---------- */
.of-header {
	border-bottom: 1px solid var(--of-line);
	background: var(--of-paper);
	padding: 16px var(--of-gutter);
}

.of-header-right {
	gap: 28px;
}

.of-header .wp-block-site-title a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	font-family: var(--wp--preset--font-family--bricolage);
	font-weight: 750;
	font-stretch: 85%;
	letter-spacing: -0.01em;
}

/* Wordmark: a small table oval before the name */
.of-header .wp-block-site-title a::before {
	content: "";
	width: 30px;
	height: 18px;
	border-radius: 50%;
	background: var(--of-felt);
	box-shadow: 0 0 0 3px var(--of-felt-deep), inset 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.of-header .wp-block-navigation {
	font-size: 0.95rem;
	font-weight: 550;
}

.of-header .wp-block-navigation .wp-block-navigation__submenu-container {
	border: 1px solid var(--of-line) !important;
	border-radius: 10px;
	padding: 8px 0;
	min-width: 240px !important;
}

.of-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 8px 18px;
}

.of-header .of-header-cta .wp-block-button__link {
	padding: 0.6em 1.1em;
	font-size: 0.95rem;
}

@media (max-width: 781px) {
	.of-header .of-header-cta {
		display: none;
	}
}

/* ---------- Buttons ---------- */
.wp-block-button__link {
	border-radius: 999px;
	font-weight: 650;
	padding: 0.85em 1.5em;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
	background: var(--of-felt-deep);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border: 2px solid currentColor;
	background: transparent;
	color: var(--of-ink);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--of-ink);
	color: var(--of-paper);
}

/* ---------- Sections (Home) ---------- */
.of-section {
	padding: var(--of-section) var(--of-gutter);
	margin: 0 !important;
}

.of-section > * {
	margin-block-start: 0;
}

.of-section h2 {
	font-size: clamp(1.9rem, 3.4vw, 2.75rem);
	margin-block: 0 0.6em;
}

/* Keep section headings and ledes left-aligned in the wide container,
   with a readable line length (max-width would centre them). */
.of-section > h1,
.of-section > h2,
.of-section > .of-lede {
	box-sizing: border-box;
}

.of-section > h1 {
	padding-right: max(0px, calc(min(100%, 1180px) - 820px));
}

.of-section > h2 {
	padding-right: max(0px, calc(min(100%, 1180px) - 820px));
}

.of-section > .of-lede {
	padding-right: max(0px, calc(min(100%, 1180px) - 680px));
}

.of-lede {
	font-size: clamp(1.1rem, 1.6vw, 1.3rem);
	line-height: 1.55;
	color: var(--of-mist);
}

/* Hero */
.of-hero {
	padding-top: clamp(40px, 7vw, 96px);
	padding-bottom: clamp(48px, 8vw, 104px);
}

.of-hero .wp-block-columns {
	align-items: center;
	gap: clamp(32px, 5vw, 72px);
}

.of-hero .wp-block-column {
	align-self: center;
}

.of-badge {
	display: inline-block;
	margin: 0 0 22px !important;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--wp--preset--color--accent-6);
	color: var(--of-felt-deep);
	font-size: 0.9rem;
	font-weight: 650;
}

.of-hero h1 {
	font-size: clamp(2.5rem, 4.8vw, 4rem);
	line-height: 1;
	font-stretch: 80%;
	font-weight: 780;
	letter-spacing: -0.015em;
	margin: 0 0 24px;
	max-width: 17ch;
}

.of-hero .of-lede {
	margin-bottom: 32px;
	color: var(--of-ink);
	opacity: 0.85;
}

.of-hero .wp-block-buttons {
	gap: 12px;
	margin-bottom: 36px;
}

/* Feature strip with card suits as markers */
ul.of-suits {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 24px;
	font-size: 0.98rem;
	font-weight: 550;
}

ul.of-suits li {
	position: relative;
	padding-left: 26px;
}

ul.of-suits li::before {
	position: absolute;
	left: 0;
	top: -1px;
	font-size: 1.05rem;
	color: var(--of-felt);
}

ul.of-suits li:nth-child(1)::before { content: "\2660"; }
ul.of-suits li:nth-child(2)::before { content: "\2665"; color: #b4392f; }
ul.of-suits li:nth-child(3)::before { content: "\2666"; color: #b4392f; }
ul.of-suits li:nth-child(4)::before { content: "\2663"; }

/* Network illustration */
.of-table-art {
	margin: 0;
}

.of-table-art svg {
	display: block;
	width: 100%;
	height: auto;
}

.of-table-art figcaption {
	margin-top: 12px;
	text-align: center;
	font-size: 0.95rem;
	color: var(--of-mist);
}

/* Why a network */
.of-why {
	background: #fff;
	border-block: 1px solid var(--of-line);
}

.of-why .wp-block-columns {
	gap: clamp(32px, 6vw, 96px);
}

.of-contrast {
	display: grid;
	gap: 14px;
	margin: 0 !important;
}

.of-contrast p {
	margin: 0;
	padding: 20px 22px;
	border-radius: 14px;
	border: 1px solid var(--of-line);
	font-size: 1rem;
	line-height: 1.45;
}

.of-contrast p strong {
	display: block;
	font-family: var(--wp--preset--font-family--bricolage);
	font-size: clamp(1.8rem, 3vw, 2.4rem);
	font-stretch: 80%;
	line-height: 1.05;
	margin-bottom: 4px;
}

.of-contrast p:last-child {
	background: var(--of-felt);
	border-color: var(--of-felt);
	color: #fff;
}

/* What you get: a ruled two-column index of the product */
.of-offer-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: clamp(24px, 5vw, 64px);
	margin-top: 40px !important;
}

.of-offer-list > .of-offer {
	margin: 0 !important;
	padding: 22px 0 24px;
	border-top: 1px solid var(--of-line);
}

.of-offer h3 {
	font-size: 1.3rem;
	margin: 0 0 6px;
	font-stretch: 88%;
}

.of-offer h3 a {
	text-decoration: none;
	color: var(--of-ink);
}

.of-offer h3 a:hover {
	color: var(--of-felt);
	text-decoration: underline;
	text-underline-offset: 4px;
}

.of-offer p {
	margin: 0;
	color: var(--of-mist);
	max-width: 46ch;
}

/* Steps: a real sequence, so numbered */
.of-steps-section {
	background: var(--of-felt-deep);
	color: #e6efe9;
}

.of-steps-section h2 {
	color: #fff;
}

ol.of-steps {
	list-style: none;
	counter-reset: step;
	padding: 0;
	margin: 40px 0 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 28px;
}

ol.of-steps li {
	counter-increment: step;
	position: relative;
	padding-top: 64px;
	line-height: 1.5;
}

ol.of-steps li::before {
	content: counter(step);
	position: absolute;
	top: 0;
	left: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--of-brass);
	color: var(--of-felt-deep);
	font-family: var(--wp--preset--font-family--bricolage);
	font-weight: 780;
	font-size: 1.25rem;
}

ol.of-steps li::after {
	content: "";
	position: absolute;
	top: 22px;
	left: 56px;
	right: -16px;
	border-top: 1px dashed rgba(255, 255, 255, 0.28);
}

ol.of-steps li:last-child::after {
	display: none;
}

ol.of-steps strong {
	display: block;
	color: #fff;
	font-size: 1.1rem;
	margin-bottom: 6px;
}

/* Comparison table */
.of-compare table {
	border-collapse: collapse;
	width: 100%;
	font-size: 1rem;
}

.of-compare th,
.of-compare td {
	border: none;
	border-bottom: 1px solid var(--of-line);
	padding: 16px 18px;
	text-align: left;
	vertical-align: top;
}

.of-compare thead th {
	font-family: var(--wp--preset--font-family--bricolage);
	font-size: 1.15rem;
	border-bottom: 2px solid var(--of-ink);
}

.of-compare tbody td:first-child {
	color: var(--of-mist);
	font-weight: 600;
	width: 26%;
}

.of-compare th:nth-child(2),
.of-compare td:nth-child(2) {
	background: rgba(14, 75, 59, 0.07);
}

/* Games */
.of-games .wp-block-columns {
	gap: clamp(24px, 5vw, 64px);
	margin-top: 32px;
}

.of-games h3 {
	font-size: 1.15rem;
	margin: 0 0 14px;
}

ul.of-chips {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

ul.of-chips li {
	padding: 7px 14px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--of-line);
	font-size: 0.95rem;
	font-weight: 550;
}

ul.of-chips.is-later li {
	background: transparent;
	border-style: dashed;
	color: var(--of-mist);
}

/* Channels */
.of-channels {
	background: #fff;
	border-block: 1px solid var(--of-line);
}

.of-channels .wp-block-columns {
	gap: clamp(24px, 5vw, 64px);
	margin-top: 28px;
}

.of-channels h3 {
	font-size: 1.25rem;
	margin: 0 0 8px;
}

/* Earn + fair play */
.of-split .wp-block-columns {
	gap: clamp(32px, 6vw, 96px);
}

.of-split h2 {
	font-size: clamp(1.6rem, 2.6vw, 2.1rem);
}

.of-split .wp-block-column:first-child {
	background: var(--of-felt);
	color: #dfeae4;
	border-radius: 18px;
	padding: clamp(24px, 4vw, 44px);
	align-self: flex-start;
}

.of-split .wp-block-column:first-child h2 {
	color: #fff;
}

.of-split .wp-block-column:first-child a {
	color: #fff;
}

.of-risk-list {
	list-style: none;
	padding: 0;
	margin: 20px 0 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.of-risk-list li {
	padding: 12px 14px;
	border-left: 3px solid var(--of-felt);
	background: #fff;
	font-weight: 600;
	font-size: 0.97rem;
}

/* FAQ */
.of-faq .wp-block-details {
	border-top: 1px solid var(--of-line);
	padding: 20px 0;
	margin: 0;
}

.of-faq .wp-block-details:last-child {
	border-bottom: 1px solid var(--of-line);
}

.of-faq summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--bricolage);
	font-size: 1.2rem;
	font-weight: 650;
	list-style-position: outside;
}

.of-faq .wp-block-details p {
	margin: 12px 0 0;
	color: var(--of-mist);
	max-width: 65ch;
}

/* Final call to action */
.of-cta {
	background: var(--of-felt);
	color: #e6efe9;
	text-align: left;
}

.of-cta h2 {
	color: #fff;
}

.of-cta .wp-block-button__link {
	background: var(--of-brass);
	color: var(--of-felt-deep);
}

.of-cta .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
	background: #fff;
	color: var(--of-felt-deep);
}

/* ---------- Inner pages (skeleton) ---------- */
.of-page-intro {
	font-size: clamp(1.1rem, 1.6vw, 1.25rem);
	color: var(--of-mist);
}

/* ---------- Footer ---------- */
.of-footer {
	background: var(--of-felt-deep);
	color: #c9d8d0;
	font-size: 0.95rem;
	padding: clamp(48px, 7vw, 80px) var(--of-gutter) 32px;
	margin-top: 0 !important;
}

.of-footer .wp-block-site-title a {
	color: #fff;
	text-decoration: none;
}

.of-footer .of-footnote p {
	margin: 0;
}

.of-footer a {
	color: #fff;
	text-decoration: none;
}

.of-footer a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.of-footer h2 {
	font-size: 0.95rem;
	color: #fff;
	margin: 0 0 12px;
	font-family: var(--wp--preset--font-family--figtree);
	font-weight: 700;
}

.of-footer ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 8px;
}

.of-footer .of-footnote {
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	padding-top: 20px;
	margin-top: 40px;
	color: #9fb5aa;
	font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	ol.of-steps {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	ol.of-steps li::after {
		display: none;
	}
}

@media (max-width: 781px) {
	.of-offer-list,
	.of-risk-list {
		grid-template-columns: 1fr;
	}
	.of-hero h1 {
		max-width: none;
	}
}

@media (max-width: 560px) {
	ol.of-steps,
	ul.of-suits {
		grid-template-columns: 1fr;
	}
	.of-compare th,
	.of-compare td {
		padding: 12px 10px;
	}
}

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

.of-cta .of-lede,
.of-steps-section .of-lede {
	color: #cfe0d6;
}

/* No gaps between header, page and footer */
.of-home,
.wp-site-blocks > footer {
	margin-block-start: 0;
}

.of-cta .wp-block-buttons {
	margin-top: 28px;
}

/* ---------- Full-width inner pages ---------- */
.of-page-hero h1 {
	font-size: clamp(2.4rem, 4.6vw, 3.8rem);
	line-height: 1;
	font-stretch: 80%;
	font-weight: 780;
	letter-spacing: -0.015em;
	margin: 0 0 22px;
}

.of-offer-list.is-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

ol.of-steps.is-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.of-note {
	margin-top: 20px !important;
	font-size: 0.98rem;
	color: var(--of-mist);
}

.of-steps-section .of-lede {
	margin-bottom: 0;
}

@media (max-width: 900px) {
	.of-offer-list.is-3 {
		grid-template-columns: 1fr;
	}
	ol.of-steps.is-3 {
		grid-template-columns: 1fr;
	}
}

/* Code sample (Poker API page) */
.of-code {
	margin: 18px 0 0;
	padding: 18px 20px;
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.28);
	color: #f3efe2;
	border: none;
	font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	font-size: 0.9rem;
	line-height: 1.55;
	overflow-x: auto;
}

/* Contact page */
.of-contact .of-offer-list {
	margin-top: 32px !important;
}

.of-contact-card h3 {
	font-size: clamp(1.25rem, 2.2vw, 1.6rem);
	word-break: break-word;
}

.of-contact h1 {
	max-width: 1180px;
	font-size: clamp(2.4rem, 4.6vw, 3.8rem);
	line-height: 1;
	font-stretch: 80%;
	font-weight: 780;
	margin: 0 0 22px;
}
