/* =============================================================
   BREW.CSS — The Brew: India's Finest Origins (Coffee & Tea)
   The Ozasco | Premium Borderless Asymmetric Editorial Layout
   ============================================================= */

#brew {
  background-color: var(--clr-ivory);
  color: var(--clr-espresso);
  padding-block: clamp(5rem, 9vw, 9rem);
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(142, 140, 130, 0.1);
}

/* Background botanical/glow patterns */
#brew::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 90% 30%, rgba(142, 140, 130, 0.04) 0%, transparent 60%),
    radial-gradient(circle at 10% 70%, rgba(17, 17, 17, 0.02) 0%, transparent 60%);
  pointer-events: none;
}

/* ── Header ── */
.brew__header {
  text-align: center;
  margin-bottom: clamp(3rem, 6vw, 5rem);
  position: relative;
  z-index: 1;
}

.brew__header .section-title {
  color: var(--clr-espresso);
}

.brew__header .section-divider {
  margin-inline: auto;
}

.brew__header .section-subtitle {
  margin-inline: auto;
  margin-top: var(--sp-5);
  color: var(--clr-muted);
  text-align: center;
  max-width: 680px;
}

/* ── Brew columns grid ── */
.brew__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--sp-8), 6vw, var(--sp-16));
  position: relative;
  z-index: 1;
}

/* ── Individual column item (formerly cards) ── */
.brew-card {
  background: transparent;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  border: none;
  display: flex;
  flex-direction: column;
  transition: transform var(--ease-base);
}

/* ── Image Wrapper with Asymmetric Offsets ── */
.brew-card__image-wrapper {
  position: relative;
  padding: var(--sp-5);
  display: block;
  overflow: visible;
}

/* Plaster gallery frame underlay */
.brew-card__image-underlay {
  position: absolute;
  background-color: var(--clr-cream);
  border: 1px solid rgba(142, 140, 130, 0.25);
  border-radius: var(--radius-lg);
  z-index: 0;
}

/* Coffee: Top-Right underlay, shifted bottom-left frame */
.brew-card--coffee .brew-card__image-underlay {
  top: 0;
  right: 0;
  width: calc(100% - var(--sp-5));
  height: calc(100% - var(--sp-5));
}

.brew-card--coffee .brew-card__image {
  margin-top: var(--sp-5);
  margin-right: var(--sp-5);
}

/* Tea: Bottom-Left underlay, shifted top-right frame */
.brew-card--tea .brew-card__image-underlay {
  bottom: 0;
  left: 0;
  width: calc(100% - var(--sp-5));
  height: calc(100% - var(--sp-5));
}

.brew-card--tea .brew-card__image {
  margin-bottom: var(--sp-5);
  margin-left: var(--sp-5);
}

/* ── Core image element ── */
.brew-card__image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(142, 140, 130, 0.15);
  z-index: 1;
}

.brew-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-smooth);
}

.brew-card:hover .brew-card__image img {
  transform: scale(1.04);
}

/* Decorative corner accents (fine brass line art) */
.brew-card__image-deco {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 50px;
  height: 50px;
  border-top: 1px solid var(--clr-gold-light);
  border-right: 1px solid var(--clr-gold-light);
  opacity: 0.7;
  z-index: 2;
  transition: transform var(--ease-base);
  pointer-events: none;
}

.brew-card:hover .brew-card__image-deco {
  transform: translate(3px, -3px);
}

.brew-card__image-deco--bottom {
  top: auto;
  right: auto;
  bottom: 6px;
  left: 6px;
  border-top: none;
  border-right: none;
  border-bottom: 1px solid var(--clr-gold-light);
  border-left: 1px solid var(--clr-gold-light);
}

.brew-card:hover .brew-card__image-deco--bottom {
  transform: translate(-3px, 3px);
}

/* Badge overlay (Frosted Plaster/Travertine style) */
.brew-card__badge {
  position: absolute;
  top: var(--sp-5);
  left: var(--sp-5);
  z-index: 3;
  padding: var(--sp-2) var(--sp-4);
  font-family: var(--font-accent);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  background: rgba(250, 248, 245, 0.9);
  color: var(--clr-espresso);
  border: 1px solid rgba(142, 140, 130, 0.25);
  box-shadow: var(--shadow-sm);
}

/* ── Column Body ── */
.brew-card__body {
  padding-inline: 0;
  padding-block: var(--sp-6) 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

/* Category Eyebrow */
.brew-card__category {
  font-family: var(--font-accent);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-gold);
}

/* Title */
.brew-card__title {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--clr-espresso);
  line-height: 1.25;
}

/* Description */
.brew-card__desc {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 300;
  line-height: 1.85;
  color: var(--clr-muted-dark);
}

/* ── Flavor Notes (Pill Tags) ── */
.brew-card__notes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-1);
}

.brew-card__note {
  padding: var(--sp-1.5) var(--sp-4);
  font-family: var(--font-accent);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  background: transparent;
  color: var(--clr-espresso);
  border: 1px solid rgba(142, 140, 130, 0.35);
  transition: 
    background var(--ease-base),
    color var(--ease-base),
    border-color var(--ease-base),
    transform var(--ease-base);
}

.brew-card__note:hover {
  background: var(--clr-espresso);
  color: var(--clr-text-light);
  border-color: var(--clr-espresso);
  transform: translateY(-2px);
}

/* ── Origin Details ── */
.brew-card__origin {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(142, 140, 130, 0.18);
  margin-top: auto;
}

.brew-card__origin-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--clr-gold);
}

.brew-card__origin-icon svg {
  stroke: var(--clr-gold);
}

.brew-card__origin-text {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--clr-muted);
  font-weight: 300;
  font-style: italic;
}

/* ── Sub-section: Tea Varieties (Minimal split list) ── */
.brew__tea-varieties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
  margin-block: var(--sp-2);
}

.brew__tea-variety {
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  transition: none;
}

/* Fine vertical brass line separating columns */
.brew__tea-variety:nth-child(2) {
  border-left: 1px solid rgba(142, 140, 130, 0.25);
  padding-left: var(--sp-6);
}

.brew__tea-variety-name {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--clr-espresso);
  margin-bottom: var(--sp-1);
}

.brew__tea-variety-desc {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--clr-muted-dark);
  font-weight: 300;
  line-height: 1.65;
}

/* ── Vertical Column Stagger (Desktop Only) ── */
@media (min-width: 769px) {
  .brew-card--coffee {
    transform: translateY(0);
  }

  .brew-card--tea {
    transform: translateY(var(--sp-12)); /* Vertical offset stagger */
  }

  .brew-card--coffee:hover {
    transform: translateY(-4px);
  }

  .brew-card--tea:hover {
    transform: translateY(calc(var(--sp-12) - 4px));
  }

  #brew {
    padding-bottom: clamp(6rem, 12vw, 12rem); /* Ensure staggered card clearance */
  }
}

/* ── Responsive Styling ── */
@media (max-width: 900px) {
  .brew__cards {
    gap: var(--sp-8);
  }
}

@media (max-width: 768px) {
  #brew {
    padding-block: var(--sp-12) var(--sp-8);
  }

  .brew__header {
    margin-bottom: var(--sp-8);
  }

  .brew__cards {
    grid-template-columns: 1fr;
    max-width: 540px;
    margin-inline: auto;
    gap: var(--sp-12);
  }

  .brew-card__image-wrapper {
    padding: var(--sp-3);
  }

  /* Reduce offsets on tablet/mobile stacks */
  .brew-card--coffee .brew-card__image-underlay,
  .brew-card--tea .brew-card__image-underlay {
    width: calc(100% - var(--sp-3));
    height: calc(100% - var(--sp-3));
  }

  .brew-card--coffee .brew-card__image {
    margin-top: var(--sp-3);
    margin-right: var(--sp-3);
  }

  .brew-card--tea .brew-card__image {
    margin-bottom: var(--sp-3);
    margin-left: var(--sp-3);
  }

  /* Reset Tea varieties border on single column mobile flow */
  .brew__tea-variety:nth-child(2) {
    border-left: none;
    padding-left: 0;
  }

  .brew__tea-varieties {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }
}

@media (max-width: 600px) {
  #brew {
    padding-block: var(--sp-10) var(--sp-6);
  }
}
