/* ==========================================================================
   RHold Labs — Design System
   1 font (Inter) · teal accent + ink primary · 8px spacing · light/dark
   ========================================================================== */

/* ---- Tokens ---- */
:root {
	color-scheme: light;

	--font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--bg: #ffffff;
	--bg-soft: #f5f7f7;
	--bg-card: #ffffff;
	--border: rgba(12, 22, 21, 0.10);
	--border-strong: rgba(12, 22, 21, 0.18);

	--text: #0c1615;
	--text-2: #45524f;
	--text-3: #687572;

	--accent: #0d9488;
	--accent-ink: #0b7268;
	--accent-soft: rgba(13, 148, 136, 0.10);

	--ink: #101b1a;
	--ink-hover: #22302e;
	--on-ink: #ffffff;

	--danger: #c62828;
	--success: #0b7268;

	--radius-sm: 10px;
	--radius: 16px;
	--radius-lg: 20px;

	--shadow-sm: 0 1px 2px rgba(12, 22, 21, 0.06);
	--shadow-md: 0 6px 20px rgba(12, 22, 21, 0.08);
	--shadow-lg: 0 20px 50px rgba(12, 22, 21, 0.14);

	--container: 72rem;
	--gutter: clamp(1.25rem, 4vw, 2rem);
	--section: clamp(4rem, 9vw, 7.5rem);
}

[data-theme="dark"] {
	color-scheme: dark;

	--bg: #0b1110;
	--bg-soft: #0f1716;
	--bg-card: #121b1a;
	--border: rgba(232, 242, 240, 0.10);
	--border-strong: rgba(232, 242, 240, 0.20);

	--text: #edf3f2;
	--text-2: #a9b6b3;
	--text-3: #7e8b88;

	--accent: #2dd4bf;
	--accent-ink: #4adcc9;
	--accent-soft: rgba(45, 212, 191, 0.10);

	--ink: #edf3f2;
	--ink-hover: #ffffff;
	--on-ink: #0b1110;

	--danger: #ef7070;
	--success: #4adcc9;

	--shadow-sm: none;
	--shadow-md: none;
	--shadow-lg: none;
}

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.65;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

p { max-width: 65ch; }

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

ul { padding: 0; }

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

::selection { background: var(--accent-soft); }

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

/* ---- Utilities ---- */
.container {
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.section { padding-block: var(--section); }
.section--soft { background: var(--bg-soft); }

.section-head {
	max-width: 42rem;
	margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head--center {
	margin-inline: auto;
	text-align: center;
}

.section-head h2 {
	font-size: clamp(1.75rem, 3.5vw, 2.5rem);
	font-weight: 800;
	margin-bottom: 1rem;
}

.section-head p { color: var(--text-2); margin-inline: auto; }

.eyebrow {
	display: inline-block;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent-ink);
	margin-bottom: 1rem;
}

.skip-link {
	position: absolute;
	top: -100%;
	left: 1rem;
	z-index: 100;
	padding: 0.75rem 1.25rem;
	background: var(--ink);
	color: var(--on-ink);
	border-radius: var(--radius-sm);
	font-weight: 600;
}
.skip-link:focus { top: 1rem; text-decoration: none; }

/* Reveal on scroll */
[data-reveal] {
	opacity: 0;
	translate: 0 16px;
	transition: opacity 0.5s ease, translate 0.5s ease;
}
[data-reveal].is-visible { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
	[data-reveal] { opacity: 1; translate: 0 0; }
}

/* ---- Buttons ---- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 3rem;
	padding: 0 1.5rem;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	font-family: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.2s ease, border-color 0.2s ease,
		color 0.2s ease, box-shadow 0.2s ease, translate 0.2s ease;
}
.btn:hover { text-decoration: none; translate: 0 -1px; }
.btn:active { translate: 0 0; }

.btn--primary {
	background: var(--ink);
	color: var(--on-ink);
}
.btn--primary:hover { background: var(--ink-hover); box-shadow: var(--shadow-md); }

.btn--secondary {
	background: transparent;
	color: var(--text);
	border-color: var(--border-strong);
}
.btn--secondary:hover { border-color: var(--text-3); background: var(--bg-soft); }

.btn--full { width: 100%; }

.btn[disabled] { opacity: 0.6; cursor: not-allowed; translate: none; }

.btn .spinner {
	width: 1em;
	height: 1em;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: spin 0.7s linear infinite;
}
@keyframes spin { to { rotate: 360deg; } }

/* ---- Header / nav ---- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	isolation: isolate;
	background: color-mix(in srgb, var(--bg) 82%, transparent);
	border-bottom: 1px solid var(--border);
}

/* Blur on a pseudo-element: combining backdrop-filter on the header itself
   with filter on the logo causes compositing artifacts in Chromium. */
.site-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.nav {
	display: flex;
	align-items: center;
	gap: 2rem;
	min-height: 4.25rem;
}

.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { height: 1.75rem; width: auto; }
[data-theme="dark"] .brand img { filter: invert(1); }

.nav-menu {
	display: flex;
	align-items: center;
	gap: 2rem;
	margin-left: auto;
}

.nav-links {
	display: flex;
	align-items: center;
	gap: 1.75rem;
	list-style: none;
}

.nav-links a {
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--text-2);
	transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--text); font-weight: 600; }

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.nav-actions .btn { min-height: 2.5rem; padding-inline: 1.125rem; font-size: 0.875rem; }

.icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--text-2);
	cursor: pointer;
	transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-soft); }
.icon-btn svg { width: 1.125rem; height: 1.125rem; }

/* theme toggle icon swap */
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* mobile nav toggle icon swap */
.nav-toggle { display: none; margin-left: auto; }
.nav-toggle .icon-close { display: none; }
.nav.is-open .nav-toggle .icon-close { display: block; }
.nav.is-open .nav-toggle .icon-menu { display: none; }

@media (max-width: 53.75rem) {
	.nav-toggle { display: inline-flex; }
	.nav-menu {
		display: none;
		position: absolute;
		inset: 100% 0 auto 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 0.75rem var(--gutter) 1.25rem;
		background: var(--bg);
		border-bottom: 1px solid var(--border);
		box-shadow: var(--shadow-md);
	}
	.nav.is-open .nav-menu { display: flex; }
	.nav-links { flex-direction: column; align-items: stretch; gap: 0; }
	.nav-links a {
		display: block;
		padding: 0.875rem 0.25rem;
		font-size: 1rem;
		border-bottom: 1px solid var(--border);
	}
	.nav-actions { padding-top: 1rem; }
	.nav-actions .btn { flex: 1; min-height: 3rem; }
}

/* ---- Hero ---- */
.hero {
	position: relative;
	padding-block: clamp(4rem, 9vw, 7rem) 0;
	text-align: center;
	overflow: hidden;
}

.hero::before {
	content: "";
	position: absolute;
	inset: -40% -20% auto;
	height: 80%;
	background: radial-gradient(closest-side, var(--accent-soft), transparent 70%);
	pointer-events: none;
}

.hero > .container { position: relative; }

.hero h1 {
	font-size: clamp(2.375rem, 6vw, 3.875rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	max-width: 20ch;
	margin-inline: auto;
	margin-bottom: 1.5rem;
}

.hero .lede {
	font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
	color: var(--text-2);
	max-width: 46ch;
	margin-inline: auto;
	margin-bottom: 2rem;
}

.hero-cta {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-bottom: 2rem;
}

.chips {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin-bottom: clamp(3rem, 6vw, 4.5rem);
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.375rem 0.875rem;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--bg-card);
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--text-2);
}
.chip svg { width: 0.875rem; height: 0.875rem; color: var(--accent-ink); flex-shrink: 0; }

/* Browser-frame mockup */
.browser-frame {
	display: block;
	max-width: 60rem;
	margin-inline: auto;
	border: 1px solid var(--border);
	border-bottom: 0;
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
	background: var(--bg-card);
	box-shadow: var(--shadow-lg);
	overflow: hidden;
	transition: border-color 0.2s ease, translate 0.2s ease;
}

a.browser-frame:hover {
	text-decoration: none;
	border-color: var(--border-strong);
	translate: 0 -2px;
}

.browser-frame__bar {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.75rem 1.25rem;
	border-bottom: 1px solid var(--border);
}

.browser-frame__dots { display: flex; gap: 0.375rem; }
.browser-frame__dots span {
	width: 0.625rem;
	height: 0.625rem;
	border-radius: 50%;
	background: var(--border-strong);
}

.browser-frame__url {
	flex: 1;
	max-width: 18rem;
	margin-inline: auto;
	padding: 0.25rem 1rem;
	border-radius: 999px;
	background: var(--bg-soft);
	font-size: 0.75rem;
	color: var(--text-3);
	text-align: center;
}

.browser-frame img { width: 100%; height: auto; }

/* ---- Cards & grids ---- */
.grid {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(3, 1fr);
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 60rem) {
	.grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 40rem) {
	.grid, .grid--2 { grid-template-columns: 1fr; }
}

.card {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.75rem;
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, translate 0.2s ease;
}

a.card { color: inherit; }
a.card:hover { text-decoration: none; }

.card:hover {
	border-color: var(--border-strong);
	box-shadow: var(--shadow-md);
	translate: 0 -2px;
}

.card h3 { font-size: 1.125rem; }
.card p { font-size: 0.9375rem; color: var(--text-2); }

.icon-tile {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: var(--radius-sm);
	background: var(--accent-soft);
	color: var(--accent-ink);
	margin-bottom: 0.25rem;
}
.icon-tile svg { width: 1.375rem; height: 1.375rem; }

.card ul.checklist { margin-top: 0.25rem; }

/* checklist */
.checklist {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	font-size: 0.9375rem;
	color: var(--text-2);
}

.checklist li {
	display: flex;
	gap: 0.625rem;
	align-items: flex-start;
}

.checklist svg {
	width: 1.125rem;
	height: 1.125rem;
	flex-shrink: 0;
	margin-top: 0.2em;
	color: var(--accent-ink);
}

/* ---- Work / portfolio ---- */
.work-card { padding: 0; overflow: hidden; }

.work-card figure {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-bottom: 1px solid var(--border);
	background: var(--bg-soft);
}

.work-card figure img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
	transition: scale 0.3s ease;
}

.work-card:hover figure img { scale: 1.03; }

.work-card .work-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1.5rem 1.75rem 1.75rem;
}

.badge {
	display: inline-block;
	width: fit-content;
	padding: 0.2rem 0.7rem;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent-ink);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

/* Featured work card — full-width, image beside text */
.work-card--featured {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: 3fr 2fr;
}

.work-card--featured figure {
	aspect-ratio: auto;
	height: 100%;
	border-bottom: 0;
	border-right: 1px solid var(--border);
}

.work-card--featured .work-card__body {
	justify-content: center;
	padding: 2rem;
}

.work-link {
	color: var(--accent-ink);
	font-weight: 600;
	font-size: 0.9375rem;
}

@media (max-width: 46rem) {
	.work-card--featured { grid-template-columns: 1fr; }
	.work-card--featured figure {
		aspect-ratio: 16 / 9;
		height: auto;
		border-right: 0;
		border-bottom: 1px solid var(--border);
	}
}

/* ---- Steps ---- */
.step { position: relative; }

.step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: var(--accent-soft);
	color: var(--accent-ink);
	font-weight: 700;
	font-size: 1rem;
	margin-bottom: 0.5rem;
}

/* ---- Pricing ---- */
.pricing-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5rem;
	align-items: stretch;
	max-width: 52rem;
	margin-inline: auto;
}

@media (max-width: 46rem) {
	.pricing-grid { grid-template-columns: 1fr; }
}

.price-card { gap: 1.25rem; padding: 2rem; }
.price-card:hover { translate: none; }

.price-card--featured { border-color: var(--accent); border-width: 1.5px; }

.price-card__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.price-card__head h3 { font-size: 1.0625rem; }

.price {
	display: flex;
	align-items: baseline;
	gap: 0.375rem;
	font-variant-numeric: tabular-nums;
}

.price strong {
	font-size: clamp(2.25rem, 4vw, 2.75rem);
	font-weight: 800;
	letter-spacing: -0.02em;
}

.price span { color: var(--text-3); font-size: 0.9375rem; }

.price-note { font-size: 0.875rem; color: var(--text-3); }

.price-card .btn { margin-top: auto; }

.domain-note {
	display: flex;
	gap: 1.25rem;
	align-items: flex-start;
	max-width: 52rem;
	margin: 1.5rem auto 0;
	padding: 1.5rem 1.75rem;
	background: var(--bg-card);
	border: 1px dashed var(--border-strong);
	border-radius: var(--radius);
}

.domain-note .icon-tile { flex-shrink: 0; margin: 0; }
.domain-note h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.domain-note p { font-size: 0.9375rem; color: var(--text-2); }

/* ---- FAQ ---- */
.faq {
	max-width: 46rem;
	margin-inline: auto;
	border-top: 1px solid var(--border);
}

.faq details { border-bottom: 1px solid var(--border); }

.faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 1.375rem 0.25rem;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
	transition: color 0.15s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-ink); }

.faq summary svg {
	width: 1.25rem;
	height: 1.25rem;
	flex-shrink: 0;
	color: var(--text-3);
	transition: rotate 0.2s ease;
}
.faq details[open] summary svg { rotate: 45deg; }

.faq .faq-answer {
	padding: 0 0.25rem 1.5rem;
	color: var(--text-2);
	font-size: 0.9688rem;
}

/* ---- CTA band ---- */
.cta-band {
	background: var(--ink);
	color: var(--on-ink);
	border-radius: var(--radius-lg);
	padding: clamp(2.5rem, 6vw, 4.5rem);
	text-align: center;
}

.cta-band h2 {
	font-size: clamp(1.625rem, 3.5vw, 2.375rem);
	font-weight: 800;
	max-width: 24ch;
	margin-inline: auto;
	margin-bottom: 1rem;
}

.cta-band p {
	color: color-mix(in srgb, var(--on-ink) 72%, transparent);
	max-width: 48ch;
	margin-inline: auto;
	margin-bottom: 2rem;
}

.cta-band .btn--primary {
	background: var(--on-ink);
	color: var(--ink);
}
.cta-band .btn--primary:hover { background: color-mix(in srgb, var(--on-ink) 90%, var(--ink)); }

/* ---- Two-column split (about, contact) ---- */
.split {
	display: grid;
	grid-template-columns: 5fr 7fr;
	gap: clamp(2rem, 5vw, 4rem);
	align-items: start;
}

@media (max-width: 53.75rem) {
	.split { grid-template-columns: 1fr; }

	/* Center the portrait when the split collapses to one column */
	.portrait { margin-inline: auto; }
}

.portrait {
	border-radius: var(--radius);
	border: 1px solid var(--border);
	box-shadow: var(--shadow-md);
	width: 100%;
	max-width: 22rem;
	height: auto;
}

.prose { display: flex; flex-direction: column; gap: 1.125rem; }
.prose p { color: var(--text-2); }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.prose h3 { font-size: 1.125rem; margin-top: 0.5rem; }

/* ---- Contact ---- */
.contact-info {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.contact-line {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
}

.contact-line .icon-tile { margin: 0; flex-shrink: 0; }
.contact-line h3 { font-size: 0.9375rem; margin-bottom: 0.125rem; }
.contact-line p, .contact-line a { font-size: 0.9688rem; color: var(--text-2); }
.contact-line a:hover { color: var(--accent-ink); }

/* ---- Forms ---- */
.form-card { padding: 2rem; }
.form-card:hover { translate: none; box-shadow: var(--shadow-sm); border-color: var(--border); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-grid .form-field--full { grid-column: 1 / -1; }

@media (max-width: 40rem) {
	.form-grid { grid-template-columns: 1fr; }
}

.form-field { display: flex; flex-direction: column; gap: 0.5rem; }

.form-field label { font-size: 0.875rem; font-weight: 600; }

.form-field input,
.form-field textarea {
	font-family: inherit;
	font-size: 0.9688rem;
	color: var(--text);
	background: var(--bg);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	padding: 0.75rem 0.875rem;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--text-3); }

.form-field input:focus,
.form-field textarea:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-field textarea { resize: vertical; min-height: 9rem; }

/* Outranks .card p, which otherwise wins on specificity */
.form-field .field-error {
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--danger);
}

.form-field input.is-invalid,
.form-field textarea.is-invalid {
	border-color: var(--danger);
}

.form-field input.is-invalid:focus,
.form-field textarea.is-invalid:focus {
	border-color: var(--danger);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 15%, transparent);
}

.form-status {
	margin-top: 1rem;
	font-size: 0.9375rem;
	font-weight: 500;
}
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--danger); }

/* ---- Footer ---- */
.site-footer {
	border-top: 1px solid var(--border);
	background: var(--bg-soft);
	padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}

.footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 2.5rem;
	margin-bottom: 3rem;
}

@media (max-width: 46rem) {
	.footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.footer-brand img { height: 1.5rem; width: auto; margin-bottom: 1rem; }
[data-theme="dark"] .footer-brand img { filter: invert(1); }
.footer-brand p { font-size: 0.9375rem; color: var(--text-2); max-width: 34ch; }

.site-footer h3 {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-3);
	margin-bottom: 1rem;
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.625rem; }
.footer-links a { font-size: 0.9375rem; color: var(--text-2); }
.footer-links a:hover { color: var(--text); text-decoration: none; }

.footer-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--border);
}

.footer-bottom p { font-size: 0.8438rem; color: var(--text-3); }

.socials { display: flex; gap: 0.5rem; list-style: none; }
