/* ==========================================================================
   MOD / VISUAL BENTO SOLUTIONS + APPLE SEGMENTED FILTER + 3D TILT CARDS
   ========================================================================== */

.section-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-5);
  margin-bottom: var(--sp-8);
}
.section-bar .section-header { margin-bottom: 0; }

/* Apple Segmented Control (100% Unified Light Minimalism) */
.segmented-control {
  position: relative;
  display: inline-flex;
  padding: var(--sp-1);
  border-radius: var(--radius-pill);
  background: rgba(25, 25, 24, 0.055);
  border: 1px solid var(--border-subtle);
  gap: var(--sp-1);
}

.seg-btn {
  position: relative;
  z-index: 1;
  min-height: 38px;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.22s ease, box-shadow 0.22s ease;
}

.seg-btn.active {
  background: var(--p-white);
  color: var(--ink-primary);
  box-shadow: var(--shadow-xs);
}

/* Visual 3D Bento Grid (12-col PC · 2-col iPad · Swipe/Stack Mobile) */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--sp-5);
}

.bento-card {
  position: relative;
  isolation: isolate;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.32s var(--ease-apple), box-shadow 0.32s var(--ease-apple), border-color 0.22s ease;
}

/* Safe padding fallback if a Bento card has no .bento-body wrapper */
.bento-card:not(:has(.bento-body)) {
  padding: var(--sp-8);
  justify-content: space-between;
  gap: var(--sp-5);
}

.bento-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); z-index: 2; }
.bento-card.hidden { display: none; }

.bento-span-6 { grid-column: span 6; }
.bento-span-4 { grid-column: span 4; }
.bento-span-12 {
  grid-column: span 12;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-8);
  gap: var(--sp-6);
  background: linear-gradient(135deg, var(--p-white) 0%, #F7F3EA 100%);
}

.bento-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-linen);
  border-bottom: 1px solid var(--border-subtle);
}
/* Specular sheen applied ONLY to the photo layer — never covering text */
.bento-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    320px circle at var(--glare-x, 50%) var(--glare-y, 20%),
    rgba(255, 255, 255, 0.34),
    rgba(217, 119, 87, 0.06) 45%,
    transparent 75%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
}
.bento-card.is-tilting .bento-visual::after { opacity: 1; }
.bento-span-4 .bento-visual { aspect-ratio: 16 / 10; }
.bento-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-apple);
}
.bento-card:hover .bento-visual img { transform: scale(1.04); }

.bento-body {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  gap: var(--sp-4);
}
.bento-span-6 .bento-body { padding: var(--sp-6) var(--sp-8) var(--sp-6); }

.bento-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-clay);
  margin-bottom: var(--sp-2);
}

.bento-card h3 {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.28;
  margin: 0 0 var(--sp-2);
  color: var(--ink-primary);
}
.bento-span-6 h3 { font-size: 24px; }

.bento-card p { font-size: 14.5px; line-height: 1.62; color: var(--ink-secondary); margin: 0; }

.bento-bullets {
  list-style: none; padding: 0; margin: var(--sp-3) 0 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.bento-bullets li {
  font-size: 12px; padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--bg-paper); border: 1px solid var(--border-subtle); color: var(--ink-secondary);
}

.bento-footer {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding-top: var(--sp-4); border-top: 1px solid var(--border-subtle);
}
.bento-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 500; color: var(--ink-primary);
  background: none; border: none; padding: 0; cursor: pointer;
}
.bento-link:hover { color: var(--accent-clay); }
.bento-ext { font-size: 13px; color: var(--ink-muted); }
.bento-ext:hover { color: var(--ink-primary); }

/* iPad (2-col balanced; last odd card spans full width) */
@media (max-width: 1119px) {
  .bento-span-6, .bento-span-4 { grid-column: span 6; }
  .bento-span-12 { flex-direction: column; align-items: flex-start; padding: var(--sp-6); }
}

/* Mobile (clean single column + full-bleed visuals) */
@media (max-width: 680px) {
  .segmented-control { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .segmented-control::-webkit-scrollbar { display: none; }
  .bento-span-6, .bento-span-4 { grid-column: span 12; }
  .bento-span-6 .bento-body, .bento-body { padding: var(--sp-5); }
}
