/* ============================================================
   COFFEE TENET — Main Stylesheet
   ============================================================ */

/* ── Variables ── */
:root {
  --espresso:       #000000;
  --espresso-light: #1a1a1a;
  --cream:          #f4ede3;
  --cream-dark:     #e8ddd0;
  --caramel:        #e1bc65;
  --caramel-hover:  #c9a44e;
  --mocha:          #c46a4e;
  --white:          #ffffff;
  --text-dark:      #000000;
  --text-mid:       #3d3530;
  --text-light:     #7a6a5a;
  --border:         #ddd0bf;

  /* Category colors */
  --cat-coffee:     #000000;
  --cat-culinary:   #c46a4e;
  --cat-community:  #9caf88;
  --cat-context:    #e1bc65;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --shadow-sm:  0 1px 4px rgba(0,0,0,.08);
  --shadow-md:  0 4px 20px rgba(0,0,0,.12);
  --shadow-lg:  0 8px 40px rgba(0,0,0,.18);
  --transition: 0.25s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dark);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--espresso);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Layout ── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.btn:hover { transform: translateY(-2px); }

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

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.6);
}
.btn-secondary:hover {
  background: rgba(255,255,255,.1);
  border-color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--caramel);
  border: 2px solid var(--caramel);
}
.btn-outline:hover {
  background: var(--caramel);
  color: var(--white);
}

/* ── Category Tags ── */
.post-category-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
}
.tag--coffee    { background: var(--cat-coffee); }
.tag--culinary  { background: var(--cat-culinary); }
.tag--community { background: var(--cat-community); }
.tag--context   { background: var(--cat-context); }

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--espresso);
  box-shadow: var(--shadow-md);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.01em;
}
.nav-logo-img {
  height: 64px;
  width: auto;
  display: block;
}
.nav-logo:hover { opacity: 0.85; }

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-link {
  color: rgba(244,237,227,.75);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--caramel);
  transition: width var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--cream);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--espresso) 0%, #1a1a1a 45%, #2e2e2e 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}
.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--caramel);
  margin-bottom: 1rem;
}
.hero h1 {
  color: var(--white);
  margin-bottom: 1.25rem;
  font-style: italic;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(244,237,227,.8);
  margin-bottom: 2rem;
  max-width: 540px;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ============================================================
   SECTION SHARED
   ============================================================ */
.section { padding: 5rem 0; }
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--caramel);
  margin-bottom: 0.75rem;
}
.section-title { margin-bottom: 0.75rem; }
.section-subtitle {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto;
}

/* ============================================================
   FOUR C'S — Homepage
   ============================================================ */
.four-cs { background: var(--cream); }

.cs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.cs-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  border-top: 4px solid transparent;
}
.cs-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.cs-card--coffee    { border-color: var(--cat-coffee); }
.cs-card--culinary  { border-color: var(--cat-culinary); }
.cs-card--community { border-color: var(--cat-community); }
.cs-card--context   { border-color: var(--cat-context); }

.cs-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
  display: block;
}
.cs-card h3 { margin-bottom: 0.5rem; }
.cs-card p { color: var(--text-mid); font-size: 0.95rem; }

/* ============================================================
   BLOG CARDS
   ============================================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}
.post-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}
.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.post-card-image {
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--espresso), #3d3530);
  position: relative;
}
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.4;
}
.post-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.post-card-date { font-size: 0.82rem; color: var(--text-light); }
.post-card h3 { margin-bottom: 0.6rem; font-size: 1.2rem; }
.post-card h3 a { transition: color var(--transition); }
.post-card h3 a:hover { color: var(--caramel); }
.post-card-excerpt { color: var(--text-mid); font-size: 0.92rem; flex: 1; }
.post-card-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.read-more {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--caramel);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap var(--transition);
}
.read-more:hover { gap: 0.6rem; }

/* ============================================================
   BLOG LISTING PAGE
   ============================================================ */
.blog-hero {
  background: var(--espresso);
  padding: 4rem 0 3rem;
  text-align: center;
  color: var(--white);
}
.blog-hero h1 { color: var(--white); margin-bottom: 0.5rem; }
.blog-hero p { color: rgba(244,237,227,.7); }

/* Category filter */
.category-filter {
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 68px;
  z-index: 50;
}
.filter-list {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-list::-webkit-scrollbar { display: none; }
.filter-btn {
  padding: 1rem 1.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-light);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
}
.filter-btn:hover { color: var(--espresso); }
.filter-btn.active {
  color: var(--espresso);
  border-bottom-color: var(--caramel);
}

.blog-main { padding: 3rem 0 5rem; }

.post-card[data-category] { transition: opacity 0.2s, display 0.2s; }
.post-card.hidden { display: none; }

/* ============================================================
   INDIVIDUAL POST PAGE
   ============================================================ */
.post-hero {
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(135deg, var(--espresso), #3d3530);
  background-size: cover;
  background-position: center;
  position: relative;
}
.post-hero--no-image { min-height: 280px; }
.post-hero-overlay {
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.4) 60%, transparent 100%);
  width: 100%;
  padding: 3rem 0 2.5rem;
}
.post-hero .post-category-tag { margin-bottom: 1rem; }
.post-hero h1.post-title {
  color: var(--white);
  margin-bottom: 0.75rem;
}
.post-hero .post-meta { color: rgba(244,237,227,.7); font-size: 0.9rem; }

.post-body { padding: 3rem 0 2rem; }
.post-content {
  max-width: 720px;
  margin: 0 auto;
}
.post-content h2,
.post-content h3 { margin: 2rem 0 1rem; }
.post-content p { margin-bottom: 1.25rem; color: var(--text-mid); }
.post-content ul, .post-content ol { margin: 1rem 0 1.25rem 1.5rem; }
.post-content li { margin-bottom: 0.5rem; color: var(--text-mid); }
.post-content blockquote {
  border-left: 4px solid var(--caramel);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--cream);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--mocha);
}
.post-content img {
  border-radius: var(--radius-md);
  margin: 1.5rem auto;
}
.post-content a { text-decoration: underline; }

.post-footer {
  max-width: 720px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.post-tags { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; color: var(--text-light); }

/* Comments */
.comments-section {
  max-width: 720px;
  padding-top: 3rem;
  padding-bottom: 4rem;
}
.comments-section h3 { margin-bottom: 1.5rem; }

/* ============================================================
   ABOUT PAGE — FOUR C'S PHOTO PANELS
   ============================================================ */
.four-cs-panels {
  display: flex;
  flex-direction: column;
}

.cs-panel {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  /* Fallback color when image is missing */
  background-color: var(--espresso);
}

.cs-panel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.78) 0%,
    rgba(0,0,0,0.55) 50%,
    rgba(0,0,0,0.15) 100%
  );
}

.cs-panel--right .cs-panel-overlay {
  background: linear-gradient(
    to left,
    rgba(0,0,0,0.78) 0%,
    rgba(0,0,0,0.55) 50%,
    rgba(0,0,0,0.15) 100%
  );
}

.cs-panel-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  display: flex;
}

.cs-panel--right .cs-panel-content {
  justify-content: flex-end;
}

.cs-panel-inner {
  max-width: 520px;
}

.cs-panel .cs-detail-number {
  font-family: var(--font-heading);
  font-size: 5rem;
  font-weight: 700;
  color: var(--caramel);
  opacity: 0.4;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.cs-panel .cs-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--caramel);
  margin-bottom: 0.75rem;
}

.cs-panel h2 {
  color: var(--white);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.25rem;
}

.cs-panel p {
  color: rgba(255,255,255,0.82);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .cs-panel { background-attachment: scroll; min-height: 80vh; }
  .cs-panel-overlay,
  .cs-panel--right .cs-panel-overlay {
    background: rgba(0,0,0,0.65);
  }
  .cs-panel--right .cs-panel-content { justify-content: flex-start; }
  .cs-panel-inner { max-width: 100%; }
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-hero {
  background: linear-gradient(135deg, var(--espresso) 0%, #1a1a1a 100%);
  padding: 5rem 0;
  text-align: center;
}
.about-hero h1 { color: var(--white); font-style: italic; margin-bottom: 1rem; }
.about-hero p { color: rgba(244,237,227,.8); max-width: 560px; margin: 0 auto; font-size: 1.1rem; }

.about-intro { padding: 5rem 0; }
.about-intro-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}
.about-intro-inner p { font-size: 1.1rem; color: var(--text-mid); }

.four-cs-detail { background: var(--cream); padding: 5rem 0; }
.cs-detail-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}
.cs-detail-item:last-child { border-bottom: none; }
.cs-detail-item.reverse { direction: rtl; }
.cs-detail-item.reverse > * { direction: ltr; }

.cs-detail-number {
  font-family: var(--font-heading);
  font-size: 5rem;
  font-weight: 700;
  color: var(--caramel);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.cs-detail-text .cs-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--caramel);
  margin-bottom: 0.5rem;
}
.cs-detail-text h2 { margin-bottom: 1rem; }
.cs-detail-text p { color: var(--text-mid); }
.cs-detail-visual {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  font-size: 6rem;
  box-shadow: var(--shadow-md);
}
.cs-detail-visual svg {
  width: 100%;
  max-width: 320px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* ============================================================
   SHOP PAGE
   ============================================================ */
.shop-hero {
  background: linear-gradient(135deg, var(--espresso) 0%, #1a1a1a 100%);
  padding: 5rem 0;
  text-align: center;
}
.shop-hero h1 { color: var(--white); margin-bottom: 1rem; }
.shop-hero p { color: rgba(244,237,227,.8); max-width: 500px; margin: 0 auto 2rem; font-size: 1.1rem; }

.shop-categories { padding: 5rem 0; }
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.category-card {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  border: 1px solid var(--border);
}
.category-card-icon { font-size: 3rem; margin-bottom: 1rem; display: block; }
.category-card h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.category-card p { font-size: 0.9rem; color: var(--text-light); }

.shop-notify { background: var(--cream); padding: 5rem 0; }
.notify-inner {
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
}
.notify-inner h2 { margin-bottom: 1rem; }
.notify-inner p { color: var(--text-mid); margin-bottom: 2rem; }
.notify-form {
  display: flex;
  gap: 0.5rem;
  max-width: 440px;
  margin: 0 auto;
}
.notify-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  outline: none;
  transition: border-color var(--transition);
}
.notify-form input:focus { border-color: var(--caramel); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--espresso);
  color: rgba(244,237,227,.7);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(244,237,227,.1);
}
.footer-logo {
  margin-bottom: 1rem;
}
.footer-logo-img {
  height: 80px;
  width: auto;
  display: block;
}
.footer-brand p { font-size: 0.9rem; line-height: 1.6; max-width: 260px; }
.footer-nav h4,
.footer-categories h4,
.footer-social h4 {
  color: var(--cream);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-family: var(--font-body);
}
.footer-nav ul li,
.footer-categories ul li { margin-bottom: 0.5rem; }
.footer-nav a,
.footer-categories a {
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-nav a:hover,
.footer-categories a:hover { color: var(--caramel); }

.social-links { display: flex; gap: 0.75rem; }
.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(244,237,227,.1);
  color: rgba(244,237,227,.75);
  transition: background var(--transition), color var(--transition);
}
.social-links a:hover {
  background: var(--caramel);
  color: var(--white);
}

.footer-bottom {
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.82rem;
}

/* ============================================================
   HOMEPAGE — LATEST POSTS SECTION
   ============================================================ */
.latest-posts { padding: 5rem 0; }
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
}

/* ============================================================
   HOMEPAGE — SHOP TEASER
   ============================================================ */
.shop-teaser {
  background: linear-gradient(135deg, #1a1a1a, var(--espresso));
  padding: 5rem 0;
  text-align: center;
  color: var(--white);
}
.shop-teaser h2 { color: var(--white); margin-bottom: 1rem; }
.shop-teaser p { color: rgba(244,237,227,.75); max-width: 480px; margin: 0 auto 2rem; }
.coming-soon-badge {
  display: inline-block;
  background: var(--caramel);
  color: var(--white);
  padding: 0.3rem 1rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--espresso-light);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-link {
    padding: 0.85rem 2rem;
    width: 100%;
  }
  .nav-link::after { display: none; }

  .hero { min-height: 80vh; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { text-align: center; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .cs-detail-item { grid-template-columns: 1fr; gap: 2rem; }
  .cs-detail-item.reverse { direction: ltr; }
  .cs-detail-visual { display: none; }

  .notify-form { flex-direction: column; }
  .section-header-row { flex-direction: column; align-items: flex-start; gap: 1rem; }

  .post-footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
}
