/*
Theme Name: sevsphotos
Theme URI: https://sevsphotos.com
Author: Severin Hess
Description: Light magazine theme for travel photography. Travels, Places, Themes, About, Instagram.
Version: 1.0.2
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: sevsphotos
*/

:root {
	--ink: #111;
	--muted: #6b6b6b;
	--line: #e6e3de;
	--paper: #fff;
	--soft: #f6f4f0;
	--accent: #b3261e;
	--serif: "DM Serif Display", Georgia, serif;
	--sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.screen-reader-text, .skip {
	position: absolute; left: -9999px; top: 0;
}
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.block { padding: 56px 0; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.block-head h2 { margin: 0; }
.muted, .muted-link { color: var(--muted); font-size: .9rem; }
.muted-link:hover, .link:hover { color: var(--accent); }
.link { font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; }
.kicker { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.lead, .lead-text { color: var(--muted); font-size: 1.05rem; max-width: 60ch; }
.crumbs { font-size: .8rem; color: var(--muted); margin-bottom: 16px; }
.page-head { padding-top: 48px; padding-bottom: 48px; }

/* placeholder when no image */
.ph { display: block; width: 100%; height: 100%; min-height: 160px; background: linear-gradient(135deg, #e8e4dc, #d8d3c8); }

/* header */
.site-header {
	display: flex; align-items: center; justify-content: space-between; gap: 24px;
	max-width: var(--wrap); margin: 0 auto; padding: 20px 24px;
}
.brand { font-family: var(--serif); font-size: 1.7rem; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.site-nav { display: flex; align-items: center; gap: 28px; }
.nav-list { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-list a { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.nav-list .current-menu-item > a, .nav-list a:hover { color: var(--accent); }
.btn-insta, .btn-dark {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 9px 16px; border-radius: 999px; font-size: .85rem; font-weight: 500;
}
.btn-insta { border: 1px solid var(--ink); }
.btn-insta:hover { background: var(--ink); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--accent); color: #fff; }

/* footer */
.site-footer {
	border-top: 1px solid var(--line); margin-top: 40px; padding: 32px 24px;
	display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center;
	max-width: var(--wrap); margin-left: auto; margin-right: auto; font-size: .85rem; color: var(--muted);
}
.footer-links { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }

/* hero */
.hero { position: relative; height: 70vh; min-height: 420px; max-height: 720px; background: #222; overflow: hidden; }
.hero .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-card {
	position: absolute; left: max(24px, calc((100% - var(--wrap)) / 2 + 24px)); bottom: 40px;
	background: var(--paper); padding: 28px 32px; max-width: 460px;
}
.hero-card h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 12px; }
.hero-card .lead { margin-bottom: 14px; font-size: .95rem; }

/* grids and cards */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.card { display: block; }
.card .img { aspect-ratio: 3 / 2; overflow: hidden; background: var(--soft); margin-bottom: 14px; }
.card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .img img { transform: scale(1.03); }
.card h3 { margin-bottom: 6px; }

/* places: wide strips */
.stack { display: flex; flex-direction: column; gap: 28px; }
.place-wide { display: block; }
.place-wide .img { height: 280px; overflow: hidden; background: var(--soft); }
.place-wide .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.place-wide:hover .img img { transform: scale(1.02); }
.place-wide .row, .place-card .row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 12px; }
.place-wide .name, .place-card .name { font-family: var(--serif); font-size: 1.4rem; }
.place-wide small, .place-card small { color: var(--muted); margin-left: 8px; font-size: .85rem; }
.act { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.place-card { display: block; }
.place-card .img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--soft); }
.place-card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.place-card:hover .img img { transform: scale(1.03); }
.place-card .desc { color: var(--muted); font-size: .9rem; margin: 4px 0 0; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 32px; }
.chips a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .85rem; }
.chips a:hover { border-color: var(--accent); }
.chips a.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* instagram band */
.insta-band { background: var(--soft); padding: 56px 0; }
.insta-band .wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: center; }
.insta-text p { color: var(--muted); }
.insta-feed { min-height: 120px; }

/* story and galleries */
.story-head { padding-top: 48px; max-width: 900px; }
.story-cover { max-width: 1400px; margin: 24px auto 0; padding: 0 24px; }
.story-cover img { width: 100%; max-height: 80vh; object-fit: cover; }
.story-body, .story { max-width: 760px; margin: 32px auto; }
.gallery-block .story, .gallery-block.story { max-width: none; }
.story img { height: auto; }
.story figure { margin: 2em 0; }
.story figcaption { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.tags { max-width: 760px; margin: 0 auto 32px; font-size: .85rem; color: var(--muted); }
.tags a { margin-right: 10px; }
.post-nav { display: flex; justify-content: space-between; gap: 24px; max-width: 760px; margin: 40px auto; padding: 20px 0; border-top: 1px solid var(--line); font-size: .9rem; }

/* NextGEN overrides */
.ngg-galleryoverview { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; width: 100% !important; margin: 24px 0; }
.ngg-galleryoverview .ngg-gallery-thumbnail-box { float: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; }
.ngg-galleryoverview .ngg-gallery-thumbnail { float: none !important; width: 100% !important; margin: 0 !important; }
.ngg-galleryoverview .ngg-gallery-thumbnail a { display: block; aspect-ratio: 1 / 1; overflow: hidden; }
.ngg-galleryoverview .ngg-gallery-thumbnail img { width: 100% !important; height: 100% !important; object-fit: cover; border: 0 !important; padding: 0 !important; margin: 0 !important; transition: transform .4s; }
.ngg-galleryoverview .ngg-gallery-thumbnail img:hover { transform: scale(1.04); }
.ngg-galleryoverview .ngg-clear, .ngg-galleryoverview br { display: none; }
.ngg-navigation { margin: 16px 0; font-size: .9rem; }

/* about */
.about { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.about-img { aspect-ratio: 4 / 5; overflow: hidden; background: var(--soft); }
.about-img img { width: 100%; height: 100%; object-fit: cover; }
.about .story-body { margin: 24px 0; max-width: none; }
.contact { margin-top: 32px; }

/* pagination, comments, search */
.pagination, .navigation.pagination { margin: 40px 0; display: flex; gap: 10px; justify-content: center; }
.page-numbers { padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: .9rem; }
.page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }
.comments { max-width: 760px; margin: 40px auto; }
.comment-list { list-style: none; padding: 0; }
.comment-list li { padding: 16px 0; border-top: 1px solid var(--line); }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea,
.search-form input[type="search"] {
	width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; font: inherit;
}
.search-form { display: flex; gap: 8px; max-width: 420px; }
.search-form button, .comment-form input[type="submit"] {
	background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 10px 18px; font: inherit; cursor: pointer;
}
.search-form button:hover, .comment-form input[type="submit"]:hover { background: var(--accent); }

/* responsive */
@media (max-width: 900px) {
	.grid { grid-template-columns: repeat(2, 1fr); }
	.insta-band .wrap, .about { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.site-header { flex-direction: column; align-items: flex-start; gap: 12px; }
	.site-nav { flex-direction: column; align-items: flex-start; gap: 12px; }
	.nav-list { gap: 16px; }
	.grid, .grid-2 { grid-template-columns: 1fr; }
	.hero { height: 60vh; }
	.hero-card { left: 16px; right: 16px; bottom: 16px; padding: 20px; max-width: none; }
	.place-wide .img { height: 200px; }
	.block { padding: 36px 0; }
	.ngg-galleryoverview { grid-template-columns: repeat(2, 1fr); }
}

/* fixes: spans used as blocks, section padding, full-width instagram band */
.img, .kicker, .lead { display: block; }
.wrap.block { padding: 56px 24px; }
.insta-band {
	display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: center;
	max-width: none; background: var(--soft); padding: 56px max(24px, calc((100% - var(--wrap)) / 2 + 24px));
	margin-top: 24px;
}
.site-footer { margin-top: 0; }
@media (max-width: 900px) { .insta-band { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .wrap.block { padding: 36px 16px; } .insta-band { padding: 36px 16px; } }

/* WordPress gallery block (new posts) */
.story .wp-block-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 24px 0; }
.story .wp-block-gallery figure { margin: 0; width: auto !important; }
.story .wp-block-gallery img { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.story .wp-block-image { margin: 2em 0; }
