/*
Theme Name: Matlyn Lakeshore
Description: A clean, photo-first theme for Matlyn Nature Photography, built around the Matlyn Species life list. Works best with the Matlyn Species plugin active.
Version: 1.0.0
Author: Matlyn Nature Photography
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: matlyn-lakeshore
*/

:root {
	--bg: #F6F5F1;
	--surface: #FFFFFF;
	--ink: #1B2A33;
	--muted: #4A5A63;
	--accent: #245E6C;
	--accent-dark: #163F49;
	--accent-soft: #A9C3C9;
	--line: #D6DADB;
	--dark: #1B2A33;
	--on-dark: #D5DEE0;
	--serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
	--radius: 4px;
	--wrap: 1200px;
	--gutter: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto; z-index: 100; background: var(--surface); padding: 10px 14px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.eyebrow { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.section { padding-top: 80px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.section-title { font-size: clamp(32px, 4vw, 44px); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: 3px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; font-family: inherit; }
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }

/* Header */
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 20px; padding-bottom: 20px; }
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 2px; }
.brand:hover { color: var(--ink); }
.brand-name { font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: 0.02em; line-height: 1; }
.brand-tag { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.brand .custom-logo { max-height: 56px; width: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 24px; }
.main-nav li { position: relative; }
.main-nav a { display: block; padding: 12px 0; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-menu-parent > a { color: var(--accent); }
.main-nav .sub-menu { display: none; position: absolute; top: 100%; left: -16px; min-width: 200px; background: var(--surface); box-shadow: 0 8px 24px rgba(27, 42, 51, .12); border-radius: var(--radius); padding: 8px 16px; z-index: 20; flex-direction: column; gap: 0; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.main-nav .nav-contact > a { color: var(--accent); }

/* Photos & placeholders */
.photo { background: #6F8A82; border-radius: var(--radius); overflow: hidden; position: relative; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-empty { display: flex; align-items: flex-end; padding: 10px; color: #fff; font-size: 12px; }
.tone-0 { background: #6F8A82; } .tone-1 { background: #8C7B62; } .tone-2 { background: #5F7686; } .tone-3 { background: #7E8A63; }
.tone-4 { background: #93806E; } .tone-5 { background: #5E716B; } .tone-6 { background: #86907F; } .tone-7 { background: #6C7A8C; }

/* Hero */
.hero { position: relative; height: clamp(380px, 56vw, 600px); border-radius: var(--radius); overflow: hidden; background: #5E7A80; display: flex; align-items: flex-end; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-text { position: relative; width: 100%; padding: clamp(24px, 5vw, 56px); background: linear-gradient(0deg, rgba(15, 25, 30, .65), rgba(15, 25, 30, 0)); }
.hero-text h1 { color: #fff; font-weight: 500; font-size: clamp(40px, 6vw, 68px); line-height: 1.02; max-width: 720px; }
.hero-text p { color: #F1F3F2; font-size: 17px; max-width: 600px; margin: 14px 0 0; }

/* Life list card + recent */
.lifelist-row { display: flex; flex-wrap: wrap; gap: 32px; align-items: stretch; }
.lifelist-card { flex: 1 1 300px; background: var(--dark); color: var(--bg); padding: 40px; border-radius: var(--radius); display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.lifelist-card .eyebrow { color: var(--accent-soft); }
.lifelist-num { font-family: var(--serif); font-size: clamp(72px, 9vw, 104px); line-height: .9; font-weight: 500; display: block; }
.lifelist-label { color: var(--on-dark); font-size: 16px; }
.lifelist-card a { color: #fff; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--accent-soft); align-self: flex-start; padding: 10px 0; }
.recent { flex: 999 1 560px; min-width: 0; }

/* Species cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px 20px; }
.card-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.species-card { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 4px; }
.species-card:hover { color: var(--ink); }
.species-card .photo { aspect-ratio: 4 / 3; margin-bottom: 6px; }
.species-card img { transition: transform .4s ease; }
.species-card:hover img { transform: scale(1.04); }
.species-name { font-weight: 600; font-size: 15px; line-height: 1.35; }
.species-card:hover .species-name { color: var(--accent); }
.sci { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--muted); line-height: 1.25; }
.species-card[hidden], .letter-section[hidden] { display: none; }

/* Letter bar */
.letter-bar { display: flex; flex-wrap: wrap; gap: 2px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 0; margin-bottom: 32px; }
.letter-bar a, .letter-bar span, .letter-bar button { min-width: 36px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; font: 600 14px var(--sans); text-decoration: none; color: var(--accent); background: none; border: 0; border-radius: 3px; cursor: pointer; }
.letter-bar span, .letter-bar button:disabled { color: #8E999D; cursor: default; }
.letter-bar button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.letter-bar a:hover, .letter-bar button:not(:disabled):hover { background: #E6ECEC; }
.letter-bar button[aria-pressed="true"]:hover { background: var(--accent-dark); }

/* Search */
.search-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); min-width: 260px; }
.search-field input { font: inherit; font-size: 15px; padding: 12px 14px; border: 1px solid #B8C2C5; border-radius: 3px; background: var(--surface); color: var(--ink); width: 100%; }
.home-search { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }

/* Category tiles */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.tile { position: relative; height: 300px; border-radius: var(--radius); overflow: hidden; display: flex; align-items: flex-end; text-decoration: none; background: #5E7A80; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover img { transform: scale(1.04); }
.tile-label { position: relative; width: 100%; padding: 20px; color: #fff; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; background: linear-gradient(0deg, rgba(10, 20, 25, .7), rgba(10, 20, 25, 0)); }
.tile-label strong { font-family: var(--serif); font-size: 32px; font-weight: 600; }
.tile-label span { font-size: 13px; color: #E4EAEB; }

/* About */
.about { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 88px; padding-bottom: 88px; }
.about .photo { flex: 1 1 280px; height: 380px; }
.about-text { flex: 999 1 480px; display: flex; flex-direction: column; gap: 16px; }
.about-text h2 { font-weight: 500; font-size: clamp(36px, 4vw, 44px); }
.about-text p { font-size: 16px; line-height: 1.7; color: #33434C; margin: 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Gallery (A–Z) page */
.page-head { padding-top: 32px; display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; }
.page-head h1 { font-size: clamp(40px, 5vw, 56px); }
.page-head p { color: var(--muted); font-size: 17px; margin: 8px 0 0; }
.count-badge { display: flex; align-items: baseline; gap: 10px; background: var(--dark); color: var(--on-dark); padding: 14px 22px; border-radius: var(--radius); }
.count-badge strong { font-family: var(--serif); font-size: 40px; font-weight: 500; color: #fff; line-height: 1; }
.filters { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: flex-end; margin: 32px 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 600 14px var(--sans); min-height: 40px; padding: 8px 16px; border-radius: 20px; border: 1px solid #B8C2C5; background: var(--surface); color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 6px; }
.result-line { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.link-btn { background: none; border: 0; padding: 8px 0; font: 600 14px var(--sans); color: var(--accent); text-decoration: underline; cursor: pointer; }
.letter-section { padding-top: 12px; padding-bottom: 28px; scroll-margin-top: 16px; }
.letter-heading { font-size: 40px; font-weight: 500; color: var(--accent); border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 20px; }
.empty-msg { padding: 48px; text-align: center; background: var(--surface); border-radius: var(--radius); color: var(--muted); }

/* Single species */
.crumbs { padding-top: 24px; font-size: 14px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.species-layout { display: flex; flex-wrap: wrap; gap: 40px; padding-top: 20px; align-items: flex-start; }
.species-media { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.species-main { display: block; border-radius: var(--radius); overflow: hidden; background: #6F8A82; }
.species-main img { width: 100%; height: auto; max-height: 78vh; object-fit: contain; background: #1B2A33; }
.species-main.photo-empty { aspect-ratio: 3 / 2; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.thumbs button { padding: 0; border: 2px solid transparent; border-radius: var(--radius); overflow: hidden; cursor: pointer; aspect-ratio: 1; background: #ddd; }
.thumbs button[aria-current="true"] { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.species-info { flex: 1 1 300px; display: flex; flex-direction: column; gap: 14px; }
.group-chip { align-self: flex-start; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-dark); background: #DCE7E9; padding: 5px 10px; border-radius: 12px; text-decoration: none; }
.species-info h1 { font-size: clamp(38px, 4vw, 48px); font-weight: 600; }
.species-info .sci { font-size: 22px; margin-top: -6px; }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 15px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.notes { font-size: 16px; line-height: 1.7; color: #33434C; }
.ref-links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-weight: 600; font-size: 15px; }
.prev-next { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 56px; padding-top: 20px; padding-bottom: 72px; }
.prev-next a { text-decoration: none; display: flex; flex-direction: column; max-width: 48%; }
.prev-next small { color: var(--muted); font-size: 13px; }
.prev-next strong { font-family: var(--serif); font-size: 24px; font-weight: 600; }
.prev-next .next { text-align: right; margin-left: auto; }

/* Ordinary pages (Equipment, Contact, Privacy) */
.content-page { max-width: 820px; padding-top: 32px; padding-bottom: 80px; }
.content-page h1 { font-size: clamp(40px, 5vw, 56px); margin-bottom: 24px; }
.entry-content { font-size: 17px; line-height: 1.75; }
.entry-content h2 { font-size: 32px; margin: 1.4em 0 .4em; }
.entry-content h3 { font-size: 24px; margin: 1.2em 0 .4em; }
.entry-content img { border-radius: var(--radius); }
.entry-content input, .entry-content textarea, .entry-content select { font: inherit; padding: 10px 12px; border: 1px solid #B8C2C5; border-radius: 3px; max-width: 100%; }
.entry-content input[type=submit], .entry-content button { background: var(--accent); color: #fff; border: 0; padding: 12px 22px; font-weight: 600; cursor: pointer; border-radius: 3px; }
.alignwide { max-width: none; }

/* Footer */
.site-footer { background: var(--dark); color: var(--on-dark); margin-top: 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; padding-top: 48px; padding-bottom: 48px; font-size: 14px; line-height: 1.8; }
.site-footer a { color: var(--on-dark); }
.site-footer a:hover { color: #fff; }
.footer-brand { font-family: var(--serif); font-size: 26px; color: #fff; }
.footer-col { display: flex; flex-direction: column; }
.footer-col strong { color: #fff; margin-bottom: 6px; }
.footer-fine { max-width: 340px; font-size: 12px; line-height: 1.6; color: #A9B6BA; margin: 0; }
.footer-fine a { color: var(--accent-soft); }

@media (max-width: 640px) {
	:root { --gutter: 16px; }
	.section { padding-top: 56px; }
	.lifelist-card { padding: 28px; }
	.about { padding-top: 56px; padding-bottom: 56px; gap: 28px; }
	.about .photo { height: 280px; }
	.main-nav ul { gap: 0 18px; }
	.prev-next a { max-width: 100%; }
	.search-field { min-width: 0; width: 100%; }
}
