/*
Theme Name: Traveloger
Theme URI: https://traveloger.example.com
Author: Traveloger
Description: Editorial travel theme for a round-the-world cyclist, author and guide. Includes a cinematic front page, journal, books, events, portfolio gallery and contact layouts.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: traveloger
Tags: blog, travel, portfolio, custom-menu, featured-images, editorial
*/

/* ---------- Tokens ---------- */
:root {
  --paper: #fbfaf6;
  --ink: #2b2924;
  --ochre: #c58a45;
  --pine: #33513f;
  --denim: #6f8ca5;
  --background: var(--paper);
  --foreground: var(--ink);
  --secondary: #f2f0ea;
  --muted-foreground: #6f6a60;
  --border: rgba(43, 41, 36, 0.12);
  --font-display: "Bebas Neue", Impact, sans-serif;
  --font-serif: "Fraunces", Georgia, serif;
  --font-sans: "Public Sans", system-ui, sans-serif;
  --wrap: 72rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--ochre); }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.wrap-narrow { max-width: 56rem; margin: 0 auto; padding: 0 1.5rem; }
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: .01em;
  line-height: .92;
  text-transform: uppercase;
}
.eyebrow {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ochre);
}
.muted { color: var(--muted-foreground); }
.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: 1rem; left: 1rem; z-index: 200;
  background: var(--ink); color: var(--paper); padding: .75rem 1rem; width: auto; height: auto; clip: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .25s ease, color .25s ease;
}
.btn-solid { background: var(--ochre); color: #fff; }
.btn-solid:hover { background: var(--paper); color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--ochre); color: #fff; }
.btn-outline { border-color: var(--foreground); }
.btn-outline:hover { background: var(--foreground); color: var(--background); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  background: rgba(251, 250, 246, .7);
  backdrop-filter: blur(4px);
  transition: background-color .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.site-header.is-scrolled {
  border-color: var(--border);
  background: rgba(251, 250, 246, .95);
  box-shadow: 0 1px 20px -8px rgba(43, 41, 36, .35);
  backdrop-filter: blur(12px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem;
  height: 6rem; transition: height .3s ease;
}
.site-brand {
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: .18em; font-size: 2.25rem; line-height: 1;
  transition: font-size .3s ease;
}
.site-header.is-scrolled .header-inner { height: 3.5rem; }
.site-header.is-scrolled .site-brand { font-size: 1.5rem; }

.main-nav { display: flex; align-items: center; gap: 2rem; }
.main-nav ul { display: flex; align-items: center; gap: 2rem; }
.main-nav a {
  position: relative; display: inline-block;
  font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted-foreground);
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 100%; height: 1px; background: var(--ochre);
  transform: scaleX(0); transform-origin: right; transition: transform .3s ease;
}
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--foreground); }
.main-nav a:hover::after, .main-nav .current-menu-item > a::after { transform: scaleX(1); transform-origin: left; }
.header-cta { border: 1px solid var(--foreground); padding: .6rem 1rem; }
.header-cta:hover { background: var(--foreground); color: var(--background); }
.header-cta::after { display: none; }

.menu-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; color: inherit; }
.mobile-nav { display: none; border-top: 1px solid var(--border); background: var(--background); padding: .5rem 1.5rem 1rem; }
.mobile-nav.is-open { display: block; }
.mobile-nav a { display: block; padding: .75rem 0; font-size: .875rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .menu-toggle { display: block; }
  .header-inner { height: 4rem; }
  .site-brand { font-size: 1.5rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; }
.hero img { height: 82vh; width: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(43,41,36,.85), rgba(43,41,36,.25) 55%, transparent);
}
.hero-content { position: absolute; inset-inline: 0; bottom: 0; padding-bottom: 3.5rem; }
.hero-kicker { font-size: .875rem; font-weight: 600; letter-spacing: .25em; text-transform: uppercase; color: var(--ochre); }
.hero h1 { font-size: clamp(2.75rem, 8vw, 6rem); color: var(--paper); margin-top: 1.25rem; max-width: 48rem; }
.hero p { margin-top: 1.5rem; max-width: 34rem; font-size: 1.125rem; color: rgba(251,250,246,.85); }
.hero .btn { margin-top: 2rem; }

/* ---------- Page hero ---------- */
.page-hero { border-bottom: 1px solid var(--border); }
.page-hero .inner { padding: 5rem 0; }
.page-hero h1 { font-size: clamp(2.75rem, 6vw, 4.5rem); margin-top: 1.25rem; }
.page-hero p { margin-top: 1.5rem; max-width: 42rem; font-size: 1.125rem; color: var(--muted-foreground); }

/* ---------- Sections ---------- */
.section { padding: 5rem 0; }
.section-tight { padding: 3rem 0; }
.section-alt { background: var(--secondary); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-dark { background: var(--ink); color: var(--paper); }
.section-dark .muted { color: rgba(251,250,246,.7); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-head h2 { font-size: 2.5rem; }
.link-italic { font-family: var(--font-serif); font-style: italic; border-bottom: 1px solid var(--ochre); padding-bottom: .25rem; }

/* ---------- Stats ---------- */
.stats { background: var(--pine); color: var(--paper); }
.stats .grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; padding: 3rem 0; text-align: center; }
.stats .value { font-family: var(--font-display); font-size: 2.5rem; line-height: 1; }
.stats .label { margin-top: .35rem; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; opacity: .7; }
@media (min-width: 768px) { .stats .grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Featured in ---------- */
.featured-in { border-bottom: 1px solid var(--border); }
.featured-in .inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .75rem 2.5rem; padding: 2rem 0;
}
.featured-in span.name { font-family: var(--font-serif); font-size: 1.125rem; color: var(--muted-foreground); }

/* ---------- Grids & cards ---------- */
.grid-3 { display: grid; gap: 3rem; }
.grid-2 { display: grid; gap: 3.5rem; }
.grid-gap-sm { gap: 1rem; }
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}
.media { overflow: hidden; }
.media img { transition: transform .7s ease; width: 100%; object-fit: cover; }
.group:hover .media img { transform: scale(1.05); }
.ratio-1-1 img { aspect-ratio: 1/1; }
.ratio-4-5 img { aspect-ratio: 4/5; }
.ratio-4-3 img { aspect-ratio: 4/3; }
.ratio-2-3 img { aspect-ratio: 2/3; }
.card-label { margin-top: 1.25rem; font-family: var(--font-display); font-size: 1.5rem; }
.group:hover .card-label, .group:hover .entry-title a { color: var(--ochre); }
.entry-meta { margin-top: 1.25rem; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--denim); }
.entry-title { margin-top: .5rem; font-size: 1.5rem; line-height: 1.3; }
.entry-excerpt { margin-top: .75rem; font-size: .875rem; color: var(--muted-foreground); }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .75rem; }
.filters a {
  border: 1px solid var(--border); color: var(--muted-foreground);
  padding: .5rem 1rem; font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
}
.filters a.is-active, .filters a:hover { border-color: var(--foreground); background: var(--foreground); color: var(--background); }

/* ---------- Books ---------- */
.book-row { display: grid; gap: 3rem; align-items: center; padding: 3.5rem 0; border-bottom: 1px solid var(--border); }
@media (min-width: 768px) { .book-row { grid-template-columns: 1fr 1.4fr; } }
.book-tag { display: inline-block; background: var(--ochre); color: #fff; padding: .3rem .7rem; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }

/* ---------- Events ---------- */
.event-list { border-top: 1px solid var(--border); }
.event-item {
  display: flex; flex-direction: column; gap: .75rem;
  padding: 1.5rem 0; border-bottom: 1px solid var(--border);
}
@media (min-width: 768px) { .event-item { flex-direction: row; align-items: center; justify-content: space-between; } }
.event-date { font-family: var(--font-display); font-size: 1.35rem; color: var(--ochre); width: 7rem; flex: none; }
.event-main { display: flex; gap: 1.5rem; align-items: baseline; }

/* ---------- Portfolio ---------- */
.gallery-grid { display: grid; gap: 1rem; }
@media (min-width: 768px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } .gallery-grid .span-2 { grid-column: span 2; } }
.gallery-grid figcaption { margin-top: .5rem; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted-foreground); }

/* ---------- Forms ---------- */
input[type=text], input[type=email], input[type=search], select, textarea {
  width: 100%; padding: .85rem 1rem; font: inherit; font-size: .875rem;
  background: var(--background); color: var(--foreground);
  border: 1px solid rgba(43,41,36,.15); border-radius: 2px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--ochre); }
.field { display: block; margin-bottom: 1.5rem; }
.field .eyebrow { display: block; margin-bottom: .5rem; }
.form-row { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }

/* ---------- Newsletter ---------- */
.newsletter { border-top: 1px solid var(--border); background: var(--secondary); text-align: center; }
.newsletter h2 { font-family: var(--font-serif); font-style: italic; font-size: 1.875rem; }
.newsletter form { display: flex; flex-direction: column; gap: .75rem; margin-top: 2rem; }
@media (min-width: 640px) { .newsletter form { flex-direction: row; } .newsletter input { flex: 1; } }

/* ---------- Single post ---------- */
.entry-content { font-size: 1.0625rem; line-height: 1.8; }
.entry-content > * + * { margin-top: 1.25rem; }
.entry-content h2 { font-size: 1.875rem; margin-top: 2.5rem; }
.entry-content h3 { font-size: 1.5rem; margin-top: 2rem; }
.entry-content blockquote {
  border-left: 2px solid var(--ochre); padding-left: 1.25rem;
  font-family: var(--font-serif); font-style: italic; font-size: 1.25rem;
}
.entry-content ul, .entry-content ol { padding-left: 1.25rem; list-style: disc; }
.entry-content ol { list-style: decimal; }
.post-nav { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--border); padding-top: 2rem; margin-top: 3rem; font-size: .875rem; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 3rem; }
.pagination .page-numbers {
  border: 1px solid var(--border); padding: .5rem .9rem; font-size: 12px; letter-spacing: .1em;
}
.pagination .current { background: var(--foreground); color: var(--background); border-color: var(--foreground); }

/* ---------- Comments ---------- */
.comments-area { margin-top: 4rem; border-top: 1px solid var(--border); padding-top: 2rem; }
.comment-list li { padding: 1.25rem 0; border-bottom: 1px solid var(--border); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); }
.site-footer .inner { padding: 4rem 0; display: grid; gap: 3rem; }
@media (min-width: 768px) { .site-footer .inner { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer .brand { font-family: var(--font-display); font-size: 1.875rem; letter-spacing: .18em; text-transform: uppercase; }
.site-footer p.about { margin-top: 1rem; max-width: 24rem; font-size: .875rem; color: var(--muted-foreground); }
.site-footer ul { margin-top: 1rem; display: grid; gap: .5rem; font-size: .875rem; }
.site-footer .copyright { margin-top: 3.5rem; font-size: 10px; letter-spacing: .25em; text-transform: uppercase; color: var(--muted-foreground); }

/* ---------- WP core classes ---------- */
.alignleft { float: left; margin: .5rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .5rem 0 1rem 1.5rem; }
.aligncenter { margin: 1rem auto; }
.wp-caption-text { font-size: .8125rem; color: var(--muted-foreground); }
.sticky .entry-title::before { content: "★ "; color: var(--ochre); }
