/*
Theme Name: Dragon Forge
Theme URI: https://dragonforgeplatforms.com
Author: Dragon Forge Platforms
Description: Block theme for Dragon Forge Platforms. Dark forged-steel design built around the Dragon Forge logo. Pair with the Dragon Forge Mission OS plugin for the module list and beta sign-up blocks.
Version: 1.2.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dragonforge
*/

/* ------------------------------------------------------------------
   Base
------------------------------------------------------------------- */
:root { color-scheme: dark; }
body { -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { text-wrap: balance; }
:where(a, button, input, select, textarea):focus-visible {
	outline: 2px solid var(--wp--preset--color--ember-hot);
	outline-offset: 3px;
}
::selection { background: var(--wp--preset--color--ember); color: var(--wp--preset--color--bright); }

/* Paragraph styles (pick them in the block's Styles panel) */
.is-style-eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--label);
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	line-height: 1.3;
	color: var(--wp--preset--color--ember-hot);
}
.is-style-lede { font-size: var(--wp--preset--font-size--lede); max-width: 58ch; }
.is-layout-constrained > .is-style-lede { max-width: var(--wp--style--global--content-size); }
.is-style-note {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--steel-dim);
}

/* Section bands: every homepage section gets a seam line underneath */
.df-section { border-bottom: 1px solid var(--wp--preset--color--seam); }
.df-section-head { max-width: 760px; }

/* ------------------------------------------------------------------
   Header
------------------------------------------------------------------- */
.df-site-header {
	position: sticky;
	top: env(safe-area-inset-top, 0px);
	z-index: 50;
	background: color-mix(in srgb, var(--wp--preset--color--forge-black) 88%, transparent);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--wp--preset--color--seam);
}
body.admin-bar .df-site-header { top: calc(var(--wp-admin--admin-bar--height, 32px) + env(safe-area-inset-top, 0px)); }
@media (max-width: 600px) { body.admin-bar .df-site-header { top: 0; } }
.df-brand { gap: 10px; }
.df-brand .wp-block-image { margin: 0; }
.df-brand .wp-block-image img { width: 40px; height: 40px; mix-blend-mode: lighten; }
.df-brand-name {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 1.125rem;
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin: 0;
}
.df-brand-name a { color: var(--wp--preset--color--bright); text-decoration: none; }
.df-site-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--forge-black);
	color: var(--wp--preset--color--steel);
	padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px));
}
.df-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-size: 1.1rem; }

/* ------------------------------------------------------------------
   Hero
------------------------------------------------------------------- */
.df-hero h1 { overflow-wrap: break-word; }
.df-hero h1 s {
	color: var(--wp--preset--color--steel-dim);
	text-decoration: line-through;
	text-decoration-color: var(--wp--preset--color--ember);
	text-decoration-thickness: 0.08em;
}
.df-hero h1 mark { background: none; }
.df-hero-mark { position: relative; max-width: 460px; margin-inline: auto; }
.df-hero-mark img { mix-blend-mode: lighten; width: 100%; display: block; }
.df-hero-mark::after {
	content: "";
	position: absolute;
	left: 66%;
	top: 39%;
	width: 22%;
	aspect-ratio: 1;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	pointer-events: none;
	background: radial-gradient(circle, rgba(240, 138, 44, 0.45), rgba(196, 84, 5, 0.12) 45%, transparent 70%);
	animation: df-ember 4.5s ease-in-out infinite;
}
@keyframes df-ember { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .df-hero-mark::after { animation: none; opacity: 0.8; } }
.df-status { font-family: var(--wp--preset--font-family--mono); font-size: 0.8125rem; letter-spacing: 0.06em; color: var(--wp--preset--color--steel-dim); }
.df-status p { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.df-status p.df-live::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wp--preset--color--ember-hot);
	box-shadow: 0 0 10px var(--wp--preset--color--ember);
	flex: none;
}
@media (max-width: 781px) {
	.df-hero .wp-block-columns { flex-direction: column-reverse; }
	.df-hero-mark { max-width: min(70%, 300px); }
}

/* ------------------------------------------------------------------
   Pricing: "budget" vs "need"
------------------------------------------------------------------- */
.df-question { border: 1px solid var(--wp--preset--color--seam); gap: 0 !important; }
.df-question > .wp-block-column { padding: 32px 28px; }
.df-question > .wp-block-column + .wp-block-column {
	border-left: 1px solid var(--wp--preset--color--seam);
	background: linear-gradient(135deg, rgba(196, 84, 5, 0.14), transparent 60%);
}
.df-question .df-q {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: clamp(1.75rem, 3.6vw, 2.6rem);
	line-height: 1.05;
	text-transform: uppercase;
	color: var(--wp--preset--color--bright);
}
.df-question .df-q s {
	color: var(--wp--preset--color--steel-dim);
	text-decoration-color: var(--wp--preset--color--ember);
	text-decoration-thickness: 3px;
}
@media (max-width: 781px) {
	.df-question > .wp-block-column + .wp-block-column { border-left: 0; border-top: 1px solid var(--wp--preset--color--seam); }
}

/* Tier steps illustration */
.df-steps {
	display: flex;
	align-items: flex-end;
	gap: 10px;
	height: 220px;
	padding: 0 4px;
	border-bottom: 2px solid var(--wp--preset--color--seam);
}
.df-steps > .df-step { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; margin: 0 !important; }
.df-step::before {
	content: "";
	display: block;
	height: 70px;
	background: linear-gradient(180deg, #3a3f46, #1b1e22);
	border: 1px solid #3a3f46;
	border-bottom: 0;
}
.df-step:nth-child(2)::before { height: 120px; }
.df-step:nth-child(3)::before { height: 170px; }
.df-step:nth-child(4)::before { height: 200px; }
.df-step.is-current::before {
	background: linear-gradient(180deg, var(--wp--preset--color--ember-hot), var(--wp--preset--color--ember));
	border-color: var(--wp--preset--color--ember-hot);
}
.df-step p {
	margin: 0;
	text-align: center;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--label);
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--steel-dim);
}
.df-step.is-current p { color: var(--wp--preset--color--bright); }

/* Checkmark list */
.df-promises { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--wp--preset--color--seam); }
.df-promises li {
	position: relative;
	padding: 16px 0 16px 42px;
	border-bottom: 1px solid var(--wp--preset--color--seam);
	color: var(--wp--preset--color--steel-dim);
}
.df-promises li strong { color: var(--wp--preset--color--bright); font-weight: 600; }
.df-promises li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: 19px;
	width: 20px;
	height: 20px;
	background: var(--wp--preset--color--ember-hot);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ------------------------------------------------------------------
   Timeline
------------------------------------------------------------------- */
.df-timeline { border: 1px solid var(--wp--preset--color--seam); gap: 0 !important; }
.df-timeline > .wp-block-column { position: relative; padding: 28px 24px 32px; }
.df-timeline > .wp-block-column + .wp-block-column { border-left: 1px solid var(--wp--preset--color--seam); }
.df-timeline > .wp-block-column > * { margin-block: 0 10px; }
.df-timeline .is-style-eyebrow { color: var(--wp--preset--color--steel-dim); letter-spacing: 0.14em; }
.df-timeline > .is-current { background: var(--wp--preset--color--plate); }
.df-timeline > .is-current .is-style-eyebrow { color: var(--wp--preset--color--ember-hot); }
.df-timeline > .is-current::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 3px;
	background: var(--wp--preset--color--ember);
}
@media (max-width: 781px) {
	.df-timeline > .wp-block-column + .wp-block-column { border-left: 0; border-top: 1px solid var(--wp--preset--color--seam); }
}

/* ------------------------------------------------------------------
   Founder credentials panel
------------------------------------------------------------------- */
.df-creds { border: 1px solid var(--wp--preset--color--seam); background: var(--wp--preset--color--plate); }
.df-creds > .wp-block-group { padding: 18px 22px; border-top: 1px solid var(--wp--preset--color--seam); margin: 0 !important; }
.df-creds > .wp-block-group:first-child { border-top: 0; }
.df-creds > .wp-block-group > p { margin: 0; }
.df-creds .is-style-eyebrow { color: var(--wp--preset--color--steel-dim); font-size: 0.6875rem; letter-spacing: 0.14em; }
.df-creds .df-cred-value {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	font-size: 1.375rem;
	line-height: 1.15;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--bright);
	margin-top: 4px !important;
}

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------- */
.df-footer-wordmark img { mix-blend-mode: lighten; width: min(100%, 360px); }
.df-footer-meta { text-align: right; }
@media (max-width: 781px) { .df-footer-meta { text-align: left; } }

/* ------------------------------------------------------------------
   Blog and inner pages
------------------------------------------------------------------- */
.df-post-card { border-top: 1px solid var(--wp--preset--color--seam); padding-top: 1.5rem; }
.wp-block-post-date, .wp-block-post-terms { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--steel-dim); }
.wp-block-query-pagination { font-family: var(--wp--preset--font-family--mono); }
.entry-content > * + h2 { margin-top: 2.5rem; }

/* ------------------------------------------------------------------
   1.1: How buying works, beta details, module pages, footer links
------------------------------------------------------------------- */
.df-howto { border: 1px solid var(--wp--preset--color--seam); gap: 0 !important; margin-top: 1.25rem; }
.df-howto > .wp-block-column { padding: 24px 24px 28px; }
.df-howto > .wp-block-column + .wp-block-column { border-left: 1px solid var(--wp--preset--color--seam); }
.df-howto > .wp-block-column > * { margin-block: 0 8px; }
.df-howto-title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 1.5rem;
	line-height: 1.1;
	text-transform: uppercase;
	color: var(--wp--preset--color--bright);
}
@media (max-width: 781px) {
	.df-howto > .wp-block-column + .wp-block-column { border-left: 0; border-top: 1px solid var(--wp--preset--color--seam); }
}

.df-specs { border-top: 1px solid var(--wp--preset--color--seam); }
.df-specs > .df-spec {
	display: grid;
	grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
	gap: 6px 28px;
	align-items: baseline;
	padding: 18px 0;
	margin: 0 !important;
	border-bottom: 1px solid var(--wp--preset--color--seam);
}
.df-spec > p { margin: 0; max-width: 68ch; }
.df-spec-label {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 1.25rem;
	line-height: 1.15;
	text-transform: uppercase;
	color: var(--wp--preset--color--bright);
}
@media (max-width: 720px) { .df-specs > .df-spec { grid-template-columns: minmax(0, 1fr); } }

/* Headings inside page and module content: readable, not hero-sized */
.entry-content:not(.df-home-content) h2:not([class*="-font-size"]) { font-size: clamp(1.6rem, 3vw, 2rem); margin-top: 2.5rem; }
.entry-content:not(.df-home-content) h3:not([class*="-font-size"]) { font-size: 1.35rem; }
.df-module-body > h2:first-child { margin-top: 0; }

.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--bright);
	border: 1px solid var(--wp--preset--color--seam);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { border-color: var(--wp--preset--color--ember-hot); color: var(--wp--preset--color--ember-hot); background: transparent; }

.df-footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 20px; margin-top: 8px; }
.df-footer-links a { color: var(--wp--preset--color--steel-dim); text-decoration: none; }
.df-footer-links a:hover { color: var(--wp--preset--color--bright); text-decoration: underline; }
@media (max-width: 781px) { .df-footer-links { justify-content: flex-start; } }

#beta, #mission-os, #pricing, #founder, #roadmap { scroll-margin-top: 72px; }

/* ------------------------------------------------------------------
   1.2: homepage as a page
------------------------------------------------------------------- */
.df-home-content > * { margin-block-start: 0 !important; margin-block-end: 0; }
.df-status .dfmos-beta-compact { display: flex; width: 100%; }
.df-status .dfmos-beta-compact + p { width: 100%; }
