/* Outpost Contact (code) template. Loaded only on page-templates/outpost-contact.php. Tokens come from style.css :root.
   Warmth comes from the room, not from decoration: a cream page like table linen, the form as a white place setting,
   a real reception table, and navy & gold where you reach a person. */

#main-content.outpost-contact,
.outpost-contact {
	--oc-gutter: clamp(16px, 4vw, 56px);
	--oc-ink-2: #4a5164;          /* secondary text: 7.6:1 on white, 7.0:1 on cream */
	--oc-line: #8b90a0;           /* input borders: 3.3:1 on white */
	--oc-gold-line: #cfab79;      /* decorative only, never text on light */
	--oc-error: #b42318;          /* 6.5:1 on white */
	--oc-ease: cubic-bezier(.16, 1, .3, 1);
	background: var(--op-tex-linen), var(--op-surface);
	color: var(--op-ink);
	font-size: 17px;
	line-height: 1.6;
	padding-top: clamp(40px, 6vw, 88px);
}
.outpost-contact p { padding: 0; }
.outpost-contact img { display: block; max-width: 100%; height: auto; }
.outpost-contact a { color: var(--op-deep); text-decoration-color: var(--oc-gold-line); text-underline-offset: 4px; }
.outpost-contact a:hover { text-decoration-color: currentColor; }
.outpost-contact ::selection { background: var(--op-accent); color: #fff; }

.oc-wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--oc-gutter); box-sizing: border-box; }
.oc-grid {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
	gap: clamp(40px, 5vw, 80px);
	align-items: start;
}

/* Heading */
.outpost-contact .oc-title {
	font-size: clamp(36px, 5vw, 58px);
	line-height: 1.05;
	letter-spacing: -0.01em;
	color: var(--op-deep);
	padding: 0;
	margin: 0 0 14px;
	text-wrap: balance;
}
.oc-lede { font-size: 19px; color: var(--oc-ink-2); max-width: 64ch; margin: 0 0 clamp(28px, 3.5vw, 40px); text-wrap: pretty; }
.oc-keep { white-space: nowrap; }   /* if the lede wraps, it wraps at the comma */
@media (max-width: 359px) { .oc-keep { white-space: normal; } }

/* The form sits on a white panel, like a place setting on linen. */
.oc-panel {
	background: #fff;
	border-radius: 0 0 6px 6px;   /* square top so the gold trim runs straight */
	padding: clamp(24px, 3.4vw, 44px);
	box-shadow: 0 1px 2px rgba(29, 36, 51, .06), 0 18px 40px -20px rgba(29, 36, 51, .28);
	border-top: 3px solid var(--oc-gold-line);
}

/* Form */
.oc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 20px; }
.oc-form[hidden] { display: none; }
.oc-field { display: flex; flex-direction: column; min-width: 0; }
.oc-field--full, .oc-status, .oc-submit { grid-column: 1 / -1; }

.oc-field label {
	font-weight: 600;
	font-size: 16px;
	line-height: 1.3;
	margin: 0 0 8px;
	color: var(--op-ink);
}
.oc-opt { font-weight: 400; color: var(--oc-ink-2); margin-left: 4px; }

.outpost-contact .oc-field input,
.outpost-contact .oc-field textarea {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	font-size: 17px;              /* 16px+ keeps iOS from zooming on focus */
	line-height: 1.4;
	color: var(--op-ink);
	background: #fff;
	border: 1px solid var(--oc-line);
	border-radius: var(--op-radius);
	padding: 12px 14px;
	margin: 0;
	caret-color: var(--op-accent);
	accent-color: var(--op-deep);
	transition: border-color .15s ease-out, background-color .15s ease-out;
}
.outpost-contact .oc-field input { height: 50px; }   /* date inputs otherwise render 2px taller */
.outpost-contact .oc-field textarea { resize: vertical; min-height: 140px; }
.outpost-contact .oc-field input:hover,
.outpost-contact .oc-field textarea:hover { border-color: var(--op-ink); }
.outpost-contact .oc-field input:focus,
.outpost-contact .oc-field textarea:focus {
	border-color: var(--op-deep);
	background: #fffdf9;
	outline: 2px solid var(--op-focus);
	outline-offset: 1px;
}
.outpost-contact .oc-field [aria-invalid="true"] { border-color: var(--oc-error); border-width: 2px; padding: 11px 13px; }

.oc-hint { font-size: 15px; line-height: 1.45; color: var(--oc-ink-2); margin: 6px 0 0; }
.oc-day.is-set { color: var(--op-accent); font-weight: 500; }   /* gold text: 5.2:1 on white */
.oc-error { font-size: 15px; line-height: 1.45; color: var(--oc-error); font-weight: 500; margin: 6px 0 0; }
.oc-error[hidden], .oc-status[hidden], .oc-done[hidden], .oc-recap[hidden] { display: none; }

.oc-status {
	background: #fdf1ef;
	color: #8a1c12;               /* 7.9:1 on the tint */
	border-radius: var(--op-radius);
	padding: 14px 18px;
	font-weight: 500;
}
.oc-status:focus { outline: 2px solid var(--oc-error); outline-offset: 2px; }

/* Honeypot: off-screen, not display:none (some bots skip hidden fields). */
.oc-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.oc-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 4px; }
.outpost-contact .oc-btn {
	font: inherit;
	font-weight: 600;
	font-size: 17px;
	line-height: 1.2;
	background: var(--op-cta);
	color: var(--op-on-cta);
	border: 0;
	border-radius: var(--op-radius);
	padding: 17px 30px;
	cursor: pointer;
	transition: background-color .2s ease-out, transform .2s var(--oc-ease);
}
.outpost-contact .oc-btn:hover { background: var(--op-cta-hover); }
.outpost-contact .oc-btn:active { transform: translateY(1px); }
.outpost-contact .oc-btn[aria-busy="true"] { cursor: progress; background: var(--op-cta-hover); }
.oc-legal { font-size: 13px; line-height: 1.5; color: var(--oc-ink-2); max-width: 36ch; margin: 0; }
.outpost-contact .oc-legal a { color: inherit; }

/* reCAPTCHA's floating badge is replaced by the text notice above, which Google's terms allow. */
.grecaptcha-badge { visibility: hidden !important; }

/* Sent: the one authored moment. */
.oc-done:focus { outline: none; }
.outpost-contact .oc-done__title {
	font-size: clamp(28px, 3.2vw, 38px);
	line-height: 1.12;
	color: var(--op-deep);
	padding: 0;
	margin: 0 0 20px;
	text-wrap: balance;
}
.oc-done p { margin: 0 0 12px; max-width: 52ch; }
.oc-recap {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 40px;
	margin: 0 0 24px;
	padding: 18px 0;
	border-block: 1px solid #ece6db;
}
.oc-recap div { min-width: 0; }
.oc-recap dt { font-size: 14px; color: var(--oc-ink-2); margin: 0; }
.oc-recap dd { font-family: 'Alegreya', Georgia, serif; font-weight: 700; font-size: 21px; line-height: 1.25; color: var(--op-deep); margin: 2px 0 0; }
.oc-done__next { margin-top: 20px !important; }

.oc-done.is-in > * { animation: oc-rise .7s var(--oc-ease) both; }
.oc-done.is-in > :nth-child(2) { animation-delay: .08s; }
.oc-done.is-in > :nth-child(3) { animation-delay: .16s; }
.oc-done.is-in > :nth-child(n+4) { animation-delay: .24s; }
@keyframes oc-rise { from { opacity: 0; transform: translateY(10px); filter: blur(2px); } }

.oc-link {
	display: inline-block;
	font-weight: 600;
	padding: 6px 0;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
}

/* Aside: a real table, then a person to call. */
.oc-aside { margin-top: clamp(0px, 1vw, 12px); }
.oc-aside__photo {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: 50% 40%;
	border-radius: 6px 6px 0 0;
}
.oc-talk {
	background: var(--op-tex-grain-light), var(--op-deep);
	color: var(--op-on-deep);
	border-radius: 0 0 6px 6px;
	padding: clamp(24px, 2.6vw, 34px);
	border-top: 3px solid var(--oc-gold-line);
}
.outpost-contact .oc-talk__title { font-size: 22px; line-height: 1.2; color: var(--op-on-deep) !important; padding: 0; margin: 0 0 6px; }
.outpost-contact .oc-phone {
	display: inline-block;
	font-family: 'Alegreya', Georgia, serif;
	font-weight: 700;
	font-size: clamp(30px, 2.8vw, 36px);
	line-height: 1.15;
	color: #fff;
	text-decoration: underline;
	text-decoration-color: transparent;
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
	font-variant-numeric: lining-nums;
	padding: 4px 0;
	transition: text-decoration-color .2s ease-out;
}
.outpost-contact .oc-phone:hover { text-decoration-color: var(--oc-gold-line); }
.outpost-contact .oc-talk a:not(.oc-phone) { color: #fff; text-decoration-color: var(--oc-gold-line); }
.outpost-contact .oc-talk :focus-visible { outline-color: var(--op-on-deep); }
.oc-email { margin: 6px 0 0; color: var(--op-on-deep-muted); overflow-wrap: anywhere; }
.oc-social { margin: 18px 0 0; font-size: 15px; color: var(--op-on-deep-muted); }

/* Map: full bleed, with the visit card laid over it on wide screens. */
.oc-map { position: relative; margin-top: clamp(64px, 8vw, 112px); }
.oc-map__frame { position: relative; height: clamp(380px, 38vw, 540px); background: #e5e3df; }
.oc-map__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.oc-map__over { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; pointer-events: none; }
.oc-visit {
	pointer-events: auto;
	width: 340px;
	background: #fff;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 2px 4px rgba(29, 36, 51, .08), 0 24px 48px -16px rgba(29, 36, 51, .35);
}
.oc-visit__photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 55%; }
.oc-visit__body { padding: 22px 26px 24px; border-top: 3px solid var(--oc-gold-line); }
.outpost-contact .oc-visit__title { font-size: 22px; line-height: 1.2; color: var(--op-deep); padding: 0; margin: 0 0 8px; }
.oc-address { font-style: normal; margin: 0 0 2px; }
.oc-note { color: var(--oc-ink-2); margin: 0 0 6px; }

@media (max-width: 900px) {
	.oc-grid { grid-template-columns: minmax(0, 1fr); }
	.oc-aside { margin-top: 0; max-width: 560px; }
	.oc-map { display: flex; flex-direction: column-reverse; }
	.oc-map__over { position: static; display: block; width: 100%; margin-bottom: 24px; }
	.oc-visit { width: auto; max-width: 560px; }
	.oc-map__frame { height: 360px; }
}
@media (max-width: 600px) {
	.oc-form { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.oc-panel { margin-inline: calc(var(--oc-gutter) * -0.5); }
	.oc-submit { flex-direction: column; align-items: stretch; }
	.outpost-contact .oc-btn { width: 100%; }
	.oc-legal { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
	.outpost-contact * { transition: none !important; animation: none !important; }
}
