/**
 * Base Styles - Reset & Typography
 * Coach Dave Academy Theme
 *
 * This file contains the CSS reset and base typography styles.
 * Requires variables.css to be loaded first.
 *
 * @package CoachDaveAcademy
 * @version 1.1.0
 */

/* ==========================================================================
   CSS Reset (Modern Minimal Reset)
   ========================================================================== */

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

html,
body,
div,
span,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
abbr,
address,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
samp,
small,
strong,
sub,
sup,
var,
b,
i,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section,
summary,
time,
mark,
audio,
video {
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	vertical-align: baseline;
	background: transparent;
	list-style: none;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
	display: block;
}

/* ==========================================================================
   Document
   ========================================================================== */

html {
	font-size: 62.5%; /* 1rem = 10px */
	overflow-x: hidden;
	-webkit-text-size-adjust: 100%;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: smooth;
}

body {
	overflow-x: hidden;
	font-size: var(--text-base);
	line-height: var(--leading-normal);
	font-family: var(--font-primary);
	font-weight: var(--font-normal);
	color: var(--color-text);
	background-color: var(--color-bg);
}

/* ==========================================================================
   Typography
   ========================================================================== */

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-heading);
	font-weight: var(--font-normal);
	color: var(--color-gray-900);
	line-height: var(--leading-tight);
	margin-bottom: var(--space-4);
}

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

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

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

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

h5 {
	font-size: var(--text-lg);
}

h6 {
	font-size: var(--text-md);
}

/* Paragraphs */
p {
	margin-bottom: var(--space-4);
}

p:last-child {
	margin-bottom: 0;
}

/* Links */
a {
	color: var(--color-text);
	text-decoration: none;
	transition: var(--transition-colors);
}

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

a:focus {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}

/* Strong & Emphasis */
strong,
b {
	font-weight: var(--font-bold);
}

em,
i {
	font-style: italic;
}

/* Small Text */
small {
	font-size: var(--text-sm);
	color: var(--color-text-muted);
}

/* Strikethrough & Underline */
s,
strike,
del {
	text-decoration: line-through;
}

u,
ins {
	text-decoration: underline;
}

/* Abbreviations */
abbr[title],
acronym[title] {
	text-decoration: underline dotted;
	cursor: help;
}

/* Superscript & Subscript */
sub,
sup {
	font-size: 75%;
	line-height: 0;
	position: relative;
	vertical-align: baseline;
}

sup {
	top: -0.5em;
}

sub {
	bottom: -0.25em;
}

/* Mark/Highlight */
mark {
	background-color: var(--color-warning-light);
	padding: var(--space-0-5) var(--space-1);
}

/* ==========================================================================
   Code & Pre
   ========================================================================== */

code,
tt,
kbd,
samp {
	font-family: var(--font-mono);
	font-size: 85%;
	background-color: var(--color-gray-200);
	color: var(--color-text);
	padding: var(--space-1) var(--space-1-5);
	border-radius: var(--radius-sm);
}

pre {
	font-family: var(--font-mono);
	font-size: 85%;
	padding: var(--space-5);
	margin-bottom: var(--space-5);
	background-color: var(--color-bg-light);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-default);
	color: var(--color-text);
	overflow-x: auto;
	white-space: pre-wrap;
	word-wrap: break-word;
}

pre code {
	background: none;
	padding: 0;
	font-size: inherit;
}

kbd {
	background-color: var(--color-gray-800);
	color: var(--color-white);
}

/* ==========================================================================
   Lists
   ========================================================================== */

ul,
ol {
	margin-bottom: var(--space-4);
	padding-left: var(--space-6);
}

ul {
	list-style-type: disc;
}

ol {
	list-style-type: decimal;
}

ul ul,
ol ol,
ul ol,
ol ul {
	margin-bottom: 0;
	margin-top: var(--space-2);
}

li {
	margin-bottom: var(--space-2);
}

li:last-child {
	margin-bottom: 0;
}

/* Definition Lists */
dl {
	margin-bottom: var(--space-4);
}

dt {
	font-weight: var(--font-bold);
	margin-bottom: var(--space-1);
}

dd {
	margin-left: var(--space-4);
	margin-bottom: var(--space-3);
}

/* Navigation Lists (reset) */
nav ul,
nav ol {
	list-style: none;
	padding-left: 0;
	margin-bottom: 0;
}

nav li {
	margin-bottom: 0;
}

/* ==========================================================================
   Blockquotes
   ========================================================================== */

blockquote {
	margin: var(--space-6) 0;
	padding: var(--space-4) var(--space-6);
	border-left: 4px solid var(--color-primary);
	background-color: var(--color-bg-light);
	font-style: italic;
}

blockquote p:last-child {
	margin-bottom: 0;
}

blockquote cite {
	display: block;
	margin-top: var(--space-3);
	font-size: var(--text-sm);
	font-style: normal;
	color: var(--color-text-muted);
}

blockquote cite::before {
	content: "— ";
}

q {
	quotes: """ """ "'" "'";
}

q::before {
	content: open-quote;
}

q::after {
	content: close-quote;
}

/* ==========================================================================
   Horizontal Rule
   ========================================================================== */

hr {
	display: block;
	height: 1px;
	border: 0;
	border-top: 1px solid var(--color-border);
	margin: var(--space-8) 0;
	padding: 0;
}

/* ==========================================================================
   Media
   ========================================================================== */

img {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

figure {
	margin: var(--space-6) 0;
}

figcaption {
	font-size: var(--text-sm);
	color: var(--color-text-muted);
	margin-top: var(--space-2);
}

iframe,
embed,
object,
video {
	max-width: 100%;
}

/* ==========================================================================
   Tables
   ========================================================================== */

table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	margin-bottom: var(--space-6);
}

th,
td {
	padding: var(--space-3) var(--space-4);
	text-align: left;
	border-bottom: 1px solid var(--color-border);
}

th {
	font-weight: var(--font-semibold);
	background-color: var(--color-bg-light);
}

thead th {
	border-bottom-width: 2px;
}

tbody tr:hover {
	background-color: var(--color-bg-lighter);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

button,
.button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
	text-align: center;
	white-space: nowrap;
}

/* ==========================================================================
   Selection
   ========================================================================== */

::selection {
	background-color: var(--color-primary);
	color: var(--color-black);
}

::-moz-selection {
	background-color: var(--color-primary);
	color: var(--color-black);
}

/* ==========================================================================
   Focus Styles (Accessibility)
   ========================================================================== */

:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
	*,
	*::before,
	*::after {
		background: transparent !important;
		color: #000 !important;
		box-shadow: none !important;
		text-shadow: none !important;
	}

	a,
	a:visited {
		text-decoration: underline;
	}

	a[href]::after {
		content: " (" attr(href) ")";
	}

	abbr[title]::after {
		content: " (" attr(title) ")";
	}

	pre {
		white-space: pre-wrap !important;
	}

	pre,
	blockquote {
		border: 1px solid #999;
		page-break-inside: avoid;
	}

	img {
		page-break-inside: avoid;
		max-width: 100% !important;
	}

	h2,
	h3 {
		page-break-after: avoid;
	}
}
