/*
Theme Name: Expedition
Theme URI: https://test.adventurephd.com
Author: Adventure PhD
Description: A clean, image-forward photography & travel theme built for Adventure PhD. Minimal chrome, generous whitespace, full-bleed imagery.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: expedition
*/

/* ---------- Tokens ---------- */
:root {
  --bg: #faf9f7;
  --bg-alt: #f3efe8;
  --ink: #1d1b18;
  --ink-soft: #3a362f;
  --muted: #6e675e;
  --line: #e7e2da;
  --accent: #8c5a33;
  --accent-dark: #6f4526;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --wide: 1240px;
  --prose: 46rem;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
figure { margin: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 999;
}
.skip-link:focus { left: 0; }

/* ---------- Type ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 .6em;
}

.kicker {
  display: block;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .9rem;
}

/* ---------- Layout shells ---------- */
.shell { max-width: var(--wide); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2.5rem); }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-head { text-align: center; max-width: 44rem; margin: 0 auto clamp(2.2rem, 5vw, 3.5rem); }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); margin-bottom: .4rem; }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- Header ---------- */
.site-header {
  background: rgba(250, 249, 247, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 60;
}
.masthead {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  max-width: var(--wide); margin: 0 auto;
  padding: .95rem clamp(1.1rem, 4vw, 2.5rem);
}
.brand { text-decoration: none; line-height: 1.25; }
.brand .site-title {
  font-family: var(--serif); font-size: 1.28rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; margin: 0; color: var(--ink);
}
.brand .site-tagline {
  display: block; font-size: .64rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--muted); margin-top: .18rem;
}

/* Nav */
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  padding: .5rem .65rem; cursor: pointer; border-radius: 2px;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px 0; transition: .2s; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.7rem; }
.site-nav a {
  text-decoration: none; font-size: .78rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft);
  padding: .4rem 0; display: inline-block;
}
.site-nav a:hover { color: var(--accent); }
.site-nav li { position: relative; }
.site-nav li.current-menu-item > a { color: var(--accent); }

/* Dropdowns (desktop) */
.site-nav .sub-menu {
  position: absolute; top: 100%; left: -1rem; min-width: 13rem;
  background: #fff; border: 1px solid var(--line); border-radius: 2px;
  box-shadow: 0 14px 34px rgba(29, 27, 24, .1);
  display: none; flex-direction: column; gap: 0; padding: .55rem 0; z-index: 70;
}
.site-nav li:hover > .sub-menu,
.site-nav li:focus-within > .sub-menu { display: flex; }
.site-nav .sub-menu li { width: 100%; }
.site-nav .sub-menu a {
  padding: .42rem 1.15rem; width: 100%; letter-spacing: .09em; font-size: .74rem;
  text-transform: none; font-weight: 500;
}
/* third level: shown inline, indented */
.site-nav .sub-menu .sub-menu {
  position: static; display: flex; border: 0; box-shadow: none; padding: 0 0 .2rem;
}
.site-nav .sub-menu .sub-menu a { padding-left: 2.1rem; color: var(--muted); font-size: .72rem; }

/* Mobile nav */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    max-height: calc(100vh - 70px); overflow-y: auto;
  }
  .nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: .8rem clamp(1.1rem, 4vw, 2.5rem) 1.2rem; }
  .site-nav a { padding: .55rem 0; font-size: .85rem; }
  .site-nav .sub-menu,
  .site-nav li:hover > .sub-menu {
    position: static; display: block; border: 0; box-shadow: none;
    background: none; padding: 0 0 0 1.1rem;
  }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 88vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: var(--ink);
}
.hero-media, .hero-media video, .hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(15,14,12,.25), rgba(15,14,12,.25) 55%, rgba(15,14,12,.6));
}
.hero-content { position: relative; z-index: 2; text-align: center; color: #fff; padding: 2rem; }
.hero-content .kicker { color: rgba(255,255,255,.85); }
.hero-title {
  font-size: clamp(2.8rem, 7.5vw, 5.4rem); font-weight: 400; color: #fff;
  letter-spacing: .02em; margin-bottom: .35rem;
}
.hero-sub {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.05rem, 2vw, 1.4rem); color: rgba(255,255,255,.88); margin: 0 0 2.1rem;
}
.hero-actions { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; font-size: .78rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  padding: .85rem 1.9rem; border-radius: 2px; transition: .2s;
}
.btn-solid { background: #fff; color: var(--ink); }
.btn-solid:hover { background: var(--bg-alt); }
.btn-ghost { border: 1px solid rgba(255,255,255,.65); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--accent-dark); }
.btn-outline { border: 1px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 2; color: #fff; opacity: .75; animation: drift 2.2s ease-in-out infinite;
}
@keyframes drift { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- Destination / gallery cards ---------- */
.dest-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 2.5vw, 2rem);
}
@media (max-width: 900px) { .dest-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .dest-grid { grid-template-columns: 1fr; } }
.dest-card { text-decoration: none; display: block; }
.dest-card .frame { overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg-alt); }
.dest-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.dest-card:hover img { transform: scale(1.045); }
.dest-card .dest-meta {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: .85rem .15rem 0; border-top: 0;
}
.dest-card h3 { font-size: 1.18rem; margin: 0; transition: color .2s; }
.dest-card:hover h3 { color: var(--accent); }
.dest-card .count { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- Journal cards ---------- */
.post-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.4rem, 3vw, 2.4rem);
}
@media (max-width: 900px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .post-grid { grid-template-columns: 1fr; } }

.post-card { display: flex; flex-direction: column; }
.post-card .frame {
  overflow: hidden; aspect-ratio: 3 / 2; background: var(--bg-alt); margin-bottom: 1.05rem;
}
.post-card .frame a { display: block; width: 100%; height: 100%; }
.post-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.post-card:hover img { transform: scale(1.04); }
.post-card .card-kicker {
  font-size: .68rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .45rem;
}
.post-card .card-kicker a { color: inherit; text-decoration: none; }
.post-card h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover { color: var(--accent); }
.post-card .card-meta { font-size: .78rem; color: var(--muted); margin-bottom: .5rem; }
.post-card .card-excerpt { color: var(--muted); font-size: .92rem; line-height: 1.65; margin: 0; }

.more-row { text-align: center; margin-top: clamp(2.2rem, 5vw, 3.2rem); }

/* ---------- About band ---------- */
.about-band { background: var(--bg-alt); }
.about-band .inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
@media (max-width: 860px) { .about-band .inner { grid-template-columns: 1fr; } }
.about-band .about-photo img { width: 100%; }
.about-band h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); }
.about-band p { color: var(--ink-soft); }
.about-band .hero-actions { justify-content: flex-start; margin-top: 1.6rem; }

/* ---------- Page & post shells ---------- */
.page-head { text-align: center; padding: clamp(2.8rem, 6vw, 4.5rem) 0 0; }
.page-head h1 { font-size: clamp(2.1rem, 4.5vw, 3rem); margin-bottom: .3rem; }
.page-head .page-desc { color: var(--muted); max-width: 40rem; margin: 0 auto; }

.entry-wrap { padding: clamp(2.2rem, 5vw, 3.6rem) 0 clamp(3.5rem, 7vw, 5.5rem); }

/* Prose: every direct child constrained to reading measure; galleries go wide */
.entry-content > * { max-width: var(--prose); margin-left: auto; margin-right: auto; }
.entry-content > .xp-gallery, .entry-content > .alignwide { max-width: min(1300px, 100%); }
.entry-content > .alignfull { max-width: 100%; }

.entry-content { font-size: 1.05rem; }
.entry-content p { margin: 0 auto 1.35em; }
.entry-content h2 { font-size: 1.65rem; margin: 2em auto .7em; }
.entry-content h3 { font-size: 1.3rem; margin: 1.8em auto .6em; }
.entry-content a { color: var(--accent); text-decoration-color: rgba(140,90,51,.4); }
.entry-content a:hover { color: var(--accent-dark); }
.entry-content img { margin: 0 auto; }
.entry-content img[data-full] { cursor: zoom-in; }
.entry-content .wp-caption { width: auto !important; max-width: var(--prose); margin: 2.2em auto; text-align: center; }
.entry-content .wp-caption img { margin: 0 auto; }
.entry-content .wp-caption-text, .entry-content figcaption {
  font-size: .8rem; color: var(--muted); padding-top: .6rem; font-style: italic;
}
.entry-content blockquote {
  border-left: 2px solid var(--accent); margin: 2em auto; padding: .2em 0 .2em 1.4em;
  font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--ink-soft);
}
.entry-content iframe { max-width: 100%; }
.entry-content hr { border: 0; border-top: 1px solid var(--line); margin: 3em auto; }

/* Neutralize legacy inline styling (light-gray text meant for the old dark theme) */
.entry-content span, .entry-content h1 span, .entry-content h2 span,
.entry-content h3 span, .entry-content p span, .entry-content li span,
.entry-content em span, .entry-content strong span {
  color: inherit !important;
  font-family: inherit !important;
  font-size: inherit !important;
  background: transparent !important;
}
.entry-content [style*="text-align: center"] { text-align: center; }

/* ---------- Single post ---------- */
.post-hero { max-height: 70vh; overflow: hidden; background: var(--ink); }
.post-hero img { width: 100%; max-height: 70vh; object-fit: cover; }
.single-head { max-width: 50rem; margin: 0 auto; text-align: center; padding: clamp(2.4rem, 5vw, 3.6rem) 1.2rem 0; }
.single-head .kicker a { color: inherit; text-decoration: none; }
.single-head h1 { font-size: clamp(2rem, 4.4vw, 2.9rem); margin-bottom: .55rem; }
.single-head .meta { color: var(--muted); font-size: .82rem; letter-spacing: .06em; }

.post-footer { max-width: var(--prose); margin: 3rem auto 0; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.tag-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-row a {
  font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  color: var(--muted); border: 1px solid var(--line); padding: .3rem .75rem; border-radius: 2px;
}
.tag-row a:hover { color: var(--accent); border-color: var(--accent); }

.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
  max-width: var(--wide); margin: 3.5rem auto 0; padding: 2.2rem clamp(1.1rem, 4vw, 2.5rem) 0;
  border-top: 1px solid var(--line);
}
.post-nav a { text-decoration: none; }
.post-nav .dir { font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: .35rem; }
.post-nav .post-nav-title { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; }
.post-nav a:hover .post-nav-title { color: var(--accent); }
.post-nav .next { text-align: right; }
@media (max-width: 640px) { .post-nav { grid-template-columns: 1fr; } .post-nav .next { text-align: left; } }

/* ---------- Photo gallery (replaces huge_it markup) ---------- */
.xp-gallery { column-count: 3; column-gap: 1.1rem; margin: 2.5rem auto; }
@media (max-width: 980px) { .xp-gallery { column-count: 2; } }
@media (max-width: 600px) { .xp-gallery { column-count: 1; } }
.xp-item { break-inside: avoid; margin: 0 0 1.1rem; position: relative; overflow: hidden; background: var(--bg-alt); }
.xp-item a { display: block; }
.xp-item img { width: 100%; transition: transform .5s ease; }
.xp-item:hover img { transform: scale(1.025); }
.xp-item .xp-cap {
  position: absolute; inset: auto 0 0 0; padding: 2.2rem .95rem .8rem;
  background: linear-gradient(to top, rgba(14,13,11,.72), transparent);
  color: #fff; font-size: .82rem; font-weight: 500; letter-spacing: .02em;
  opacity: 0; transition: opacity .3s ease; pointer-events: none;
}
.xp-item:hover .xp-cap { opacity: 1; }

/* ---------- Lightbox ---------- */
.xp-lb {
  position: fixed; inset: 0; z-index: 200; background: rgba(12,11,10,.96);
  display: none; align-items: center; justify-content: center;
}
.xp-lb.open { display: flex; }
.xp-lb img { max-width: 92vw; max-height: 82vh; width: auto; height: auto; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.xp-lb .xp-lb-cap {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.92); text-align: center; max-width: 46rem; padding: 0 1.2rem;
  font-size: .88rem; line-height: 1.5;
}
.xp-lb .xp-lb-cap strong { display: block; font-family: var(--serif); font-size: 1.05rem; margin-bottom: .15rem; }
.xp-lb button {
  position: absolute; background: none; border: 0; color: rgba(255,255,255,.85);
  cursor: pointer; font-size: 2rem; line-height: 1; padding: 1rem; z-index: 2;
}
.xp-lb button:hover { color: #fff; }
.xp-lb .xp-close { top: .6rem; right: .8rem; }
.xp-lb .xp-prev { left: .4rem; top: 50%; transform: translateY(-50%); }
.xp-lb .xp-next { right: .4rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .xp-lb .xp-prev, .xp-lb .xp-next { top: auto; bottom: 4.6rem; transform: none; } }

/* ---------- Archive / blog listing ---------- */
.archive-wrap { padding-bottom: clamp(3.5rem, 7vw, 5.5rem); }
.pagination { display: flex; justify-content: center; gap: .4rem; margin-top: 3rem; }
.pagination .page-numbers {
  text-decoration: none; padding: .5rem .95rem; border: 1px solid var(--line);
  font-size: .82rem; color: var(--ink-soft); border-radius: 2px;
}
.pagination .page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination a.page-numbers:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Comments ---------- */
.comments-area { max-width: var(--prose); margin: 3rem auto 0; padding-top: 2rem; border-top: 1px solid var(--line); }
.comments-area h2 { font-size: 1.4rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment { border-bottom: 1px solid var(--line); padding: 1.3rem 0; }
.comment-list .children { list-style: none; padding-left: 1.6rem; }
.comment-author { font-weight: 600; font-size: .95rem; }
.comment-author img { display: inline-block; vertical-align: middle; border-radius: 50%; margin-right: .6rem; }
.comment-metadata { font-size: .75rem; color: var(--muted); }
.comment-metadata a { color: inherit; text-decoration: none; }
.comment-content { font-size: .95rem; }
.reply a { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); text-decoration: none; }

/* ---------- Forms (incl. CF7 / WPForms) ---------- */
.entry-content input[type="text"], .entry-content input[type="email"],
.entry-content input[type="url"], .entry-content input[type="tel"],
.entry-content textarea, .comment-form input[type="text"],
.comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; padding: .8rem .95rem; font: inherit; font-size: .95rem;
  border: 1px solid var(--line); background: #fff; border-radius: 2px; color: var(--ink);
}
.entry-content textarea:focus, .entry-content input:focus,
.comment-form textarea:focus, .comment-form input:focus {
  outline: none; border-color: var(--accent);
}
.entry-content input[type="submit"], .comment-form input[type="submit"], .wpcf7-submit {
  width: auto; background: var(--ink); color: #fff; border: 0; cursor: pointer;
  font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  padding: .9rem 2.1rem; border-radius: 2px; transition: .2s;
}
.entry-content input[type="submit"]:hover, .wpcf7-submit:hover { background: var(--accent-dark); }
.wpcf7 label { display: block; margin-bottom: 1.1rem; font-size: .85rem; font-weight: 500; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.78); margin-top: clamp(3rem, 7vw, 5rem); }
.site-footer .inner { text-align: center; padding: clamp(2.8rem, 6vw, 4rem) 1.5rem; }
.footer-brand {
  font-family: var(--serif); font-size: 1.15rem; letter-spacing: .22em; text-transform: uppercase;
  color: #fff; text-decoration: none;
}
.footer-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.6rem; margin: 1.6rem 0; }
.footer-nav a {
  color: rgba(255,255,255,.72); text-decoration: none; font-size: .74rem;
  letter-spacing: .16em; text-transform: uppercase;
}
.footer-nav a:hover { color: #fff; }
.site-footer .colophon { font-size: .76rem; color: rgba(255,255,255,.45); }

/* Front page tweaks */
.front-page .site-header { position: absolute; left: 0; right: 0; background: transparent; border-bottom-color: rgba(255,255,255,.14); }
.front-page .site-header .site-title, .front-page .site-nav a { color: #fff; }
.front-page .site-header .site-tagline { color: rgba(255,255,255,.65); }
.front-page .site-nav a:hover { color: #fff; opacity: .8; }
.front-page .nav-toggle span { background: #fff; }
@media (max-width: 900px) {
  .front-page .site-nav { background: rgba(20,18,16,.97); }
  .front-page .site-nav a { color: #fff; }
}

/* Misc */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.err-wrap { text-align: center; padding: 6rem 1.5rem; }
