/*
Theme Name: Trek Goat
Theme URI: https://trekgoat.com
Author: Trek Goat
Description: Slow-travel & hiking blog theme inspired by the Adriatic. Custom homepage with hero, featured stories, regions and newsletter.
Version: 1.4.0
License: GPL-2.0-or-later
Text Domain: trekgoat
*/

/* ---------- Design tokens ---------- */
:root {
  --brand-teal: #2c4a55;
  --brand-teal-deep: #1f3640;
  --brand-yellow: #f5c542;
  --brand-leaf: #5fa463;
  --brand-leaf-deep: #3b7740;
  --brand-cream: #fbfaf5;

  --bg: #fdfcf7;
  --fg: #1f2a33;
  --muted: #6b7783;
  --card: #ffffff;
  --border: #e3e6ea;

  --radius: 12px;
  --radius-lg: 24px;
  --shadow-soft: 0 4px 18px -8px rgba(44, 74, 85, 0.25);
  --shadow-card: 0 14px 34px -14px rgba(44, 74, 85, 0.4);

  --font-display: "Caveat Brush", "Comic Sans MS", cursive;
  --font-sans: "Nunito", system-ui, -apple-system, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; }

h1, h2, h3, .font-display {
  font-family: var(--font-display);
  font-weight: normal;
  letter-spacing: 0.01em;
  line-height: 1;
  margin: 0;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--brand-teal);
  color: #fff;
}
.header-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem 0;
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand img { width: 48px; height: 48px; }
.brand-name { font-family: var(--font-display); font-size: 2rem; color: var(--brand-yellow); }

.main-nav { display: none; gap: 1.75rem; }
.main-nav a {
  font-size: 0.8rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; opacity: 0.9; transition: color 0.2s;
}
.main-nav a:hover { color: var(--brand-yellow); }

.search-box {
  display: none; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.1); padding: 0.4rem 0.8rem;
  border-radius: 8px; border: 1px solid rgba(255,255,255,0.2);
}
.search-box input {
  background: transparent; border: 0; color: #fff; outline: none;
  font-size: 0.85rem; width: 160px;
}
.search-box input::placeholder { color: rgba(255,255,255,0.6); }

.menu-toggle { background: rgba(255,255,255,0.08); padding: 0.5rem; border-radius: 8px; color: #fff; }

.region-bar { border-top: 1px solid rgba(255,255,255,0.1); display: none; }
.region-bar .container {
  display: flex; justify-content: center; gap: 1.5rem; padding: 0.7rem 1rem;
}
.region-bar a {
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.18em; opacity: 0.85; transition: color 0.2s;
}
.region-bar a:hover { color: var(--brand-yellow); }

.mobile-menu { display: none; padding: 0.75rem 1rem; border-top: 1px solid rgba(255,255,255,0.1); }
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block; padding: 0.4rem 0; font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}

@media (min-width: 768px) {
  .main-nav, .search-box, .region-bar { display: flex; }
  .menu-toggle { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; height: 78vh; min-height: 520px; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(31,54,64,0.78) 100%);
}
.hero-inner {
  position: relative; z-index: 1;
  height: 100%; display: flex; align-items: center;
  color: #fff;
}
.hero-eyebrow {
  display: inline-block; background: var(--brand-yellow); color: var(--brand-teal-deep);
  padding: 0.4rem 1rem; border-radius: 999px;
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.2em;
}
.hero h1 {
  margin-top: 1.25rem; font-size: clamp(2.75rem, 7vw, 5.5rem);
  max-width: 720px;
}
.hero h1 .accent { color: var(--brand-yellow); }
.hero p { margin-top: 1.25rem; max-width: 560px; font-size: 1.05rem; opacity: 0.92; }
.hero-cta { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  transition: transform 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand-yellow); color: var(--brand-teal-deep); box-shadow: var(--shadow-soft); }
.btn-ghost {
  background: rgba(255,255,255,0.1); color: #fff;
  border: 1px solid rgba(255,255,255,0.3); backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.2); }
.btn-teal { background: var(--brand-teal); color: #fff; }

/* ---------- Intro ---------- */
.intro { max-width: 820px; margin: 0 auto; padding: 4rem 1rem; text-align: center; }
.intro img { width: 110px; height: 110px; margin: 0 auto; }
.intro h2 { margin-top: 1rem; font-size: clamp(2.5rem, 5vw, 3.75rem); color: var(--brand-teal); }
.intro h2 .accent { color: var(--brand-yellow); }
.intro p { margin-top: 1rem; color: var(--muted); }

/* ---------- Section heads ---------- */
.section { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.section + .section { margin-top: 5rem; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; padding-bottom: 0.85rem;
  border-bottom: 2px solid var(--brand-yellow);
}
.section-head h2 { font-size: clamp(2.25rem, 4vw, 3rem); color: var(--brand-teal); }
.section-head a {
  font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--brand-teal);
}
.section-head a:hover { color: var(--brand-leaf-deep); }

/* ---------- Post grid ---------- */
.grid { display: grid; gap: 1.5rem; margin-top: 2rem; }
.grid-featured { grid-template-columns: 1fr; }
.grid-more { grid-template-columns: 1fr; }

@media (min-width: 700px) {
  .grid-more { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-featured { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; }
  .grid-featured .post-card.large { grid-column: span 2; grid-row: span 2; }
  .grid-more { grid-template-columns: repeat(4, 1fr); }
}

.post-card {
  background: var(--card); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-card);
  transition: transform 0.3s;
  display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); }
.post-card .thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.post-card.large .thumb { aspect-ratio: 16/10; }
.post-card .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s;
}
.post-card:hover .thumb img { transform: scale(1.05); }
.post-card .badge {
  position: absolute; top: 1rem; left: 1rem;
  background: var(--brand-yellow); color: var(--brand-teal-deep);
  padding: 0.3rem 0.85rem; border-radius: 999px;
  font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em;
  box-shadow: var(--shadow-soft);
}
.post-card .body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.post-card .region {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--brand-leaf-deep);
}
.post-card h3 {
  font-size: 1.5rem; margin-top: 0.5rem; color: var(--fg); transition: color 0.2s;
}
.post-card.large h3 { font-size: 2.25rem; }
.post-card:hover h3 { color: var(--brand-leaf-deep); }
.post-card .excerpt { margin-top: 0.75rem; font-size: 0.9rem; color: var(--muted); flex: 1; }
.post-card .read-more {
  margin-top: 1rem; font-size: 0.85rem; font-weight: 800;
  color: var(--brand-teal); display: inline-flex; align-items: center; gap: 0.25rem;
}
.post-card:hover .read-more { gap: 0.5rem; }

/* ---------- Regions block ---------- */
.regions-block {
  background: var(--brand-teal); color: #fff;
  border-radius: 28px; padding: 3rem 1.5rem; margin-top: 5rem;
}
@media (min-width: 768px) { .regions-block { padding: 3rem; } }
.regions-block .head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem;
}
.regions-block .eyebrow {
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.25em;
  color: var(--brand-yellow);
}
.regions-block h2 { margin-top: 0.5rem; font-size: clamp(2.25rem, 4vw, 3rem); }
.regions-block .desc { max-width: 420px; font-size: 0.9rem; opacity: 0.85; }

.regions-grid { margin-top: 2rem; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .regions-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .regions-grid { grid-template-columns: repeat(4, 1fr); } }

.region-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem; border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.region-card:hover {
  background: var(--brand-yellow); color: var(--brand-teal-deep);
  border-color: transparent;
}
.region-card .icon {
  background: var(--brand-yellow); color: var(--brand-teal-deep);
  padding: 0.75rem; border-radius: 12px; transition: background 0.2s, color 0.2s;
}
.region-card:hover .icon { background: var(--brand-teal-deep); color: var(--brand-yellow); }
.region-card .name { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; }
.region-card .count {
  margin-top: 0.25rem; font-size: 0.7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.85;
}

/* ---------- Newsletter ---------- */
.newsletter {
  max-width: 880px; margin: 6rem auto 0; padding: 3rem 1.5rem;
  background: var(--brand-yellow); color: var(--brand-teal-deep);
  border-radius: 28px; text-align: center; box-shadow: var(--shadow-card);
}
@media (min-width: 768px) { .newsletter { padding: 3.5rem; } }
.newsletter h2 { font-size: clamp(2.5rem, 5vw, 3.75rem); }
.newsletter p { margin-top: 0.5rem; opacity: 0.85; }
.newsletter form {
  margin: 1.5rem auto 0; max-width: 460px;
  display: flex; flex-direction: column; gap: 0.5rem;
}
@media (min-width: 600px) { .newsletter form { flex-direction: row; } }
.newsletter input {
  flex: 1; border: 0; padding: 0.85rem 1.25rem; border-radius: 999px;
  background: #fff; box-shadow: var(--shadow-soft); font-size: 0.9rem;
}
.newsletter input:focus { outline: 2px solid var(--brand-teal); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 5rem; background: var(--brand-teal); color: #fff;
}
.footer-grid {
  display: grid; gap: 2.5rem; padding: 3.5rem 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand .brand-name { font-size: 2.25rem; }
.footer-grid p { margin-top: 0.75rem; font-size: 0.9rem; opacity: 0.8; max-width: 420px; }
.footer-grid h3, .footer-widget h3, .footer-col h3 { color: var(--brand-yellow); font-size: 1.5rem; margin-bottom: 0.75rem; }
.footer-grid ul, .footer-widget ul, .footer-col ul { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; opacity: 0.85; }
.footer-grid li, .footer-widget li, .footer-col li { padding: 0.2rem 0; }
.footer-widget a, .footer-col a { color: #fff; text-decoration: none; opacity: 0.9; }
.footer-widget a:hover, .footer-col a:hover { color: var(--brand-yellow); opacity: 1; }
.footer-widget + .footer-widget { margin-top: 1.5rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.25rem 1rem; font-size: 0.75rem; opacity: 0.75;
}
.footer-bottom .container { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.footer-nav ul { list-style: none; display: flex; gap: 1rem; padding: 0; margin: 0; }
.footer-nav a { color: #fff; text-decoration: none; opacity: 0.85; }
.footer-nav a:hover { color: var(--brand-yellow); }

/* Newsletter form feedback */
.newsletter form { position: relative; flex-wrap: wrap; }
.newsletter .newsletter-msg {
  width: 100%;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  min-height: 1.2em;
  color: var(--brand-teal-deep);
}
.newsletter .newsletter-msg.is-success { color: var(--brand-teal-deep); }
.newsletter .newsletter-msg.is-error { color: #b42318; }
.newsletter button[disabled] { opacity: 0.7; cursor: not-allowed; }
