:root {
	--bg-color: #f5f4f2;
	--title-color: #1c1c1e;
	--text-color: #3c3f44;
	--accent-color: #9a7e6f;
	--extra-color: #7b736e;
	--card-bg: #ffffff;
	--border: #dddad6;
	--card-text-static: #3c3f44;
	--font-title: "Plus Jakarta Sans", sans-serif;
	--font-body: "DM Sans", sans-serif;
}

:root.dark {
	--bg-color: #0f0f11;
	--title-color: #f2f2f3;
	--text-color: #b6b7bb;
	--accent-color: #a78f81;
	--extra-color: #a39b95;
	--card-bg: #ffffff;
	--border: #2a2a2e;
}

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

html {
	background-color: var(--bg-color);
	scroll-behavior: smooth;
	color-scheme: light dark;
}

body {
	background-color: var(--bg-color);
	min-height: 100vh;
	transition: background-color 0.3s ease, color 0.3s ease;
}

/* Toogle Light/Dark Mode */
.theme-toggle {
	position: absolute;
	top: 16px;
	right: 16px;
}

/* Hide the actual checkbox */
.theme-toggle input[type="checkbox"] {
	height: 0;
	width: 0;
	visibility: hidden;
}

/* Track */
.theme-toggle label {
	cursor: pointer;
	text-indent: -9999px;
	width: 52px;
	height: 26px;
	background: grey;
	display: block;
	border-radius: 999px;
	position: relative;
}

/* Knob */
.theme-toggle label:after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 22px;
	height: 22px;
	background: #fff;
	border-radius: 999px;
	transition: 0.3s;
}

/* Checked state */
.theme-toggle input:checked + label {
	background: #2db92d;
}

.theme-toggle input:checked + label:after {
	left: calc(100% - 5px);
	transform: translateX(-100%);
}

/* Pressed animation */
.theme-toggle label:active:after {
	width: 30px;
}

/*Title Section*/
.title-section {
	padding: 100px 15px 15px 15px;
	position: relative;
}

.title-section .intro-title {
	font-family: var(--font-title);
	font-size: 60px;
	color: var(--title-color);
	text-transform: uppercase;
}

.title-section .intro-subheading {
	font-family: var(--font-title);
	font-size: 17px;
	font-weight: 300;
	color: var(--text-color);
}

.title-section .intro-text {
	font-family: var(--font-body);
	font-size: 20px;
	font-weight: 300;
	color: var(--text-color);
	padding: 35px 0 15px 0;
}

/*Grid poster section */
.doc-grid {
	padding: 60px 20px;
}

.doc-grid .grid-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	max-width: 1100px;
	gap: 24px;
	margin: 0 auto;
}

/* Section Divider */
.section-divider {
	border: 0;
	height: 1px;
	background: linear-gradient(
		to right,
		transparent,
		var(--accent-color),
		transparent
	);
	margin: 48px auto 32px;
	max-width: 500px;
	opacity: 0.9;
}

/* Cards */
.doc-grid .card {
	max-width: 260px;
	justify-self: center;
	background-color: var(--card-bg);
	border-radius: 12px;
	border: 1px solid var(--border);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
	transition: transform 0.18s ease-out, box-shadow 0.18s ease-out,
		border-color 0.18s ease-out, background-color 0.18s ease-out;
}

/* Poster */
.doc-grid .card-img-top {
	aspect-ratio: 2 / 3;
	object-fit: cover;
}

/* Card body */
.doc-grid .card-body {
	padding: 14px 14px 18px;
	display: flex;
	flex-direction: column;
	color: var(--card-text-static);
	gap: 6px;
}

/* Title */
.doc-grid .card-title {
	font-family: var(--font-title);
	font-size: 1rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--card-text-static);
	margin-bottom: 2px;
}

/* Text */
.doc-grid .card-text {
	font-family: var(--font-body);
	font-size: 0.9rem;
	font-weight: 400;
	line-height: 1.5;
	color: var(--card-text-static);
}

/* Hover */
.doc-grid .card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 35px rgba(0, 0, 0, 0.12);
	border-color: var(--accent-color);
	background-color: color-mix(
		in srgb,
		var(--card-bg) 92%,
		var(--accent-color) 8%
	);
}

/* Button CTA */
.button-cta {
	margin: 48px 0 32px;
	text-align: center;
}

.btn-doc {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-body);
	font-size: 0.95rem;
	font-weight: 500;

	border-radius: 999px;
	background-color: var(--extra-color);
	color: var(--bg-color);
	border: 1px solid var(--extra-color);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	padding: 1rem 2rem;
	margin: 0 0 30px 0;
	transition: background-color 0.2s ease-out, color 0.2s ease-out,
		transform 0.12s ease-out, box-shadow 0.18s ease-out,
		border-color 0.2s ease-out;
}
.btn-doc:hover {
	background-color: var(--accent-color);
	border-color: var(--accent-color);
	color: var(--bg-color);
	transform: translateY(-1px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.16);
}

.btn-doc:active {
	transform: translateY(0);
	box-shadow: none;
}

/* Line */
hr {
	border: 0;
	height: 1px;
	background-color: var(--border);
	margin: 40px auto;
	max-width: 1100px;
	opacity: 1;
}

/* Footer */
footer {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 1rem 0;
}

footer p {
	margin: 0;
	font-family: var(--font-body);
	font-size: 14px;
	color: var(--extra-color);
	font-weight: 400;
}

footer a {
	color: var(--extra-color);
	text-decoration: none;
	font-weight: 500;
}

footer a:hover {
	color: green;
}

/* ======== RESPONSIVE ======== */

/*Tablets and down (<= 768px)*/
@media (max-width: 768px) {
	/* Title section */
	.title-section {
		padding: 80px 16px 10px 16px;
	}

	.title-section .intro-title {
		font-size: 40px;
	}

	.title-section .intro-subheading {
		font-size: 15px;
	}

	.title-section .intro-text {
		font-size: 17px;
		padding: 24px 0 10px 0;
	}

	/* Grid spacing */
	.doc-grid {
		padding: 40px 16px;
	}

	.doc-grid .grid-container {
		gap: 16px;
	}

	/* Cards */
	.doc-grid .card {
		max-width: 100%;
		margin-bottom: 0;
	}

	/* Button */
	.button-cta {
		margin: 32px 0 24px;
	}

	.btn-doc {
		padding: 0.8rem 1.6rem;
		font-size: 0.9rem;
		letter-spacing: 0.08em;
	}
}

/* Small phones (<= 480px) */
@media (max-width: 480px) {
	/* Title section tighter */
	.title-section {
		padding: 70px 14px 8px 14px;
	}

	.title-section .intro-title {
		font-size: 32px;
	}

	.title-section .intro-subheading {
		font-size: 14px;
	}

	.title-section .intro-text {
		font-size: 16px;
	}

	/* Grid: keep columns but with more breathing space */
	.doc-grid {
		padding: 32px 12px;
	}

	.doc-grid .grid-container {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	/* Cards full width on very small screens */
	.doc-grid .card {
		max-width: 100%;
	}

	/* Button full-ish widht */
	.btn-doc {
		width: 100%;
		max-width: 320px;
		padding: 0.9rem 1.4rem;
	}

	.button-cta {
		display: flex;
		justify-content: center;
	}
}
