/* Tech with Glory: Elementor widget styles */

/* ---------- Brand lockup ---------- */
.twg-brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: var(--twg-ink);
}
.twg-mark { display: block; flex: none; width: 38px; height: 38px; }
.twg-mark--image { object-fit: contain; border-radius: 10px; }
.twg-brand__name {
	font: 700 1.15rem/1 var(--twg-font-logo);
	letter-spacing: -.02em;
	white-space: nowrap;
}
.twg-brand__with { color: var(--twg-blue-soft); font-weight: 500; }

/* ---------- Header ---------- */
.twg-header {
	height: 80px;
	display: flex;
	align-items: center;
	border-bottom: 1px solid var(--twg-line);
}
.twg-header__nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.twg-status {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 8px 14px;
	border: 1px solid var(--twg-line-strong);
	border-radius: 999px;
	background: var(--twg-surface);
	color: var(--twg-ink-2);
	font-size: .84rem;
	font-weight: 500;
	line-height: 1.2;
}
.twg-status i {
	position: relative;
	width: 7px;
	height: 7px;
	flex: none;
	border-radius: 50%;
	background: var(--twg-blue-soft);
}
.twg-status i::after {
	content: "";
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 1px solid var(--twg-blue-soft);
	opacity: 0;
	animation: twg-ping 2.2s ease-out infinite;
}
@keyframes twg-ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }

/* ---------- Hero intro ---------- */
.twg-eyebrow {
	margin-bottom: 20px;
	font-size: .95rem;
	font-weight: 500;
	color: var(--twg-muted);
}
.elementor-widget .twg-hero__title {
	font-family: var(--twg-font-display);
	font-size: clamp(2.5rem, 4.4vw, 4.25rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -.03em;
	margin: 0 0 20px;
	color: var(--twg-white);
}
.twg-accent { color: var(--twg-blue-soft); }
.twg-lead {
	max-width: 58ch;
	font-size: clamp(1.02rem, 1.4vw, 1.125rem);
	line-height: 1.7;
	color: var(--twg-muted);
	margin: 0 0 24px;
}
.twg-path {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin: 0 0 28px;
	color: var(--twg-ink);
	font: 600 .875rem/1 var(--twg-font-display);
}
.twg-path__step {
	padding: 9px 14px;
	border: 1px solid var(--twg-line-strong);
	border-radius: 999px;
	background: var(--twg-surface);
}
.twg-path__sep { color: var(--twg-subtle); }

/* ---------- Countdown ---------- */
.twg-timer-label {
	font-size: .72rem;
	text-transform: uppercase;
	letter-spacing: .16em;
	color: var(--twg-muted);
	font-weight: 700;
	margin-bottom: 12px;
}
.twg-countdown { display: grid; grid-template-columns: repeat(4, minmax(72px, 96px)); gap: 10px; }
.twg-time {
	padding: 13px 8px 12px;
	border-radius: var(--twg-radius);
	text-align: center;
	background: var(--twg-surface);
	border: 1px solid var(--twg-line);
}
.twg-time strong {
	display: block;
	font: 600 clamp(1.6rem, 3vw, 2.1rem)/1 var(--twg-font-display);
	letter-spacing: -.02em;
	color: var(--twg-white);
	font-variant-numeric: tabular-nums;
}
.twg-time span {
	display: block;
	margin-top: 8px;
	color: var(--twg-muted);
	font-size: .66rem;
	text-transform: uppercase;
	letter-spacing: .14em;
	font-weight: 700;
}

/* ---------- Notify form (Fluent Forms) ---------- */
.twg-notify__box {
	max-width: 540px;
	padding: 6px;
	border-radius: 16px;
	background: rgba(244, 247, 255, .045);
	border: 1px solid var(--twg-line-strong);
	transition: border-color .2s, box-shadow .2s;
}
.twg-notify__box:focus-within { border-color: rgba(117, 153, 255, .6); box-shadow: 0 0 0 4px rgba(62, 104, 232, .16); }
.twg-notify .fluentform,
.twg-notify .frm-fluent-form { margin: 0 !important; }
.twg-notify .frm-fluent-form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.twg-notify--inline-yes .twg-notify .frm-fluent-form fieldset { display: flex; gap: 6px; align-items: stretch; }
.twg-notify .ff-el-group { margin: 0 !important; flex: 1; min-width: 0; }

/* Form with a consent checkbox: email + button stay in the pill, consent sits underneath */
.twg-notify__box:has(.twg-consent) { padding: 0; background: none; border: 0; box-shadow: none; }
.twg-notify--inline-yes .twg-notify__box:has(.twg-consent) fieldset { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0; }
.twg-notify__box:has(.twg-consent) fieldset::before {
	content: "";
	grid-row: 1;
	grid-column: 1 / -1;
	border-radius: 16px;
	background: rgba(244, 247, 255, .045);
	border: 1px solid var(--twg-line-strong);
	transition: border-color .2s, box-shadow .2s;
}
.twg-notify__box:has(.twg-consent) fieldset:has(.ff-el-form-control:focus)::before { border-color: rgba(117, 153, 255, .6); box-shadow: 0 0 0 4px rgba(62, 104, 232, .16); }
.twg-notify__box:has(.twg-consent) .ff-el-group:not(.twg-consent):not(.ff_submit_btn_wrapper) { grid-row: 1; grid-column: 1; margin: 6px 0 6px 6px !important; position: relative; }
.twg-notify__box:has(.twg-consent) .ff_submit_btn_wrapper { grid-row: 1; grid-column: 2; margin: 6px 6px 6px 6px !important; position: relative; }
.twg-notify .twg-consent { grid-row: 2; grid-column: 1 / -1; margin: 14px 0 0 2px !important; }
.twg-notify .twg-consent .ff-el-form-check { margin: 0; }
.twg-notify .twg-consent label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	color: var(--twg-muted);
	font-size: .8rem;
	font-weight: 400;
	line-height: 1.5;
	cursor: pointer;
}
.twg-notify .twg-consent .ff_tc_checkbox { display: flex; padding-top: 2px; }
.twg-notify .twg-consent input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--twg-blue); cursor: pointer; }
.twg-notify .twg-consent .ff_t_c { margin: 0; padding: 0; }
.twg-notify .twg-consent a { color: var(--twg-ink-2); text-decoration: underline; text-underline-offset: 2px; }
.twg-notify .twg-consent a:hover { color: var(--twg-ink); }
.twg-notify .twg-consent .text-danger { padding: 6px 0 0 26px !important; }
.twg-notify .ff-el-input--label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.twg-notify .fluentform .ff-el-form-control,
.twg-notify .ff-el-form-control {
	width: 100%;
	height: auto;
	min-width: 0;
	border: 0 !important;
	border-radius: 10px;
	background: transparent !important;
	color: var(--twg-white) !important;
	padding: 13px 14px !important;
	font-size: 1rem;
	line-height: 1.5;
	outline: none;
	box-shadow: none !important;
}
.twg-notify .ff-el-form-control::placeholder { color: var(--twg-subtle); opacity: 1; }
.twg-notify .ff_submit_btn_wrapper { margin: 0 !important; flex: none; }
.twg-notify .fluentform .ff-btn-submit,
.twg-notify .ff-btn-submit {
	height: 100%;
	border: 0 !important;
	border-radius: 11px !important;
	padding: 13px 22px !important;
	background: var(--twg-blue) !important;
	color: var(--twg-white) !important;
	font-family: var(--twg-font-display);
	font-size: .92rem;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.4;
	cursor: pointer;
	white-space: nowrap;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18) !important;
	transition: background-color .2s, transform .2s;
}
.twg-notify .ff-btn-submit:hover { background: var(--twg-blue-hover) !important; opacity: 1 !important; }
.twg-notify .ff-btn-submit:active { transform: translateY(1px); }
.twg-notify .ff-btn-submit:focus-visible { outline: 2px solid var(--twg-blue-soft); outline-offset: 2px; }
.twg-notify .error.text-danger,
.twg-notify .ff-el-is-error .text-danger { color: #ff9b9b; font-size: .8rem; padding: 4px 14px 0; margin: 0; }
.twg-notify .ff-errors-in-stack { margin: 8px 8px 2px; color: #ff9b9b; font-size: .85rem; }
.twg-notify .ff-message-success {
	margin: 0;
	padding: 13px 14px;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: var(--twg-ink);
	font-weight: 600;
}
.twg-notify .ff-message-success::before { content: "✓"; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 10px; border-radius: 50%; background: var(--twg-blue); color: #fff; font-size: .75rem; }
.twg-notify .ff-message-success p { display: inline; margin: 0; }
.twg-notify__empty { margin: 0; padding: 13px 14px; color: var(--twg-muted); font-size: .9rem; }
.twg-form-note { margin: 12px 0 0 4px; color: var(--twg-subtle); font-size: .82rem; }

/* ---------- Portrait showcase ---------- */
.twg-visual {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}
.twg-figure { position: relative; z-index: 1; width: min(100%, 440px); margin: 0; }
.twg-portrait {
	position: relative;
	width: 100%;
	height: clamp(420px, calc(100vh - 250px), 540px);
	border-radius: 20px;
	overflow: hidden;
	background: var(--twg-surface-2);
}
.twg-caption { margin-top: 14px; color: var(--twg-muted); font-size: .88rem; line-height: 1.4; }
/* Optional brand-blue panel behind the photo (off by default) */
.twg-portrait-panel-yes .twg-visual::before {
	content: "";
	position: absolute;
	z-index: 0;
	width: min(80%, 380px);
	height: 72%;
	right: max(0px, calc(50% - 260px));
	bottom: 0;
	border-radius: var(--twg-radius-lg);
	background: var(--twg-blue);
}
.twg-portrait--arch .twg-portrait { border-radius: 230px 230px var(--twg-radius-lg) var(--twg-radius-lg); }
.twg-portrait img { width: 100%; height: 100% !important; max-width: none; object-fit: cover; object-position: center 24%; display: block; border-radius: 0; }

.twg-lesson-card {
	position: absolute;
	z-index: 2;
	left: max(-12px, calc(50% - 300px));
	/* Anchored just below the face line so it never rises over the face on shorter photos */
	/* 46% down the photo, just below the face */
	top: 46%;
	width: 232px;
	padding: 16px 16px 6px;
	border-radius: 16px;
	background: var(--twg-paper);
	color: var(--twg-ink-dark);
	box-shadow: 0 30px 60px -18px rgba(0, 0, 0, .55);
}
.twg-lesson-card small {
	display: block;
	margin-bottom: 6px;
	color: var(--twg-blue);
	font-size: .62rem;
	font-weight: 700;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: .14em;
}
.twg-lesson-card strong { display: block; font: 600 .9rem/1.35 var(--twg-font-display); letter-spacing: -.01em; color: var(--twg-ink-dark); }
.twg-lesson-card p { margin: 8px 0 0; color: var(--twg-muted-dark); font-size: .84rem; line-height: 1.5; }
.twg-feature-list { list-style: none; margin: 10px 0 0; padding: 0; }
.twg-feature-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: .8rem; font-weight: 500; line-height: 1.3; color: var(--twg-ink-dark); }
.twg-feature-list li + li { border-top: 1px solid var(--twg-line-dark); }
.twg-feature-list__icon { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 7px; background: #e6ecff; color: var(--twg-blue); }
.twg-feature-list__icon svg { width: 13px; height: 13px; }

.twg-code-card {
	position: absolute;
	z-index: 2;
	right: max(-12px, calc(50% - 290px));
	top: 40px;
	width: 236px;
	border: 1px solid var(--twg-line-strong);
	border-radius: 16px;
	background: rgba(8, 12, 20, .92);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	box-shadow: 0 30px 60px -18px rgba(0, 0, 0, .6);
	overflow: hidden;
}
.twg-code-card__top { height: 34px; border-bottom: 1px solid var(--twg-line); display: flex; align-items: center; gap: 6px; padding: 0 14px; }
.twg-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(244, 247, 255, .18); }
.twg-code { padding: 16px 18px 18px; font: 500 .74rem/1.8 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--twg-ink-2); }
.twg-code .b { color: var(--twg-blue-soft); }
.twg-code .g { color: var(--twg-cursor); }
.twg-code .c { color: var(--twg-subtle); }

/* ---------- Promise ---------- */
.twg-promise__head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.elementor-widget .twg-promise__title {
	font: 700 clamp(1.9rem, 3.4vw, 2.75rem)/1.12 var(--twg-font-display);
	letter-spacing: -.025em;
	margin: 0 0 14px;
}
.twg-promise__lead { margin: 0; font-size: 1.06rem; line-height: 1.65; }
.twg-promise__items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); }
.twg-promise__items article { padding-top: 26px; border-top: 1px solid; }
.twg-promise__items b { display: block; font: 600 1.1rem/1.35 var(--twg-font-display); letter-spacing: -.01em; margin-bottom: 8px; }
.twg-promise__items p { margin: 0; font-size: .95rem; line-height: 1.6; }
.twg-num {
	display: inline-block;
	margin-bottom: 18px;
	color: var(--twg-blue);
	font: 600 .8rem/1 var(--twg-font-display);
	letter-spacing: .06em;
}

.twg-scheme--light .twg-promise__title,
.twg-scheme--light .twg-promise__items b { color: var(--twg-ink-dark); }
.twg-scheme--light .twg-promise__lead,
.twg-scheme--light .twg-promise__items p { color: var(--twg-muted-dark); }
.twg-scheme--light .twg-promise__items article { border-color: var(--twg-ink-dark); }
.twg-scheme--light .twg-promise__items article:not(:first-child) { border-color: var(--twg-line-dark); }

.twg-scheme--dark .twg-promise__title,
.twg-scheme--dark .twg-promise__items b { color: var(--twg-ink); }
.twg-scheme--dark .twg-promise__lead,
.twg-scheme--dark .twg-promise__items p { color: var(--twg-muted); }
.twg-scheme--dark .twg-promise__items article { border-color: var(--twg-line-strong); }
.twg-scheme--dark .twg-promise__items article:first-child { border-color: var(--twg-blue-soft); }
.twg-scheme--dark .twg-num { color: var(--twg-blue-soft); }

/* ---------- Footer ---------- */
.twg-footer { padding: 28px 0; border-top: 1px solid var(--twg-line); color: var(--twg-muted); font-size: .85rem; background: var(--twg-black); }
.twg-footer__row { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.twg-footer__brand { display: inline-flex; align-items: center; gap: 12px; }
.twg-footer .twg-mark { width: 28px; height: 28px; }
.twg-footer__tagline { color: var(--twg-muted); }
.twg-footer__legal { display: inline-flex; flex-wrap: wrap; gap: 6px 20px; }
.twg-footer__legal a { color: var(--twg-ink-2); text-decoration: none; }
.twg-footer__legal a:hover, .twg-footer__legal a:focus-visible { color: var(--twg-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.twg-visual { min-height: auto; max-width: 600px; margin: 0 auto; width: 100%; }
	.twg-code-card { right: 0; }
	.twg-lesson-card { left: 0; }
}
@media (max-width: 767px) {
	.twg-header { height: 68px; }
	.twg-brand__name { font-size: 1.05rem; }
	.twg-mark { width: 34px; height: 34px; }
	.twg-status { padding: 9px; }
	.twg-status__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.elementor-widget .twg-hero__title { font-size: clamp(2.3rem, 10.5vw, 3rem); }
	.twg-countdown { grid-template-columns: repeat(4, 1fr); gap: 8px; }
	.twg-time { padding: 13px 4px 11px; }
	.twg-notify--inline-yes .twg-notify .frm-fluent-form fieldset { display: grid; }
	.twg-notify .ff-btn-submit { width: 100%; }
	.twg-notify--inline-yes .twg-notify__box:has(.twg-consent) fieldset { grid-template-columns: minmax(0, 1fr); }
	.twg-notify__box:has(.twg-consent) fieldset::before { grid-row: 1 / 3; }
	.twg-notify__box:has(.twg-consent) .ff-el-group:not(.twg-consent):not(.ff_submit_btn_wrapper) { margin: 6px 6px 0 !important; }
	.twg-notify__box:has(.twg-consent) .ff_submit_btn_wrapper { grid-row: 2; grid-column: 1; margin: 6px !important; }
	.twg-notify .twg-consent { grid-row: 3; }
	.twg-visual { padding: 8px 0 0; }
	.twg-figure { width: 100%; }
	.twg-portrait-panel-yes .twg-visual::before { right: -6px; width: 70%; }
	.twg-portrait { height: 420px; }
	.twg-portrait--arch .twg-portrait { border-radius: 160px 160px 24px 24px; }
	.twg-code-card { display: none; }
	.twg-visual { flex-direction: column; align-items: stretch; }
	.twg-lesson-card { position: relative; top: auto; left: auto; bottom: auto; width: 100%; margin-top: 18px; padding: 18px 18px 8px; }
	.twg-lesson-card strong { font-size: .98rem; }
	.twg-feature-list li { padding: 7px 0; font-size: .84rem; }
	.twg-feature-list__icon { width: 26px; height: 26px; }
	.twg-promise__items { grid-template-columns: 1fr; }
	.twg-footer__row { justify-content: center; text-align: center; }
}
