/* ==========================================================================
   La Table de Lalia — design tokens, fonts, base typography, buttons, layout
   Values transcribed from the original site's theme configuration.
   ========================================================================== */

/* --------------------------------------------------------------- @font-face */

@font-face {
	font-family: "Gotham";
	src: url("../fonts/gotham-500.woff") format("woff");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Gotham";
	src: url("../fonts/gotham-700.woff") format("woff");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Gotham";
	src: url("../fonts/gotham-700-italic.woff") format("woff");
	font-weight: 700;
	font-style: italic;
	font-display: swap;
}
@font-face {
	font-family: "Gotham";
	src: url("../fonts/gotham-900.woff") format("woff");
	font-weight: 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Gotham";
	src: url("../fonts/gotham-900-italic.woff") format("woff");
	font-weight: 900;
	font-style: italic;
	font-display: swap;
}
@font-face {
	font-family: "Gotham Book";
	src: url("../fonts/gotham-book-400.woff") format("woff");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Lato";
	src: url("../fonts/lato-400.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Lato";
	src: url("../fonts/lato-400-italic.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}
@font-face {
	font-family: "Lato";
	src: url("../fonts/lato-700.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Lato";
	src: url("../fonts/lato-700-italic.woff2") format("woff2");
	font-weight: 700;
	font-style: italic;
	font-display: swap;
}

/* ------------------------------------------------------------------ tokens */

:root {
	/* palette */
	--brand: #99907f;
	--dark-accent: #564032;
	--light-accent: #564032;
	--light-shade: #f4f1ea;
	--dark-shade: #060606;
	--link: #060606;
	--link-hover: #060606;
	--link-light: #f4f1ea;

	/* families */
	--font-display: "Gotham", serif;      /* headings, buttons, subheadings */
	--font-book: "Gotham Book", serif;    /* block titles, captions, quotes */
	--font-text: "Lato", sans-serif;      /* body copy */

	/* type scale — desktop */
	--hero-title-size: 80px;
	--hero-title-lh: 1.1;
	--block-title-size: 56px;
	--block-title-lh: 1.2;
	--heading-lg-size: 36px;
	--heading-lg-lh: 1.4;
	--quote-size: 36px;
	--quote-lh: 1.4;
	--subtitle-size: 24px;
	--subtitle-lh: 1.4;
	--heading-size: 24px;
	--heading-lh: 1.3;
	--subheading-size: 20px;
	--subheading-lh: 1.4;
	--text-size: 16px;
	--text-lh: 1.6;
	--caption-size: 12px;
	--caption-lh: 1.4;
	--small-size: 12px;
	--small-lh: 1.4;
	--btn-size: 15px;
	--btn-lh: 1.2;

	/* layout */
	--container: 1200px;
	--gutter: 24px;
	--section-v: 100px;
	--section-v-xxl: 130px;
	--section-v-s: 20px;
	--section-header-offset: 45px;
	--section-footer-offset: 50px;
	--gap: 15px;
	--nav-item-gap: 15px;
	--btns-group-item-offset: 20px;
	--btns-group-offset: 35px;
	--title-offset: 25px;

	/* buttons */
	--btn-sm-radius: 18px;
	--btn-md-radius: 20px;
	--btn-lg-radius: 25px;

	/* chrome */
	--header-h: 92px;
}

@media (min-width: 480px) {
	:root { --gutter: 24px; }
}
@media (min-width: 768px) {
	:root { --gutter: 32px; }
}
@media (min-width: 992px) {
	:root { --gutter: 40px; }
}
/* The original still uses the 40px gutter at exactly 1200 and only drops to
   15px above it — measured: content is 1060px wide in a 1200px viewport. */
@media (min-width: 1201px) {
	:root { --gutter: 15px; }
}

/* Section padding steps down with the viewport: measured intro padding
   totals 300px at 1440, 250px at 768 and 200px at 375. */
@media (min-width: 768px) and (max-width: 991px) {
	:root { --section-v: 84px; }
}
@media (max-width: 767px) {
	:root { --section-v: 67px; }
}

/* The block title is fluid below 992px — measured 38.4px at 768 and
   18.75px at 375, i.e. exactly 5vw. Every other size steps by breakpoint. */
@media (max-width: 991px) {
	:root { --block-title-size: 5vw; }
}

/* tablet type scale */
@media (min-width: 768px) and (max-width: 991px) {
	:root {
		--hero-title-size: 69px;
		--heading-lg-size: 33px;
		--quote-size: 30px;
		--subtitle-size: 22px;
		--heading-size: 23px;
		--subheading-size: 19px;
	}
}

/* mobile type scale */
@media (max-width: 767px) {
	:root {
		--hero-title-size: 58px;
		--heading-lg-size: 30px;
		--quote-size: 24px;
		--subtitle-size: 20px;
		--heading-size: 22px;
		--subheading-size: 18px;
	}
}

/* -------------------------------------------------------------------- base */

*,
*::before,
*::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

body {
	margin: 0;
	/* The original sets overflow-x:hidden on <body> — that is how it contains
	   the slider tracks, which are several thousand px wide by design. Without
	   it the page scrolls sideways. */
	overflow-x: hidden;
	background: var(--light-shade);
	color: var(--dark-shade);
	font-family: var(--font-text);
	font-size: var(--text-size);
	font-weight: 400;
	line-height: var(--text-lh);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; border: 0; }
svg { display: block; }

a {
	color: var(--link);
	text-decoration: none;
	transition: color .2s ease, opacity .2s ease;
}
a:hover { color: var(--link-hover); }

h1, h2, h3, h4, h5, h6, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
	outline: 2px solid var(--dark-accent);
	outline-offset: 3px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	padding: 12px 20px;
	background: var(--dark-accent);
	color: var(--light-shade);
	font-family: var(--font-display);
	font-size: 14px;
}
.skip-link:focus {
	left: 0;
	color: var(--light-shade);
}

/* ------------------------------------------------------------------ layout */

.section {
	position: relative;
	padding-top: var(--section-v);
	padding-bottom: var(--section-v);
}
.section--flush { padding-top: 0; padding-bottom: 0; }

.section__inner {
	position: relative;
	z-index: 1;
	width: 95%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

/* repeating paper texture used by most blocks */
.section--tiled::before {
	content: "";
	position: absolute;
	inset: 0;
	background: url("../img/bg-repeat.webp") repeat left top / 250px;
	pointer-events: none;
}

.section--textured::before {
	content: "";
	position: absolute;
	inset: 0;
	background: url("../img/bg-texture.jpg") repeat left top;
	pointer-events: none;
}

/* ------------------------------------------------------------- typography */

.t-hero-title {
	font-family: var(--font-display);
	font-weight: 900;
	font-size: var(--hero-title-size);
	line-height: var(--hero-title-lh);
	color: var(--dark-shade);
}
.t-block-title {
	font-family: var(--font-book);
	font-weight: 400;
	font-size: var(--block-title-size);
	line-height: var(--block-title-lh);
	color: var(--dark-shade);
}
.t-heading-lg {
	font-family: var(--font-display);
	font-weight: 900;
	font-size: var(--heading-lg-size);
	line-height: var(--heading-lg-lh);
	color: var(--dark-shade);
}
.t-heading {
	font-family: var(--font-display);
	font-weight: 900;
	font-size: var(--heading-size);
	line-height: var(--heading-lh);
	color: var(--dark-shade);
}
.t-subtitle {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: var(--subtitle-size);
	line-height: var(--subtitle-lh);
	color: var(--dark-shade);
}
.t-subheading {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: var(--subheading-size);
	line-height: var(--subheading-lh);
	color: var(--dark-shade);
}
.t-caption {
	font-family: var(--font-book);
	font-weight: 400;
	font-size: var(--caption-size);
	line-height: var(--caption-lh);
	color: var(--dark-shade);
}
.t-small {
	font-family: var(--font-book);
	font-weight: 400;
	font-size: var(--small-size);
	line-height: var(--small-lh);
	color: var(--dark-shade);
}
.t-quote {
	font-family: var(--font-book);
	font-weight: 400;
	font-style: italic;
	font-size: var(--quote-size);
	line-height: var(--quote-lh);
	color: var(--dark-shade);
}
.t-text {
	font-family: var(--font-text);
	font-weight: 400;
	font-size: var(--text-size);
	line-height: var(--text-lh);
	color: var(--dark-shade);
}

/* light-on-dark variants */
.t--light,
.t--light a { color: var(--light-shade); }

/* ---------------------------------------------------------------- buttons */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 11px 22px;
	border: 1px solid transparent;
	border-radius: var(--btn-md-radius);
	font-family: var(--font-display);
	font-weight: 500;
	font-size: var(--btn-size);
	line-height: calc(var(--btn-lh) * 1em);
	letter-spacing: 0;
	text-align: center;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

/* "primary-light" in the original palette */
.btn--primary {
	background: var(--brand);
	border-color: transparent;
	color: var(--light-shade);
}
.btn--primary:hover {
	background: var(--dark-accent);
	color: var(--light-shade);
}

/* "secondary-light" in the original palette */
.btn--secondary {
	background: #272727;
	border-color: transparent;
	color: var(--light-shade);
}
.btn--secondary:hover {
	background: var(--dark-accent);
	color: var(--light-shade);
}

.btn--bold { font-weight: 700; }

.btn__icon {
	width: 16px;
	height: 16px;
	flex: none;
}

.btns-group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--btns-group-item-offset);
	margin-top: var(--btns-group-offset);
}

/* ------------------------------------------------------- entrance animation */

.anim {
	opacity: 0;
	will-change: transform, opacity;
	transition: opacity .7s cubic-bezier(.22, .61, .36, 1),
	            transform .7s cubic-bezier(.22, .61, .36, 1);
}
.anim--top { transform: translateY(-40px); }
.anim--left { transform: translateX(-60px); }
.anim--bottom { transform: translateY(40px); }
.anim.is-in {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.anim {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* No JS: never leave content invisible. */
.no-js .anim {
	opacity: 1;
	transform: none;
}
