/* Spain Life & Houses, open houses. Light theme only. Orange is a fill, never text on a light background. */

@font-face {
	font-family: "Figtree";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("/fonts/figtree-latin.woff2") format("woff2");
}
@font-face {
	font-family: "Playfair Display";
	font-style: normal;
	font-weight: 500 700;
	font-display: swap;
	src: url("/fonts/playfair-display-latin.woff2") format("woff2");
}

:root {
	--navy: #0a1320;
	--navy-soft: #16212f;
	--orange: #ff8a2a;
	--orange-hover: #ffa04f;
	--sand: #e6dcc6;
	--sand-soft: #f0e9da;
	--page: #f6f5f2;
	--card: #ffffff;
	--line: #ddd6c6;
	--muted: #46505e;
	--radius: 14px;
	--gutter: 16px;
	--font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-head: "Playfair Display", Georgia, "Times New Roman", serif;
	color-scheme: light;
}

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

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

body {
	margin: 0;
	background: var(--page);
	color: var(--navy);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.6;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

main {
	flex: 1 0 auto;
}

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

a {
	color: var(--navy);
	text-underline-offset: 0.2em;
	text-decoration-thickness: 0.08em;
}

h1,
h2,
h3 {
	font-family: var(--font-head);
	font-weight: 600;
	line-height: 1.2;
	margin: 0;
	letter-spacing: -0.005em;
}

p {
	margin: 0 0 1rem;
	text-wrap: pretty;
}

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

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: var(--gutter);
	top: -100px;
	z-index: 20;
	background: var(--navy);
	color: #fff;
	padding: 0.75rem 1rem;
	border-radius: 0 0 8px 8px;
}
.skip-link:focus {
	top: 0;
	outline-color: var(--orange);
}

.wrap {
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/* Header and footer */

.site-header {
	background: #fff;
	border-bottom: 1px solid var(--line);
}
.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 72px;
}
.brand img {
	width: 140px;
	height: auto;
}
.site-header__tag {
	display: none;
	color: var(--muted);
	font-size: 0.9375rem;
}

.site-footer {
	background: var(--navy);
	color: var(--sand);
	margin-top: 4rem;
	padding: 2rem 0;
}
.site-footer a {
	color: #fff;
}
.site-footer :focus-visible {
	outline-color: var(--orange);
}
.site-footer__contact {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin-bottom: 0.75rem;
}
.site-footer__small {
	margin: 0;
	font-size: 0.875rem;
	opacity: 0.85;
}
.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.25rem 2rem;
	margin-top: 1rem;
	padding-top: 0.75rem;
	border-top: 1px solid rgba(230, 220, 198, 0.18);
}
.site-footer__powered {
	margin: 0;
}
/* Quiet, like on spainlifeandhouses.com. The logo is the light variant: its wordmark is white on the navy footer. */
.site-footer__powered a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	color: var(--sand);
	font-size: 0.875rem;
	text-decoration: none;
	opacity: 0.85;
	transition: opacity 0.15s ease;
}
.site-footer__powered a:hover {
	opacity: 1;
}
.site-footer__powered img {
	height: 20px;
	width: auto;
}

/* Overview */

.intro {
	background: var(--navy);
	color: #fff;
	padding: 2.5rem 0 2.75rem;
}
.intro h1 {
	font-size: clamp(2.25rem, 7vw, 3.5rem);
	margin-bottom: 0.75rem;
}
.intro p {
	color: var(--sand);
	font-size: 1.125rem;
	max-width: 38rem;
	margin: 0;
}

.list {
	padding-top: 2rem;
}
.grid {
	display: grid;
	gap: 1.5rem;
}

.card {
	display: grid;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
}
.card__media img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}
.card__body {
	padding: 1.25rem 1.25rem 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}
.card__date {
	margin: 0 0 0.5rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}
.card__time {
	font-weight: 600;
}
.card__area {
	margin: 0;
	color: var(--muted);
	font-size: 0.9375rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.card__title {
	font-size: 1.5rem;
	margin-bottom: 0.25rem;
	text-wrap: balance;
}
.card__title a {
	text-decoration: none;
}
.card__title a:hover {
	text-decoration: underline;
}
.card__price {
	font-size: 1.375rem;
	font-weight: 700;
	margin-bottom: 1rem;
}
.card__body p:last-child {
	margin: auto 0 0;
}

.chip {
	display: inline-block;
	background: var(--orange);
	color: var(--navy);
	font-weight: 600;
	font-size: 0.9375rem;
	line-height: 1.3;
	padding: 0.35rem 0.8rem;
	border-radius: 999px;
}

.empty {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 2rem 1.25rem;
	max-width: 44rem;
}
.empty__title {
	font-family: var(--font-head);
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.25;
	margin: 0 0 1rem;
}

/* Buttons */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0.7rem 1.4rem;
	border: 2px solid var(--navy);
	border-radius: 10px;
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.button--primary {
	background: var(--orange);
	border-color: var(--orange);
	color: var(--navy);
}
.button--primary:hover {
	background: var(--orange-hover);
	border-color: var(--orange-hover);
}
.button--secondary {
	background: #fff;
	color: var(--navy);
}
.button--secondary:hover {
	background: var(--navy);
	color: #fff;
}

/* Detail page */

.detail {
	padding-top: 1rem;
}
.back {
	margin: 0 0 1rem;
	font-size: 0.9375rem;
}
.banner {
	background: var(--sand);
	border-left: 6px solid var(--navy);
	padding: 1rem 1.25rem;
	margin: 1.25rem 0 0;
	font-weight: 600;
}
.detail__head {
	padding: 1.5rem 0 1.25rem;
}
.eyebrow {
	margin: 0 0 0.5rem;
	color: var(--muted);
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.detail__head h1 {
	font-size: clamp(1.875rem, 6vw, 3rem);
	max-width: 22ch;
}
.partner {
	margin: 0.75rem 0 0;
	color: var(--muted);
	font-size: 0.9375rem;
}
.detail__main {
	display: grid;
	gap: 1.5rem;
}
.detail__facts {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.25rem;
	align-self: start;
}
.when {
	margin: 0 0 1.25rem;
}
.when .chip {
	font-size: 1.0625rem;
	padding: 0.5rem 1rem;
	border-radius: 12px;
}
.nowrap {
	white-space: nowrap;
}
.facts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem 1.25rem;
	margin: 0;
}
.facts dt {
	color: var(--muted);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.facts dd {
	margin: 0.15rem 0 0;
	font-size: 1.125rem;
	font-weight: 600;
}
.lead {
	font-size: 1.1875rem;
	max-width: 40rem;
}
.actions {
	display: grid;
	gap: 0.75rem;
	margin-top: 1.5rem;
	max-width: 40rem;
}

.block {
	margin-top: 3rem;
}
.block h2 {
	font-size: 1.75rem;
	margin-bottom: 1rem;
}
.count {
	font-family: var(--font-body);
	font-size: 1rem;
	font-weight: 600;
	color: var(--muted);
	margin-left: 0.25rem;
}

/* Registration form and personal page */

.form {
	display: grid;
	gap: 1.25rem;
	margin-top: 1rem;
	max-width: 40rem;
}
.field label,
.field legend {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
	padding: 0;
}
.optional {
	font-weight: 400;
	color: var(--muted);
}
.field__hint {
	margin: 0 0 0.35rem;
	color: var(--muted);
	font-size: 0.9375rem;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="url"] {
	width: 100%;
	min-height: 48px;
	padding: 0.6rem 0.85rem;
	border: 2px solid var(--navy);
	border-radius: 10px;
	background: #fff;
	color: var(--navy);
	font: inherit;
}
.field--error input[type="text"],
.field--error input[type="email"],
.field--error input[type="tel"],
.field--error input[type="url"] {
	border-color: #b42318;
}
.field__error {
	margin: 0.4rem 0 0;
	color: #b42318;
	font-weight: 600;
}
fieldset.field {
	border: 0;
	padding: 0;
	margin: 0;
	min-width: 0;
}
.choices {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.5rem;
}
.field label.choice {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 44px;
	margin: 0;
	font-weight: 400;
}
.field--check label.choice {
	align-items: flex-start;
	padding: 0.25rem 0;
}
.choice input {
	flex: none;
	width: 1.4rem;
	height: 1.4rem;
	margin: 0;
	accent-color: var(--navy);
}
.hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.error-summary {
	border: 2px solid #b42318;
	background: #fef3f2;
	border-radius: 10px;
	padding: 1rem 1.25rem;
}
.error-summary p {
	margin: 0;
}
.error-summary ul {
	margin: 0.5rem 0 0;
	padding-left: 1.25rem;
}
.banner--ok {
	border-left-color: #1d6b34;
	background: #e6f1e3;
}
.small-heading {
	font-size: 1.25rem;
	margin-bottom: 0.75rem;
}
.place {
	margin: 0 0 1rem;
}
.detail__facts .actions {
	grid-template-columns: 1fr;
	margin-top: 0;
}
.facts--single {
	grid-template-columns: 1fr;
}
.change {
	margin-top: 1.25rem;
}
.change summary {
	display: flex;
	align-items: center;
	min-height: 44px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}
.change[open] summary {
	margin-bottom: 0.5rem;
}
.points {
	margin: 0 0 1.25rem;
	padding-left: 1.25rem;
	max-width: 40rem;
}
.points li {
	margin-bottom: 0.5rem;
}
.thanks {
	font-size: 1.125rem;
	font-weight: 700;
}
.feed {
	overflow-wrap: anywhere;
}
.prose {
	max-width: 46rem;
	padding-top: 1rem;
}
.prose h1 {
	font-size: clamp(1.875rem, 6vw, 2.5rem);
	margin-bottom: 1rem;
}
.prose h2 {
	font-size: 1.35rem;
	margin: 1.75rem 0 0.5rem;
}

/* Registration page: head, photo band, then the invitation and the form side by side from 1024 px */

.detail--register {
	padding-top: 1.75rem;
	/* The form's view timeline is read by the sticky button, which sits in the other column. */
	timeline-scope: --regform;
}
.invite-head {
	padding-bottom: 1.5rem;
}
.eyebrow--date {
	color: var(--navy);
	font-size: 0.875rem;
	letter-spacing: 0.08em;
	margin-bottom: 0.9rem;
}
.eyebrow--date::before {
	content: "";
	display: inline-block;
	vertical-align: middle;
	width: 1.75rem;
	height: 3px;
	margin: -0.15em 0.65rem 0 0;
	border-radius: 2px;
	background: var(--orange);
}
.invite-head h1 {
	font-size: clamp(2.125rem, 1.1rem + 4.1vw, 4.5rem);
	line-height: 1.08;
	letter-spacing: -0.015em;
	text-wrap: balance;
}
.invite-head .partner {
	margin-top: 1rem;
	font-size: 1rem;
}
.detail--register .banner {
	margin: 0 0 1.5rem;
}

.hero {
	margin-inline: calc(var(--gutter) * -1);
}
.hero img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.detail__grid {
	display: grid;
	/* Stacked, the space above the form is the sticky button's own resting place. */
	gap: 0;
	padding-top: 2rem;
}
.detail__info {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	min-width: 0;
}
.invite h2,
.register h2 {
	font-size: clamp(1.625rem, 1.35rem + 0.9vw, 2rem);
	line-height: 1.15;
	margin-bottom: 0.75rem;
	text-wrap: balance;
}
.invite p {
	max-width: 42rem;
	font-size: 1.125rem;
	line-height: 1.6;
}
.invite p:last-child {
	margin-bottom: 0;
}

.facts--house {
	grid-template-columns: 1fr 1fr;
	gap: 0 1.5rem;
	border-top: 1px solid var(--line);
}
.facts--house > div {
	padding: 0.8rem 0 0.85rem;
	border-bottom: 1px solid var(--line);
}
.facts--house .facts__wide {
	grid-column: 1 / -1;
}
.facts--house dd {
	font-size: 1.0625rem;
	line-height: 1.4;
}

/* The host signs the invitation: quiet, no photo. */
.invite .signoff {
	margin: 1.25rem 0 0;
	font-size: 1rem;
	line-height: 1.4;
}
.signoff__name {
	display: block;
	font-family: var(--font-head);
	font-size: 1.125rem;
	font-weight: 600;
}
.signoff__title {
	display: block;
	color: var(--muted);
	font-size: 0.875rem;
}

.kit {
	background: var(--sand-soft);
	border-radius: var(--radius);
	padding: 1.25rem 1.25rem 1.4rem;
}
.kit h2 {
	font-size: 1.25rem;
	line-height: 1.25;
	margin-bottom: 0.85rem;
	text-wrap: balance;
}
.kit__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.45rem;
}
.kit__list li {
	position: relative;
	padding-left: 1.5rem;
	line-height: 1.45;
}
.kit__list li::before {
	content: "";
	position: absolute;
	left: 0.1rem;
	top: 0.5em;
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 1px;
	background: var(--orange);
	transform: rotate(45deg);
}

.register {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.5rem 1.25rem 1.5rem;
	scroll-margin-top: 1rem;
	min-width: 0;
}
.register__intro {
	color: var(--muted);
	margin: 0 0 1.5rem;
}
.register .form {
	margin-top: 0;
	max-width: none;
}
.register .form > .button {
	width: 100%;
	margin-top: 0.25rem;
}

/* The feed link appears only after "Yes, contact me". CSS only (the page has no script). A browser without :has()
   simply always shows the field; the server ignores it when the answer is "Not now". */
@supports selector(:has(*)) {
	.field--feed {
		display: none;
	}
	.form:has(input[name="xml_interest"][value="yes"]:checked) .field--feed {
		display: block;
	}
}
fieldset.field--error .choices {
	outline: 2px solid #b42318;
	outline-offset: 4px;
	border-radius: 6px;
}

/* Pairs of short fields (name | agency, e-mail | WhatsApp) from 600 px: every form is then at least 390 px wide.
   A media query, not a container query: in Chrome a size container restyles its children after the first paint,
   and the Register button then visibly fades in from the browser's grey button style. */
@media (min-width: 600px) {
	.form {
		grid-template-columns: 1fr 1fr;
		column-gap: 1rem;
	}
	.form > * {
		grid-column: 1 / -1;
	}
	.form > .field--half {
		grid-column: auto;
	}
}

/* Phone and tablet: a Register button at the bottom of the screen. It sticks inside the left column, so it
   stops right above the form; where the browser supports view timelines it also fades out as the form enters. */
.cta-bar {
	--cta-height: calc(1.5rem + 48px + env(safe-area-inset-bottom));
	position: sticky;
	bottom: 0;
	z-index: 5;
	margin: -0.5rem calc(var(--gutter) * -1) 0;
	padding: 0.75rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom));
	background: linear-gradient(to top, var(--page) 72%, rgba(246, 245, 242, 0));
}
.cta-bar .button {
	width: 100%;
	box-shadow: 0 6px 18px rgba(10, 19, 32, 0.18);
}
/* Where the button fades out, it takes no room: it is pulled up by its own height, so it rests inside the normal
   2rem gap above the form and the kit panel and the form card sit one gap apart. Without the fade (older browsers)
   it keeps its room and stays visible above the form, so there is never an empty band. */
@supports (animation-timeline: view()) and (timeline-scope: none) {
	.register {
		view-timeline: --regform block;
	}
	.cta-bar {
		margin-top: calc(var(--cta-height) * -1);
		animation: cta-hide linear both;
		animation-timeline: --regform;
		animation-range: entry 0% entry 12%;
	}
}
@keyframes cta-hide {
	to {
		opacity: 0;
		visibility: hidden;
		transform: translateY(0.5rem);
	}
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* Personal page: the same cards and rhythm as the registration page */

.details-card,
.together__action {
	border-radius: var(--radius);
	padding: 1.25rem;
}
.details-card {
	background: var(--card);
	border: 1px solid var(--line);
}
.details-card dd {
	overflow-wrap: anywhere;
}
.together__action {
	background: var(--sand-soft);
	margin-top: 1.5rem;
}
.together__action .lead {
	font-size: 1.125rem;
	font-weight: 600;
	margin-bottom: 0.75rem;
}
.together__action .form {
	margin-top: 0;
}
.together__action > :last-child {
	margin-bottom: 0;
}

/* Larger screens */

@media (min-width: 600px) {
	:root {
		--gutter: 24px;
	}
	.site-header__tag {
		display: block;
	}
	.brand img {
		width: 160px;
	}
	.actions {
		grid-template-columns: 1fr 1fr;
	}
	.previews {
		gap: 12px;
	}
}

@media (min-width: 600px) {
	.hero {
		margin-inline: 0;
	}
	.hero img {
		aspect-ratio: 16 / 9;
		border-radius: var(--radius);
	}
	.invite-head {
		padding-bottom: 2rem;
	}
	.detail__grid {
		padding-top: 2.5rem;
	}
	.facts--house {
		grid-template-columns: repeat(3, 1fr);
	}
	.facts--house .facts__wide {
		grid-column: auto;
	}
	.kit {
		padding: 1.5rem 1.75rem 1.65rem;
	}
	.register {
		padding: 2rem;
	}
}

@media (min-width: 820px) {
	.intro {
		padding: 3.5rem 0 3.75rem;
	}
	.card {
		grid-template-columns: 5fr 6fr;
	}
	.card__media img {
		height: 100%;
		aspect-ratio: auto;
		min-height: 280px;
	}
	.card__body {
		padding: 2rem;
	}
	.card__title {
		font-size: 1.875rem;
	}
	.detail__main {
		grid-template-columns: 360px 1fr;
		gap: 3rem;
	}
	.detail__text {
		padding-top: 0.25rem;
	}
	.previews {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (min-width: 1024px) {
	.detail--register {
		padding-top: 2.75rem;
	}
	.hero img {
		aspect-ratio: 21 / 9;
		max-height: 460px;
	}
	/* Fill the first line; balancing would leave the first line short and a hole beside it. */
	.invite-head h1 {
		text-wrap: pretty;
	}
	.detail__grid {
		grid-template-columns: 1fr 1fr;
		gap: 3.5rem;
		padding-top: 3.5rem;
		align-items: start;
	}
	.detail__grid--single {
		grid-template-columns: minmax(0, 46rem);
	}
	.detail__grid--single .detail__info {
		padding-top: 0;
	}
	/* The column headings line up with the heading inside the form card. */
	.detail__info {
		padding-top: calc(2rem + 1px);
		gap: 2.25rem;
	}
	.facts--house {
		grid-template-columns: 1fr 1fr;
	}
	/* A little more air in the form card, so it reads easily and ends level with the left column. */
	.register {
		padding-bottom: 2.75rem;
	}
	.register .form {
		row-gap: 1.5rem;
	}
	.register__intro {
		margin-bottom: 1.75rem;
	}
	.cta-bar {
		display: none;
	}
	.personal .detail__main {
		grid-template-columns: 1fr 1fr;
		gap: 3.5rem;
	}
	.personal .detail__text {
		padding-top: 0;
	}
	.personal .detail__facts,
	.details-card,
	.together__action {
		padding: 1.5rem 2rem 2rem;
	}
	.personal .detail__facts .actions {
		grid-template-columns: 1fr 1fr;
	}
	.details-card .facts--single {
		grid-template-columns: 1fr 1fr;
	}
	/* Name | Agency, then the e-mail on its own row (it is long), then WhatsApp | People. */
	.details-card .facts--single > div:nth-child(3) {
		grid-column: 1 / -1;
	}
	/* Both cards as tall as the taller one. */
	.personal .detail__facts {
		align-self: stretch;
	}
	.personal .detail__text,
	.personal .details-card {
		height: 100%;
	}
	.together {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 3.5rem;
		align-items: start;
	}
	.together__action {
		margin-top: 0;
	}
}

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