/*
Theme Name: Langøya
Author: Langøya Environmental Education Project
Description: An editorial, accessible theme for exploring the environment and learning about Langøya, Norway.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: langoya
*/

:root {
	--color-forest: #183e35;
	--color-green: #477b68;
	--color-sage: #dce9e1;
	--color-sand: #f5f3ea;
	--color-white: #fff;
	--color-ink: #1e302b;
	--color-muted: #64736c;
	--color-line: #d9e1dc;
	--font-body: "Aptos", "Segoe UI", sans-serif;
	--font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
	--content-width: 1200px;
	--radius-card: 22px;
	--shadow-soft: 0 18px 60px rgb(24 62 53 / 9%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body {
	margin: 0;
	background: var(--color-white);
	color: var(--color-ink);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--color-forest); text-underline-offset: .2em; }
a:hover { color: var(--color-green); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #ad7445; outline-offset: 4px; }
.screen-reader-text {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
	clip: auto; width: auto; height: auto; margin: 1rem; padding: 1rem;
	background: var(--color-white); z-index: 100000;
}
.container { width: min(var(--content-width), calc(100% - 3rem)); margin-inline: auto; }
.section { padding-block: clamp(4.5rem, 8vw, 7.5rem); }
.section--sand { background: var(--color-sand); }
.section--sage { background: var(--color-sage); }
.eyebrow {
	display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 1rem;
	color: var(--color-green); font-size: .76rem; font-weight: 750; letter-spacing: .13em;
	line-height: 1.3; text-transform: uppercase;
}
.eyebrow::before { display: block; width: 22px; height: 1px; background: currentColor; content: ""; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--color-forest); }
h1, h2 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.045em; }
h1 { max-width: 760px; margin-bottom: 1.4rem; font-size: clamp(3.15rem, 6.7vw, 6.15rem); line-height: .99; }
h2 { margin-bottom: 1rem; font-size: clamp(2.35rem, 4.7vw, 4.25rem); line-height: 1.04; }
h3 { margin-bottom: .65rem; font-size: 1.18rem; line-height: 1.35; }
.section-intro { max-width: 640px; margin-bottom: 2.5rem; color: var(--color-muted); font-size: 1.08rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2.5rem; }
.section-heading h2 { max-width: 670px; margin-bottom: 0; }
.section-heading__copy { max-width: 420px; margin-bottom: .2rem; color: var(--color-muted); }
.button {
	display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: .65rem;
	padding: .8rem 1.2rem; border: 1px solid transparent; border-radius: 999px;
	font-size: .92rem; font-weight: 700; line-height: 1.2; text-decoration: none;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button--primary { background: var(--color-forest); color: var(--color-white); }
.button--primary:hover { background: var(--color-green); color: var(--color-white); }
.button--outline { border-color: rgb(24 62 53 / 25%); color: var(--color-forest); }
.button--outline:hover { border-color: var(--color-forest); background: var(--color-white); color: var(--color-forest); }
.text-link { display: inline-flex; align-items: center; gap: .55rem; color: var(--color-forest); font-size: .92rem; font-weight: 750; text-decoration: none; }
.text-link::after { content: "↗"; font-size: 1.1em; transition: transform .2s ease; }
.text-link:hover::after { transform: translate(2px, -2px); }

/* Site header and keyboard-friendly navigation. */
.site-header { position: relative; z-index: 20; background: var(--color-white); }
.header-inner {
	display: flex; min-height: 88px; align-items: center; justify-content: space-between; gap: 2rem;
}
.site-brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--color-forest); text-decoration: none; }
.site-brand__mark {
	display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%;
	background: var(--color-sage); color: var(--color-forest);
}
.site-brand__mark svg { width: 23px; height: 23px; }
.site-brand__name { display: block; font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; line-height: 1.1; }
.site-brand__tagline { display: block; margin-top: .25rem; color: var(--color-muted); font-size: .7rem; letter-spacing: .04em; }
.primary-navigation { display: flex; align-items: center; gap: 1.8rem; }
.primary-navigation ul { display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.8rem); margin: 0; padding: 0; list-style: none; }
.primary-navigation li { margin: 0; }
.primary-navigation a { color: var(--color-ink); font-size: .86rem; font-weight: 650; text-decoration: none; }
.primary-navigation a:hover, .primary-navigation .current-menu-item > a { color: var(--color-green); }
.menu-toggle { display: none; }

/* Home hero. */
.hero { overflow: hidden; padding-block: clamp(4.25rem, 8vw, 7.7rem) clamp(4.5rem, 8vw, 7.5rem); background: var(--color-sand); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(380px, .97fr); align-items: center; gap: clamp(3rem, 7vw, 7rem); }
.hero-copy { position: relative; z-index: 1; }
.hero-copy .eyebrow { margin-bottom: 1.4rem; }
.hero-copy h1 span { color: var(--color-green); }
.hero-copy__intro { max-width: 550px; margin-bottom: 2rem; color: #52645d; font-size: clamp(1.08rem, 1.5vw, 1.24rem); line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-note { display: flex; align-items: center; gap: .55rem; margin: 2rem 0 0; color: var(--color-muted); font-size: .79rem; }
.hero-note svg { flex: 0 0 auto; width: 17px; height: 17px; color: var(--color-green); }
.photo-figure { position: relative; margin: 0; }
.photo-figure--topic { min-height: 260px; overflow: hidden; border-radius: 18px; background: var(--color-sage); }
.photo-figure--topic:not(.photo-figure--placeholder) { aspect-ratio: 4 / 3; }
.photo-figure--topic .photo-figure__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-photo {
	min-height: 440px; align-self: stretch; overflow: hidden; border: 1px solid rgb(24 62 53 / 9%);
	border-radius: 48% 48% 25px 25px / 43% 43% 25px 25px; background: var(--color-sage);
	box-shadow: var(--shadow-soft); isolation: isolate;
}
.hero-photo .photo-figure__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 52%; }
.photo-figure__caption {
	position: absolute; right: 1rem; bottom: 1rem; left: 1rem; z-index: 1; display: grid; gap: .3rem;
	width: fit-content; max-width: calc(100% - 2rem); padding: .7rem .85rem; border: 1px solid rgb(24 62 53 / 8%);
	border-radius: 10px; background: rgb(255 255 255 / 94%); color: var(--color-muted); font-size: .7rem; line-height: 1.4;
	box-shadow: 0 4px 16px rgb(24 62 53 / 8%);
}
.photo-figure__archive { color: var(--color-forest); font-size: .75rem; font-weight: 750; }
.photo-figure__credit { margin: 0; }
.photo-figure__credit a { color: var(--color-forest); text-decoration-thickness: 1px; }
.photo-figure--placeholder {
	position: relative; display: grid; min-height: 260px; place-items: center; overflow: hidden;
	border: 1px dashed #9bb5a6; border-radius: 18px; background: var(--color-sage); text-align: center;
}
.photo-figure--placeholder::before, .photo-figure--placeholder::after {
	position: absolute; width: 70%; aspect-ratio: 1; border: 1px solid rgb(24 62 53 / 13%); border-radius: 50%; content: "";
}
.photo-figure--placeholder::after { width: 46%; }
.photo-figure__placeholder-copy { position: relative; z-index: 1; max-width: 280px; margin: 1.5rem; padding: .9rem 1rem; border-radius: 10px; background: rgb(255 255 255 / 88%); color: var(--color-forest); font-size: .83rem; }
.photo-figure__placeholder-copy strong { display: block; margin-bottom: .25rem; }
.photo-figure__placeholder-copy p { margin: 0; color: var(--color-muted); font-size: .77rem; }

/* Exploration topics and cards. */
.explore-grid { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: clamp(3rem, 8vw, 8rem); }
.explore-copy h2 { max-width: 520px; }
.explore-copy > p:not(.eyebrow) { max-width: 470px; margin-bottom: 1.6rem; color: var(--color-muted); }
.topic-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin: 0; padding: 0; list-style: none; }
.topic-list a { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; border: 1px solid var(--color-line); border-radius: 14px; background: var(--color-white); color: var(--color-forest); font-weight: 700; text-decoration: none; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.topic-list a:hover { transform: translateY(-2px); border-color: #9eb9aa; box-shadow: 0 10px 30px rgb(24 62 53 / 7%); }
.topic-list a::after { content: "↗"; color: var(--color-green); font-size: 1.15rem; }
.challenge-grid, .activity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.feature-card { display: flex; min-height: 285px; flex-direction: column; align-items: flex-start; padding: clamp(1.35rem, 2.5vw, 2rem); border: 1px solid rgb(24 62 53 / 9%); border-radius: var(--radius-card); background: var(--color-white); }
.feature-card__icon { display: grid; width: 48px; height: 48px; margin-bottom: 2rem; place-items: center; border-radius: 15px; background: var(--color-sage); color: var(--color-forest); }
.feature-card__icon svg { width: 23px; height: 23px; }
.feature-card p { margin-bottom: 1.5rem; color: var(--color-muted); font-size: .94rem; }
.feature-card .text-link { margin-top: auto; }
.challenge-section .section-heading { align-items: end; }

/* Student discoveries band. */
.discovery-band { display: grid; grid-template-columns: 1fr; overflow: hidden; border-radius: 30px; background: var(--color-forest); color: var(--color-white); }
.discovery-band__copy { padding: clamp(2rem, 5vw, 4.5rem); }
.discovery-band__copy .eyebrow { color: #b6d2c3; }
.discovery-band__copy h2 { color: var(--color-white); }
.discovery-band__copy > p:not(.eyebrow) { max-width: 460px; color: #d3e0d9; }
.discovery-band__copy .button { margin-top: .6rem; border-color: rgb(255 255 255 / 45%); color: var(--color-white); }
.discovery-band__copy .button:hover { background: var(--color-white); color: var(--color-forest); }

/* Data highlights avoid invented measurements; this section invites real data. */
.data-panel { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; padding: clamp(2rem, 5vw, 4rem); border: 1px solid var(--color-line); border-radius: 28px; background: var(--color-white); }
.data-panel h2 { max-width: 550px; }
.data-panel__copy > p:not(.eyebrow) { max-width: 500px; color: var(--color-muted); }
.data-panel__empty { padding: 1.5rem; border: 1px dashed #a5b8ac; border-radius: 16px; background: #f8faf8; }
.data-panel__empty strong { display: block; margin-bottom: .4rem; color: var(--color-forest); }
.data-panel__empty p { margin: 0; color: var(--color-muted); font-size: .9rem; }
.data-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin: 1.4rem 0 0; padding: 0; list-style: none; }
.data-topics li { padding: .7rem .8rem; border-radius: 9px; background: var(--color-sand); color: var(--color-forest); font-size: .82rem; font-weight: 650; }
.activity-card { min-height: 235px; background: var(--color-sand); }
.activity-card .feature-card__icon { background: var(--color-white); }
.activity-card .feature-card__icon svg { width: 21px; height: 21px; }
.activity-card p { margin-bottom: 1rem; }

/* Page, archive, and footer styles. */
.page-header { padding-block: clamp(4rem, 8vw, 7rem); background: var(--color-sand); }
.page-header h1 { font-size: clamp(2.8rem, 5vw, 4.7rem); }
.page-content { max-width: 820px; padding-block: 4rem 6rem; }
.page-content > * + * { margin-top: 1.5em; }
.page-content h2, .page-content h3 { margin-top: 2em; }
.entry-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; padding-block: 3rem 6rem; }
.entry-card { padding: 1.5rem; border: 1px solid var(--color-line); border-radius: var(--radius-card); }
.entry-card h2 { margin-bottom: .7rem; font-size: 1.7rem; }
.entry-card__meta { color: var(--color-muted); font-size: .84rem; }
.site-footer { padding-block: 4rem 1.5rem; background: var(--color-forest); color: #d3e0d9; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; padding-bottom: 3rem; }
.footer-brand .site-brand { color: var(--color-white); }
.footer-brand .site-brand__tagline { color: #b6c9bf; }
.footer-brand > p { max-width: 350px; margin-top: 1.2rem; color: #c1d1c8; font-size: .9rem; }
.footer-heading { margin-bottom: 1rem; color: var(--color-white); font-family: var(--font-body); font-size: .86rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.footer-links ul { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: #d3e0d9; font-size: .9rem; text-decoration: none; }
.footer-links a:hover { color: var(--color-white); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1.3rem; border-top: 1px solid rgb(255 255 255 / 18%); color: #b6c9bf; font-size: .78rem; }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: inherit; }
.pagination { padding-block: 1rem 4rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.pagination a, .pagination span { padding: .55rem .85rem; border: 1px solid var(--color-line); border-radius: 8px; text-decoration: none; }
.pagination .current { background: var(--color-forest); color: var(--color-white); }

@media (max-width: 980px) {
	.primary-navigation { gap: 1rem; }
	.primary-navigation ul { gap: 1rem; }
	.primary-navigation a { font-size: .8rem; }
	.header-inner { gap: 1rem; }
	.hero-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr); gap: 2.5rem; }
	.hero-photo { min-height: 390px; }
}
@media (max-width: 760px) {
	.container { width: min(var(--content-width), calc(100% - 2rem)); }
	.header-inner { min-height: 74px; }
	.menu-toggle { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid var(--color-line); border-radius: 50%; background: var(--color-white); color: var(--color-forest); cursor: pointer; }
	.menu-toggle svg { width: 21px; height: 21px; }
	.primary-navigation { position: absolute; top: 100%; right: 0; left: 0; display: none; align-items: stretch; padding: .5rem 1rem 1.25rem; border-top: 1px solid var(--color-line); background: var(--color-white); box-shadow: 0 18px 25px rgb(24 62 53 / 8%); }
	.primary-navigation.is-open { display: flex; }
	.primary-navigation ul { width: min(var(--content-width), 100%); flex-direction: column; align-items: stretch; gap: 0; margin-inline: auto; }
	.primary-navigation li { border-bottom: 1px solid #edf0ed; }
	.primary-navigation a { display: block; padding: .8rem .25rem; font-size: .95rem; }
	.hero { padding-top: 4rem; }
	.hero-grid, .explore-grid { grid-template-columns: 1fr; }
	.hero-grid { gap: 2.5rem; }
	.hero-photo { min-height: min(430px, 88vw); }
	.section-heading { align-items: flex-start; flex-direction: column; gap: .8rem; }
	.challenge-grid, .activity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.discovery-band, .data-panel { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
	h1 { font-size: clamp(3rem, 14vw, 4.25rem); }
	.hero-actions { align-items: stretch; flex-direction: column; }
	.hero-actions .button { width: 100%; }
	.hero-photo { min-height: 330px; }
	.topic-list, .challenge-grid, .activity-grid, .data-topics, .entry-list { grid-template-columns: 1fr; }
	.feature-card { min-height: 240px; }
	.feature-card__icon { margin-bottom: 1.3rem; }
	.discovery-band { border-radius: 22px; }
	.footer-grid { grid-template-columns: 1fr; gap: 2rem; }
	.footer-brand { grid-column: auto; }
	.footer-bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
