@import url('https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Inter:wght@100..900&family=Mona+Sans:wdth,wght@75..125,200..900&display=swap');

@import 'tailwindcss';

@theme {
	--color-emerald-950: #022c1f;
	--color-emerald-900: #064e38;
	--color-emerald-800: #065f43;
	--color-emerald-700: #047854;
	--color-emerald-600: #059669;
	--color-emerald-500: #10b985;
	--color-emerald-400: #34d3a2;
	--color-emerald-300: #6ee7c1;
	--color-emerald-200: #a7f3db;
	--color-emerald-100: #d1faed;
	--color-emerald-50: #ecfdf8;

	--color-primary: var(--color-emerald-600);
	--color-primary-hover: var(--color-emerald-700);
	--color-success: #16a34a;
	--color-warning: #ca8a04;
	--color-danger: #dc2626;

	--color-border: var(--color-neutral-200);
	--color-border-button: var(--color-neutral-300);
	--color-border-button-hover: var(--color-neutral-400);
	--color-body-bg: #fcfcfc;
	--color-background: var(--color-white);
	--color-foreground: var(--color-neutral-900);
	--color-supporting-foreground: var(--color-neutral-500);
	--color-table-heading-bg: var(--color-neutral-50);

	--shadow-card: 0 2px 3px hsla(0, 0%, 6%, 0.05);
	--radius-card: var(--radius-xl); /* 12px */

	--font-heading: 'Mona Sans', sans-serif;
	--font-dashboard: 'Geist', sans-serif;
	--font-marketing: 'Inter', sans-serif;

	--weight-extrabold: 800;
}

* {
	box-sizing: border-box;
	font-smoothing: antialiased;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

a,
button {
	cursor: pointer;
	transition: all 320ms ease-out;
}

body {
	font-family: 'Geist', sans-serif;
	font-size: 14px;
	background-color: var(--color-body-bg);
}

main {
	background-color: var(--color-body-bg);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	@apply text-emerald-900;
	letter-spacing: -0.02em;
	font-weight: 700;
}

.wordmark {
	@apply text-emerald-900 leading-none font-heading;
	font-family: 'Mona Sans';
	font-weight: 800;
	font-variation-settings: 'wdth' 115;
}

.title,
.stretched {
	font-family: 'Mona Sans';
	font-weight: 800;
	font-variation-settings: 'wdth' 115;
}

.text-gradient {
	background: linear-gradient(
		135deg,
		var(--color-emerald-400),
		var(--color-emerald-600)
	);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.card {
	@apply bg-background rounded-card shadow-card border-[0.5px] border-border;
}

.card__heading {
	@apply text-lg font-semibold text-neutral-900 leading-none;
}

.stat-card {
	@apply bg-background rounded-card shadow-card border-[0.5px] border-border px-6 py-5 flex flex-col gap-1;
}

.stat-card__label {
	@apply font-medium text-supporting-foreground flex justify-between;
}

.stat-card__value {
	@apply text-neutral-900 text-2xl truncate;
	font-family: 'Geist';
	letter-spacing: -0.025em;
	font-weight: 600;
}

.btn {
	@apply h-10 px-4 font-medium border rounded-lg shadow-xs;
}

.btn--primary {
	@apply bg-primary text-background border-transparent;
}

.btn--primary:hover {
	@apply bg-primary-hover;
}

.btn--secondary {
	@apply text-foreground bg-background border border-border-button;
}

.btn--secondary:hover {
	@apply border-border-button-hover;
}

/* Flash message animations */
@keyframes slide-in {
	from {
		opacity: 0;
		transform: translateX(100%);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes fade-out {
	from {
		opacity: 1;
		transform: translateX(0);
	}
	to {
		opacity: 0;
		transform: translateX(100%);
	}
}

.animate-slide-in {
	animation: slide-in 0.3s ease-out forwards;
}

.animate-fade-out {
	animation: fade-out 0.3s ease-out forwards;
}

/* Marketing page uses Inter for body text */
.landing {
	font-family: var(--font-marketing);
}

.landing .heading {
	@apply text-2xl font-bold tracking-tight text-emerald-800 font-heading;
	font-weight: 800;
	font-variation-settings: 'wdth' 105;
}

.landing .subheading {
	@apply text-base text-foreground;
}

.landing .heading + .subheading {
	@apply mt-1;
}

@media (width >= theme(--breakpoint-sm)) {
	.landing .heading {
		@apply text-2xl;
	}
}

.pricing-card.pricing-card--highlighted .pricing-card__heading {
	box-shadow: 0 6px 16px hsla(162, 86%, 16%, 0.08);
}

.pricing-card .pricing-card__heading {
	@apply border border-border;
}

.pricing-card--highlighted .pricing-card__heading {
	@apply border-transparent;
}

/* Hide scrollbar for carousel */
.scrollbar-hide {
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
	display: none;
}

/* Embla Carousel */

.embla__viewport {
	overflow: hidden;
}

.embla {
	max-width: 56rem;
	margin: auto;
	--slide-height: 19rem;
	--slide-spacing: 2rem;
	--slide-size: 90%;
}
.embla__viewport {
	overflow: hidden;
}
.embla__container {
	display: flex;
	touch-action: pan-y pinch-zoom;
	margin-left: calc(var(--slide-spacing) * -1);
}
.embla__slide {
	transform: translate3d(0, 0, 0);
	flex: 0 0 var(--slide-size);
	min-width: 0;
	padding-left: var(--slide-spacing);
}
.embla__slide__img {
	border-radius: 1.8rem;
	display: block;
	height: var(--slide-height);
	width: 100%;
	object-fit: cover;
}
.embla__controls {
	display: grid;
	grid-template-columns: auto 1fr;
	justify-content: space-between;
	gap: 1.2rem;
	margin-top: 1.8rem;
}
.embla__buttons {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.6rem;
	align-items: center;
}
.embla__button {
	-webkit-tap-highlight-color: rgba(var(--text-high-contrast-rgb-value), 0.5);
	-webkit-appearance: none;
	appearance: none;
	background-color: transparent;
	touch-action: manipulation;
	display: inline-flex;
	text-decoration: none;
	cursor: pointer;
	border: 0;
	padding: 0;
	margin: 0;
	box-shadow: inset 0 0 0 0.2rem var(--detail-medium-contrast);
	width: 3.6rem;
	height: 3.6rem;
	z-index: 1;
	border-radius: 50%;
	color: var(--text-body);
	display: flex;
	align-items: center;
	justify-content: center;
}
.embla__button:disabled {
	color: var(--detail-high-contrast);
}
.embla__button__svg {
	width: 35%;
	height: 35%;
}
.embla__dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	margin-right: calc((2.6rem - 1.4rem) / 2 * -1);
}
.embla__dot {
	-webkit-tap-highlight-color: rgba(var(--text-high-contrast-rgb-value), 0.5);
	-webkit-appearance: none;
	appearance: none;
	background-color: transparent;
	touch-action: manipulation;
	display: inline-flex;
	text-decoration: none;
	cursor: pointer;
	border: 0;
	padding: 0;
	margin: 0;
	width: 2.6rem;
	height: 2.6rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
}
.embla__dot:after {
	box-shadow: inset 0 0 0 0.2rem var(--detail-medium-contrast);
	width: 1.4rem;
	height: 1.4rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	content: '';
}
.embla__dot--selected:after {
	box-shadow: inset 0 0 0 0.2rem var(--text-body);
}
