/*
 * THEME: TINCTURE (ATMOSPHERIC MINIMALISM) v1.0.0
 * A digital extension of Aesop's design philosophy
 * 
 * Design Principles:
 * - Utilitarian luxury through restrained aesthetics
 * - Clinical minimalism with architectural precision
 * - "Slow retail" digital experience - contemplation over conversion
 * - Atmospheric rather than transactional
 * - Grid-based, airy layouts with expansive whitespace
 * - Typography as primary design element
 * - Muted, nature-inspired color palette
 * - Subtle, tactile interactions
 */

/* --- FONT IMPORTS --- */
/* Using Inter as closest web-safe alternative to Suisse Int'l (grotesque sans-serif) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Lora:wght@400;500&display=swap');

/* --- ROOT VARIABLES --- */
:root {
  /* Color Palette - Quiet, nature-inspired tones */
  --bg-color: #F5F3EE;           /* Aesop cream - warmer, more muted */
  --bg-secondary: #FAFAF8;        /* Subtle off-white for cards */
  --text-color: #4A4A47;          /* Warm charcoal with slight brown undertone */
  --text-secondary: #7A7A75;      /* Muted gray */
  --text-tertiary: #A5A5A0;       /* Light muted gray for meta */
  --heading-color: #2B2B28;       /* Deep warm black */
  --accent-color: #6F7C6A;        /* Olive green - more muted */
  --accent-hover: #5A6555;        /* Darker olive */
  --border-color: #E8E6E0;        /* Very subtle warm border */
  --border-light: #F0EEE8;        /* Barely-there border */
  --aesop-brown: #C9A876;         /* Amber bottle inspired */
  
  /* Typography - Suisse Int'l inspired */
  --sans-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --serif-font: 'Lora', Georgia, serif;
  
  /* Spacing - Generous, architectural */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2.5rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  --spacing-xxl: 8rem;
  
  /* Layout - Airy, grid-based */
  --content-width: 900px;
  --wide-content-width: 1200px;
  
  /* Transitions - Smooth, tactile */
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- GLOBAL RESET & BASE STYLES --- */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--sans-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.015em;
}

/* --- TYPOGRAPHY --- */
/* Typography is the primary design element - bold headers against delicate body text */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--sans-font);
  font-weight: 600;
  color: var(--heading-color);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
}

h1 { 
  font-size: 3.5rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  margin-top: 0;
  text-transform: none;
  line-height: 1.1;
}
h2 { 
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
h3 { 
  font-size: 1.5rem;
  font-weight: 600;
}
h4 { 
  font-size: 1.125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p {
  margin-bottom: var(--spacing-md);
  max-width: 65ch;
  font-size: 1rem;
  line-height: 1.75;
}

a {
  color: var(--heading-color);
  text-decoration: none;
  transition: all var(--transition-medium);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1px;
}

a:hover {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

/* --- LAYOUT CONTAINERS --- */
#site-header, main, footer {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--spacing-md);
  padding-right: var(--spacing-md);
}

/* --- HEADER --- */
#site-header {
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
}

#site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--sans-font);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#site-header nav .site-logo {
  height: 54px;
  width: auto;
  margin-right: var(--spacing-md);
  opacity: 1;
  transition: opacity var(--transition-medium);
}

#site-header nav .site-logo:hover {
  opacity: 0.7;
}

#site-header h1 {
  margin: 0;
  margin-right: auto;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

#site-header h1 a {
  color: var(--heading-color);
  border-bottom: none;
  transition: color var(--transition-medium);
}

#site-header h1 a:hover {
  color: var(--accent-color);
  border-bottom: none;
}

#site-header nav a {
  color: var(--text-secondary);
  border-bottom: none;
  transition: color var(--transition-medium);
  position: relative;
}

#site-header nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--heading-color);
  transition: width var(--transition-medium);
}

#site-header nav a:hover {
  color: var(--heading-color);
}

#site-header nav a:hover::after {
  width: 100%;
}

#site-header nav .menu-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

/* --- DROPDOWN MENU STYLES --- */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle-input {
  display: none;
}

.dropdown-toggle {
  cursor: pointer;
  color: var(--text-secondary);
  user-select: none;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 160px;
  z-index: 1000;
  margin-top: 0.5rem;
  padding: 0.5rem 0;
}

/* Desktop: show on hover */
.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
  display: block;
}

/* Mobile/tap: show when checkbox is checked */
.dropdown-toggle-input:checked ~ .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-color);
  text-decoration: none;
  transition: background-color var(--transition-medium);
}

.dropdown-item:hover {
  background-color: var(--bg-secondary);
  color: var(--heading-color);
}

.dropdown-item:hover::after {
  display: none;
}

/* --- FOOTER --- */
footer {
  margin-top: var(--spacing-xl);
  padding: var(--spacing-lg) 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-family: var(--sans-font);
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
}

/* --- HOMEPAGE --- */
.homepage h2 {
  font-size: 0.9375rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

/* --- TAXONOMY PAGES --- */
[data-pagefind-ignore] > h1,
main > h1 {
  font-size: 0.9375rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

/* --- POSTS LIST --- */
/* Grid-based, airy layout with expansive whitespace */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xxl);
  padding: 0;
  margin: 0;
}

article.post-preview {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--spacing-lg);
  padding: 0;
  border: none;
  align-items: start;
}

.post-preview .featured-image-container {
  display: block;
  overflow: hidden;
  background: transparent;
  position: relative;
  line-height: 0;
}

.post-preview .featured-image-preview {
  width: 100%;
  height: 280px;
  object-fit: cover;
  opacity: 1;
  border: 2.5px solid var(--heading-color);
  border-radius: 3px;
}

.post-preview .post-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: start;
}

.post-preview .post-content h2 {
  margin-top: 0;
}

.post-preview h3 {
  margin: 0 0 var(--spacing-md) 0;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.post-preview h3 a {
  color: var(--heading-color);
  border-bottom: none;
  transition: color var(--transition-medium);
}

.post-preview h3 a:hover {
  color: var(--accent-color);
}

.post-preview .meta {
  font-family: var(--sans-font);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--spacing-md);
}

.post-preview p {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0;
  letter-spacing: 0.01em;
}

/* --- SINGLE POST PAGE --- */
article > header {
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border-light);
}

article > header h1 {
  margin-top: 0;
  margin-bottom: var(--spacing-sm);
  max-width: 100%;
}

article > header .meta {
  font-family: var(--sans-font);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--spacing-md);
}

article > header .meta .author {
  margin-left: var(--spacing-sm);
}

article > header .meta .categories,
article > header .meta .tags {
  display: inline-flex;
  gap: var(--spacing-xs);
  margin-left: var(--spacing-sm);
}

article > header .meta .category,
article > header .meta .tag {
  padding: 0.25rem 0.75rem;
  background: var(--border-light);
  border-radius: 2px;
  font-size: 0.7rem;
}

article > header .meta .tag {
  background: transparent;
  border: 1px solid var(--border-color);
}

article > header .featured-image {
  display: block;
  width: 100%;
  max-width: 1400px;
  height: auto;
  margin: var(--spacing-lg) auto 0 auto;
}

/* --- RATING BADGE (CLINICAL, MINIMAL DESIGN) --- */
/* Inspired by Aesop's thin-line, geometric iconography */
.title-with-badge {
  position: relative;
  padding-right: 120px;
}

.title-with-badge h1 {
  margin-right: 0;
}

.title-with-badge .rating-badge {
  position: absolute;
  top: 0;
  right: 0;
}

.rating-badge {
  flex-shrink: 0;
  width: 90px !important;
  height: 90px !important;
  min-width: 90px !important;
  background: transparent !important;
  color: var(--heading-color) !important;
  border-radius: 50% !important;
  border: 3px solid var(--heading-color) !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--sans-font);
  padding: 0 !important;
  transition: all var(--transition-medium);
}

.rating-badge:hover {
  border-color: var(--accent-color) !important;
  color: var(--accent-color) !important;
}

.rating-badge .rb-score {
  color: inherit !important;
  font-size: 2.25rem !important;
  font-weight: 400 !important;
  line-height: 1;
  letter-spacing: -0.03em;
}

.rating-badge .rb-outof {
  display: none !important;
}

/* --- REVIEW LAYOUTS --- */
/* Clean, product-focused presentation with architectural precision */
.review-layout {
  background: transparent;
  padding: 0;
  margin: var(--spacing-xl) 0;
  border: none;
}

.review-layout h2,
.review-layout h3 {
  font-size: 1.125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--spacing-sm);
}

.review-layout .content {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-color);
}

/* --- DETAILS WITH IMAGE LAYOUT --- */
.details-with-image-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  margin: var(--spacing-lg) 0;
}

.details-section {
  min-width: 0;
}

.details-section h2 {
  margin-top: 0;
}

.details-image {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.details-image img {
  width: 100%;
  height: auto;
  border: 2.5px solid var(--heading-color);
  border-radius: 3px;
}

.details-image .image-caption {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  font-style: italic;
  margin: 0;
  text-align: center;
}

/* --- TABLES (SPECS & RATINGS) --- */
/* Clinical, blueprint-like presentation */
table.specs,
table.ratings {
  width: 100%;
  border-collapse: collapse;
  margin: var(--spacing-lg) 0;
  font-family: var(--sans-font);
  font-size: 0.875rem;
  background: var(--bg-secondary);
}

table.specs th,
table.specs td,
table.ratings th,
table.ratings td {
  padding: var(--spacing-sm) var(--spacing-lg);
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

table.specs th,
table.ratings th {
  font-weight: 600;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--bg-color);
}

table.specs td,
table.ratings td {
  color: var(--text-color);
  font-weight: 400;
  letter-spacing: 0.01em;
  font-size: 0.9375rem;
}

table.ratings tr.overall-rating {
  font-weight: 600;
  border-top: 2px solid var(--border-color);
  background: var(--bg-color);
}

table.ratings tr.overall-rating td {
  font-weight: 600;
  padding-top: var(--spacing-sm);
  color: var(--heading-color);
}

/* --- RATING LISTS --- */
.ratings ul {
  list-style: none;
  padding: 0;
  margin: var(--spacing-lg) 0;
  background: var(--bg-secondary);
}

.ratings ul li {
  display: flex;
  justify-content: space-between;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-bottom: 1px solid var(--border-light);
  font-family: var(--sans-font);
  font-size: 0.9375rem;
}

.ratings ul li.overall-rating {
  font-weight: 600;
  border-top: 2px solid var(--border-color);
  padding-top: var(--spacing-sm);
  margin-top: 0;
  background: var(--bg-color);
}

.ratings ul li strong {
  font-weight: 500;
  color: var(--text-color);
  letter-spacing: 0.01em;
}

.ratings ul li span {
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* --- IMAGE GALLERY --- */
/* Still-life presentation with dramatic spacing */
.image-gallery {
  margin: var(--spacing-xxl) 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

.gallery-item {
  background: transparent;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  transition: transform var(--transition-slow), opacity var(--transition-slow);
  opacity: 1;
}

.gallery-item:hover img {
  transform: scale(1.02);
  opacity: 0.9;
}

.gallery-caption {
  padding: var(--spacing-md) 0;
  font-family: var(--sans-font);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-tertiary);
  text-align: left;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- CONTENT STYLING --- */
/* Generous spacing for contemplative reading */
.content {
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.015em;
}

.content p {
  margin-bottom: var(--spacing-lg);
}

.content ul,
.content ol {
  margin-bottom: var(--spacing-lg);
  padding-left: var(--spacing-lg);
}

.content li {
  margin-bottom: var(--spacing-sm);
  line-height: 1.75;
}

.content blockquote {
  margin: var(--spacing-xl) 0;
  padding-left: var(--spacing-lg);
  border-left: 2px solid var(--heading-color);
  font-style: normal;
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.8;
}

.content code {
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 0.875em;
  background: var(--bg-secondary);
  padding: 0.25em 0.5em;
  border-radius: 0;
  border: 1px solid var(--border-light);
}

.content pre {
  background: var(--bg-secondary);
  padding: var(--spacing-lg);
  overflow-x: auto;
  border-radius: 0;
  border: 1px solid var(--border-color);
  margin: var(--spacing-lg) 0;
}

.content pre code {
  background: none;
  padding: 0;
  border: none;
}

/* --- SHORTCODE IMAGES --- */
/* Museum-quality image presentation */
.shortcode-image {
  max-width: 100%;
  height: auto;
  margin: var(--spacing-xl) 0;
  box-shadow: none;
}

.shortcode-figure {
  margin: var(--spacing-xxl) 0;
  text-align: left;
}

.shortcode-figure figcaption {
  margin-top: var(--spacing-md);
  font-family: var(--sans-font);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-tertiary);
  font-style: normal;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- RESPONSIVE DESIGN --- */
/* Maintaining atmospheric quality across devices */
@media (max-width: 768px) {
  :root {
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 3.5rem;
    --spacing-xxl: 5rem;
  }
  
  body {
    font-size: 15px;
  }
  
  h1 {
    font-size: 2.5rem;
    letter-spacing: -0.02em;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  #site-header,
  main,
  footer {
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
  }
  
  #site-header {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
  }
  
  #site-header nav {
    gap: var(--spacing-md);
  }
  
  article.post-preview {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .post-preview .featured-image-preview {
    height: 300px;
  }
  
  .title-with-badge {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  .rating-badge {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
  }
  
  .rating-badge .rb-score {
    font-size: 1.75rem !important;
  }
  
  table.specs th,
  table.specs td,
  table.ratings th,
  table.ratings td {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.8125rem;
  }
  
  .details-with-image-container {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-item img {
    height: 280px;
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-md: 1.25rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
  }
  
  body {
    font-size: 15px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  #site-header nav {
    font-size: 0.75rem;
    gap: var(--spacing-sm);
  }
  
  #site-header,
  main,
  footer {
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
  }
  
  .post-preview h3 {
    font-size: 1.5rem;
  }
  
  table.specs th,
  table.specs td,
  table.ratings th,
  table.ratings td {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.75rem;
  }
}

/* --- PRINT STYLES --- */
@media print {
  body {
    background: white;
    color: black;
    font-size: 12pt;
  }
  
  #site-header nav,
  footer,
  .search-icon,
  .search-panel,
  .rating-badge {
    display: none;
  }
  
  a {
    color: black;
    text-decoration: none;
    border-bottom: none;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
  
  img {
    max-width: 100%;
    page-break-inside: avoid;
  }
  
  table {
    page-break-inside: avoid;
  }
}
