/* ============================================================
 * Pitru Theme v2 — assets/css/pages/contact.css
 *
 * Page-specific styles for templates/page-contact.php and the
 * three partials in templates/partials/page-contact/*.
 *
 * Source of truth: Pitrupaksha ORG/contact.html (lines 50-176).
 * Wave: C.11 (agent A2). Tokens-only — no raw colors / fonts.
 * ============================================================ */

/* ------------------------------------------------------------
 * 1. HERO
 *    ORG lines 50-64 — small section, eyebrow + display H1 with
 *    italic gold-deep subtitle + 20px ink-soft lede (max 640).
 * ------------------------------------------------------------ */

.pps-page-contact-hero {
	padding: 60px 0 40px;
}

.pps-page-contact-hero__inner {
	max-width: 920px;
}

.pps-page-contact-hero__title {
	font-size: clamp(60px, 7vw, 108px);
	letter-spacing: -0.035em;
	line-height: 0.96;
	margin-top: 14px;
}

.pps-page-contact-hero__subtitle {
	display: block;
	font-family: var(--font-display);
	font-style: italic;
	color: var(--gold-deep);
	margin-top: 6px;
}

.pps-page-contact-hero__lede {
	margin-top: 26px;
	font-size: 20px;
	color: var(--ink-soft);
	line-height: 1.55;
	max-width: 640px;
}

/* ------------------------------------------------------------
 * 2. CHANNELS — three clickable cards
 *    ORG lines 67-85 — section padding 40px 0, 3-col grid gap 16,
 *    each card padded 28 with mono label / display value / italic sub.
 * ------------------------------------------------------------ */

.pps-page-contact-channels {
	padding: 40px 0;
}

.pps-page-contact-channels__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.pps-page-contact-channels__card {
	display: block;
	padding: 28px;
	color: inherit;
	text-decoration: none;
	transition: transform 0.18s var(--ease-ios), box-shadow 0.18s var(--ease-ios), border-color 0.18s var(--ease-ios);
}

.pps-page-contact-channels__card:hover {
	border-color: rgba(26, 22, 19, 0.18);
	box-shadow: var(--shadow-md);
	transform: translateY(-1px);
}

.pps-page-contact-channels__card:active {
	transform: translateY(0) scale(0.995);
}

.pps-page-contact-channels__label {
	font-family: var(--font-mono);
	font-size: 10px;
	color: var(--gold-deep);
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.pps-page-contact-channels__value {
	margin-top: 14px;
	font-size: 22px;
	letter-spacing: -0.015em;
	font-family: var(--font-display);
	color: var(--ink);
}

.pps-page-contact-channels__sub {
	margin-top: 8px;
	font-size: 13px;
	color: var(--ink-soft);
	font-style: italic;
	font-family: var(--font-display);
}

/* ------------------------------------------------------------
 * 3. BODY — two-column grid
 *    ORG lines 87-176 — section padding 60px 0 120px, grid 1.3fr / 1fr,
 *    gap 64. Form left, offices right.
 * ------------------------------------------------------------ */

.pps-page-contact-body {
	padding: 60px 0 120px;
}

.pps-page-contact-body__grid {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: 64px;
}

/* ------------------------------------------------------------
 * 3a. FORM — heading + topic pills + form fields + footer
 *     ORG lines 91-144.
 * ------------------------------------------------------------ */

.pps-page-contact-form__title {
	font-size: 40px;
	letter-spacing: -0.025em;
	margin-top: 10px;
}

/* Topic pills — radio inputs disguised as buttons. */

.pps-page-contact-form__topics {
	margin-top: 28px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pps-page-contact-form__topic {
	position: relative;
	padding: 11px 18px;
	border-radius: var(--r-pill);
	font-size: 14px;
	background: var(--paper);
	color: var(--ink);
	border: 1px solid var(--line);
	cursor: pointer;
	font-family: var(--font-body);
	transition: background 0.2s var(--ease-ios), color 0.2s var(--ease-ios), border-color 0.2s var(--ease-ios);
	user-select: none;
}

/* Visually hide the radio while keeping it focusable + clickable. */
.pps-page-contact-form__topic input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 1px;
	height: 1px;
	margin: 0;
}

/* SSR fallback (no `:has` support) — server applies this class. */
.pps-page-contact-form__topic--active {
	background: var(--ink);
	color: var(--ivory);
	border-color: var(--ink);
}

/* Modern browsers — react to the actual checked state (cumulative
 * with --active, not conflicting). Chrome 105+, Safari 15.4+, FF 121+. */
.pps-page-contact-form__topic:has(input[type="radio"]:checked) {
	background: var(--ink);
	color: var(--ivory);
	border-color: var(--ink);
}

/* Keyboard focus — visible ring around the pill. */
.pps-page-contact-form__topic:has(input[type="radio"]:focus-visible) {
	outline: 2px solid var(--gold);
	outline-offset: 2px;
}

/* Error banner — composer redirects to ?error=<code>#pps-contact-form on
 * nonce/validation/mail failures. Mirrors the advisory-block--note pattern
 * (components.css L1933) for visual consistency: tinted vermillion fill +
 * 2px left rule + deep vermillion text. */
.pps-page-contact-form__error {
	margin-top: 24px;
	padding: 12px 16px;
	background: color-mix(in srgb, var(--vermillion) 10%, transparent);
	border-left: 2px solid var(--vermillion);
	border-radius: 4px;
	color: var(--vermillion-deep);
	font-size: 14px;
	line-height: 1.5;
}

/* Form layout. */

.pps-page-contact-form__form {
	margin-top: 32px;
	display: grid;
	gap: 14px;
}

.pps-page-contact-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.pps-page-contact-form__field {
	display: block;
	padding: 14px 18px;
	background: var(--ivory);
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	transition: border-color 0.18s var(--ease-ios), box-shadow 0.18s var(--ease-ios);
}

.pps-page-contact-form__field:focus-within {
	border-color: var(--gold);
	box-shadow: 0 0 0 3px rgba(184, 137, 58, 0.15);
}

.pps-page-contact-form__field-label {
	display: block;
	font-family: var(--font-mono);
	font-size: 10px;
	color: var(--stone);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin-bottom: 6px;
}

.pps-page-contact-form__input,
.pps-page-contact-form__textarea {
	width: 100%;
	background: transparent;
	border: 0;
	outline: 0;
	font-family: var(--font-body);
	font-size: 15px;
	color: var(--ink);
	padding: 0;
}

.pps-page-contact-form__textarea {
	resize: vertical;
	min-height: 7em;
	line-height: 1.55;
}

.pps-page-contact-form__input::placeholder,
.pps-page-contact-form__textarea::placeholder {
	color: var(--stone-2);
}

.pps-page-contact-form__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 8px;
	gap: 14px;
	flex-wrap: wrap;
}

.pps-page-contact-form__privacy-note {
	font-size: 12px;
	color: var(--stone);
	font-style: italic;
	font-family: var(--font-display);
	max-width: 360px;
}

.pps-page-contact-form__submit {
	padding: 14px 24px;
}

/* ------------------------------------------------------------
 * 3b. OFFICES — eyebrow + H3 + 3 cards + ink urgent box
 *     ORG lines 146-173.
 * ------------------------------------------------------------ */

.pps-page-contact-offices__title {
	font-size: 28px;
	letter-spacing: -0.02em;
	margin-top: 10px;
}

.pps-page-contact-offices__list {
	margin-top: 24px;
	display: grid;
	gap: 12px;
}

.pps-page-contact-offices__card {
	padding: 24px;
}

.pps-page-contact-offices__note {
	font-family: var(--font-mono);
	font-size: 10px;
	color: var(--gold-deep);
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.pps-page-contact-offices__city {
	margin-top: 10px;
	font-family: var(--font-display);
	font-size: 24px;
	letter-spacing: -0.015em;
	color: var(--ink);
}

.pps-page-contact-offices__addr {
	display: block;
	margin: 10px 0 0;
	font-family: var(--font-body);
	font-size: 14px;
	color: var(--ink-soft);
	line-height: 1.6;
	font-style: normal; /* override <address> default italic */
	white-space: pre-line; /* preserve \n line breaks */
}

/* Urgent box — ink background, ivory text, gold accents. */

.pps-page-contact-offices__urgent {
	margin-top: 28px;
	padding: 24px;
	background: var(--ink);
	color: var(--ivory);
	border-radius: var(--r-lg);
}

.pps-page-contact-offices__urgent-label {
	font-family: var(--font-mono);
	font-size: 10px;
	color: var(--gold);
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.pps-page-contact-offices__urgent-body {
	margin-top: 12px;
	font-size: 17px;
	font-family: var(--font-display);
	font-style: italic;
	line-height: 1.45;
	color: var(--ivory);
}

.pps-page-contact-offices__urgent-cta {
	margin-top: 16px;
	display: inline-block;
	color: var(--gold);
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	transition: color 0.18s var(--ease-ios), transform 0.18s var(--ease-ios);
}

.pps-page-contact-offices__urgent-cta:hover {
	color: var(--gold-soft);
	transform: translateX(2px);
}

/* ------------------------------------------------------------
 * 4. RESPONSIVE
 *    Body grid → 1-col on mobile, channels grid → 1-col, hero
 *    type already uses clamp(). Global mobile rules in tokens.css
 *    add an `!important` 1-col override to anything matching
 *    `[style*="grid-template-columns"]`, but our class-based grids
 *    don't trip that selector — so we explicitly opt in here.
 * ------------------------------------------------------------ */

@media (max-width: 900px) {
	.pps-page-contact-channels__grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.pps-page-contact-body__grid {
		grid-template-columns: 1fr;
		gap: 48px;
	}

	.pps-page-contact-form__row {
		grid-template-columns: 1fr;
	}

	.pps-page-contact-body {
		padding: 48px 0 80px;
	}
}

@media (max-width: 720px) {
	.pps-page-contact-hero {
		padding: 40px 0 24px;
	}

	.pps-page-contact-form__title {
		font-size: clamp(28px, 7vw, 36px);
		letter-spacing: -0.02em;
	}

	.pps-page-contact-offices__title {
		font-size: clamp(22px, 5vw, 26px);
	}

	.pps-page-contact-form__footer {
		justify-content: flex-start;
	}

	.pps-page-contact-form__submit {
		width: 100%;
	}
}

/* Reduced-motion — drop transforms + transitions that animate position. */
@media (prefers-reduced-motion: reduce) {
	.pps-page-contact-channels__card,
	.pps-page-contact-form__topic,
	.pps-page-contact-form__field,
	.pps-page-contact-offices__urgent-cta {
		transition: none;
	}
	.pps-page-contact-channels__card:hover,
	.pps-page-contact-channels__card:active,
	.pps-page-contact-offices__urgent-cta:hover {
		transform: none;
	}
}
