/**
 * Base reset & typography — Jalil Theme
 */

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

html {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	scroll-behavior: smooth;
	overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	margin: 0;
	overflow-x: hidden;
	background-color: var(--background);
	color: var(--foreground);
	font-family: var(--font-sans);
	font-size: 15px;
	line-height: 1.55;
}

/*
 * Every section in this theme uses `display: grid; grid-template-columns:
 * repeat(12, 1fr)` (or flexbox) somewhere. Grid/flex items default to
 * `min-width: auto` — their content's min-content size — which lets a single
 * long, unbreakable token blow out a column, and with it the whole row,
 * wider than the viewport. This is the standard fix: it doesn't change
 * layout for anything that already fits, only stops items from refusing to
 * shrink below their content's natural width.
 */
* {
	min-width: 0;
}

/*
 * Belt-and-suspenders: clip (don't scroll-ify) horizontal overflow at every
 * top-level block section, so nothing a block renders can ever push the
 * page wider than the viewport. `clip` — not `hidden` — because `hidden`
 * would force overflow-y to `auto` too (per spec, when only one axis is
 * non-visible the other becomes a scroll container), which breaks the
 * sticky Services intro column on desktop. Explicit overflow-y keeps the
 * vertical axis untouched.
 */
section {
	overflow-x: clip;
	overflow-y: visible;
}

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

/* Keeps in-page anchors (#services, #faq…) from landing under the sticky header. */
[id] {
	scroll-margin-top: 4.5rem;
}

a {
	color: inherit;
}

h1,
h2,
h3,
h4,
h5 {
	font-family: var(--font-display);
	font-weight: 700;
	letter-spacing: -0.015em;
	margin: 0;
}

p {
	margin: 0;
}

ul,
ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

button {
	font-family: inherit;
	background: none;
	border: none;
	padding: 0;
}

input,
textarea,
select {
	font-family: inherit;
	font-size: inherit;
}

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

/* ==========================================================================
   Accordion primitive (shared by the Services and FAQ blocks)
   ========================================================================== */

.accordion-item {
	border-bottom: 1px solid var(--border);
}

.accordion-panel {
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	transition: grid-template-rows var(--duration-slow) var(--ease-out-expo), opacity var(--duration-slow) var(--ease-out-expo);
}

.accordion-item.is-open .accordion-panel {
	grid-template-rows: 1fr;
	opacity: 1;
}

.accordion-panel__inner {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.accordion-panel {
		transition: none;
	}
}

/* ==========================================================================
   Plain content pages (legal pages, blog fallback)
   ========================================================================== */

.page-content {
	max-width: 46rem;
	padding-block: var(--space-section);
}

.page-title {
	font-size: clamp(1.8rem, 3.5vw, 2.6rem);
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.entry-content {
	margin-top: 2rem;
	font-size: 0.95rem;
	line-height: 1.75;
	color: color-mix(in oklch, var(--foreground) 85%, transparent);
}

.entry-content > * + * {
	margin-top: 1.1em;
}

.entry-content h2,
.entry-content h3 {
	margin-top: 2em;
	letter-spacing: -0.01em;
}

.entry-content h2 {
	font-size: 1.4rem;
}

.entry-content h3 {
	font-size: 1.15rem;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.25rem;
	list-style: disc;
}
.entry-content ol {
	list-style: decimal;
}
.entry-content li + li {
	margin-top: 0.4em;
}

.entry-content a {
	color: var(--foreground);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ==========================================================================
   Gracias (thank-you) page
   ========================================================================== */

.gracias-page__inner {
	min-height: calc(100vh - 3.5rem - 4rem);
	display: flex;
	align-items: center;
	justify-content: center;
	padding-block: 3rem;
}

.gracias-card {
	width: 100%;
	max-width: 34rem;
	text-align: center;
}

.gracias-card__icon {
	margin: 0 auto 1.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 3rem;
	width: 3rem;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--panel);
}

.gracias-card__title {
	margin-top: 0.75rem;
	font-size: clamp(2rem, 4vw, 3rem);
	line-height: 1.1;
	letter-spacing: -0.01em;
}

.gracias-card__body {
	margin-top: 1.25rem;
	font-size: 1rem;
	line-height: 1.7;
	color: var(--ink-soft);
}

.gracias-card__phone {
	margin-top: 0.75rem;
	font-size: 0.9rem;
	color: var(--ink-soft);
}
.gracias-card__phone a {
	color: var(--foreground);
	text-underline-offset: 4px;
}

.gracias-card__actions {
	margin-top: 2rem;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.75rem;
}

@media (min-width: 640px) {
	.gracias-card__actions {
		align-items: center;
	}
}

.gracias-card__back {
	font-size: 0.9rem;
	color: var(--ink-soft);
}
.gracias-card__back:hover {
	color: var(--foreground);
}

/* ==========================================================================
   Editor-only placeholder (shown when a block has no content yet)
   ========================================================================== */

.block-preview-placeholder {
	padding: 2.5rem 1.5rem;
	text-align: center;
	border: 1px dashed var(--border);
	border-radius: 6px;
	color: var(--ink-soft);
	font-size: 0.85rem;
	background: var(--surface);
}
