/*
 * DawnSpar pages (brand v2): generic page.html (support, privacy), page-about, page-contact,
 * archive-app (Apps) and 404. Loaded after home.css (shell). Content blocks use the dsp-* classes written by
 * infra/content/build_content.py.
 */

.dsp-red { color: var(--h-red); }
.dsp-main { position: relative; }
.dsp-main > .alignfull + .alignfull { margin-block-start: 0; }

/* -------------------------------------------------------------------- hero */
.dsp-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-block: clamp(3rem, 6vw, 5rem) clamp(2.75rem, 5vw, 4.25rem) !important;
	background:
		radial-gradient(42% 80% at 12% 0%, rgba(227, 38, 54, 0.22), transparent 70%),
		radial-gradient(35% 70% at 100% 100%, rgba(227, 38, 54, 0.14), transparent 70%),
		linear-gradient(100deg, #0B0B0E 0%, #131317 55%, #0E0E11 100%);
}
.dsp-hero::before { /* the D mark as a quiet watermark on the right */
	content: "";
	position: absolute;
	z-index: -1;
	right: max(-4rem, calc(50% - 44rem));
	top: 50%;
	width: clamp(16rem, 32vw, 30rem);
	aspect-ratio: 262 / 192;
	transform: translateY(-50%) rotate(-6deg);
	background: url("../images/home/d-mark.webp") center / contain no-repeat;
	opacity: 0.07;
	filter: grayscale(0.2);
}
.dsp-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, rgba(227, 38, 54, 0.15), rgba(240, 68, 68, 0.95) 34%, rgba(227, 38, 54, 0.5) 60%, rgba(227, 38, 54, 0.05)); box-shadow: 0 0 14px rgba(227, 38, 54, 0.5); }
.dsp-hero--compact { padding-block: clamp(2.25rem, 4.5vw, 3.5rem) clamp(2rem, 4vw, 3rem) !important; }
.dsp-hero__inner > * { max-width: 46rem; }
.dsp-eyebrow { display: flex; align-items: center; gap: 0.75rem; margin: 0 0 1rem; color: var(--h-red); font-size: 1rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.dsp-eyebrow::before,
.dsp-eyebrow::after { content: ""; width: 1.4rem; height: 2px; background: var(--h-red); }
.dsp-title { margin: 0 0 1rem; color: #fff; font-size: clamp(2.5rem, 1rem + 4.2vw, 4.6rem); font-weight: 800; font-style: italic; line-height: 1; letter-spacing: -0.025em; }
.dsp-hero--compact .dsp-title { font-size: clamp(2.2rem, 1rem + 3.4vw, 3.8rem); margin-bottom: 0; }
.dsp-lead { margin: 0; color: #E2E3E7; font-size: clamp(1.05rem, 0.85rem + 0.55vw, 1.3rem); font-weight: 500; line-height: 1.5; }

/* --------------------------------------------------------------- sections */
.dsp-section { position: relative; isolation: isolate; padding-block: clamp(3rem, 6vw, 5rem) clamp(4rem, 8vw, 6.5rem) !important; background: linear-gradient(180deg, #0B0B0E 0%, #0E0F12 100%); }
.dsp-rich .wp-block-post-content > * + * { margin-block-start: clamp(3rem, 6vw, 4.5rem); }
.dsp-rich .wp-block-post-content > .dsp-head + * { margin-block-start: clamp(1.5rem, 3vw, 2.25rem); }
.dsp-kicker { margin: 0 0 0.6rem; color: var(--h-red); font-size: 0.85rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.dsp-h { margin: 0 0 1rem; color: #fff; font-size: clamp(1.9rem, 1.2rem + 2vw, 2.9rem); font-weight: 800; font-style: italic; line-height: 1.08; letter-spacing: -0.02em; }
.dsp-sub { margin: 0 auto; max-width: 38rem; color: #C9CBD1; font-size: 1.08rem; }
.dsp-head { text-align: center; }
.dsp-head .wp-block-buttons { justify-content: center; margin-top: 1.5rem; }
.dsp-rich p { color: #D3D5DA; font-size: 1.1rem; line-height: 1.75; }
.dsp-rich p:last-child { margin-bottom: 0; }
.dsp-rich a:where(:not(.wp-element-button)) { color: var(--h-red2); background-image: none; text-decoration: underline; text-underline-offset: 3px; }
.dsp-rich a:where(:not(.wp-element-button)):hover { color: #fff; }
.dsp-rich ul { margin: 0.5rem 0 0; padding: 0; list-style: none; }
.dsp-rich ul li { position: relative; margin: 0.45rem 0; padding-left: 1.5rem; color: #D3D5DA; font-size: 1.05rem; }
.dsp-rich ul li::before { content: ""; position: absolute; left: 0.3rem; top: 0.72em; width: 7px; height: 7px; border-radius: 50%; background: var(--h-red); box-shadow: 0 0 8px rgba(227, 38, 54, 0.7); }
.dsp-rich .ds-social li::before { display: none; }
.dsp-rich .ds-social li { padding: 0; margin: 0; }
.dsp-rich .dsh-apps a { color: inherit; text-decoration: none; }
.dsp-rich .dsh-apps p { font-size: inherit; line-height: inherit; }

/* buttons inside page content */
.dsp-buttons { gap: 0.9rem; margin-top: 1.75rem; }
.dsp-buttons .wp-block-button__link { display: inline-flex; align-items: center; min-height: 56px; padding: 0 1.9rem; border: 1.5px solid var(--h-red); border-radius: 999px; background: var(--h-red); color: #fff; font-size: 1.05rem; font-weight: 700; text-decoration: none; transition: background-color 0.2s, border-color 0.2s, transform 0.2s; }
.dsp-buttons .wp-block-button__link:hover { border-color: #C81E2D; background: #C81E2D; transform: translateY(-1px); }
.dsp-buttons .is-style-outline .wp-block-button__link { border-color: rgba(255, 255, 255, 0.55); background: transparent; }
.dsp-buttons .is-style-outline .wp-block-button__link:hover { border-color: #fff; background: rgba(255, 255, 255, 0.07); }

/* about: split story */
.dsp-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.dsp-split > * { margin: 0 !important; }
.dsp-split--text { align-items: start; }
.dsp-split__visual { position: relative; display: grid; place-items: center; isolation: isolate; }
.dsp-split__visual::before { content: ""; position: absolute; z-index: -1; inset: 8% 10%; border-radius: 50%; background: radial-gradient(closest-side, rgba(227, 38, 54, 0.45), transparent); filter: blur(10px); }
.dsp-split__visual img { width: min(100%, 26rem); height: auto; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.6)); }

/* about: values */
.dsp-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.dsp-values > * { margin: 0 !important; }
.dsp-value { padding: 1.6rem 1.5rem; border: 1px solid #2A2B31; border-radius: 18px; background: linear-gradient(180deg, #17181C, #121317); transition: border-color 0.25s, transform 0.25s; }
.dsp-value:hover { border-color: rgba(227, 38, 54, 0.6); transform: translateY(-3px); }
.dsp-value__n { margin: 0 0 0.9rem; color: var(--h-red); font-size: 1.5rem !important; font-weight: 800; font-style: italic; line-height: 1; }
.dsp-value h3 { margin: 0 0 0.5rem; color: #fff; font-size: 1.3rem; font-weight: 800; }
.dsp-value p:last-child { margin: 0; font-size: 1.02rem; }

/* CTA band */
.dsp-band { position: relative; overflow: hidden; padding: clamp(2rem, 4vw, 3.25rem); border: 1px solid rgba(227, 38, 54, 0.4); border-radius: 24px; background: radial-gradient(60% 120% at 100% 0%, rgba(227, 38, 54, 0.22), transparent 60%), linear-gradient(180deg, #17181C, #111216); text-align: center; }
.dsp-band > p:not(.dsp-kicker) { max-width: 44rem; margin-inline: auto; }
.dsp-band .wp-block-buttons { justify-content: center; }

/* contact */
.dsp-mail { padding: clamp(1.75rem, 4vw, 2.75rem); border: 1px solid rgba(227, 38, 54, 0.4); border-radius: 24px; background: radial-gradient(60% 120% at 100% 0%, rgba(227, 38, 54, 0.2), transparent 60%), linear-gradient(180deg, #17181C, #111216); text-align: center; }
.dsp-mail__addr { margin: 0.2rem 0 0.9rem; font-size: clamp(1.5rem, 1rem + 2.4vw, 2.6rem) !important; font-weight: 800; font-style: italic; letter-spacing: -0.02em; word-break: break-word; }
.dsp-mail__addr a { color: #fff !important; text-decoration: none !important; }
.dsp-mail__addr a:hover { color: var(--h-red2) !important; }
.dsp-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.dsp-rich .wp-block-post-content > .dsp-mail + .dsp-cards { margin-block-start: 1.25rem; }
.dsp-cards > * { margin: 0 !important; }
.dsp-card { padding: 1.6rem 1.5rem; border: 1px solid #2A2B31; border-radius: 18px; background: linear-gradient(180deg, #17181C, #121317); }
.dsp-card h3 { margin: 0 0 0.5rem; color: #fff; font-size: 1.3rem; font-weight: 800; }
.dsp-card p { margin: 0 0 0.6rem; font-size: 1.02rem !important; }
.dsp-card .ds-social { gap: 0.6rem; margin-top: 0.6rem; }
.dsp-card .ds-social .wp-social-link a { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #2A2B31; border-radius: 50%; background: rgba(255, 255, 255, 0.03); color: #fff; }
.dsp-card .ds-social .wp-social-link a:hover { border-color: var(--h-red); color: var(--h-red2); }

/* generic pages (support, privacy): readable prose */
.dsp-prose .wp-block-post-content { color: #D3D5DA; font-size: 1.08rem; line-height: 1.8; }
.dsp-prose .wp-block-post-content > * { margin-block: 0 1.2rem; }
.dsp-prose .wp-block-post-content strong { color: #fff; }
.dsp-prose .wp-block-post-content a { color: var(--h-red2); background-image: none; text-decoration: underline; text-underline-offset: 3px; }
.dsp-prose .wp-block-post-content a:hover { color: #fff; }
.dsp-prose .wp-block-post-content > p:first-child { padding: 1.1rem 1.3rem; border: 1px solid #2A2B31; border-left: 3px solid var(--h-red); border-radius: 14px; background: linear-gradient(90deg, rgba(227, 38, 54, 0.1), rgba(23, 24, 28, 0.6) 40%); color: #E6E7EA; }
.dsp-prose .wp-block-post-content > p:first-child::before { display: none; }
.dsp-prose .wp-block-post-content h2 { position: relative; margin: 2.4rem 0 0.9rem; padding-top: 1rem; color: #fff; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.85rem); font-weight: 800; line-height: 1.2; }
.dsp-prose .wp-block-post-content h2::before { content: ""; position: absolute; top: 0; left: 0; width: 40px; height: 3px; border-radius: 3px; background: var(--h-red); }
.dsp-prose .wp-block-post-content h3 { margin: 1.8rem 0 0.6rem; color: #fff; font-size: 1.2rem; font-weight: 800; }
.dsp-prose .wp-block-post-content ul { padding-left: 0; list-style: none; }
.dsp-prose .wp-block-post-content ul > li { position: relative; margin: 0.45rem 0; padding-left: 1.5rem; }
.dsp-prose .wp-block-post-content ul > li::before { content: ""; position: absolute; left: 0.3rem; top: 0.75em; width: 7px; height: 7px; border-radius: 50%; background: var(--h-red); }
.dsp-prose .wp-block-post-content ol { padding-left: 1.4rem; }
.dsp-prose .wp-block-post-content ol > li::marker { color: var(--h-red); font-weight: 800; }

/* tables in pages (legal, round timer); dark stripes replace the core light-grey ones */
.dsp-prose .wp-block-table { margin: 1.4rem 0 1.8rem; overflow-x: auto; border: 1px solid #2A2B31; border-radius: 14px; background: #121317; }
.dsp-prose .wp-block-table table { width: 100%; margin: 0; border: 0; border-collapse: collapse; font-size: 0.95rem; line-height: 1.5; }
.dsp-prose .wp-block-table th { padding: 0.8rem 1rem; border: 0; border-bottom: 2px solid var(--h-red); background: #17181C; color: #fff; font-weight: 800; text-align: left; }
.dsp-prose .wp-block-table td { padding: 0.75rem 1rem; border: 0; border-top: 1px solid #22232A; color: #D3D5DA; vertical-align: top; }
.dsp-prose .wp-block-table.is-style-stripes { border-bottom: 1px solid #2A2B31; }
.dsp-prose .wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: rgba(255, 255, 255, 0.035); }
/* never split words inside cells ("Pres-et"); a table wider than the phone scrolls sideways instead */
.dsp-prose .wp-block-table table.has-fixed-layout { table-layout: auto; }
.dsp-prose .wp-block-table th { white-space: nowrap; }
.dsp-prose .wp-block-table th, .dsp-prose .wp-block-table td { overflow-wrap: normal; word-break: normal; hyphens: none; }
.dsp-prose code { padding: 0.1rem 0.35rem; border-radius: 6px; background: #1C1D22; color: #fff; font-size: 0.88em; }

/* 404 */
.dsp-404 { text-align: center; padding-block: clamp(4rem, 9vw, 7rem) !important; }
.dsp-404 .dsp-hero__inner > * { margin-inline: auto; }
.dsp-404::before { right: 50%; transform: translate(50%, -50%) rotate(-6deg); opacity: 0.05; width: clamp(20rem, 46vw, 40rem); }
.dsp-404__code { margin: 0 auto 0.5rem !important; color: transparent; font-size: clamp(6rem, 4rem + 10vw, 12rem); font-weight: 800; font-style: italic; line-height: 0.9; letter-spacing: -0.04em; -webkit-text-stroke: 2px var(--h-red); text-shadow: 0 0 40px rgba(227, 38, 54, 0.35); }
.dsp-404 .dsp-lead { margin-bottom: 2rem !important; }
.dsp-404__links { justify-content: center; }

/* apps page: app icon next to the name */
.ds-showcase__id { display: flex; align-items: center; gap: 1.25rem; margin: 0.4rem 0 0.9rem; }
.ds-showcase__id .ds-showcase__title { margin: 0; }
.ds-showcase__icon { flex: none; width: 104px; height: 104px; border-radius: 24px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 16px 34px -12px rgba(227, 38, 54, 0.65); }
@media (max-width: 781px) { .ds-showcase__icon { width: 80px; height: 80px; border-radius: 19px; } }
/* apps page: the phone screens DawnSpar supplied (phone already drawn in the image, transparent corners) */
.ds-showcase .ds-device--image { width: min(100%, 320px); margin: 0 auto; }
.ds-device--image .ds-device__image { display: block; width: 100%; height: auto; filter: drop-shadow(0 34px 44px rgba(227, 38, 54, 0.38)) drop-shadow(0 14px 22px rgba(0, 0, 0, 0.65)); }
@media (prefers-reduced-motion: no-preference) {
	.ds-device--image { animation: ds-float 7s ease-in-out infinite; }
}
@media (max-width: 781px) { .ds-showcase .ds-device--image { width: min(70vw, 270px); } }
/* apps page */
.ds-apps-section.dsp-section { background: linear-gradient(180deg, #0B0B0E, #0E0F12); }

@media (prefers-reduced-motion: reduce) {
	.dsp-value,
	.dsp-buttons .wp-block-button__link { transition: none; }
	.dsp-value:hover,
	.dsp-buttons .wp-block-button__link:hover { transform: none; }
}

@media (max-width: 781px) {
	.dsp-hero::before { width: 14rem; right: -3rem; opacity: 0.06; }
	.dsp-split,
	.dsp-values,
	.dsp-cards { grid-template-columns: 1fr; }
	.dsp-split__visual { order: -1; }
	.dsp-split__visual img { width: min(70%, 18rem); }
	.dsp-buttons .wp-block-button,
	.dsp-buttons .wp-block-button__link { width: 100%; justify-content: center; }
}
