/* QCut Website — Shared Styles */

* {
	font-family: "Inter", system-ui, sans-serif;
}

/* ── Color Palette ──
   Primary:   Warm terracotta/coral — creative energy
   Secondary: Deep teal — trust and depth
   Accent:    Soft amber/gold — premium highlights
   Neutrals:  Warm-tinted toward terracotta hue
*/

/* Light Mode (default) */
:root {
	--bg-primary: oklch(0.975 0.005 60);
	--bg-secondary: oklch(0.95 0.008 55);
	--bg-card: oklch(0.993 0.003 60);
	--text-primary: oklch(0.18 0.01 30);
	--text-muted: oklch(0.45 0.015 30);
	--text-light: oklch(0.6 0.01 30);
	--border-color: oklch(0.88 0.008 55);
	--border-hover: oklch(0.78 0.01 55);
	--code-bg: oklch(0.18 0.01 30);
	--code-text: oklch(0.9 0.005 60);

	/* Brand colors */
	--color-primary: oklch(0.62 0.17 25);
	--color-primary-light: oklch(0.92 0.04 25);
	--color-primary-hover: oklch(0.55 0.17 25);
	--color-secondary: oklch(0.5 0.08 195);
	--color-secondary-light: oklch(0.92 0.03 195);
	--color-accent: oklch(0.78 0.12 75);
	--color-accent-light: oklch(0.94 0.04 75);

	/* Semantic */
	--color-success: oklch(0.6 0.15 155);
	--color-success-light: oklch(0.93 0.04 155);
	--color-error: oklch(0.58 0.18 18);
	--color-error-light: oklch(0.93 0.04 18);
	--color-warning: oklch(0.75 0.14 65);
	--color-warning-light: oklch(0.94 0.04 65);
	--color-info: oklch(0.58 0.12 245);
	--color-info-light: oklch(0.93 0.03 245);

	/* Easing curves */
	--ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
	--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode */
.dark {
	--bg-primary: oklch(0.13 0.01 30);
	--bg-secondary: oklch(0.17 0.008 30);
	--bg-card: oklch(0.2 0.01 30);
	--text-primary: oklch(0.95 0.005 60);
	--text-muted: oklch(0.65 0.01 30);
	--text-light: oklch(0.45 0.01 30);
	--border-color: oklch(0.28 0.01 30);
	--border-hover: oklch(0.4 0.01 30);
	--code-bg: oklch(0.1 0.01 30);
	--code-text: oklch(0.9 0.005 60);

	/* Brand colors — slightly brighter for dark bg */
	--color-primary: oklch(0.68 0.16 25);
	--color-primary-light: oklch(0.25 0.04 25);
	--color-primary-hover: oklch(0.75 0.15 25);
	--color-secondary: oklch(0.6 0.08 195);
	--color-secondary-light: oklch(0.22 0.03 195);
	--color-accent: oklch(0.8 0.12 75);
	--color-accent-light: oklch(0.25 0.04 75);

	--color-success: oklch(0.68 0.14 155);
	--color-success-light: oklch(0.22 0.04 155);
	--color-error: oklch(0.65 0.16 18);
	--color-error-light: oklch(0.22 0.04 18);
	--color-warning: oklch(0.78 0.12 65);
	--color-warning-light: oklch(0.22 0.03 65);
	--color-info: oklch(0.65 0.1 245);
	--color-info-light: oklch(0.22 0.03 245);
}

/* Smooth scrolling */
html {
	scroll-behavior: smooth;
}

body {
	background: var(--bg-primary);
	color: var(--text-primary);
	transition:
		background 0.3s var(--ease-out-quart),
		color 0.3s var(--ease-out-quart);
}

/* Utility classes */
.bg-primary {
	background: var(--bg-primary);
}
.bg-secondary {
	background: var(--bg-secondary);
}
.bg-card {
	background: var(--bg-card);
}
.text-primary {
	color: var(--text-primary);
}
.text-muted {
	color: var(--text-muted);
}
.text-light {
	color: var(--text-light);
}
.border-main {
	border-color: var(--border-color);
}

/* Brand color utilities */
.text-brand {
	color: var(--color-primary);
}
.text-brand-secondary {
	color: var(--color-secondary);
}
.text-brand-accent {
	color: var(--color-accent);
}
.bg-brand {
	background: var(--color-primary);
	color: oklch(0.99 0 0);
}
.bg-brand-light {
	background: var(--color-primary-light);
}
.bg-brand-secondary-light {
	background: var(--color-secondary-light);
}
.bg-brand-accent-light {
	background: var(--color-accent-light);
}
.bg-success-light {
	background: var(--color-success-light);
}
.text-success {
	color: var(--color-success);
}

/* ── Buttons ── */
.btn-primary {
	background: var(--color-primary);
	color: oklch(0.99 0 0);
	transition:
		background 0.2s var(--ease-out-quart),
		transform 0.15s var(--ease-out-quart),
		box-shadow 0.2s var(--ease-out-quart);
}
.btn-primary:hover {
	background: var(--color-primary-hover);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px oklch(0.62 0.17 25 / 0.25);
}
.btn-primary:active {
	transform: translateY(0) scale(0.98);
}

.btn-dark {
	background: var(--text-primary);
	color: var(--bg-primary);
	transition:
		opacity 0.2s var(--ease-out-quart),
		transform 0.15s var(--ease-out-quart),
		box-shadow 0.2s var(--ease-out-quart);
}
.btn-dark:hover {
	opacity: 0.85;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px oklch(0.2 0.01 30 / 0.15);
}
.btn-dark:active {
	transform: translateY(0) scale(0.98);
	opacity: 1;
}

.btn-outline {
	border: 1px solid var(--border-color);
	background: transparent;
	color: var(--text-primary);
	transition:
		border-color 0.2s var(--ease-out-quart),
		color 0.2s var(--ease-out-quart),
		transform 0.15s var(--ease-out-quart);
}
.btn-outline:hover {
	border-color: var(--color-primary);
	color: var(--color-primary);
	transform: translateY(-1px);
}
.btn-outline:active {
	transform: translateY(0) scale(0.98);
}

/* ── Cards ── */
.card {
	background: var(--bg-card);
	border: 1px solid var(--border-color);
	transition:
		border-color 0.25s var(--ease-out-quart),
		box-shadow 0.25s var(--ease-out-quart);
}
.card:hover {
	border-color: var(--border-hover);
	box-shadow: 0 4px 12px oklch(0.2 0.01 30 / 0.08);
}

/* Code blocks */
.code-block {
	background: var(--code-bg);
	color: var(--code-text);
	overflow-x: auto;
}

/* ── Navigation ── */
.nav-border {
	border-bottom: 1px solid var(--border-color);
	transition: box-shadow 0.3s var(--ease-out-quart);
}
.nav-scrolled {
	box-shadow: 0 1px 8px oklch(0.2 0.01 30 / 0.06);
}

/* Nav link hover underline */
.nav-link {
	position: relative;
}
.nav-link::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 100%;
	height: 1.5px;
	background: var(--color-primary);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.25s var(--ease-out-quart);
}
.nav-link:hover::after {
	transform: scaleX(1);
	transform-origin: left;
}

/* Theme toggle — 44px minimum touch target */
.theme-toggle {
	cursor: pointer;
	padding: 12px;
	border-radius: 8px;
	transition: background 0.2s var(--ease-out-quart);
}
.theme-toggle:hover {
	background: var(--bg-secondary);
}

/* Focus indicators — uses brand primary */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}

/* ── FAQ Accordion ── */
details .faq-content {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.3s var(--ease-out-quart);
}
details[open] .faq-content {
	grid-template-rows: 1fr;
}
details .faq-content > div {
	overflow: hidden;
}

/* ── Contact form submit animation ── */
.btn-loading {
	pointer-events: none;
	opacity: 0.7;
}
.btn-loading::after {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid transparent;
	border-top-color: currentColor;
	border-radius: 50%;
	margin-left: 8px;
	vertical-align: middle;
	animation: spin 0.6s linear infinite;
}
@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Text overflow utilities */
.truncate {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Mobile nav */
.mobile-menu {
	display: none;
}
.mobile-menu.open {
	display: block;
}
.mobile-menu a {
	padding: 12px 0;
	min-height: 44px;
	display: flex;
	align-items: center;
}
.hamburger {
	display: none;
}
@media (max-width: 767px) {
	.hamburger {
		display: flex;
	}
}
