/* ==========================================================================
   Alpine Pooch — base
   Design tokens, reset, typography and the chrome shared by every page
   (top bar, footer, loader, alert modal, cookie banner).
   ========================================================================== */

:root {
	/* Brand */
	--cream: #f7f3eb;
	--gold: #b28a39;
	--darkgold: #94742c;
	--blocked: #a67b51;
	--white: #ffffff;
	--ink: #4a3c1c;
	--muted: #8a7c5e;

	/* Surfaces */
	--surface: #ffffff;
	--surface-alt: #fffdf9;
	--line: rgba(148, 116, 44, 0.25);

	/* Type */
	--font-body: 'Architects Daughter', 'Segoe UI', system-ui, sans-serif;
	--font-display: 'Give You Glory', 'Architects Daughter', cursive;
	--font-ui: 'Poppins', 'Segoe UI', system-ui, sans-serif;

	/* Fluid type scale */
	--fs-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.9rem);
	--fs-sm: clamp(0.9rem, 0.85rem + 0.3vw, 1.05rem);
	--fs-md: clamp(1rem, 0.95rem + 0.4vw, 1.25rem);
	--fs-lg: clamp(1.15rem, 1rem + 0.8vw, 1.6rem);
	--fs-xl: clamp(1.4rem, 1.1rem + 1.4vw, 2.2rem);
	--fs-2xl: clamp(1.8rem, 1.3rem + 2.2vw, 3rem);
	--fs-3xl: clamp(2.2rem, 1.5rem + 3vw, 3.75rem);

	/* Spacing */
	--sp-1: 0.25rem;
	--sp-2: 0.5rem;
	--sp-3: 0.75rem;
	--sp-4: 1rem;
	--sp-5: 1.5rem;
	--sp-6: 2rem;
	--sp-7: 3rem;
	--sp-8: 4rem;

	/* Shape */
	--radius-sm: 8px;
	--radius: 16px;
	--radius-lg: 24px;
	--ring: 0 0 14px rgba(148, 116, 44, 0.45);
	--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
	--shadow: 0 6px 18px rgba(0, 0, 0, 0.12);

	/* Layout */
	--content: 1100px;
	--gutter: clamp(1rem, 4vw, 3rem);
}

/* --------------------------------------------------------------- reset -- */

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

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

body {
	margin: 0;
	padding: 0 var(--gutter) var(--sp-6);
	min-height: 100vh;
	background: var(--cream);
	color: var(--ink);
	font-family: var(--font-ui);
	font-size: var(--fs-md);
	line-height: 1.6;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	overflow-x: hidden;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 var(--sp-4);
	font-family: var(--font-body);
	color: var(--darkgold);
	text-align: center;
	line-height: 1.25;
}

a {
	color: var(--darkgold);
}

.hidden {
	display: none !important;
}

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

/* --------------------------------------------------------- form controls -- */

input,
select,
textarea {
	width: 100%;
	max-width: 100%;
	padding: 0.7rem 0.9rem;
	font-family: inherit;
	font-size: var(--fs-sm);
	color: var(--darkgold);
	background: var(--white);
	border: 2px solid var(--darkgold);
	border-radius: var(--radius-sm);
}

input[type='checkbox'],
input[type='radio'] {
	width: 1.25rem;
	height: 1.25rem;
	min-width: 1.25rem;
	padding: 0;
	accent-color: var(--darkgold);
	cursor: pointer;
}

textarea {
	resize: vertical;
	min-height: 5rem;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
	outline: 3px solid var(--gold);
	outline-offset: 2px;
	box-shadow: none;
}

label {
	display: flex;
	flex-direction: column;
	gap: var(--sp-2);
	font-family: var(--font-body);
	font-weight: 500;
	text-align: left;
}

/* ------------------------------------------------------------- buttons -- */

button,
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--sp-2);
	min-height: 2.75rem;
	padding: 0.75rem 1.5rem;
	font-family: var(--font-body);
	font-size: var(--fs-sm);
	color: var(--white);
	background: var(--darkgold);
	border: 2px solid var(--darkgold);
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

button:hover,
.btn:hover {
	background: var(--white);
	color: var(--darkgold);
}

button:active,
.btn:active {
	transform: translateY(1px);
}

button:disabled,
.btn:disabled {
	background: #d8d2c4;
	border-color: #d8d2c4;
	color: #7d7666;
	cursor: not-allowed;
	transform: none;
}

.btn-secondary {
	background: var(--white);
	color: var(--darkgold);
}

.btn-secondary:hover {
	background: var(--darkgold);
	color: var(--white);
}

/* ------------------------------------------------------------- top bar -- */

.site-top {
	width: 100%;
	max-width: var(--content);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-4);
	padding: var(--sp-3) 0;
	flex-wrap: wrap;
}

#simone-and-cheeto a {
	font-family: var(--font-body);
	font-size: var(--fs-md);
	color: var(--gold);
	text-decoration: none;
	border-bottom: 2px solid transparent;
	transition: border-color 0.2s ease;
}

#simone-and-cheeto a:hover {
	border-bottom-color: var(--gold);
}

#language-switcher {
	display: inline-flex;
	gap: var(--sp-2);
	margin-left: auto;
}

.lang-btn {
	min-height: 2.25rem;
	padding: 0.3rem 0.85rem;
	font-family: var(--font-ui);
	font-size: var(--fs-sm);
	font-weight: 700;
	color: var(--darkgold);
	background: var(--cream);
	border: 2px solid var(--gold);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-sm);
}

.lang-btn:hover {
	background: var(--white);
	color: var(--darkgold);
}

.lang-btn.active {
	background: var(--darkgold);
	color: var(--cream);
}

/* Disabled only while a language switch is loading — keep the brand colours
   rather than falling back to the generic grey disabled button. */
.lang-btn:disabled {
	background: var(--cream);
	border-color: var(--gold);
	color: var(--darkgold);
	cursor: progress;
	opacity: 0.65;
}

.lang-btn.active:disabled {
	background: var(--darkgold);
	color: var(--cream);
}

/* --------------------------------------------------------------- header -- */

#heading {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--sp-3);
	margin-bottom: var(--sp-5);
}

#logo,
#about-logo {
	width: min(420px, 70vw);
}

#sub-heading {
	max-width: 32ch;
	font-family: var(--font-display);
	font-size: var(--fs-2xl);
	line-height: 1.3;
	color: var(--gold);
}

/* --------------------------------------------------------------- footer -- */

footer {
	width: 100%;
	max-width: var(--content);
	margin-top: var(--sp-8);
	padding: var(--sp-5) 0;
	border-top: 2px solid var(--line);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-4);
	flex-wrap: wrap;
	font-family: var(--font-body);
	color: var(--darkgold);
}

#links {
	display: flex;
	gap: var(--sp-4);
}

.policy-link,
.privacy-link {
	font-size: var(--fs-sm);
	font-weight: 700;
	color: var(--darkgold);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	transition: border-color 0.2s ease;
}

.policy-link:hover,
.privacy-link:hover {
	border-bottom-color: var(--darkgold);
}

#tortoiga {
	flex: 1;
	text-align: center;
	font-size: var(--fs-md);
}

#tortoiga a {
	color: var(--darkgold);
	text-decoration: none;
}

.social-media-links {
	display: flex;
	align-items: center;
	gap: var(--sp-4);
}

.social-media-links a {
	color: var(--darkgold);
	text-decoration: none;
	font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
	line-height: 1;
	transition: transform 0.2s ease;
	display: inline-flex;
}

.social-media-links a:hover {
	transform: scale(1.12);
}

/* --------------------------------------------------------- page loader -- */

#page-loader {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--cream);
	transition: opacity 0.4s ease;
}

.loader-wrapper {
	position: relative;
	display: grid;
	place-items: center;
}

.loader-favicon,
.loading-favicon {
	position: absolute;
	width: 48px;
	height: 48px;
}

.loader-circle,
.loading-circle {
	width: 120px;
	height: 120px;
	border: 5px solid var(--gold);
	border-top-color: transparent;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

/* --------------------------------------------------------- alert modal -- */

.custom-alert-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--gutter);
	background: rgba(0, 0, 0, 0.55);
}

.custom-alert-box {
	width: 100%;
	max-width: 640px;
	max-height: 85vh;
	overflow-y: auto;
	padding: var(--sp-6);
	background: var(--white);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	text-align: center;
	animation: pop 0.25s ease-out;
}

.custom-alert-message {
	margin-bottom: var(--sp-5);
	font-family: var(--font-display);
	font-size: var(--fs-md);
	color: var(--gold);
}

.custom-alert-box button {
	width: min(220px, 80%);
}

/* ------------------------------------------------------- cookie banner -- */

#cookie-consent-banner {
	position: fixed;
	bottom: var(--sp-4);
	left: 0;
	right: 0;
	z-index: 10000;
	display: flex;
	justify-content: center;
	padding: 0 var(--gutter);
	pointer-events: none;
}

#cookie-banner {
	display: flex;
	align-items: center;
	gap: var(--sp-4);
	width: min(720px, 100%);
	padding: var(--sp-4) var(--sp-5);
	background: var(--cream);
	color: var(--darkgold);
	border: 3px solid var(--darkgold);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	font-family: var(--font-display);
	font-size: var(--fs-md);
	opacity: 0;
	transition: opacity 0.5s ease;
	pointer-events: auto;
}

#alpine-cookie {
	width: 84px;
	flex-shrink: 0;
}

#cookie-text-buttons {
	display: flex;
	flex-direction: column;
	gap: var(--sp-3);
	text-align: left;
	flex: 1;
}

#consent-buttons {
	display: flex;
	gap: var(--sp-3);
}

#consent-buttons button {
	flex: 1;
	max-width: 160px;
	font-size: var(--fs-sm);
}

#decline-cookies {
	background: var(--white);
	color: var(--darkgold);
}

#decline-cookies:hover {
	background: var(--darkgold);
	color: var(--white);
}

/* ----------------------------------------------------------- animation -- */

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

@keyframes pop {
	from {
		transform: scale(0.9);
		opacity: 0;
	}
	to {
		transform: scale(1);
		opacity: 1;
	}
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ---------------------------------------------------------- responsive -- */

@media (max-width: 800px) {
	.site-top {
		justify-content: center;
	}

	#language-switcher {
		margin-left: 0;
	}

	footer {
		flex-direction: column;
		gap: var(--sp-4);
		text-align: center;
	}

	#links {
		justify-content: center;
	}

	#cookie-banner {
		flex-direction: column;
		text-align: center;
	}

	#cookie-text-buttons {
		text-align: center;
		align-items: center;
	}

	#alpine-cookie {
		width: 64px;
	}
}
