/*
Theme Name: Technify Guru
Theme URI: https://technifyguru.com
Author: Technify Guru
Author URI: https://technifyguru.com
Description: Marketing site theme for Technify Guru AI Paper Maker, the CBSE question-paper generator for teachers. A multi-page block theme built for the Site Editor.
Requires at least: 6.6
Tested up to: 6.7
Requires PHP: 8.1
Version: 0.6.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: technifyguru
Tags: block-patterns, full-site-editing, one-column, custom-colors, custom-logo
*/

/*
 * Everything that theme.json can express lives there. This file holds the
 * rules the block editor has no setting for.
 *
 * Specificity rule: every selector that can reach an Elementor page is wrapped
 * in :where() so it carries no weight; whatever is set in the Elementor panel
 * wins. The theme only supplies defaults there.
 *
 * Colour rule: text on the amber accent is always navy (white on amber is
 * 2.5:1). Amber used as text is the darker "accent-text" preset (6:1 on white).
 */

/* ---------------------------------------------------------------------- */
/* Base                                                                    */
/* ---------------------------------------------------------------------- */

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

body {
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

:where(img) {
	max-width: 100%;
	height: auto;
}

:where(p) {
	text-wrap: pretty;
}

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

/* Visible keyboard focus everywhere, in brand blue */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--blue);
	outline-offset: 2px;
	border-radius: 4px;
}

.wp-block-button__link {
	transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.wp-block-button__link:hover {
	box-shadow: 0 8px 20px -12px rgba(11, 27, 58, 0.5);
}

.wp-block-button__link:focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------------- */
/* Header                                                                  */
/* ---------------------------------------------------------------------- */

.tg-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--base);
	/* No backdrop-filter here: it would make the fixed-position mobile menu overlay clip to the header. */
}

.admin-bar .tg-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .tg-header {
		top: 46px;
	}
}

.tg-header > .wp-block-group {
	flex-wrap: nowrap;
}

.tg-header .wp-block-site-title a {
	text-decoration: none;
}

/* When a logo is set, the site-logo block renders; hide the text fallback next to it. */
.tg-header .wp-block-site-logo + .wp-block-site-title {
	display: none;
}

.tg-header .wp-block-site-logo img {
	height: auto;
	max-height: 44px;
	width: auto;
}

.tg-header .wp-block-navigation .wp-block-navigation-item__content {
	padding: 0.35rem 0;
	border-bottom: 2px solid transparent;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.tg-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.tg-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
	border-bottom-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
}

.tg-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: 4rem clamp(1rem, 4vw, 1.5rem) 2rem;
	background: var(--wp--preset--color--base);
}

.tg-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 1.125rem;
	padding: 0.65rem 0;
	border-bottom: 0;
}

.tg-header .wp-block-navigation__responsive-container-open,
.tg-header .wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--contrast);
}

.tg-header .wp-block-button__link {
	padding: 0.6rem 1.1rem;
	font-size: var(--wp--preset--font-size--small);
}

.tg-link {
	color: var(--wp--preset--color--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.tg-link:hover {
	color: var(--wp--preset--color--contrast);
	text-decoration: underline;
}

/* The menu's own "Sign in" entry exists for phones only. */
@media (min-width: 782px) {
	.tg-header .wp-block-navigation-item.tg-nav-signin {
		display: none;
	}
}

/* Phones: logo left, Start free and the menu button right, Sign in moves into the menu. */
@media (max-width: 781px) {
	.tg-header .tg-header-actions .tg-link {
		display: none;
	}

	.tg-header .wp-block-navigation {
		order: 3;
	}

	.tg-header .tg-header-actions {
		order: 2;
		margin-left: auto;
	}

	.tg-header .wp-block-site-logo img {
		max-height: 36px;
	}
}

/* ---------------------------------------------------------------------- */
/* Text helpers                                                            */
/* ---------------------------------------------------------------------- */

/* Eyebrow line (the short label above a heading) */
:where(.tg-eyebrow) {
	color: var(--wp--preset--color--accent-text);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.has-contrast-background-color .tg-eyebrow,
.has-primary-background-color .tg-eyebrow,
.tg-footer .tg-eyebrow {
	color: var(--wp--preset--color--accent);
}

:where(.tg-lead) {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.55;
}

/* ---------------------------------------------------------------------- */
/* Cards, badges, steps, prices                                            */
/* ---------------------------------------------------------------------- */

:where(.tg-card) {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--large);
	box-shadow: var(--wp--custom--shadow--card);
	height: 100%;
	transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

:where(.tg-card):hover {
	box-shadow: var(--wp--custom--shadow--card-hover);
	transform: translateY(-2px);
}

:where(.tg-card-featured) {
	border-color: var(--wp--preset--color--accent);
	box-shadow: 0 0 0 1px var(--wp--preset--color--accent), var(--wp--custom--shadow--card);
}

:where(.tg-card-flat),
:where(.tg-card-flat):hover {
	box-shadow: none;
	transform: none;
}

:where(.tg-badge) {
	display: inline-block;
	background: var(--wp--preset--color--accent-tint);
	color: var(--wp--preset--color--accent-text);
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1;
	padding: 0.45em 0.9em;
	letter-spacing: 0.02em;
}

:where(.tg-badge-navy) {
	background: var(--wp--preset--color--tint);
	color: var(--wp--preset--color--contrast);
}

/* Numbered steps: navy disc, white numeral */
:where(.tg-step-number) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 999px;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	font-weight: 700;
	font-size: 1.0625rem;
	margin-bottom: var(--wp--preset--spacing--30);
	box-shadow: 0 0 0 6px var(--wp--preset--color--tint);
}

/* Price line */
:where(.tg-price) {
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1;
	color: var(--wp--preset--color--contrast);
}

:where(.tg-price) small {
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 500;
	letter-spacing: 0;
	color: var(--wp--preset--color--muted);
}

/* Check lists (plans, sample contents) */
.tg-plan-list {
	list-style: none;
	padding-left: 0;
}

.tg-plan-list li {
	padding-left: 1.75rem;
	position: relative;
	margin-bottom: 0.4rem;
}

.tg-plan-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 999px;
	background: var(--wp--preset--color--accent-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%239a4d00' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / 0.75rem no-repeat;
}

/* ---------------------------------------------------------------------- */
/* Screenshots (assets/images/screenshots, captured at 2x by _capture.js)  */
/* ---------------------------------------------------------------------- */

:where(.tg-shot) {
	margin-left: auto;
	margin-right: auto;
}

:where(.tg-shot) img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--medium);
	box-shadow: var(--wp--custom--shadow--shot);
	background: #fff;
}

/* Element crops already carry their own card border; keep only a soft shadow. */
:where(.tg-shot-crop) img {
	border: 0;
	border-radius: 14px;
	box-shadow: 0 16px 32px -20px rgba(11, 27, 58, 0.3);
}

/* Equal-height tiles in card grids: show the top-left of the shot. */
:where(.tg-shot-tile) img {
	aspect-ratio: 16 / 10;
	object-fit: cover;
	object-position: left top;
}

:where(.tg-shot-hero) img {
	border-radius: var(--wp--custom--radius--large);
	box-shadow: 0 40px 80px -40px rgba(11, 27, 58, 0.5), 0 0 0 1px rgba(11, 27, 58, 0.06);
}

:where(.tg-shot-small) {
	max-width: 380px;
}

/* Hero and feature rows: stack as soon as the text column gets narrow (tablets too). */
@media (max-width: 1023px) {
	.tg-hero .wp-block-columns,
	.tg-feature-row .wp-block-columns {
		flex-wrap: wrap !important;
	}

	.tg-hero .wp-block-columns > .wp-block-column,
	.tg-feature-row .wp-block-columns > .wp-block-column {
		flex-basis: 100% !important;
	}

	.tg-hero .wp-block-columns > .wp-block-column + .wp-block-column {
		margin-top: var(--wp--preset--spacing--60);
	}

	.tg-hero .tg-shot-hero {
		max-width: 640px;
	}

	/* Text first, then the screenshot. */
	.tg-feature-media {
		order: 2;
	}
}

/* ---------------------------------------------------------------------- */
/* Sections                                                                */
/* ---------------------------------------------------------------------- */

/* Hero: soft fade plus a faint amber glow top-right */
:where(.tg-hero) {
	position: relative;
	overflow: hidden;
	/* background: var(--wp--preset--gradient--hero); */
}

:where(.tg-hero)::before {
	content: "";
	position: absolute;
	top: -20%;
	right: -10%;
	width: 50vw;
	max-width: 640px;
	aspect-ratio: 1;
	border-radius: 999px;
	/* background: radial-gradient(closest-side, rgba(240, 138, 16, 0.14), transparent 70%); */
	pointer-events: none;
}

:where(.tg-hero) > * {
	position: relative;
}

.tg-hero .wp-block-buttons {
	gap: 0.75rem;
}

/* Small trust line under the hero buttons */
.tg-trust {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	padding: 0;
	margin: 0;
	list-style: none;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.tg-trust li {
	padding-left: 1.35rem;
	position: relative;
}

.tg-trust li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.35em;
	width: 0.9rem;
	height: 0.9rem;
	border-radius: 999px;
	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 fill='none' stroke='%230b1b3a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / 0.6rem no-repeat;
}

/* Navy bands (CTA) */
:where(.tg-band-navy) {
	/* background: var(--wp--preset--gradient--navy); */
}

:where(.tg-band-navy) a:not(.wp-block-button__link) {
	color: var(--wp--preset--color--base);
	text-decoration: underline;
	text-decoration-color: rgba(255, 255, 255, 0.5);
}

:where(.tg-band-navy) a:not(.wp-block-button__link):hover {
	text-decoration-color: currentColor;
}

/* Button variants */
.tg-button-inverse .wp-block-button__link {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

.tg-button-inverse .wp-block-button__link:hover {
	background: var(--wp--preset--color--tint);
	color: var(--wp--preset--color--primary-dark);
}

.tg-button-accent .wp-block-button__link {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
}

.tg-button-accent .wp-block-button__link:hover {
	background: #f6a23a;
	color: var(--wp--preset--color--contrast);
}

/* Help & how-tos, Support */
.tg-anchor,
.tg-guide [id] {
	scroll-margin-top: 96px; /* clear the sticky header when deep-linked from the app */
}

.tg-doc-nav {
	font-size: var(--wp--preset--font-size--small);
	line-height: 2;
}

.tg-doc-nav a {
	white-space: nowrap;
}

.tg-steps {
	counter-reset: tg-step;
	list-style: none;
	padding-left: 0;
	margin: 0;
}

.tg-steps li {
	counter-increment: tg-step;
	position: relative;
	padding-left: 2.75rem;
	margin-bottom: 0.9rem;
	line-height: 1.6;
}

.tg-steps li::before {
	content: counter(tg-step);
	position: absolute;
	left: 0;
	top: 0.05em;
	width: 1.9rem;
	height: 1.9rem;
	border-radius: 999px;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	font-weight: 700;
	font-size: 0.875rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.tg-tip,
.tg-tip .elementor-widget-container {
	border-left: 4px solid var(--wp--preset--color--accent);
	background: var(--wp--preset--color--accent-tint);
	padding: 0.75rem 1rem;
	border-radius: var(--wp--custom--radius--small);
	font-size: var(--wp--preset--font-size--small);
}

.tg-tip p:last-child {
	margin-bottom: 0;
}

/* Draft notice on legal pages */
.tg-notice {
	border-left: 4px solid var(--wp--preset--color--accent);
	background: var(--wp--preset--color--accent-tint);
	color: var(--wp--preset--color--body);
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--small);
}

/* Comparison tables: scroll sideways on phones instead of squeezing */
.wp-block-table {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.wp-block-table table {
	min-width: 520px;
	border-collapse: collapse;
}

.wp-block-table.is-style-stripes {
	border-bottom: 0;
	border-radius: var(--wp--custom--radius--medium);
	border: 1px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--base);
}

.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background-color: var(--wp--preset--color--base-2);
}

.wp-block-table th,
.wp-block-table td {
	padding: 0.8rem 1rem;
	border: 0;
	text-align: left;
}

.wp-block-table thead th {
	color: var(--wp--preset--color--contrast);
	border-bottom: 2px solid var(--wp--preset--color--line);
}

.wp-block-table td:first-child {
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
}

/* FAQ */
.wp-block-details summary {
	cursor: pointer;
	font-weight: 600;
	list-style: none;
	position: relative;
	padding-right: 2.5rem;
	color: var(--wp--preset--color--contrast);
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::after {
	content: "";
	position: absolute;
	right: 0.25rem;
	top: 50%;
	width: 0.6rem;
	height: 0.6rem;
	border-right: 2px solid var(--wp--preset--color--accent-text);
	border-bottom: 2px solid var(--wp--preset--color--accent-text);
	transform: translateY(-70%) rotate(45deg);
	transition: transform 0.2s ease;
}

.wp-block-details[open] summary::after {
	transform: translateY(-30%) rotate(225deg);
}

.wp-block-details > :not(summary) {
	color: var(--wp--preset--color--muted);
	margin-top: var(--wp--preset--spacing--30);
	max-width: 65ch;
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

.tg-footer {
	border-top: 4px solid var(--wp--preset--color--accent);
}

.tg-footer a {
	color: inherit;
	text-decoration: none;
	opacity: 0.85;
}

.tg-footer a:hover {
	opacity: 1;
	text-decoration: underline;
}

.tg-footer .wp-block-list {
	list-style: none;
	padding-left: 0;
}

.tg-footer .wp-block-list li {
	margin-bottom: 0.35rem;
}

.tg-footer .wp-block-site-logo img {
	max-height: 40px;
	width: auto;
}

.tg-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	padding-top: var(--wp--preset--spacing--40);
	opacity: 0.8;
}

/* Footer columns: two per row on phones instead of a long single stack */
@media (max-width: 781px) {
	.tg-footer .wp-block-columns:not(.is-not-stacked-on-mobile) {
		flex-wrap: wrap !important;
	}

	.tg-footer .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
		flex-basis: calc(50% - var(--wp--style--block-gap, 1.5rem) / 2) !important;
	}

	.tg-footer .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column.tg-footer-brand {
		flex-basis: 100% !important;
	}
}

/* ---------------------------------------------------------------------- */
/* Elementor pages                                                         */
/* ---------------------------------------------------------------------- */

/* Elementor's Site Settings button style targets every <button>; keep the
   theme header's menu toggles as plain icons. */
.tg-header .wp-block-navigation__responsive-container-open,
.tg-header .wp-block-navigation__responsive-container-close {
	background: transparent !important;
	color: var(--wp--preset--color--contrast) !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

/* Helper classes applied to Elementor heading widgets style the heading
   itself, not the widget wrapper (which stretches to the column width). */
:where(.elementor-widget.tg-step-number, .elementor-widget.tg-badge, .elementor-widget.tg-price) {
	display: block;
	width: auto;
	height: auto;
	background: transparent;
	box-shadow: none;
	border-radius: 0;
	padding: 0;
	margin-bottom: 0;
	font-size: inherit;
	line-height: inherit;
	letter-spacing: 0;
}

:where(.elementor-widget.tg-step-number .elementor-heading-title) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 999px;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	font-weight: 700;
	font-size: 1.0625rem;
	line-height: 1;
	box-shadow: 0 0 0 6px var(--wp--preset--color--tint);
	margin: 6px 0 2px 6px;
}

:where(.elementor-widget.tg-badge .elementor-heading-title) {
	display: inline-block;
	background: var(--wp--preset--color--accent-tint);
	color: var(--wp--preset--color--accent-text);
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1;
	padding: 0.45em 0.9em;
	letter-spacing: 0.02em;
}

:where(.elementor-widget.tg-price .elementor-heading-title) {
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1;
	color: var(--wp--preset--color--contrast);
}

:where(.elementor-widget.tg-price .elementor-heading-title) small {
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 500;
	letter-spacing: 0;
	color: var(--wp--preset--color--muted);
}

/* Theme card hover also applies to Elementor containers carrying tg-card. */
:where(.e-con.tg-card) {
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* Elementor's own text widget: match theme paragraph rhythm. */
:where(.elementor-widget-text-editor) p:last-child {
	margin-bottom: 0;
}

.tg-elementor-main {
	margin-top: 0;
}

/* The theme's block gap would otherwise open 1.5rem between the last section and the footer. */
.wp-site-blocks > footer.wp-block-template-part,
.wp-site-blocks > .tg-elementor-main {
	margin-block-start: 0;
}

/* ---------------------------------------------------------------------- */
/* Small screens                                                           */
/* ---------------------------------------------------------------------- */

@media (max-width: 600px) {
	/* Buttons in a row stay side by side where they fit, else they go full width. */
	.tg-hero .wp-block-buttons > .wp-block-button,
	.tg-cta-buttons .wp-block-buttons > .wp-block-button {
		flex: 1 1 12rem;
	}

	.tg-hero .wp-block-buttons .wp-block-button__link,
	.tg-cta-buttons .wp-block-buttons .wp-block-button__link {
		width: 100%;
		text-align: center;
	}

	.tg-price {
		font-size: 2.25rem;
	}

	.wp-block-table table {
		min-width: 0;
	}

	.wp-block-table th,
	.wp-block-table td {
		padding: 0.6rem 0.5rem;
		font-size: 0.8125rem;
	}
}
