/*
Theme Name: Expaty
Theme URI: https://expaty.com
Author: Expaty
Description: One-page theme for expaty.com. No plugins, no cookies, no third-party scripts. Destinations are managed in inc/destinations.php; contact and company details in Appearance > Customize > Expaty.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: expaty
*/

/* Fonts: Schibsted Grotesk (SIL Open Font License, see assets/fonts/OFL.txt) */
@font-face {
	font-family: "Schibsted Grotesk";
	font-style: normal;
	font-display: swap;
	font-weight: 400 900;
	src: url("assets/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2-variations"),
		url("assets/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Schibsted Grotesk";
	font-style: normal;
	font-display: swap;
	font-weight: 400 900;
	src: url("assets/fonts/schibsted-grotesk-latin-ext-wght-normal.woff2") format("woff2-variations"),
		url("assets/fonts/schibsted-grotesk-latin-ext-wght-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Tokens */
:root {
	--bg: #f7f7f5;
	--bg-alt: #efefec;
	--ink: #141517;
	--muted: #5c5f66;
	--line: #dcdddf;
	--media: #e4e5e3;
	--accent: #2438b0;
	--field: #8a8d93;
	--error: #a4161a;

	--font: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
	--gutter: clamp(1.25rem, 4vw, 3.5rem);
	--max: 84rem;
	--gap: clamp(1rem, 2vw, 2rem);
	--space: clamp(3.5rem, 8vw, 7rem);
}

/* Base */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	background: var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-size: 1.0625rem;
	font-weight: 400;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p,
ul {
	margin: 0;
}

h1,
h2,
h3 {
	font-weight: 560;
	text-wrap: balance;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 1px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed !important;
	top: 1rem;
	left: 1rem;
	z-index: 10;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0.75rem 1rem;
	clip: auto;
	background: var(--ink);
	color: var(--bg);
	text-decoration: none;
}

.wrap {
	width: 100%;
	max-width: var(--max);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/* Links */
.text-link {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
}

.text-link:hover {
	text-decoration-thickness: 2px;
}

.text-link--large {
	font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem);
	font-weight: 500;
}

/* Header */
.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: clamp(1.25rem, 2.5vw, 2rem);
}

.wordmark {
	display: inline-block;
	color: var(--ink);
	text-decoration: none;
}

.wordmark-text {
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.045em;
	line-height: 1;
}

.wordmark-img {
	width: auto;
	height: 1.75rem;
}

.header-contact {
	font-weight: 500;
	text-decoration: none;
	padding-block: 0.25rem;
}

.header-contact:hover {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
}

/* Hero: the one expressive element */
.hero {
	padding-block: clamp(3.5rem, 11vw, 10rem) clamp(4rem, 9vw, 8rem);
}

.hero .wrap {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: var(--gap);
}

.hero-title {
	grid-column: 1 / -1;
	max-width: 14ch;
	font-size: clamp(2.75rem, 0.9rem + 7.4vw, 8.25rem);
	font-weight: 560;
	line-height: 0.97;
	letter-spacing: -0.048em;
}

.hero-title em {
	font-style: normal;
	color: var(--accent);
}

.hero-sub {
	grid-column: 1 / -1;
	max-width: 34rem;
	margin-top: clamp(2rem, 5vw, 4.5rem);
	font-size: clamp(1.125rem, 1rem + 0.45vw, 1.375rem);
	line-height: 1.5;
}

.hero--page .hero-title {
	max-width: 18ch;
	font-size: clamp(2.25rem, 0.9rem + 5vw, 5.75rem);
	line-height: 1;
	letter-spacing: -0.04em;
}

/* Sections */
.section {
	padding-bottom: var(--space);
}

.section > .wrap::before {
	content: "";
	display: block;
	grid-column: 1 / -1;
	height: 1px;
	margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
	background: var(--line);
}

.section-title {
	font-size: clamp(1.625rem, 1.15rem + 1.7vw, 2.625rem);
	line-height: 1.1;
	letter-spacing: -0.03em;
}

.split-body {
	max-width: 40rem;
	margin-top: 1.5rem;
	font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
}

.split-body > * + * {
	margin-top: 1.1em;
}

.split-body .cta {
	margin-top: 2rem;
}

@media (min-width: 900px) {
	.split {
		display: grid;
		grid-template-columns: repeat(12, minmax(0, 1fr));
		column-gap: var(--gap);
	}

	.split > .section-title {
		grid-column: 1 / 6;
	}

	.split > .split-body {
		grid-column: 7 / -1;
		margin-top: 0.3em;
	}

	.hero-sub {
		grid-column: 7 / -1;
	}
}

/* Principles */
.principles {
	display: grid;
	gap: 2rem var(--gap);
	padding: 0;
	list-style: none;
}

.principles h3 {
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.principles p {
	margin-top: 0.4rem;
	font-size: 1.0625rem;
	color: var(--muted);
}

@media (min-width: 700px) {
	.principles {
		grid-template-columns: 1fr 1fr;
	}
}

/* Destinations */
.dest-media {
	position: relative;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--media);
}

.dest-media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dest-media:not(.dest-media--empty)::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(20, 21, 23, 0.08);
	pointer-events: none;
}

.dest-media--empty {
	display: grid;
	place-items: center;
	padding: 0.5rem;
	text-align: center;
}

.dest-media-name {
	color: var(--muted);
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.dest-place {
	color: var(--muted);
}

.dest-status {
	font-weight: 500;
}

/* Live: featured, full width */
.dest--live {
	margin-top: clamp(1.75rem, 4vw, 3rem);
}

.dest--live + .dest--live {
	margin-top: clamp(2.5rem, 5vw, 4rem);
}

.dest--live .dest-media-name {
	font-size: clamp(1.5rem, 1rem + 2vw, 2.75rem);
}

.dest--live .dest-body {
	margin-top: 1.5rem;
}

.dest--live .dest-portal {
	margin-top: 0.25rem;
	font-size: clamp(1.75rem, 1.2rem + 2vw, 3rem);
	line-height: 1.05;
	letter-spacing: -0.035em;
}

.dest--live .dest-status {
	margin-top: 1rem;
}

.dest--live .dest-desc {
	max-width: 30rem;
	margin-top: 0.5rem;
	font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
}

.dest--live .dest-link {
	margin-top: 1.5rem;
	font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
	font-weight: 500;
}

@media (min-width: 900px) {
	.dest--live {
		display: grid;
		grid-template-columns: repeat(12, minmax(0, 1fr));
		column-gap: var(--gap);
		align-items: end;
	}

	.dest--live .dest-media {
		grid-column: 1 / 9;
	}

	.dest--live .dest-body {
		grid-column: 9 / -1;
		margin-top: 0;
	}
}

/* Coming soon: secondary, balanced rows, not clickable */
.dest-grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 1.25rem var(--gap);
	margin-top: clamp(2.5rem, 5vw, 4rem);
	padding: 0;
	list-style: none;
}

.dest--soon {
	grid-column: span 12;
	display: grid;
	grid-template-columns: 6.5rem minmax(0, 1fr);
	gap: 1rem;
	align-items: center;
	padding-top: 1.25rem;
	border-top: 1px solid var(--line);
	cursor: default;
}

.dest--soon .dest-media-name {
	font-size: 0.8125rem;
}

.dest--soon .dest-place {
	font-size: 0.875rem;
}

.dest--soon .dest-portal {
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.dest--soon .dest-status {
	margin-top: 0.2rem;
	font-size: 0.875rem;
	color: var(--muted);
	font-weight: 400;
}

@media (min-width: 700px) {
	.dest--soon {
		grid-column: span var(--span-md, 4);
	}
}

@media (min-width: 1100px) {
	.dest--soon {
		grid-column: span var(--span-lg, 3);
	}
}

.dest-note {
	margin-top: clamp(2rem, 4vw, 3rem);
	font-size: 0.9375rem;
	color: var(--muted);
}

/* Text pages (legal notice, privacy policy) */
.text-page {
	padding-block: clamp(3rem, 8vw, 6rem) var(--space);
}

.page-title {
	max-width: 20ch;
	font-size: clamp(2rem, 1.2rem + 3vw, 3.75rem);
	line-height: 1.05;
	letter-spacing: -0.04em;
}

.prose {
	max-width: 42rem;
	margin-top: clamp(2rem, 4vw, 3rem);
	padding-top: clamp(1.25rem, 2.5vw, 2rem);
	border-top: 1px solid var(--line);
}

.prose > * + * {
	margin-top: 1em;
}

.prose h2 {
	margin-top: 2.25em;
	font-size: 1.375rem;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.prose h3 {
	margin-top: 1.75em;
	font-size: 1.125rem;
	font-weight: 600;
}

.prose ul,
.prose ol {
	padding-left: 1.25em;
}

.prose li + li {
	margin-top: 0.35em;
}

.prose a {
	color: var(--accent);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
}

.prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.prose th,
.prose td {
	padding: 0.5rem 0.75rem 0.5rem 0;
	border-bottom: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}

/* Enquiry forms */
.enquiry {
	margin-top: clamp(2rem, 4vw, 3rem);
	scroll-margin-top: 1.5rem;
}

.enquiry-title {
	font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem);
	font-weight: 560;
	letter-spacing: -0.015em;
}

.form {
	display: grid;
	gap: 1.25rem var(--gap);
	margin-top: 1.25rem;
	font-size: 1rem;
}

.field {
	display: grid;
	gap: 0.4rem;
	align-content: start;
	min-width: 0;
}

.field label {
	font-weight: 500;
}

.field-optional {
	font-weight: 400;
	color: var(--muted);
}

.field input[type="text"],
.field input[type="email"],
.field textarea {
	width: 100%;
	margin: 0;
	padding: 0.7rem 0.8rem;
	border: 1px solid var(--field);
	border-radius: 0;
	background: #fff;
	color: var(--ink);
	font: inherit;
	line-height: 1.4;
	-webkit-appearance: none;
	appearance: none;
}

.field textarea {
	min-height: 9rem;
	resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 0;
	border-color: var(--accent);
}

.has-error input[type="text"],
.has-error input[type="email"],
.has-error textarea {
	border: 2px solid var(--error);
	padding: calc(0.7rem - 1px) calc(0.8rem - 1px);
}

.field-error {
	color: var(--error);
	font-weight: 500;
}

.field--check .check {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.75rem;
	align-items: start;
}

.field--check input[type="checkbox"] {
	width: 1.25rem;
	height: 1.25rem;
	margin: 0.15rem 0 0;
	accent-color: var(--accent);
}

.field--check label {
	font-weight: 400;
}

.has-error.field--check input[type="checkbox"] {
	outline: 2px solid var(--error);
	outline-offset: 2px;
}

.hp {
	position: absolute !important;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.button {
	justify-self: start;
	padding: 0.85rem 1.4rem;
	border: 0;
	border-radius: 0;
	background: var(--ink);
	color: #fff;
	font: inherit;
	font-weight: 500;
	cursor: pointer;
}

.button:hover {
	background: var(--accent);
}

.form-errors,
.form-notice {
	margin-top: 1.25rem;
	padding: 1rem 0 1rem 1.25rem;
	border-left: 3px solid var(--error);
	font-size: 1rem;
}

.form-notice {
	border-left-color: var(--accent);
}

.form-errors-title {
	font-weight: 600;
}

.form-errors ul {
	margin-top: 0.5rem;
	padding-left: 1.1em;
}

.form-errors li + li {
	margin-top: 0.25rem;
}

.form-errors a {
	color: var(--error);
	text-underline-offset: 0.2em;
}

@media (min-width: 700px) {
	.form {
		grid-template-columns: 1fr 1fr;
	}

	.field--wide {
		grid-column: 1 / -1;
	}
}

/* Legal pages */
.prose .legal-updated {
	color: var(--muted);
	font-size: 0.9375rem;
}

/* Footer */
.site-footer {
	padding-block: clamp(3rem, 6vw, 5rem);
	border-top: 1px solid var(--line);
	background: var(--bg-alt);
	font-size: 0.9375rem;
	color: var(--muted);
}

.footer-grid {
	display: grid;
	gap: 2rem;
}

.footer-email {
	margin-top: 1.25rem;
	font-size: 1.0625rem;
}

.footer-meta > * + * {
	margin-top: 1rem;
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	padding: 0;
	list-style: none;
}

.footer-links li:not(:last-child)::after {
	content: "\00b7";
	padding-inline: 0.6em;
}

.footer-links a {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-color: var(--line);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
}

.footer-links a:hover {
	text-decoration-color: currentColor;
}

@media (min-width: 900px) {
	.footer-grid {
		grid-template-columns: repeat(12, minmax(0, 1fr));
		column-gap: var(--gap);
	}

	.footer-brand {
		grid-column: 1 / 7;
	}

	.footer-meta {
		grid-column: 7 / -1;
	}
}
