/*
Theme Name: SIOL
Theme URI: https://example.com/siol
Author: SIOL
Description: An editorial, field-notebook style theme for SIOL. Provides a composed landing page, a contact page and a long-form story page, with content driven from the WordPress editor.
Version: 0.1.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: siol
Tags: one-column, custom-menu, custom-logo, editor-style, full-width-template, block-styles
*/

/* -----------------------------------------------------------------------------
 * 1. Design tokens
 *    Colours sampled directly from the design mockups.
 * -------------------------------------------------------------------------- */

:root {
	/* Ink */
	--siol-ink: #1d2f26;
	--siol-text: #4e5a4e;
	--siol-muted: #767c6b;

	/* Brand green */
	--siol-green: #355037;
	--siol-green-dark: #2a4029;
	--siol-green-soft: rgba(53, 80, 55, 0.08);

	/* Paper */
	--siol-paper: #f1ebdc;
	--siol-paper-alt: #f6f1e7;
	--siol-paper-foot: #f2eee2;
	--siol-card: #f7f3ea;

	/* Lines */
	--siol-rule: rgba(29, 47, 38, 0.14);
	--siol-rule-strong: rgba(29, 47, 38, 0.28);

	/* Type */
	--siol-font-display: "EB Garamond", "Iowan Old Style", "Palatino Linotype",
		Palatino, Georgia, "Times New Roman", serif;
	--siol-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
		Roboto, "Helvetica Neue", Arial, sans-serif;

	--siol-step--1: 0.8125rem;
	--siol-step-0: 1.0625rem;
	--siol-step-1: 1.1875rem;
	--siol-step-2: clamp(1.5rem, 2.4vw, 1.875rem);
	--siol-step-3: clamp(2rem, 4.2vw, 3rem);
	--siol-step-4: clamp(2.625rem, 5.6vw, 4.75rem);

	/* Space */
	--siol-gutter: clamp(1.25rem, 4vw, 2.5rem);
	--siol-container: 1240px;
	--siol-measure: 34rem;
	--siol-section-y: clamp(4rem, 8vw, 7.5rem);

	/* Motion */
	--siol-ease: cubic-bezier(0.32, 0.72, 0.28, 1);
	--siol-speed: 240ms;

	/* Header height, also used as scroll-padding and drawer offset */
	--siol-header-h: 4.75rem;
}

/* -----------------------------------------------------------------------------
 * 2. Reset and base
 * -------------------------------------------------------------------------- */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: calc(var(--siol-header-h) + 1rem);
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background-color: var(--siol-paper);
	color: var(--siol-text);
	font-family: var(--siol-font-body);
	font-size: var(--siol-step-0);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	font-feature-settings: "kern" 1;
}

img,
svg,
picture,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: var(--siol-green);
	text-decoration-color: var(--siol-rule-strong);
	text-underline-offset: 0.2em;
}

a:hover {
	color: var(--siol-green-dark);
	text-decoration-color: currentColor;
}

:where(button, input, select, textarea) {
	font: inherit;
	color: inherit;
}

:focus-visible {
	outline: 2px solid var(--siol-green);
	outline-offset: 3px;
	border-radius: 2px;
}

hr {
	height: 0;
	margin-block: 2.5rem;
	border: 0;
	border-top: 1px solid var(--siol-rule);
}

/* -----------------------------------------------------------------------------
 * 3. Typography
 * -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
	margin: 0 0 0.5em;
	color: var(--siol-ink);
	font-family: var(--siol-font-display);
	font-weight: 500;
	line-height: 1.08;
	letter-spacing: -0.012em;
	text-wrap: balance;
}

h1 {
	font-size: var(--siol-step-4);
}

h2 {
	font-size: var(--siol-step-3);
}

h3 {
	font-size: var(--siol-step-2);
	line-height: 1.2;
}

h4 {
	font-family: var(--siol-font-body);
	font-size: var(--siol-step-1);
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.35;
}

p {
	margin: 0 0 1.15em;
}

em,
i {
	font-style: italic;
}

strong,
b {
	font-weight: 600;
	color: var(--siol-ink);
}

blockquote {
	margin: 2.5rem 0;
	padding: 0;
	border: 0;
	color: var(--siol-ink);
	font-family: var(--siol-font-display);
	font-size: var(--siol-step-2);
	font-style: italic;
	line-height: 1.3;
	text-wrap: balance;
}

blockquote p {
	margin-bottom: 0.6em;
}

blockquote cite {
	display: block;
	color: var(--siol-muted);
	font-family: var(--siol-font-body);
	font-size: var(--siol-step--1);
	font-style: normal;
	letter-spacing: 0.02em;
}

code,
pre {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.9em;
}

/*
 * Small letter-spaced uppercase label above a heading, as in the mockups.
 * Authored as a paragraph with the "Eyebrow" block style.
 */
.siol-eyebrow,
.siol-prose p.is-style-siol-eyebrow,
p.is-style-siol-eyebrow {
	margin: 0 0 1.25rem;
	color: var(--siol-muted);
	font-family: var(--siol-font-body);
	font-size: 0.7rem;
	font-weight: 500;
	letter-spacing: 0.2em;
	line-height: 1.4;
	text-transform: uppercase;
}

/* An <em> in a display heading drops to its own line, set in italics. */
.siol-display-italic,
.siol-prose :where(h1, h2, h3) em,
.siol-page-header__title em {
	display: block;
	font-style: italic;
	font-weight: 400;
}

/* Intro paragraph beneath a heading, authored with the "Lede" block style. */
.siol-lede,
.siol-prose p.is-style-siol-lede,
p.is-style-siol-lede {
	max-width: var(--siol-measure);
	margin: 0 0 2rem;
	font-size: var(--siol-step-1);
	line-height: 1.6;
}

.siol-handwritten {
	color: var(--siol-muted);
	font-family: var(--siol-font-display);
	font-size: var(--siol-step--1);
	font-style: italic;
	line-height: 1.5;
}

/* -----------------------------------------------------------------------------
 * 4. Layout primitives
 * -------------------------------------------------------------------------- */

.siol-container {
	width: 100%;
	max-width: var(--siol-container);
	margin-inline: auto;
	padding-inline: var(--siol-gutter);
}

.siol-container--narrow {
	max-width: 46rem;
}

.siol-site {
	display: flex;
	min-height: 100vh;
	flex-direction: column;
}

.siol-main {
	flex: 1 0 auto;
}

.siol-skip-link {
	position: absolute;
	left: -9999px;
	z-index: 100;
	padding: 0.75rem 1.25rem;
	background: var(--siol-green);
	color: #fff;
	border-radius: 0 0 0.5rem 0;
	text-decoration: none;
}

.siol-skip-link:focus {
	left: 0;
	top: 0;
	color: #fff;
}

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

/* -----------------------------------------------------------------------------
 * 5. Buttons
 * -------------------------------------------------------------------------- */

.siol-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.85rem 1.6rem;
	border: 1px solid transparent;
	border-radius: 999px;
	font-family: var(--siol-font-body);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--siol-speed) var(--siol-ease),
		border-color var(--siol-speed) var(--siol-ease),
		color var(--siol-speed) var(--siol-ease),
		transform var(--siol-speed) var(--siol-ease);
}

.siol-btn:hover {
	transform: translateY(-1px);
}

.siol-btn--primary {
	background-color: var(--siol-green);
	color: #f7f4ec;
}

.siol-btn--primary:hover {
	background-color: var(--siol-green-dark);
	color: #fff;
}

.siol-btn--ghost {
	background-color: transparent;
	border-color: var(--siol-rule-strong);
	color: var(--siol-ink);
}

.siol-btn--ghost:hover {
	background-color: var(--siol-green-soft);
	border-color: var(--siol-green);
	color: var(--siol-ink);
}

.siol-btn__arrow {
	width: 1rem;
	flex: none;
	transition: transform var(--siol-speed) var(--siol-ease);
}

.siol-btn:hover .siol-btn__arrow {
	transform: translateX(3px);
}

.siol-btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 0.5rem;
}

/* The CTA nav menu renders as a list; strip list affordances so the items
   read as a plain row of pills. */
.siol-btn-row--menu {
	padding: 0;
	list-style: none;
}

.siol-btn-row--menu li {
	display: flex;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
