/*
Theme Name: Fair Model
Author: Fair Model
Description: Classic theme whose content is built from Lazy Blocks: fields in the editor, design in the theme's block templates.
Version: 0.4.0
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fair-model
*/

/* ---------- fonts: self-hosted variable fonts (fonts/, licenses in fonts/OFL.txt) ---------- */
/* Cormorant Garamond, latin-ext */
@font-face {
	font-family: "Cormorant Garamond";
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url("fonts/cormorant-garamond-latin-ext.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;
}
/* Cormorant Garamond, latin */
@font-face {
	font-family: "Cormorant Garamond";
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url("fonts/cormorant-garamond-latin.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;
}
/* Inter, latin-ext */
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 300 600;
	font-display: swap;
	src: url("fonts/inter-latin-ext.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;
}
/* Inter, latin */
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 300 600;
	font-display: swap;
	src: url("fonts/inter-latin.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;
}
/* JetBrains Mono, latin-ext */
@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 400 500;
	font-display: swap;
	src: url("fonts/jetbrains-mono-latin-ext.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;
}
/* JetBrains Mono, latin */
@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 400 500;
	font-display: swap;
	src: url("fonts/jetbrains-mono-latin.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;
}

/* ---------- tokens ---------- */
:root {
	--cream: #f6f4ee;
	--paper: #fbfaf6;
	--beige: #e9e4d7;
	--overlay: 242, 239, 231;
	--sage: #8b9176;
	--ink: #23221d;
	--soft: #45433b;
	--muted: #75725f;
	--line: #ddd9cb;
	--serif: "Cormorant Garamond", Georgia, serif;
	--sans: "Inter", system-ui, -apple-system, sans-serif;
	--mono: "JetBrains Mono", ui-monospace, monospace;
	/* section titles in the blocks (smaller on phones, see responsive) */
	--title-size: clamp(2.25rem, 3.8vw, 3.125rem);
}

/* ---------- base ---------- */
*,
*::before,
*::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Global type scale: 125% => 1rem = 20px. Every size is rem-based. */
html { font-size: 125%; scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
/* The admin bar nudges #hash targets by -32px; smoothly animated, that nudge
   cancels the jump itself — so logged-in views scroll instantly. */
html:has(> body.admin-bar) { scroll-behavior: auto; }
body { background: var(--cream); color: var(--ink); font-family: var(--sans); font-weight: 400; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
/* A word longer than the line (narrow screens) breaks instead of overflowing. */
h1, h2, h3 { overflow-wrap: break-word; }

.container { max-width: 78.75rem; margin: 0 auto; padding-left: 3.25rem; padding-right: 3.25rem; }

/* ---------- arrow link ---------- */
.cta { display: inline-flex; align-items: center; gap: .75rem; font-family: var(--mono); font-size: .75rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); padding-bottom: .4375rem; border-bottom: 2px solid var(--ink); transition: opacity .2s; }
.cta:hover { opacity: .6; }
.cta svg { flex: none; margin-bottom: 1px; width: 1.875rem; height: auto; }
.cta svg path { stroke-width: 1.3; }
.cta--light { color: #fff; border-bottom-color: #fff; }

/* ---------- eyebrow / section headings ---------- */
.eyebrow { font-size: .6875rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; margin-bottom: 2.25rem; }
.sec-head h2 { font-size: 1rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.sec-head .cta { font-size: .6875rem; }

/* ---------- nav: logo left, menu centred ---------- */
/* The logo column never shrinks below the logo; the menu stays centred while there is room.
   The padding lines the logo up with the page content (.container: 78.75rem wide, 3.25rem padding). */
.nav { display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(0, 1fr); column-gap: 2rem; align-items: center; padding: 0 max(3.25rem, (100% - 78.75rem) / 2 + 3.25rem); background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; }
/* Stay below the admin bar (fixed above 600px, 46px tall below 783px). */
.admin-bar .nav { top: 32px; }
.nav__brand { justify-self: start; display: block; color: var(--ink); line-height: 0; }
.logo { display: block; width: auto; height: 100%; }
.nav__brand .logo { height: 2.25rem; }
.nav__menu { min-width: 0; }
/* The space around the links is their own padding, so all of it is clickable:
   half the 2.875rem spacing on each side, none on the outer ends of the row. */
.nav__menu ul { position: relative; list-style: none; display: flex; align-items: center; justify-content: center; overflow-x: auto; scrollbar-width: none; }
.nav__menu ul::-webkit-scrollbar { display: none; }
.nav__menu li { display: flex; }
.nav__menu a { padding: 1.1875rem 1.4375rem; font-size: .8125rem; font-weight: 400; letter-spacing: .04em; color: var(--ink); white-space: nowrap; transition: opacity .2s; }
.nav__menu li:first-child a { padding-left: 0; }
.nav__menu li:last-child a { padding-right: 0; }
.nav__menu a:hover { opacity: .55; }

/* Burger button, shown on small screens only (see responsive). */
.nav__toggle { display: none; position: relative; flex: none; width: 2.75rem; height: 2.75rem; margin-right: -.6875rem; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nav__toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: -.25rem; }
.nav__toggle-icon { position: absolute; top: 50%; left: 50%; width: 1.375rem; height: 1.5px; margin: -.75px 0 0 -.6875rem; background: currentColor; transition: background-color .2s; }
.nav__toggle-icon::before,
.nav__toggle-icon::after { content: ""; position: absolute; left: 0; width: 100%; height: 100%; background: currentColor; transition: transform .45s cubic-bezier(.22, .61, .36, 1); }
.nav__toggle-icon::before { transform: translateY(-.4rem); }
.nav__toggle-icon::after { transform: translateY(.4rem); }
.is-open .nav__toggle-icon { background-color: transparent; }
.is-open .nav__toggle-icon::before { transform: rotate(45deg); }
.is-open .nav__toggle-icon::after { transform: rotate(-45deg); }

/* Menu links shown as an icon (see inc/setup.php). */
.menu-icon { display: block; width: .9375rem; height: .9375rem; }

.screen-reader-text { border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }

/* ---------- footer ---------- */
.footer { background: var(--beige); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 3rem; padding-top: 4.5rem; padding-bottom: 3.75rem; }
.footer .brand-sm { display: inline-block; color: var(--ink); margin-bottom: .75rem; }
.footer .brand-sm .logo { height: 2.75rem; }
.footer .tagline { font-size: .8125rem; color: var(--muted); }
.footer-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .75rem 1.875rem; padding-top: .5rem; }
.footer-nav li { display: flex; }
.footer-nav a { font-size: .8125rem; transition: opacity .2s; }
.footer-nav a:hover { opacity: .55; }
.footer-grid > div,
.footer-mail { flex: none; }
.footer-mail { margin-top: .25rem; }

/* ---------- responsive ---------- */
@media (max-width: 1120px) {
	.nav { padding: 0 1.625rem; } /* less than the page's padding: the menu needs the room */
	.nav__menu a { padding-left: .9375rem; padding-right: .9375rem; }
}

@media (max-width: 960px) {
	.container { padding-left: 1.625rem; padding-right: 1.625rem; }
	/* Without JavaScript the menu stays a scrollable row next to the logo. */
	.nav { grid-template-columns: auto minmax(0, 1fr); column-gap: 0; padding: 0 0 0 1.625rem; }
	.nav__menu ul { justify-content: flex-start; padding: 0 1.625rem; }
	.nav__menu a { padding-top: 1rem; padding-bottom: 1rem; }
	/* With JavaScript: logo and burger; the menu opens as a panel that fills
	   the screen below the header (nav.js), the page behind doesn't scroll. */
	.js .nav { --nav-h: 3.25rem; display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); padding: 0 1.625rem; }
	.js .nav__toggle { display: block; }
	.js .nav__menu { position: absolute; top: calc(100% + 1px); left: 0; right: 0; height: calc(100dvh - var(--nav-h)); overflow-y: auto; overscroll-behavior: contain; background: var(--paper); visibility: hidden; opacity: 0; transform: translateY(-.75rem); transition: opacity .45s cubic-bezier(.22, .61, .36, 1), transform .45s cubic-bezier(.22, .61, .36, 1), visibility 0s .45s; }
	.js .nav.is-open .nav__menu { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
	.js .nav__menu ul { flex-direction: column; align-items: stretch; gap: 0; padding: .75rem 1.625rem 2.5rem; overflow: visible; }
	.js .nav__menu li { border-bottom: 1px solid var(--line); }
	.js .nav__menu a { flex: 1; padding: .875rem 0; font-family: var(--serif); font-size: 1.75rem; line-height: 1.2; letter-spacing: 0; white-space: normal; }
	.js .nav__menu li:has(.menu-icon) { border-bottom: 0; }
	.js .nav__menu .menu-icon { width: 1.25rem; height: 1.25rem; }
	html:has(.nav.is-open) { overflow: hidden; }
	/* The fixed admin bar (logged in) takes its share of the screen. */
	.js .admin-bar .nav__menu { height: calc(100dvh - var(--nav-h) - 32px); }
	.footer-grid { flex-direction: column; gap: 1.75rem; padding-top: 3.5rem; padding-bottom: 2.75rem; }
}

@media (max-width: 782px) {
	.admin-bar .nav { top: 46px; }
	.js .admin-bar .nav__menu { height: calc(100dvh - var(--nav-h) - 46px); }
}

/* Phones: the smaller root size tightens every rem-based size at once; the
   blocks tighten display type and section spacing further. */
@media (max-width: 600px) {
	html { font-size: 106.25%; } /* 1rem = 17px */
	:root { --title-size: 1.75rem; }
	/* even line lengths instead of a lone word on the last line */
	h1, h2, h3 { text-wrap: balance; }
	.container { padding-left: 1.25rem; padding-right: 1.25rem; }
	.admin-bar .nav { top: 0; } /* the admin bar scrolls away here */
	.js .admin-bar .nav__menu { height: calc(100dvh - var(--nav-h)); }
	.nav { padding-left: 1.25rem; }
	.nav__menu ul { padding: 0 1.25rem; }
	.js .nav { padding: 0 1.25rem; }
	.js .nav__menu ul { padding: .5rem 1.25rem 2rem; }
	.js .nav__menu a { padding: .75rem 0; font-size: 1.625rem; }
	.sec-head { flex-direction: column; gap: .75rem; margin-bottom: 1.75rem; }
	.sec-head h2 { font-size: .875rem; }
	.footer-grid { gap: 1.25rem; padding-top: 2.5rem; padding-bottom: 2.25rem; }
	.footer .brand-sm { margin-bottom: .5rem; }
	.footer .brand-sm .logo { height: 2.375rem; }
}

@media (prefers-reduced-motion: reduce) {
	.js .nav__menu,
	.nav__toggle-icon::before,
	.nav__toggle-icon::after { transition: none; }
}
