/*
Theme Name: Trip & Seek v2.2
Theme URI: https://tripandseek.co
Author: Jorge De Silva
Author URI: https://jorgedesilva.com
Description: Custom cinematic travel blog theme. Light, warm, editorial design with sage green accents.
Version: 2.0.0
License: GPL v2
Text Domain: tripandseek
*/

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
  /* Colors */
  --color-sage: #7B8B6F;
  --color-sage-dark: #5C6A52;
  --color-sage-light: #9BAA8F;
  --color-cream: #FAF8F5;
  --color-white: #FFFFFF;
  --color-charcoal: #1A1A1A;
  --color-gray-dark: #4A4A4A;
  --color-gray: #6B6B6B;
  --color-gray-light: #E5E3E0;
  --color-lime: #C4D600;
  --color-forest: #2D3329;
  
  /* Typography */
  --font-headline: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-accent: 'Space Grotesk', sans-serif;
  
  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;
  --text-6xl: 4.5rem;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  
  /* Layout */
  --max-width: 1200px;
  --content-width: 720px;
  --border-radius: 4px;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ============================================
   BASE STYLES
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-charcoal);
  background-color: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-sage);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-sage-dark);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-charcoal);
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-6);
}

em {
  font-style: italic;
  color: var(--color-sage);
}

blockquote {
  font-family: var(--font-headline);
  font-size: var(--text-2xl);
  font-style: italic;
  color: var(--color-sage);
  border-left: 3px solid var(--color-sage);
  padding-left: var(--space-6);
  margin: var(--space-12) 0;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.content-narrow {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
  background-color: var(--color-cream);
  padding: var(--space-6) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--color-gray-light);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-family: var(--font-headline);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-charcoal);
  letter-spacing: -0.02em;
}

.site-logo span {
  color: var(--color-sage);
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: var(--space-8);
}

.main-nav a {
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-gray-dark);
  transition: color var(--transition-fast);
}

.main-nav a:hover {
  color: var(--color-sage);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  width: 100%;
  height: 85vh;
  min-height: 600px;
  max-height: 900px;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.6) 100%
  );
}

.hero-content {
  position: absolute;
  bottom: var(--space-20);
  left: 0;
  right: 0;
  text-align: center;
  color: var(--color-white);
  padding: 0 var(--space-6);
}

.hero-eyebrow {
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-4);
  opacity: 0.9;
}

.hero-title {
  font-size: clamp(var(--text-4xl), 6vw, var(--text-6xl));
  font-weight: 400;
  color: var(--color-white);
  max-width: 900px;
  margin: 0 auto var(--space-6);
  line-height: 1.1;
}

.hero-title em {
  color: var(--color-lime);
  font-style: italic;
}

.hero-excerpt {
  font-size: var(--text-lg);
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.9;
  line-height: 1.6;
}

/* ============================================
   POST GRID
   ============================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--space-8);
  padding: var(--space-20) 0;
}

.post-card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.post-card-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.post-card:hover .post-card-image img {
  transform: scale(1.05);
}

.post-card-content {
  padding: var(--space-6);
}

.post-card-category {
  font-family: var(--font-accent);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-sage);
  margin-bottom: var(--space-2);
}

.post-card-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
  line-height: 1.3;
}

.post-card-title a {
  color: var(--color-charcoal);
}

.post-card-title a:hover {
  color: var(--color-sage);
}

.post-card-excerpt {
  font-size: var(--text-sm);
  color: var(--color-gray);
  margin-bottom: var(--space-4);
  line-height: 1.6;
}

.post-card-meta {
  font-family: var(--font-accent);
  font-size: var(--text-xs);
  color: var(--color-gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   CATEGORY / ARCHIVE HEADER
   ============================================ */
.archive-header {
  background: var(--color-white);
  padding: var(--space-16) 0 var(--space-8);
  text-align: center;
  border-bottom: 1px solid var(--color-gray-light);
}

.archive-header .archive-label {
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-sage);
  margin-bottom: var(--space-2);
}

.archive-header h1 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
}

.archive-header .archive-description {
  color: var(--color-gray);
  max-width: 600px;
  margin: 0 auto var(--space-4);
}

.archive-header .archive-count {
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  color: var(--color-gray);
}

/* ============================================
   SINGLE POST
   ============================================ */
.single-post .post-hero {
  width: 100%;
  height: 70vh;
  min-height: 500px;
  max-height: 800px;
  position: relative;
  overflow: hidden;
}

.single-post .post-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-header {
  text-align: center;
  padding: var(--space-16) 0;
  max-width: 800px;
  margin: 0 auto;
}

.post-category {
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-sage);
  margin-bottom: var(--space-4);
}

.post-title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  margin-bottom: var(--space-6);
  line-height: 1.15;
}

.post-meta {
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  color: var(--color-gray);
}

.post-meta span {
  margin: 0 var(--space-2);
}

.post-body {
  font-size: var(--text-lg);
  line-height: 1.8;
}

.post-body > * {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--space-6);
}

.post-body > .alignwide {
  max-width: 1000px;
}

.post-body > .alignfull {
  max-width: none;
  padding: 0;
}

.post-body > p:first-of-type::first-letter {
  font-family: var(--font-headline);
  font-size: 4.5em;
  float: left;
  line-height: 0.8;
  padding-right: var(--space-2);
  color: var(--color-sage);
}

/* ============================================
   NEWSLETTER
   ============================================ */
.newsletter-section {
  background-color: var(--color-forest);
  color: var(--color-white);
  padding: var(--space-20) 0;
  text-align: center;
}

.newsletter-section h2 {
  color: var(--color-white);
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

.newsletter-section p {
  color: var(--color-gray-light);
  max-width: 500px;
  margin: 0 auto var(--space-8);
}

.newsletter-form {
  display: flex;
  gap: var(--space-3);
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: var(--space-4) var(--space-6);
  border: 1px solid var(--color-gray);
  border-radius: var(--border-radius);
  background: transparent;
  color: var(--color-white);
  font-size: var(--text-base);
}

.newsletter-form input[type="email"]::placeholder {
  color: var(--color-gray);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary {
  background-color: var(--color-sage);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-sage-dark);
  color: var(--color-white);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background-color: var(--color-charcoal);
  color: var(--color-gray-light);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-brand {
  font-family: var(--font-headline);
  font-size: var(--text-2xl);
  color: var(--color-white);
  margin-bottom: var(--space-4);
}

.footer-brand span {
  color: var(--color-sage);
}

.footer-about {
  font-size: var(--text-sm);
  line-height: 1.7;
  max-width: 300px;
}

.footer-heading {
  font-family: var(--font-accent);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-white);
  margin-bottom: var(--space-4);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-links a {
  color: var(--color-gray);
  font-size: var(--text-sm);
}

.footer-links a:hover {
  color: var(--color-sage);
}

.footer-bottom {
  border-top: 1px solid var(--color-gray-dark);
  padding-top: var(--space-6);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-gray);
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  color: var(--color-charcoal);
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --text-5xl: 2.5rem;
    --text-6xl: 3rem;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-cream);
    border-bottom: 1px solid var(--color-gray-light);
    padding: var(--space-6);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  }
  
  .main-nav.is-open {
    display: block;
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: var(--space-4);
  }
  
  .main-nav a {
    display: block;
    padding: var(--space-2) 0;
    font-size: var(--text-base);
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  
  .newsletter-form {
    flex-direction: column;
  }
}

/* ============================================
   IMAGE FOCUS POSITIONING
   ============================================ */
.image-focus-top img,
.image-focus-top .hero-image,
.image-focus-top .post-hero img {
  object-position: top center !important;
}

.image-focus-center img,
.image-focus-center .hero-image,
.image-focus-center .post-hero img {
  object-position: center center !important;
}

.image-focus-bottom img,
.image-focus-bottom .hero-image,
.image-focus-bottom .post-hero img {
  object-position: bottom center !important;
}

/* Card images focus */
.post-card.image-focus-top img {
  object-position: top center;
}

.post-card.image-focus-bottom img {
  object-position: bottom center;
}

/* ============================================
   UTILITIES
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-sage { color: var(--color-sage); }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin: var(--space-12) 0;
}

.pagination a,
.pagination span {
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-gray-light);
  border-radius: var(--border-radius);
  font-family: var(--font-accent);
  font-size: var(--text-sm);
}

.pagination .current {
  background: var(--color-sage);
  color: var(--color-white);
  border-color: var(--color-sage);
}
