/*
Theme Name: Suraj Gogoi
Theme URI: https://surajgogoi.com
Author: Suraj Gogoi
Description: Custom theme for SurajGogoi.com — educational digital guides.
Version: 0.8.6
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: surajgogoi
*/

/*
  Design tokens — see docs/design-system.md
*/

@font-face {
	font-family: "Source Sans 3";
	src: url("assets/fonts/source-sans-3-latin-400.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Source Sans 3";
	src: url("assets/fonts/source-sans-3-latin-500.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Source Sans 3";
	src: url("assets/fonts/source-sans-3-latin-600.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Source Serif 4";
	src: url("assets/fonts/source-serif-4-latin-400.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Source Serif 4";
	src: url("assets/fonts/source-serif-4-latin-600.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

:root {
	--font-heading: "Source Serif 4", Georgia, "Times New Roman", serif;
	--font-body: "Source Sans 3", "Helvetica Neue", system-ui, sans-serif;

	--blue: #0072c8;
	--blue-deep: #005a9e;
	--purple: #9b7bb8;
	--purple-deep: #7a69a3;
	--purple-soft: #c9b6dc;
	--ink: #333333;
	--ink-soft: #555555;
	--paper: #ffffff;
	--mist: #ececec;
	--card: #f4f4f4;
	--line: #e0e0e0;
	--fun-radius: 1.15rem;

	--text-body: 1.125rem;
	--text-small: 0.9375rem;
	--text-caption: 0.875rem;
	--text-h1: clamp(2rem, 1.5rem + 2vw, 3rem);
	--text-h2: clamp(1.625rem, 1.35rem + 1.2vw, 2.25rem);
	--text-h3: 1.375rem;
	--text-h4: 1.1875rem;

	--leading-body: 1.65;
	--leading-heading: 1.2;
	--leading-ui: 1.4;

	--measure-text: 38rem;
	--measure-content: 68rem;

	--color-primary: var(--ink);
	--color-secondary: var(--ink-soft);
	--color-background: var(--paper);
	--color-text: var(--ink);
	--color-muted: var(--ink-soft);
	--color-accent: var(--blue-deep);
	--color-border: var(--line);
	--color-on-primary: var(--paper);
	--color-surface: #faf8fc;

	--space-section: clamp(3.5rem, 2.5rem + 4vw, 7rem);
	--space-grid: 1.5rem;

	--bp-small: 40rem;
	--bp-medium: 48rem;
	--bp-large: 64rem;

	--radius: 0.35rem;
	--button-padding: 0.75rem 1.25rem;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--text-body);
	line-height: var(--leading-body);
	color: var(--color-text);
	background-color: var(--color-background);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--color-accent);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

a:hover {
	color: var(--color-primary);
}

a:focus-visible,
button:focus-visible,
.sg-button:focus-visible,
.sg-nav-toggle:focus-visible {
	outline: 2px solid var(--purple);
	outline-offset: 3px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-heading);
	line-height: var(--leading-heading);
	color: var(--color-text);
	font-weight: 600;
	margin: 0 0 0.75rem;
}

h1 {
	font-size: var(--text-h1);
}

h2 {
	font-size: var(--text-h2);
}

h3 {
	font-size: var(--text-h3);
}

h4 {
	font-size: var(--text-h4);
}

p {
	margin: 0 0 1rem;
}

ul,
ol {
	margin: 0 0 1rem;
	padding-left: 1.25rem;
}

li + li {
	margin-top: 0.35rem;
}

.sg-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: 0.75rem 1rem;
	background: var(--color-primary);
	color: var(--color-on-primary);
}

.sg-skip-link:focus {
	left: 0.5rem;
	top: 0.5rem;
}

.sg-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.sg-shell {
	width: min(100% - 2rem, var(--measure-content));
	margin-inline: auto;
}

.sg-prose {
	max-width: var(--measure-text);
}

.sg-prose > *:last-child {
	margin-bottom: 0;
}

/* Header */

.sg-header {
	border-bottom: 1px solid var(--line);
	background: var(--paper);
}

.sg-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.65rem 1.25rem;
	padding: 0.85rem 0 0.75rem;
}

.sg-header--sales .sg-header__inner,
.sg-header--checkout .sg-header__inner {
	justify-content: flex-start;
}

.sg-brand {
	margin: 0;
	font-family: var(--font-body);
	line-height: 1;
}

.sg-brand a {
	color: var(--ink);
	text-decoration: none;
}

.sg-brand--logo {
	line-height: 0;
}

.sg-brand--logo .sg-brand__link {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	line-height: 0;
}

.sg-brand--signature .sg-brand__link {
	align-items: center;
	line-height: 1;
	gap: 0;
}

.sg-brand__signature-img {
	display: block;
	width: auto;
	height: clamp(2.9rem, 2.35rem + 1.6vw, 4rem);
	max-width: min(100%, 20rem);
	flex: 0 1 auto;
}

.sg-brand__logo--wordmark {
	display: block;
	width: auto;
	height: clamp(2.1rem, 1.85rem + 0.75vw, 2.75rem);
	max-width: min(100%, 15.5rem);
	flex: 0 1 auto;
}

.sg-brand__signature-lockup {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 0.18rem;
	line-height: 1;
	min-width: 0;
}

.sg-brand--signature .sg-brand__role {
	display: block;
	font-family: var(--font-body);
	font-size: clamp(0.58rem, 0.54rem + 0.15vw, 0.65rem);
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ink-soft);
	line-height: 1;
	padding-left: 0.15rem;
}

.sg-brand a:hover .sg-brand__name-mark {
	color: var(--blue-deep);
}

.sg-brand--text a {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.22rem;
}

.sg-brand__name {
	display: block;
	font-size: clamp(1.1rem, 1rem + 0.35vw, 1.3rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.05;
}

.sg-brand__name-mark {
	color: var(--blue);
}

.sg-brand__role {
	display: block;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ink-soft);
	line-height: 1;
}

@media (min-width: 48rem) {
	.sg-header__inner {
		padding-top: 0.95rem;
	}
}

.sg-nav-toggle {
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: var(--text-small);
	font-weight: 700;
	line-height: var(--leading-ui);
	cursor: pointer;
}

.sg-nav {
	width: 100%;
	display: none;
}

.sg-nav.is-open {
	display: block;
}

.sg-nav__list {
	list-style: none;
	margin: 0;
	padding: 0.5rem 0 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	align-items: flex-start;
}

.sg-nav__list li {
	display: flex;
	align-items: center;
	margin: 0;
}

.sg-nav__list a {
	display: inline-flex;
	align-items: center;
	color: var(--ink);
	text-decoration: none;
	font-size: var(--text-small);
	line-height: 1;
	font-weight: 700;
}

.sg-nav__list a:hover,
.sg-nav__list .current-menu-item > a {
	color: var(--blue-deep);
}

@media (min-width: 48rem) {
	.sg-nav-toggle {
		display: none;
	}

	.sg-nav {
		display: block;
		width: auto;
	}

	.sg-nav__list {
		flex-direction: row;
		align-items: center;
		gap: 1.5rem;
		padding: 0;
	}
}

/* Buttons */

.sg-button {
	display: inline-block;
	padding: var(--button-padding);
	border-radius: var(--radius);
	font-family: var(--font-body);
	font-size: var(--text-body);
	font-weight: 500;
	line-height: var(--leading-ui);
	text-decoration: none;
	text-align: center;
	border: 1px solid transparent;
	cursor: pointer;
}

.sg-button--primary {
	background: var(--color-primary);
	color: var(--color-on-primary);
	border-color: var(--color-primary);
}

.sg-button--primary:hover {
	background: var(--color-secondary);
	border-color: var(--color-secondary);
	color: var(--color-on-primary);
}

.sg-button--secondary {
	background: var(--color-background);
	color: var(--color-primary);
	border-color: var(--color-primary);
}

.sg-button--secondary:hover {
	background: var(--color-surface);
	color: var(--color-primary);
}

.sg-cta-group {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	margin-top: 1.5rem;
}

/* Sections */

.sg-section {
	padding: var(--space-section) 0;
}

.sg-section--tint {
	background: var(--color-surface);
}

.sg-section--border {
	border-top: 1px solid var(--color-border);
}

.sg-eyebrow {
	margin: 0 0 0.5rem;
	font-size: var(--text-caption);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--color-muted);
	line-height: var(--leading-ui);
}

.sg-lede {
	font-size: 1.2rem;
	color: var(--color-secondary);
	max-width: var(--measure-text);
}

.sg-muted {
	color: var(--color-muted);
	font-size: var(--text-small);
}

.sg-disclaimer {
	margin: 0;
	padding: 1rem 0 0;
	border-top: 1px solid var(--color-border);
	font-size: var(--text-small);
	color: var(--color-muted);
	max-width: var(--measure-text);
}

.sg-meta {
	margin: 0 0 1rem;
	font-size: var(--text-small);
	color: var(--color-muted);
}

/* Hero */

.sg-hero {
	padding: clamp(2.5rem, 2rem + 3vw, 5rem) 0 var(--space-section);
}

.sg-hero__title {
	max-width: 20ch;
}

.sg-hero__support {
	margin: 0;
	max-width: var(--measure-text);
	font-size: 1.2rem;
	color: var(--color-secondary);
}

/* Split lists */

.sg-split {
	display: grid;
	gap: 2rem;
}

@media (min-width: 48rem) {
	.sg-split {
		grid-template-columns: 1fr 1fr;
		gap: var(--space-grid);
	}
}

.sg-list-check {
	list-style: none;
	padding-left: 0;
	max-width: var(--measure-text);
}

.sg-list-check li {
	position: relative;
	padding-left: 1.25rem;
}

.sg-list-check li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 0.5rem;
	height: 0.5rem;
	background: var(--color-accent);
	border-radius: 1px;
}

/* Product feature list */

.sg-feature-list {
	list-style: none;
	padding: 0;
	margin: 0;
	max-width: 42rem;
}

.sg-feature-list li {
	padding: 1rem 0;
	border-bottom: 1px solid var(--color-border);
}

.sg-feature-list li:first-child {
	border-top: 1px solid var(--color-border);
}

.sg-feature-list strong {
	display: block;
	font-weight: 600;
	margin-bottom: 0.25rem;
}

/* Author */

.sg-author {
	display: grid;
	gap: 1.5rem;
	align-items: start;
	max-width: 42rem;
}

@media (min-width: 40rem) {
	.sg-author {
		grid-template-columns: 8rem 1fr;
	}
}

.sg-author__photo {
	aspect-ratio: 1;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: var(--text-caption);
	color: var(--color-muted);
	text-align: center;
	padding: 0.5rem;
}

.sg-author__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Steps */

.sg-steps {
	list-style: none;
	padding: 0;
	margin: 0;
	counter-reset: sg-step;
	max-width: var(--measure-text);
}

.sg-steps li {
	counter-increment: sg-step;
	padding-left: 2.5rem;
	position: relative;
	margin-bottom: 1.25rem;
}

.sg-steps li::before {
	content: counter(sg-step);
	position: absolute;
	left: 0;
	top: 0;
	font-family: var(--font-heading);
	font-weight: 600;
	color: var(--color-accent);
}

/* Guide index */

.sg-guide {
	padding: 1.5rem 0;
	border-top: 1px solid var(--color-border);
	max-width: 42rem;
}

.sg-guide:last-child {
	border-bottom: 1px solid var(--color-border);
}

.sg-guide__meta {
	margin: 0 0 0.5rem;
	font-size: var(--text-caption);
	color: var(--color-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600;
}

.sg-guide h2 {
	font-size: var(--text-h3);
}

.sg-guide--soon {
	opacity: 0.85;
}

/* Price block */

.sg-price-block {
	max-width: var(--measure-text);
}

.sg-price {
	font-family: var(--font-heading);
	font-size: var(--text-h2);
	font-weight: 600;
	margin: 0 0 0.5rem;
}

/* Lead form */

.sg-lead-form {
	max-width: 28rem;
}

.sg-form-notice {
	margin: 0;
	padding: 0.75rem 1rem;
	border: 1px dashed var(--color-border);
	font-size: var(--text-small);
	color: var(--color-muted);
}

.sg-lead-form .wpforms-container {
	margin: 0 !important;
}

.sg-lead-form .wpforms-field {
	padding: 0 0 0.75rem !important;
}

.sg-lead-form input[type="text"],
.sg-lead-form input[type="email"],
.sg-lead-form textarea {
	width: 100%;
	padding: 0.65rem 0.75rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	background: var(--color-background);
	font-family: var(--font-body);
	font-size: var(--text-body);
	color: var(--color-text);
}

.sg-lead-form button[type="submit"],
.sg-lead-form .wpforms-submit {
	background: var(--color-primary) !important;
	color: var(--color-on-primary) !important;
	border: 1px solid var(--color-primary) !important;
	border-radius: var(--radius) !important;
	padding: var(--button-padding) !important;
	font-family: var(--font-body) !important;
	font-weight: 500 !important;
	box-shadow: none !important;
}

/* Page content (legal) */

.sg-page-header {
	padding: clamp(2rem, 1.5rem + 2vw, 3.5rem) 0 1.5rem;
}

.sg-page-body {
	padding-bottom: var(--space-section);
}

.sg-page-body .sg-prose h2 {
	margin-top: 2rem;
}

/* Quiz page — fullscreen embed below the header, no footer. */

html:has(body.sg-lead-magnet-page) {
	height: 100%;
	overflow: hidden;
}

body.sg-lead-magnet-page {
	display: flex;
	flex-direction: column;
	height: 100dvh;
	overflow: hidden;
}

body.sg-lead-magnet-page .sg-header {
	flex-shrink: 0;
	position: relative;
	z-index: 5;
}

body.sg-lead-magnet-page .sg-quiz-full {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-height: 0;
	padding: 0;
	position: relative;
}

body.sg-lead-magnet-page .sg-quiz-full > .sg-sr-only {
	position: absolute;
}

body.sg-lead-magnet-page .sg-quiz-consent {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(1.25rem, 1rem + 2vw, 2.5rem);
	overflow: auto;
	min-height: 0;
}

body.sg-lead-magnet-page .sg-quiz-consent[hidden] {
	display: none !important;
}

.sg-quiz-consent__card {
	width: min(38rem, 100%);
	padding: clamp(1.5rem, 1.25rem + 1.5vw, 2.25rem);
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--fun-radius);
}

.sg-quiz-consent__card h2 {
	margin: 0 0 0.85rem;
	font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
}

.sg-quiz-consent__card p {
	margin: 0 0 1rem;
	color: var(--ink-soft);
}

.sg-quiz-consent__links {
	margin-bottom: 1.25rem !important;
	font-size: var(--text-small);
}

.sg-quiz-consent__links a {
	color: var(--blue);
	font-weight: 600;
	text-decoration: none;
}

.sg-quiz-consent__links a:hover {
	color: var(--blue-deep);
	text-decoration: underline;
}

.sg-quiz-consent__card .sg-cta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0;
}

.sg-quiz-consent__card .sg-cta-row .sg-btn,
.sg-quiz-consent__card .sg-cta-row .sg-btn--ghost {
	margin: 0;
	font-family: var(--font-body);
	cursor: pointer;
}

.sg-quiz-consent__card button.sg-btn {
	background: transparent;
}

.sg-quiz-consent__declined {
	margin-top: 1.15rem !important;
	margin-bottom: 0 !important;
}

.sg-quiz-consent__declined a {
	color: var(--blue);
	font-weight: 600;
}

body.sg-lead-magnet-page .sg-quiz-full__embed {
	flex: 1 1 auto;
	position: relative;
	width: 100%;
	min-height: 0;
}

body.sg-lead-magnet-page .sg-quiz-full__embed[hidden] {
	display: none !important;
}

body.sg-lead-magnet-page .sg-quiz-full__embed .involveme_embed,
body.sg-lead-magnet-page .sg-quiz-full__embed iframe,
body.sg-lead-magnet-page iframe[src*="involve.me"] {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-height: none !important;
	z-index: 1 !important;
	border: 0;
	display: block;
}

html.admin-bar body.sg-lead-magnet-page {
	height: calc(100dvh - 32px);
}

@media screen and (max-width: 782px) {
	html.admin-bar body.sg-lead-magnet-page {
		height: calc(100dvh - 46px);
	}
}

/* Footer */

.sg-footer {
	border-top: 1px solid var(--line);
	padding: clamp(2rem, 1.5rem + 2vw, 3rem) 0 1.75rem;
	background: var(--color-surface);
}

.sg-footer__inner {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.sg-footer__name {
	margin: 0 0 0.35rem;
	font-family: var(--font-body);
	font-weight: 800;
	font-size: 1.05rem;
	letter-spacing: -0.02em;
}

.sg-footer__tag {
	margin: 0;
	font-size: var(--text-small);
	color: var(--ink-soft);
	line-height: 1.55;
	max-width: 28rem;
}

.sg-footer__contact {
	margin: 0.65rem 0 0;
}

.sg-footer__contact a {
	color: var(--blue);
	font-size: var(--text-small);
	font-weight: 600;
	text-decoration: none;
}

.sg-footer__contact a:hover {
	color: var(--blue-deep);
	text-decoration: underline;
}

.sg-footer__links {
	width: 100%;
}

.sg-footer__links-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
}

.sg-footer__links-list li {
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	line-height: 1;
}

.sg-footer__links-list a {
	display: inline-block;
	color: var(--ink);
	text-decoration: none;
	font-size: var(--text-small);
	font-weight: 600;
	line-height: 1.4;
}

.sg-footer__links-list a:hover {
	color: var(--blue-deep);
}

@media (min-width: 48rem) {
	.sg-footer__links-list {
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: center;
		gap: 1.5rem;
	}

	.sg-footer__links-list a {
		white-space: nowrap;
	}
}

@media (min-width: 64rem) {
	.sg-footer__links-list {
		gap: 2rem;
	}
}

.sg-footer__note,
.sg-footer__meta,
.sg-footer__copy {
	margin: 0;
	font-size: var(--text-caption);
	color: var(--ink-soft);
	line-height: 1.55;
}

.sg-footer__note {
	padding-top: 1.25rem;
	border-top: 1px solid var(--line);
}

.sg-footer__meta {
	margin-top: 0.5rem;
	max-width: 42rem;
}

/* Pending SamCart note */

.sg-admin-note {
	margin-top: 0.75rem;
	font-size: var(--text-caption);
	color: var(--color-muted);
}
