/* ============================================
   Ember Roast — Styles
   Verve meets Patagonia. Warm, Earthy, Premium.
   ============================================ */

:root {
  /* Palette */
  --c-espresso: #2C241B;
  --c-crema: #E8DCCA;
  --c-rust: #BC5D2E;
  --c-sage: #8FA89B;
  --c-clay: #D6A692;
  --c-forest: #3A4D3F;
  --c-paper: #F9F5F1;
  --c-stone: #9C9288;
  
  /* Fonts */
  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;
  
  /* Spacing */
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 80px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--c-paper);
  color: var(--c-espresso);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* === Components === */
.btn {
  display: inline-block;
  padding: 16px 32px;
  border-radius: 50px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s, background-color 0.2s;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--c-rust);
  color: var(--c-paper);
  border: none;
}

.btn-primary:hover {
  background-color: #A34E24; /* Darker rust */
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--c-espresso);
  border: 1px solid var(--c-espresso);
}

.btn-secondary:hover {
  background-color: var(--c-espresso);
  color: var(--c-paper);
}

/* === Header === */
.announcement-bar {
  background-color: var(--c-forest);
  color: var(--c-paper);
  text-align: center;
  font-size: 13px;
  padding: 8px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav {
  padding: 24px 0;
  position: sticky;
  top: 0;
  background-color: var(--c-paper);
  z-index: 100;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--c-espresso);
  text-decoration: none;
}

.nav-links a {
  margin-right: 24px;
  color: var(--c-espresso);
  text-decoration: none;
  font-weight: 500;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-actions a {
  color: var(--c-espresso);
  text-decoration: none;
}

.cart-btn {
  background: none;
  border: 1px solid var(--c-stone);
  padding: 8px 16px;
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--font-body);
}

/* === Hero === */
.hero {
  position: relative;
  height: 80vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--c-crema); /* Fallback */
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?w=1920&q=80') center/cover no-repeat;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(44, 36, 27, 0.3), rgba(44, 36, 27, 0.6));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-label {
  display: inline-block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  color: var(--c-espresso);
  opacity: 0.8;
}

.hero-title {
  font-size: clamp(48px, 6vw, 80px);
  margin-bottom: 24px;
  color: var(--c-espresso);
}

.hero-subtitle {
  font-size: 18px;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* === Section === */
.section {
  padding: var(--space-xl) 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
}

.section-title {
  font-size: 32px;
}

.text-link {
  color: var(--c-rust);
  text-decoration: none;
  font-weight: 500;
}

/* === Product Grid === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.product-card {
  display: flex;
  flex-direction: column;
}

.product-image {
  background-color: var(--c-crema);
  background-size: cover;
  background-position: center;
  aspect-ratio: 1;
  border-radius: 16px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.product-card:nth-child(1) .product-image {
  background-image: url('https://images.unsplash.com/photo-1559496417-e7f25cb247f3?w=600&q=80');
}

.product-card:nth-child(2) .product-image {
  background-image: url('https://images.unsplash.com/photo-1514432324607-a09d9b4aefdd?w=600&q=80');
}

.product-card:nth-child(3) .product-image {
  background-image: url('https://images.unsplash.com/photo-1504630083234-14187a9df0f5?w=600&q=80');
}

.roast-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  background-color: rgba(255,255,255,0.9);
}

.product-title {
  font-size: 20px;
  margin-bottom: 4px;
}

.product-notes {
  color: var(--c-stone);
  font-size: 14px;
  margin-bottom: 12px;
}

.product-price {
  font-weight: 600;
  margin-bottom: 16px;
}

.btn-add {
  width: 100%;
  padding: 12px;
  background-color: transparent;
  border: 1px solid var(--c-stone);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add:hover {
  border-color: var(--c-espresso);
  background-color: var(--c-espresso);
  color: var(--c-paper);
}

/* === Subscription / Split === */
.bg-crema {
  background-color: var(--c-crema);
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.split-image {
  background: url('https://images.unsplash.com/photo-1511920170033-f8396924c348?w=800&q=80') center/cover no-repeat;
  aspect-ratio: 4/5;
  border-radius: 24px;
}

.section-body {
  margin-bottom: 24px;
  font-size: 18px;
}

.benefit-list {
  list-style: none;
  margin-bottom: 32px;
}

.benefit-list li {
  margin-bottom: 12px;
  font-weight: 500;
}

/* === Footer === */
.footer {
  background-color: var(--c-espresso);
  color: var(--c-paper);
  padding: 80px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  display: block;
  margin-bottom: 16px;
}

.footer-col h4 {
  font-family: var(--font-body);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
  color: var(--c-stone);
}

.footer-col a {
  display: block;
  color: var(--c-paper);
  text-decoration: none;
  margin-bottom: 12px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.footer-col a:hover {
  opacity: 1;
}

.newsletter-form {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.newsletter-form input {
  flex: 1;
  background: transparent;
  border: 1px solid var(--c-stone);
  border-radius: 4px;
  padding: 8px 12px;
  color: var(--c-paper);
}

.newsletter-form button {
  background: var(--c-rust);
  border: none;
  color: #fff;
  padding: 0 16px;
  border-radius: 4px;
  cursor: pointer;
}

/* === Responsive === */
@media (max-width: 768px) {
  .desktop-only { display: none; }
  .split-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-title { font-size: 48px; }
}
