/*
Theme Name: Damangamec
Theme URI: https://damangamec.com
Author: Damangamec
Author URI: https://damangamec.com
Description: Lightweight, SEO-first custom block theme for damangamec.com. Deep-indigo editorial design, self-hosts only two fonts (Inter + Hind for Devanagari), and strips front-end bloat for a fast Core Web Vitals profile. Preserves the existing site structure, pages and URLs.
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: damangamec
Tags: blocks, full-site-editing, custom-colors, custom-logo, editor-style, block-patterns, translation-ready, one-column
*/

/* =========================================================
   Base
   ========================================================= */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-wrap: break-word; }
:root { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { :root { scroll-behavior: auto; } * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

::selection { background: #3a1e97; color: #fff; }

/* Visible, accessible focus */
:where(a, button, input, select, textarea, .wp-block-button__link, .wp-block-navigation-item__content):focus-visible {
	outline: 3px solid #6d28d9;
	outline-offset: 2px;
	border-radius: 4px;
}

/* =========================================================
   Reading rhythm (long-form content pages)
   ========================================================= */
.entry-content > *,
.wp-block-post-content > * { margin-block: 0; }
/* Let text fill the content column on desktop; only cap on very wide screens for readability */
@media (min-width: 1500px) {
	.entry-content p,
	.wp-block-post-content p { max-width: 82ch; }
}

/* Headings get a little breathing room from preceding text */
:where(.wp-block-post-content, .entry-content) :is(h2, h3, h4) { margin-top: 2.2em; }
:where(.wp-block-post-content, .entry-content) :is(h2) {
	padding-top: .2em;
	scroll-margin-top: 90px;
}
:where(.wp-block-post-content, .entry-content) h2::after {
	content: "";
	display: block;
	width: 48px;
	height: 3px;
	margin-top: .55rem;
	background: linear-gradient(90deg, #3a1e97, #6d28d9);
	border-radius: 3px;
}

/* Lists */
:where(.wp-block-post-content, .entry-content) ul { list-style: none; padding-left: 0; }
:where(.wp-block-post-content, .entry-content) ul li { position: relative; padding-left: 1.6rem; }
:where(.wp-block-post-content, .entry-content) ul li::before {
	content: "";
	position: absolute;
	left: .1rem; top: .62em;
	width: .5rem; height: .5rem;
	background: #6d28d9;
	border-radius: 2px;
	transform: rotate(45deg);
}
:where(.wp-block-post-content, .entry-content) ol { padding-left: 1.3rem; }
:where(.wp-block-post-content, .entry-content) ol li::marker { color: #3a1e97; font-weight: 700; }

/* Links: subtle underline offset */
.wp-block-post-content a, .entry-content a { text-underline-offset: .18em; text-decoration-thickness: 1px; transition: color .15s ease; }

/* Images & embeds */
.wp-block-image img, .wp-block-post-featured-image img { border-radius: 14px; }
figure.wp-block-image figcaption { color: #4b4668; font-size: .85rem; }

/* Tables */
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table th { background: #f2f2fa; color: #15103a; font-weight: 700; text-align: left; }
.wp-block-table th, .wp-block-table td { border: 1px solid #e7e4f4; padding: .7rem .9rem; }
.wp-block-table tr:nth-child(even) td { background: #faf9fe; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
	border-bottom: 1px solid #e7e4f4;
	background: rgba(255,255,255,.85);
	backdrop-filter: saturate(140%) blur(8px);
	position: sticky; top: 0; z-index: 100;
}
.site-header .wp-block-site-title a { text-decoration: none; }
.site-nav .wp-block-navigation-item__content { color: #15103a; text-decoration: none; }
.site-nav .wp-block-navigation-item__content:hover,
.site-nav .current-menu-item .wp-block-navigation-item__content { color: #3a1e97; }
.site-nav .wp-block-navigation-item__content { position: relative; padding-bottom: 2px; }
.site-nav .wp-block-navigation-item__content::after {
	content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
	background: #6d28d9; transition: width .18s ease;
}
.site-nav .wp-block-navigation-item__content:hover::after { width: 100%; }

/* CTA button */
.cta-button .wp-block-button__link {
	background: linear-gradient(180deg, #4a2bb0, #3a1e97);
	box-shadow: 0 1px 2px rgba(28,10,99,.25), 0 6px 18px -8px rgba(58,30,151,.55);
	transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.cta-button .wp-block-button__link:hover {
	background: linear-gradient(180deg, #3a1e97, #2b1570);
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(28,10,99,.3), 0 10px 24px -8px rgba(58,30,151,.65);
}

/* =========================================================
   Content frame & post meta
   ========================================================= */
.site-main { padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: clamp(2.5rem, 6vw, 4.5rem); min-height: 60vh; }

.post-meta { color: #4b4668; font-size: .9rem; }
.post-meta .wp-block-post-date, .post-meta .wp-block-post-author-name { color: #4b4668; }
.post-meta a { color: #4b4668; text-decoration: none; }
.post-meta a:hover { color: #3a1e97; }

/* Author / E-E-A-T box */
.author-box {
	border: 1px solid #e7e4f4; background: #f6f5fc; border-radius: 16px;
	padding: clamp(1.1rem, 3vw, 1.6rem);
}

/* Post cards (archive / blog) */
.post-card {
	border: 1px solid #e7e4f4; border-radius: 16px; background: #fff;
	padding: clamp(1.1rem, 3vw, 1.5rem);
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
	height: 100%;
}
.post-card:hover { border-color: #cfc8ee; box-shadow: 0 12px 30px -18px rgba(28,10,99,.45); transform: translateY(-2px); }
.post-card .wp-block-post-title a { text-decoration: none; }
.post-card .wp-block-post-title a:hover { color: #3a1e97; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { border-top: 1px solid #e7e4f4; background: #15103a; color: #cdc8e6; }
.site-footer a { color: #d8d3f0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .wp-block-site-title a { color: #fff; }
.site-footer .footer-legal { color: #8f88b8; font-size: .82rem; }
.site-footer .responsible-note {
	border: 1px solid #2d2560; background: #1b1348; border-radius: 12px;
	color: #c9c3e6; font-size: .85rem;
}

/* =========================================================
   Hindi pages — Devanagari typography
   ========================================================= */
.page-id-148 .wp-block-post-content,
.parent-pageid-148 .wp-block-post-content,
[lang="hi"] .wp-block-post-content,
html[lang^="hi"] .wp-block-post-content {
	font-family: "Hind", "Noto Sans Devanagari", -apple-system, "Segoe UI", sans-serif;
	line-height: 1.85;
}

/* =========================================================
   Utilities
   ========================================================= */
.skip-link.screen-reader-text {
	position: absolute; left: -9999px; top: 0; z-index: 9999;
	background: #3a1e97; color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link.screen-reader-text:focus { left: 0; }
