/* =========================================================================
   THEORYS — CONTACT PAGE
   Loaded only on template-contact.php, on top of theorys-shop.css (which owns
   the shell, .thr-wrap, .thr-crumbs, .thr-eyebrow and .thr-lead). Field styling
   intentionally mirrors theorys-gate.css so the contact form and the account
   form read as the same control set.
   ========================================================================= */

/* ---------- masthead -------------------------------------------------- */

.thr-contact-head { padding: 46px 0 34px; border-bottom: 1px solid var(--line); }
.thr-contact-title {
	font-family: var(--font-head); font-weight: 600;
	font-size: clamp(34px, 6vw, 60px); line-height: 1.02; letter-spacing: -0.03em;
	color: var(--ink); margin: 0 0 16px;
}

/* ---------- layout ---------------------------------------------------- */

.thr-contact-layout {
	display: grid; grid-template-columns: 1fr; gap: 0;
	padding-top: 44px; padding-bottom: 72px;
	align-items: start;
}
/* Row gap is 0 and spacing is carried by margins instead, because the heading is
   now its own grid item: a row gap would push the card away from its own heading. */
.thr-contact-rail { margin-top: 34px; }

.thr-contact-h2 {
	font-family: var(--font-head); font-weight: 600;
	font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.02em;
	color: var(--ink); margin: 0 0 18px;
}

/* ---------- form card ------------------------------------------------- */

.thr-contact-card {
	background: var(--white); border: 1px solid var(--line);
	border-radius: 18px; padding: 26px 24px;
}
.thr-contact-req {
	margin: 0 0 20px; font-size: 12.5px; color: var(--platinum-lo);
}

.thr-cfield { margin-bottom: 16px; }
.thr-cfield label {
	display: block; font-family: var(--font-head);
	font-size: 12.5px; font-weight: 500; letter-spacing: 0.02em;
	color: var(--ink); margin-bottom: 6px;
}
.thr-req { color: var(--forest-mid); margin-left: 2px; }

.thr-cfield input[type="text"],
.thr-cfield input[type="email"],
.thr-cfield textarea,
.thr-cselect select {
	width: 100%;
	font-family: var(--font-body); font-size: 15px; color: var(--ink);
	background: var(--off-white);
	border: 1.5px solid var(--line); border-radius: 11px;
	padding: 12px 14px;
	transition: border-color .15s ease, background .15s ease;
	-webkit-appearance: none; appearance: none;
}
.thr-cfield textarea { line-height: 1.6; resize: vertical; min-height: 132px; }
.thr-cfield input:focus,
.thr-cfield textarea:focus,
.thr-cselect select:focus {
	outline: none; border-color: var(--forest-mid); background: var(--white);
}
.thr-cfield ::placeholder { color: var(--platinum-lo); }

/* Native select arrow is removed by appearance:none above, so draw one. */
.thr-cselect { position: relative; }
.thr-cselect::after {
	content: ""; position: absolute; right: 16px; top: 50%;
	width: 8px; height: 8px; margin-top: -6px; pointer-events: none;
	border-right: 1.5px solid #5b6660; border-bottom: 1.5px solid #5b6660;
	transform: rotate(45deg);
}
.thr-cselect select { padding-right: 40px; }

.thr-contact-error {
	display: block; margin-top: 6px;
	font-size: 12.5px; color: #a4322b;
}
.thr-contact-error--form {
	margin: 0 0 16px; padding: 11px 13px;
	background: #fdf3f2; border: 1px solid #f0d5d2; border-radius: 11px;
}

/* Submit + "prefer email" share a row and wrap together on narrow screens. */
.thr-contact-actions {
	display: flex; flex-wrap: wrap; align-items: center;
	gap: 10px 18px; margin-top: 6px;
}

.thr-contact-submit {
	width: 100%;
	font-family: var(--font-head); font-weight: 500; font-size: 15px;
	padding: 14px 20px; border-radius: 12px; cursor: pointer;
	background: var(--forest-deep); border: 1px solid var(--forest-deep);
	color: var(--white);
	transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.thr-contact-submit:hover {
	background: var(--forest-mid); border-color: var(--forest-mid);
	transform: translateY(-1px);
}
.thr-contact-submit:focus-visible { outline: 2px solid var(--forest-mid); outline-offset: 3px; }

/* The row's height is set by the button, so align-self:stretch makes this block
   EXACTLY as tall as it and centres the text inside — no magic number to drift
   if the button's padding ever changes. Centring the flex item alone was already
   pixel-accurate; what read as "not on the same level" was the weight, so the
   address matches the button's type family and size too. */
.thr-contact-prefer {
	margin: 0; flex: 1 1 auto;
	align-self: stretch; display: flex; align-items: center; justify-content: center;
	gap: 6px; font-size: 13.5px; color: #5b6660;
}
.thr-contact-prefer a {
	font-family: var(--font-head); font-size: 14.5px; font-weight: 500;
	color: var(--forest-mid); text-decoration: underline; text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}
.thr-contact-prefer a:hover { color: var(--forest-deep); }

/* Honeypot — off screen rather than display:none, which some bots skip. */
.thr-honey {
	position: absolute !important; left: -9999px !important;
	width: 1px; height: 1px; overflow: hidden;
}

/* ---------- success state --------------------------------------------- */

.thr-contact-sent h3 {
	font-family: var(--font-head); font-weight: 600; font-size: 20px;
	color: var(--forest-deep); margin: 0 0 10px;
}
.thr-contact-sent p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.65; color: #3a423d; }
.thr-contact-sent p:last-child { margin-bottom: 0; }
.thr-contact-sent a { color: var(--forest-mid); }
.thr-contact-sent-link {
	font-family: var(--font-head); font-weight: 500; text-decoration: none;
}
.thr-contact-sent-link:hover { text-decoration: underline; }

/* ---------- reference rail -------------------------------------------- */

.thr-contact-rail { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.thr-contact-item { background: var(--white); padding: 20px 22px; }
.thr-contact-item h3 {
	font-family: var(--font-head); font-size: 11.5px; font-weight: 600;
	letter-spacing: 0.18em; text-transform: uppercase;
	color: var(--platinum-lo); margin: 0 0 8px;
}
.thr-contact-item p { margin: 0; font-size: 14px; line-height: 1.6; color: #3a423d; }
.thr-contact-item p + p { margin-top: 6px; }
.thr-contact-item a { color: var(--forest-mid); }
.thr-contact-item-lead {
	font-family: var(--font-head); font-size: 15.5px !important; font-weight: 500;
	margin-bottom: 6px !important;
}
.thr-contact-item-lead a { text-decoration: none; }
.thr-contact-item-lead a:hover { text-decoration: underline; }
.thr-contact-item--ruo { background: var(--off-white); }
.thr-contact-item--ruo h3 { color: var(--forest-mid); }

/* ---------- desktop --------------------------------------------------- */

@media (min-width: 900px) {
	.thr-contact-head { padding: 62px 0 44px; }
	.thr-contact-layout {
		grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
		grid-template-rows: auto 1fr;
		gap: 0 44px; padding-top: 56px;
	}
	/* Row 1: heading, left column only. Row 2: form card and rail side by side. */
	.thr-contact-intro { grid-column: 1; grid-row: 1; }
	.thr-contact-form-col { grid-column: 1; grid-row: 2; }
	.thr-contact-rail {
		grid-column: 2; grid-row: 2;
		/* Exactly the card's own padding-top, so the rail's top edge lands on the
		   card's first line ("Fields marked with an asterisk are required.").
		   Tied to the padding below on purpose — change one, change both. */
		margin-top: 30px;
	}
	.thr-contact-card { padding: 30px 30px 28px; }
	.thr-contact-submit { width: auto; min-width: 200px; }
	.thr-contact-prefer { flex: 0 1 auto; justify-content: flex-start; }
}
